:root {
  --bg: #f5f7fb;
  --surface: #ffffff;
  --surface-soft: #f8fafc;
  --ink: #101828;
  --muted: #667085;
  --line: #e4e7ec;
  --primary: #2563eb;
  --primary-strong: #1d4ed8;
  --primary-soft: #eff6ff;
  --success: #079455;
  --warning: #dc6803;
  --danger: #d92d20;
  --shadow: 0 16px 40px rgba(16, 24, 40, .08);
  --ease-soft: cubic-bezier(.2, .8, .2, 1);
  --ease-ui: cubic-bezier(.22, .61, .36, 1);
  --font-rounded: "YouYuan", "骞煎渾", "Microsoft YaHei UI", "Microsoft YaHei", "HarmonyOS Sans SC", "MiSans", "PingFang SC", "Segoe UI", Arial, sans-serif;
}

* { box-sizing: border-box; }
html { color-scheme: light; }
body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background: var(--bg);
  font-family: var(--font-rounded);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
button, input, select, textarea { font: inherit; }
button {
  border: 1px solid var(--line);
  background: var(--surface);
  color: #344054;
  border-radius: 8px;
  min-height: 38px;
  padding: 0 14px;
  cursor: pointer;
  transition: border-color .22s var(--ease-ui), box-shadow .22s var(--ease-ui), background .22s var(--ease-ui), color .22s var(--ease-ui), transform .18s var(--ease-soft);
}
button:hover {
  border-color: #b2c6ff;
  box-shadow: 0 1px 2px rgba(16, 24, 40, .06);
}
button:active { transform: translateY(.5px) scale(.995); }
button:disabled {
  cursor: wait;
  opacity: .72;
  transform: none;
  box-shadow: none;
}
.primary {
  border-color: var(--primary);
  background: var(--primary);
  color: #fff;
}
.primary:hover {
  border-color: var(--primary-strong);
  background: var(--primary-strong);
}
.download-list-btn {
  border-color: #ea580c;
  background: #f97316;
  color: #fff;
  font-weight: 900;
}
.download-list-btn:hover {
  border-color: #c2410c;
  background: #ea580c;
  color: #fff;
}
.notice-btn {
  border-color: var(--danger);
  background: #fff5f5;
  color: var(--danger);
  font-weight: 800;
}
.notice-btn:hover {
  border-color: #b42318;
  background: #fee4e2;
  color: #b42318;
}
.small-confirm-btn {
  min-height: 32px;
  height: 32px;
  padding: 0 10px;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 800;
}
.filter-mini-btn {
  width: 72px;
  min-width: 72px;
  max-width: 72px;
  min-height: 38px;
  height: 38px;
  padding: 0 12px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 900;
  flex: 0 0 72px;
}
.filter-mini-btn.price-pending-filter-btn {
  width: 118px;
  min-width: 118px;
  max-width: 118px;
  border-color: #f59e0b;
  background: #fff7ed;
  color: #b45309;
  flex-basis: 118px;
}
.filter-mini-btn.price-pending-filter-btn.active {
  border-color: #d97706;
  background: #f59e0b;
  color: #fff;
}
.inventory-month-tabs .inventory-price-pending-inline {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 110px;
  min-width: 110px;
  max-width: 110px;
  height: 30px;
  min-height: 30px;
  margin-left: auto;
  margin-right: 18%;
  padding: 0 8px;
  border-radius: 8px;
  font-size: 12px;
  line-height: 1;
}
.filter-button-pair {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  align-self: end;
}
.job-filter-confirm {
  width: 72px;
  min-width: 72px;
  max-width: 72px;
  min-height: 38px;
  height: 38px;
  padding: 0 12px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 900;
}
.job-filter-clear {
  width: 72px;
  min-width: 72px;
  max-width: 72px;
  min-height: 38px;
  height: 38px;
  padding: 0 12px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 900;
}
.ghost {
  background: transparent;
  color: #475467;
  border-color: var(--line);
}
.install-app-btn {
  border-color: #14b8a6;
  background: #ecfdf5;
  color: #047857;
  font-weight: 950;
}
.install-app-btn:hover {
  border-color: #0f766e;
  background: #ccfbf1;
  color: #0f766e;
}
.desktop-notifier-btn {
  border-color: #2563eb;
  background: #2563eb;
  color: #ffffff;
  font-weight: 950;
}
.desktop-notifier-btn:hover {
  border-color: #1d4ed8;
  background: #1d4ed8;
  color: #ffffff;
}
.login-form .install-app-btn {
  min-height: 42px;
  border-radius: 10px;
  background: #f0fdfa;
}
html:not(.tablet-install-allowed) .install-app-btn {
  display: none !important;
}
html.tablet-install-allowed .install-app-btn {
  display: inline-flex !important;
}
.login-form .install-app-btn {
  justify-content: center;
}
.install-guide {
  display: grid;
  gap: 12px;
}
.install-guide-card {
  padding: 14px;
  border: 1px solid #dbeafe;
  border-radius: 8px;
  background: #f8fbff;
}
.install-guide-card strong {
  display: block;
  margin-bottom: 8px;
  color: #101828;
}
.install-guide-card p {
  margin: 0;
  color: #475467;
  line-height: 1.7;
  font-weight: 800;
}
.hidden { display: none !important; }
body.auth-loading #loginView,
body.auth-loading #appView,
body.auth-login #bootScreen,
body.auth-login #appView,
body.auth-app #bootScreen,
body.auth-app #loginView {
  display: none !important;
}
body.auth-loading #bootScreen,
body.auth-login #loginView {
  display: grid !important;
}
body.auth-loading .custom-select-menu,
body.auth-loading .custom-select-menu-floating,
body.auth-login .custom-select-menu,
body.auth-login .custom-select-menu-floating {
  display: none !important;
}
body.auth-app #appView {
  display: grid !important;
}
body.auth-loading .boot-card {
  animation: shellFadeLift .34s var(--ease-soft) both;
}
body.auth-login .login-form {
  animation: shellFadeLift .38s var(--ease-soft) both;
}
body.auth-app .app-shell {
  animation: appSoftIn .32s var(--ease-soft) both;
}
@keyframes shellFadeLift {
  from {
    opacity: 0;
    transform: translateY(10px) scale(.985);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}
@keyframes appSoftIn {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
.muted, .hint { color: var(--muted); }
.hint { margin: 0; font-size: 13px; }
.eyebrow {
  margin: 0 0 12px;
  color: var(--primary);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.login-shell {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
  color: #0f172a;
  font-family: "Microsoft YaHei UI", "Microsoft YaHei", "PingFang SC", "Segoe UI", Arial, sans-serif;
  background:
    radial-gradient(circle at 50% 18%, rgba(37,99,235,.06), transparent 35%),
    linear-gradient(135deg, #ffffff, #f7f9fc);
}
.login-stage {
  display: grid;
  justify-items: center;
  gap: 16px;
  width: min(620px, 100%);
}
.login-filing {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px;
  width: fit-content;
  max-width: 100%;
  color: #64748b;
  font-size: 12px;
  line-height: 1.5;
  text-align: center;
}
.login-filing a {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: #64748b;
  text-decoration: none;
}
.login-filing a:hover,
.login-filing a:focus-visible {
  color: #2563eb;
  text-decoration: underline;
}
.login-filing img {
  width: 16px;
  height: 17px;
  flex: 0 0 auto;
  object-fit: contain;
}
.login-filing-separator {
  color: #cbd5e1;
}
@media (max-width: 520px) {
  .login-filing {
    gap: 4px;
  }
  .login-filing a {
    width: 100%;
    justify-content: center;
  }
  .login-filing-separator {
    display: none;
  }
}
.boot-screen {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
  background: linear-gradient(135deg, #ffffff, #f5f7fb);
}
.boot-card {
  display: grid;
  justify-items: center;
  gap: 14px;
  width: min(360px, 100%);
  padding: 34px 28px;
  border: 1px solid #e6edf5;
  border-radius: 10px;
  background: rgba(255,255,255,.96);
  box-shadow: var(--shadow);
  text-align: center;
  font-weight: 900;
}
.boot-spinner {
  width: 36px;
  height: 36px;
  border: 4px solid #dbeafe;
  border-top-color: var(--primary);
  border-radius: 999px;
  animation: bootSpin .95s linear infinite;
}
.boot-card small {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}
@keyframes bootSpin {
  to { transform: rotate(360deg); }
}
.login-form {
  width: min(460px, 100%);
  align-content: center;
  gap: 16px;
  padding: 36px 34px;
  border: 1px solid #d9e2ee;
  border-radius: 14px;
  background: #ffffff;
  box-shadow: 0 18px 44px rgba(15, 23, 42, .10);
  backdrop-filter: none;
}
.login-form h1 {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin: 0 0 4px;
  color: #0f172a;
  font-size: 30px;
  line-height: 1.2;
  letter-spacing: 0;
  font-weight: 900;
  text-rendering: geometricPrecision;
}
.app-version {
  color: #64748b;
  font-size: 12px;
  font-weight: 800;
  margin-left: 6px;
  white-space: nowrap;
  vertical-align: baseline;
}
.login-form h1 .app-version {
  font-size: 13px;
}
.app-version.is-updating {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.app-version.is-updating::after {
  content: "";
  width: 12px;
  height: 12px;
  border: 2px solid #cbd5e1;
  border-top-color: #2563eb;
  border-radius: 999px;
  animation: loginSpin .9s linear infinite;
}
.login-form label {
  display: grid;
  gap: 7px;
  color: #344054;
  font-size: 14px;
  font-weight: 900;
}
.login-form input,
.login-form select {
  min-height: 46px;
  border-color: #b8c4d4;
  border-radius: 10px;
  color: #0f172a;
  font-size: 15px;
}
.login-form .primary {
  min-height: 46px;
  border-radius: 10px;
  font-size: 16px;
  font-weight: 900;
}
.login-form.is-submitting button[type="submit"],
.login-form.is-updating button[type="submit"] {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}
.login-form.is-submitting button[type="submit"]::before,
.login-form.is-updating button[type="submit"]::before {
  content: "";
  width: 15px;
  height: 15px;
  border: 2px solid rgba(255,255,255,.55);
  border-top-color: #fff;
  border-radius: 999px;
  animation: loginSpin .92s linear infinite;
}
@keyframes loginSpin {
  to { transform: rotate(360deg); }
}
.login-loading-status {
  min-height: 18px;
  color: #475467;
  font-size: 13px;
  font-weight: 850;
  text-align: center;
}
.login-form:not(.is-submitting):not(.is-updating) .login-loading-status {
  color: transparent;
}
.login-account-field {
  position: relative;
}
.login-account-wrap {
  position: relative;
  display: block;
}
.login-account-wrap.has-saved-logins {
  display: block;
}
.login-account-wrap.has-saved-logins input {
  padding-right: 48px;
  border-radius: 10px;
}
.saved-login-toggle {
  position: absolute;
  right: 7px;
  top: 50%;
  width: 32px;
  min-width: 32px;
  min-height: 32px;
  height: 32px;
  padding: 0;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #475467;
  font-size: 13px;
  transform: translateY(-50%);
  box-shadow: none;
}
.saved-login-toggle:hover {
  background: #f1f5f9;
  border-color: transparent;
  box-shadow: none;
}
.saved-login-toggle:active {
  transform: translateY(-50%);
}
.saved-login-dropdown {
  position: absolute;
  z-index: 90;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  display: grid;
  gap: 4px;
  max-height: 220px;
  overflow: auto;
  padding: 6px;
  border: 1px solid #d0d5dd;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 12px 28px rgba(16, 24, 40, .14);
  transform-origin: top center;
  animation: dropdownSoftIn .24s var(--ease-soft) both;
}
.saved-login-option {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 28px;
  gap: 6px;
  align-items: center;
  min-height: 36px;
  padding: 4px 4px 4px 10px;
  border-radius: 6px;
  color: #344054;
  font-weight: 800;
  transition: background .18s var(--ease-ui), color .18s var(--ease-ui), transform .18s var(--ease-soft);
}
.saved-login-option:hover {
  background: #eff6ff;
  transform: translateX(2px);
}
.saved-login-option small {
  display: block;
  margin-top: 2px;
  color: #667085;
  font-size: 11px;
  font-weight: 700;
}
.saved-login-name {
  min-width: 0;
  cursor: pointer;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.saved-login-remove {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  min-height: 28px;
  padding: 0;
  border-color: transparent;
  background: transparent;
  color: #98a2b3;
  font-size: 20px;
  line-height: 1;
}
.saved-login-remove:hover {
  border-color: #fecaca;
  background: #fef2f2;
  color: #d92d20;
}
.form-grid { display: grid; gap: 14px; align-content: start; }
label {
  display: grid;
  gap: 7px;
  color: #344054;
  font-size: 14px;
  font-weight: 600;
}
.field-title {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.required-mark {
  color: var(--danger);
  font-size: 15px;
  line-height: 1;
}
.required-field input,
.required-field select,
.required-field textarea {
  border-color: #d0d5dd;
  background: #fff;
}
.required-field input:invalid,
.required-field select:invalid,
.required-field textarea:invalid {
  border-color: rgba(217, 45, 32, .72);
  background: #fffafa;
}
.required-field input:invalid:focus,
.required-field select:invalid:focus,
.required-field textarea:invalid:focus {
  border-color: var(--danger);
  box-shadow: 0 0 0 4px rgba(217, 45, 32, .12);
}
.shipping-method-select:invalid {
  color: #98a2b3;
}
.shipping-method-select option {
  color: #101828;
}
.shipping-method-select option:disabled {
  color: #98a2b3;
}
.compact-required {
  gap: 4px;
  font-size: 12px;
}
input, select, textarea {
  width: 100%;
  border: 1px solid #d0d5dd;
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  min-height: 40px;
  padding: 8px 11px;
  outline: none;
  transition: border-color .22s var(--ease-ui), box-shadow .22s var(--ease-ui), background .22s var(--ease-ui);
}
input:focus, select:focus, textarea:focus {
  border-color: #84adff;
  box-shadow: 0 0 0 4px rgba(37, 99, 235, .12);
}
select:hover {
  border-color: #bfdbfe;
  background-color: #f8fbff;
}
textarea { min-height: 88px; resize: vertical; }
.custom-select-shell {
  position: relative;
  display: block;
  width: 100%;
  min-width: 0;
}
.custom-select-native {
  position: absolute !important;
  inset: auto auto 0 0 !important;
  width: 1px !important;
  height: 1px !important;
  min-height: 1px !important;
  padding: 0 !important;
  border: 0 !important;
  opacity: 0 !important;
  pointer-events: none !important;
}
.custom-select-trigger {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  width: 100%;
  min-height: 40px;
  padding: 8px 11px;
  border: 1px solid #d0d5dd;
  border-radius: 8px;
  background: #fff;
  color: #101828;
  text-align: left;
  font-weight: 850;
}
.custom-select-trigger:hover {
  border-color: #bfdbfe;
  background: #f8fbff;
}
.custom-select-trigger.custom-select-required-missing {
  border-color: rgba(217, 45, 32, .72);
  background: #fffafa;
}
.custom-select-trigger.custom-select-required-missing:hover,
.custom-select-shell.open .custom-select-trigger.custom-select-required-missing {
  border-color: var(--danger);
  box-shadow: 0 0 0 4px rgba(217, 45, 32, .12);
}
.custom-select-trigger.custom-select-required-missing .custom-select-value,
.custom-select-trigger.is-placeholder .custom-select-value {
  color: #98a2b3;
}
.custom-select-trigger:disabled {
  cursor: not-allowed;
  opacity: .7;
}
.custom-select-value {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.custom-select-arrow {
  flex: 0 0 auto;
  color: #667085;
  transition: transform .22s var(--ease-soft);
}
.custom-select-shell.open .custom-select-arrow {
  transform: rotate(180deg);
}
.custom-select-menu {
  position: absolute;
  z-index: 1200;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  display: none;
  gap: 4px;
  max-height: 260px;
  overflow: auto;
  overscroll-behavior: contain;
  touch-action: pan-y;
  -webkit-overflow-scrolling: touch;
  padding: 7px;
  border: 1px solid #dbe4f0;
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 16px 36px rgba(16, 24, 40, .16);
  transform-origin: top center;
}
.custom-select-shell.open .custom-select-menu {
  display: grid;
  animation: dropdownSoftIn .24s var(--ease-soft) both;
}
.custom-select-option {
  justify-content: flex-start;
  min-height: 32px;
  padding: 6px 9px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #111827;
  text-align: left;
  font-size: 13px;
  font-weight: 900;
  box-shadow: none;
  touch-action: pan-y;
}
.custom-select-option:hover {
  background: #eff6ff;
  color: #1d4ed8;
}
.custom-select-option.selected {
  background: #dbeafe;
  color: #1d4ed8;
}
.custom-select-option.custom-select-option-danger {
  color: #dc2626;
  background: #fff1f2;
  font-weight: 950;
}
.custom-select-option.custom-select-option-danger:hover,
.custom-select-option.custom-select-option-danger.selected {
  color: #b91c1c;
  background: #ffe4e6;
}
.custom-select-trigger.custom-select-danger .custom-select-value {
  color: #dc2626;
  font-weight: 950;
}
.custom-select-option:disabled {
  color: #98a2b3;
  background: #f8fafc;
}
.custom-select-menu-floating {
  position: fixed !important;
  right: auto !important;
  display: grid !important;
  z-index: 99999 !important;
  background: #fff !important;
  transform: none !important;
  filter: none !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  contain: paint;
}
.custom-select-menu-floating.custom-select-menu-in-dialog {
  z-index: 2147483647 !important;
  contain: none !important;
}
.field-invalid {
  border-color: #f04438 !important;
  background: #fff5f5 !important;
  box-shadow: 0 0 0 3px rgba(240, 68, 56, .12) !important;
}
.custom-select-status {
  width: 112px;
  flex: 0 0 auto;
}
.custom-select-compact .custom-select-trigger,
.custom-select-status .custom-select-trigger {
  min-height: 30px;
  padding: 5px 8px;
  font-size: 13px;
}
.custom-select-compact .custom-select-option,
.custom-select-status .custom-select-option {
  min-height: 28px;
  padding: 5px 8px;
  font-size: 12px;
}
.custom-select-table .custom-select-trigger {
  min-height: 34px;
}
.check-line {
  display: flex;
  grid-template-columns: none;
  align-items: center;
  gap: 8px;
  font-size: 13px;
}
.check-line input {
  width: 16px;
  min-height: 16px;
  height: 16px;
  padding: 0;
}

.app-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 248px 1fr;
}
.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
  gap: 20px;
  padding: 20px 16px;
  background: rgba(255,255,255,.92);
  border-right: 1px solid var(--line);
  backdrop-filter: blur(16px);
}
.brand {
  display: flex;
  gap: 12px;
  align-items: center;
  min-height: 50px;
  padding: 0 6px;
}
.brand-mark {
  display: block;
  width: 44px;
  height: 44px;
  min-width: 44px;
  aspect-ratio: 1 / 1;
  border-radius: 8px;
  object-fit: contain;
  object-position: center;
  transform: none;
}
.brand strong {
  display: inline-flex;
  align-items: baseline;
  gap: 6px;
  font-size: 15px;
  white-space: nowrap;
}
.brand .app-version {
  font-size: 11px;
  margin-left: 0;
}
.brand small { display: block; color: var(--muted); margin-top: 3px; }
nav { display: grid; gap: 6px; }
nav button {
  justify-content: flex-start;
  text-align: left;
  background: transparent;
  color: #475467;
  border-color: transparent;
  min-height: 46px;
  font-size: 16px;
  line-height: 1.25;
  font-weight: 700;
}
nav button.active {
  background: var(--primary-soft);
  border-color: #dbeafe;
  color: var(--primary);
}
nav button.nav-sub-action {
  position: relative;
  border-color: #fed7aa;
  background: #fff7ed;
  color: #c2410c;
  font-weight: 900;
}
nav button.nav-sub-action:hover {
  border-color: #fdba74;
  background: #ffedd5;
}
nav button.nav-sub-action.has-drafts::after {
  content: attr(data-badge);
  position: absolute;
  top: 5px;
  right: 8px;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 999px;
  background: #ef4444;
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 900;
  line-height: 18px;
  box-shadow: 0 0 0 2px #fff;
}

nav button.inventory-nav-btn {
  position: relative;
}

nav button.inventory-nav-btn.has-direct-purchase::after {
  content: attr(data-direct-purchase-badge);
  position: absolute;
  top: 4px;
  right: 7px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 19px;
  height: 19px;
  padding: 0 5px;
  border-radius: 999px;
  background: #ef4444;
  color: #fff;
  font-size: 12px;
  font-weight: 950;
  line-height: 19px;
  box-shadow: 0 0 0 2px #fff;
}

nav button.purchase-nav-btn {
  position: relative;
}

nav button.purchase-nav-btn.has-purchase-pending::after {
  content: attr(data-purchase-badge);
  position: absolute;
  top: 5px;
  right: 8px;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 999px;
  background: #ef4444;
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 900;
  line-height: 18px;
  box-shadow: 0 0 0 2px #fff;
}

nav button.completed-nav-btn,
nav button.has-operation-unread {
  position: relative;
}

nav button.has-operation-unread {
  padding-right: 34px;
}

nav button.has-operation-unread::before {
  content: attr(data-operation-unread-badge);
  position: absolute;
  top: 5px;
  right: 8px;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 999px;
  background: #ef4444;
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 900;
  line-height: 18px;
  box-shadow: 0 0 0 2px #fff;
}

nav button.purchase-nav-btn.has-purchase-pending.has-operation-unread::before {
  right: 34px;
}

nav button.inventory-nav-btn.has-direct-purchase.has-operation-unread::before,
nav button.nav-sub-action.has-drafts.has-operation-unread::before,
nav button#developmentNavBtn.has-development-assignment.has-operation-unread::before {
  right: 34px;
}

nav button.purchase-nav-btn.has-purchase-pending.has-operation-unread,
nav button.inventory-nav-btn.has-direct-purchase.has-operation-unread,
nav button.nav-sub-action.has-drafts.has-operation-unread,
nav button#developmentNavBtn.has-development-assignment.has-operation-unread {
  padding-right: 58px;
}

nav button#developmentNavBtn {
  position: relative;
}

nav button#developmentNavBtn:active {
  transform: none;
}

html.qn-pc-theme nav button#developmentNavBtn > span:first-child {
  gap: 6px;
  white-space: nowrap;
}

nav button#developmentNavBtn.has-development-assignment {
  padding-right: 48px;
}

nav button#developmentNavBtn.has-development-multiple {
  padding-right: 74px;
}

nav button#developmentNavBtn .development-nav-badges {
  position: absolute;
  top: 50%;
  right: 6px;
  z-index: 3;
  display: inline-flex;
  flex-direction: row;
  align-items: center;
  gap: 2px;
  pointer-events: none;
  transform: translateY(-50%);
  isolation: isolate;
}

html.qn-pc-theme nav button#developmentNavBtn .development-nav-badges::before,
html.qn-pc-theme nav button#developmentNavBtn .development-nav-badge::before {
  content: none !important;
  display: none !important;
  width: 0 !important;
  height: 0 !important;
  margin: 0 !important;
  background: none !important;
  box-shadow: none !important;
}

nav button#developmentNavBtn .development-nav-badges[hidden] {
  display: none;
}

nav button#developmentNavBtn .development-nav-badge {
  min-width: 32px;
  height: 17px;
  padding: 0 4px;
  border-radius: 999px;
  background: #ef4444;
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  font-weight: 900;
  line-height: 17px;
  box-shadow: 0 0 0 2px #fff;
  white-space: nowrap;
}

nav button#developmentNavBtn .development-nav-badge.assigned {
  background: #2563eb;
}

nav button#developmentNavBtn .development-nav-badge.completed {
  background: #16a34a;
}
.online-status {
  margin-top: auto;
  position: relative;
}
.offline-status {
  margin-top: 6px;
}
.server-memory-btn {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 9px;
  width: 100%;
  min-height: 44px;
  margin-top: 6px;
  padding: 6px 9px;
  border: 1px solid #bfdbfe;
  border-radius: 8px;
  background: #eff6ff;
  color: #1d4ed8;
  font-size: 12px;
  font-weight: 900;
}
.server-memory-ring {
  position: relative;
  width: 28px;
  height: 28px;
  flex: 0 0 auto;
}
.server-memory-ring svg {
  display: block;
  width: 100%;
  height: 100%;
  transform: rotate(-90deg);
}
.server-memory-ring-total {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: var(--server-storage-usage-color, #16a34a);
  font-size: 8px;
  font-weight: 950;
  line-height: 1;
  letter-spacing: -.25px;
  white-space: nowrap;
  pointer-events: none;
}
.server-memory-ring-track,
.server-memory-ring-value {
  fill: none;
  stroke-width: 4;
}
.server-memory-ring-track {
  stroke: #dcfce7;
}
.server-memory-ring-value {
  stroke: var(--server-storage-usage-color, #16a34a);
  stroke-linecap: round;
  stroke-dasharray: 0 100;
  transition: stroke-dasharray .25s ease;
}
.server-memory-copy {
  display: grid;
  gap: 2px;
  min-width: 0;
  text-align: left;
}
.server-memory-btn:hover {
  border-color: #93c5fd;
  background: #dbeafe;
}
.server-memory-copy strong {
  color: #0f172a;
  font-size: 13px;
}
.server-memory-btn.warning {
  border-color: #fed7aa;
  background: #fff7ed;
  color: #c2410c;
}
.server-memory-btn.danger {
  border-color: #fecaca;
  background: #fef2f2;
  color: #dc2626;
}

/* 仅邓招雄账号：在“当前账号”右侧展示无外框的大型云端存储圆环。 */
.current-account-copy {
  display: contents;
}

.current-account.has-server-storage,
html.tablet-desktop-mode .current-account.has-server-storage {
  grid-template-columns: minmax(0, 1fr) 88px;
  align-items: center;
  gap: 0;
  min-height: 112px;
  padding: 8px;
}

.current-account.has-server-storage .current-account-copy {
  display: grid;
  gap: 4px;
  min-width: 0;
  padding-right: 10px;
}

.current-account.has-server-storage .current-account-copy > span {
  white-space: nowrap;
}

.current-account.has-server-storage .current-account-copy small {
  grid-column: auto;
}

.current-account.has-server-storage .server-memory-btn {
  width: 88px;
  min-height: 94px;
  margin: 0;
  padding: 0 0 0 10px;
  flex-direction: column;
  justify-content: center;
  gap: 4px;
  border: 0;
  border-left: 1px solid #bfdbfe;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.current-account.has-server-storage .server-memory-btn:hover,
.current-account.has-server-storage .server-memory-btn.warning,
.current-account.has-server-storage .server-memory-btn.danger {
  border-color: #bfdbfe;
  background: transparent;
}

.current-account.has-server-storage .server-memory-ring {
  width: 62px;
  height: 62px;
}

.current-account.has-server-storage .server-memory-ring-total {
  font-size: 10px;
}

.current-account.has-server-storage .server-memory-ring-track,
.current-account.has-server-storage .server-memory-ring-value {
  stroke-width: 5;
}

.current-account.has-server-storage .server-memory-copy {
  gap: 1px;
  justify-items: center;
  text-align: center;
}

.current-account.has-server-storage .server-memory-copy span {
  color: #475467;
  font-size: 11px;
  white-space: nowrap;
}

.current-account.has-server-storage .server-memory-copy strong {
  color: var(--server-storage-usage-color, #16a34a);
  font-size: 10px;
  line-height: 1.1;
  white-space: nowrap;
}
.online-status:not(.hidden) ~ .current-account,
.offline-status:not(.hidden) + .current-account {
  margin-top: 0;
}
.online-status-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  min-height: 40px;
  border-color: #bbf7d0;
  background: #f0fdf4;
  color: #15803d;
  font-weight: 900;
}
.online-status-btn:hover {
  border-color: #86efac;
  background: #dcfce7;
  color: #166534;
}
.presence-count-group {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  min-width: 0;
  white-space: nowrap;
}
.presence-count-divider {
  width: 1px;
  height: 17px;
  flex: 0 0 auto;
  background: #d0d5dd;
}
.presence-count-idle {
  color: #b42318;
}
.online-idle-dot {
  width: 9px;
  height: 9px;
  flex: 0 0 auto;
  border-radius: 999px;
  background: #ef4444;
  box-shadow: 0 0 0 3px #fee2e2;
}
.offline-status-btn {
  border-color: #e4e7ec;
  background: #f8fafc;
  color: #667085;
}
.offline-status-btn:hover {
  border-color: #d0d5dd;
  background: #f2f4f7;
  color: #344054;
}
.online-person {
  position: relative;
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
}
.online-person::before,
.online-person::after {
  content: "";
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  background: #16a34a;
}
.online-person::before {
  top: 1px;
  width: 8px;
  height: 8px;
  border-radius: 999px;
}
.online-person::after {
  bottom: 1px;
  width: 15px;
  height: 8px;
  border-radius: 999px 999px 5px 5px;
}
.offline-dot {
  width: 10px;
  height: 10px;
  flex: 0 0 auto;
  border-radius: 999px;
  background: #98a2b3;
  box-shadow: 0 0 0 3px #f2f4f7;
}
.online-list {
  display: grid;
  gap: 8px;
}
.online-users-panel {
  position: absolute;
  left: 0;
  right: 0;
  bottom: calc(100% + 8px);
  z-index: 100;
  width: 100%;
  max-height: min(340px, calc(100vh - 180px));
  overflow-y: auto;
  overflow-x: hidden;
  display: grid;
  gap: 8px;
  padding: 10px;
  border: 1px solid #bbf7d0;
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 16px 36px rgba(16, 24, 40, .18);
  transform-origin: bottom center;
  animation: softPopoverIn .2s var(--ease-soft) both;
}
.online-users-panel::after {
  display: none;
  content: "";
  position: absolute;
  left: 26px;
  bottom: -7px;
  width: 12px;
  height: 12px;
  transform: rotate(45deg);
  border-right: 1px solid #bbf7d0;
  border-bottom: 1px solid #bbf7d0;
  background: #ffffff;
}
.online-users-panel h4 {
  margin: 0;
  display: flex;
  align-items: center;
  gap: 6px;
  color: #166534;
  font-size: 13px;
  font-weight: 950;
}
.online-users-section {
  display: grid;
  gap: 8px;
}
.online-users-section + .online-users-section {
  padding-top: 9px;
  border-top: 1px solid #e4e7ec;
}
.online-users-panel .idle-users-section h4 {
  color: #b42318;
}
.online-heading-dot {
  width: 9px;
  height: 9px;
  flex: 0 0 auto;
  border-radius: 999px;
}
.online-heading-dot.active {
  background: #16a34a;
  box-shadow: 0 0 0 3px #dcfce7;
}
.online-heading-dot.idle {
  background: #ef4444;
  box-shadow: 0 0 0 3px #fee2e2;
}
.online-user-row {
  display: block;
  padding: 7px 9px;
  border: 1px solid #d1fadf;
  border-radius: 8px;
  background: #f6fef9;
  line-height: 1.25;
}
.online-user-row strong {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #101828;
  font-size: 13px;
}
.online-user-row small {
  display: block;
  margin-top: 3px;
  color: #667085;
  font-weight: 700;
  font-size: 12px;
  overflow-wrap: anywhere;
}
.online-user-row .online-user-location {
  color: #2563eb;
  font-weight: 950;
}
.online-duration-line {
  display: flex !important;
  align-items: center;
  gap: 7px;
}
.online-activity-dot {
  width: 8px;
  height: 8px;
  flex: 0 0 auto;
  border-radius: 999px;
  background: #ef4444;
  box-shadow: 0 0 0 3px #fee2e2;
}
.online-activity-dot.active {
  background: #16a34a;
  box-shadow: 0 0 0 3px #dcfce7;
}
.online-activity-dot.idle {
  background: #ef4444;
  box-shadow: 0 0 0 3px #fee2e2;
}
.online-user-dot {
  width: 8px;
  height: 8px;
  flex: 0 0 auto;
  border-radius: 999px;
  background: #16a34a;
  box-shadow: 0 0 0 3px #dcfce7;
}
.offline-user-dot {
  background: #98a2b3;
  box-shadow: 0 0 0 3px #f2f4f7;
}
.idle-user-dot {
  background: #ef4444;
  box-shadow: 0 0 0 3px #fee2e2;
}
.current-account {
  margin-top: auto;
  display: grid;
  gap: 4px;
  padding: 12px;
  border: 1px solid #dbeafe;
  border-radius: 8px;
  background: #eff6ff;
  color: #1d4ed8;
}
.current-account span {
  font-size: 12px;
  font-weight: 800;
  color: #475467;
}
.current-account strong {
  font-size: 15px;
  line-height: 1.2;
  color: #101828;
  overflow-wrap: anywhere;
}
.current-account small {
  color: #2563eb;
  font-weight: 800;
}
.server-memory-modal {
  display: grid;
  gap: 12px;
}
.server-memory-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}
.server-memory-summary article {
  display: grid;
  align-content: start;
  gap: 4px;
  min-height: 112px;
  padding: 10px;
  border: 1px solid #dbeafe;
  border-radius: 8px;
  background: #f8fafc;
}
.server-memory-summary span {
  color: #64748b;
  font-size: 12px;
  font-weight: 800;
}
.server-memory-summary strong {
  color: #0f172a;
  font-size: 18px;
  font-weight: 950;
}
.server-memory-summary small {
  color: #2563eb;
  font-weight: 800;
}
.server-memory-summary .server-memory-current strong,
.server-memory-summary .server-memory-current small {
  color: var(--server-storage-usage-color, #16a34a);
}
.server-memory-summary .server-memory-today-increase > strong {
  color: #ef4444;
}
dialog:has(.server-memory-modal) {
  width: min(780px, calc(100vw - 32px));
}
@media (max-width: 760px) {
  .server-memory-summary {
    grid-template-columns: 1fr;
  }
}
#logoutBtn { margin-top: 0; }
#passwordBtn,
#systemInitBtn,
#staffRosterBtn,
.sidebar > #sheinPlatformNavBtn.ghost:not(.hidden) {
  display: flex;
  align-items: center;
  width: 100%;
  height: 38px;
  min-height: 38px;
  padding: 0 14px;
  box-sizing: border-box;
  justify-content: center;
  text-align: center;
  border: 1px solid #d0d5dd;
  background: #fff;
  color: #172033;
  box-shadow: none;
  outline: none;
}
#passwordBtn:hover,
#systemInitBtn:hover,
#staffRosterBtn:hover,
.sidebar > #sheinPlatformNavBtn.ghost:not(.hidden):hover {
  border-color: #cbd5e1;
  background: #f8fafc;
  box-shadow: none;
}
#passwordBtn:focus,
#systemInitBtn:focus,
#staffRosterBtn:focus,
#passwordBtn:focus-visible,
#systemInitBtn:focus-visible,
#staffRosterBtn:focus-visible {
  border-color: #d0d5dd;
  box-shadow: none;
  outline: none;
}

.content {
  min-width: 0;
  padding: 28px;
}
.view:not(.hidden) {
  animation: viewSoftIn .22s var(--ease-soft) both;
}
@keyframes viewSoftIn {
  from {
    opacity: 0;
    transform: translateY(4px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 20px;
}
.topbar h2 {
  margin: 0 0 5px;
  font-size: 28px;
  line-height: 1.2;
  letter-spacing: 0;
}
.topbar p { margin: 0; color: var(--muted); }
.toolbar { display: flex; gap: 10px; flex-wrap: wrap; }
.job-draft-entry {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-right: 6px;
  overflow: visible;
  border-color: #bfdbfe;
  background: #eff6ff;
  color: #1d4ed8;
  font-weight: 900;
}
.job-draft-entry strong {
  display: none;
  position: absolute;
  z-index: 4;
  top: -6px;
  right: -6px;
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  border-radius: 999px;
  background: #ff2d2d;
  color: #fff;
  align-items: center;
  justify-content: center;
  font-size: 9px;
  font-weight: 950;
  line-height: 16px;
  text-align: center;
  box-shadow: 0 0 0 1px #fff, 0 2px 5px rgba(220, 38, 38, .3);
}
.job-draft-entry.has-drafts {
  border-color: #f59e0b;
  background: #fff7ed;
  color: #c2410c;
}
.job-draft-entry.has-drafts strong {
  display: inline-flex;
}

.metric-grid, .kanban, .inventory-grid, .two-col { display: grid; gap: 16px; }
.metric-grid { grid-template-columns: repeat(auto-fit, minmax(132px, 1fr)); }
.metric, .panel, .job-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 1px 2px rgba(16, 24, 40, .04);
}
.metric {
  position: relative;
  overflow: hidden;
  padding: 16px;
}
.metric::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 3px;
  background: linear-gradient(90deg, var(--primary), #14b8a6);
}
.metric span { color: var(--muted); font-size: 13px; font-weight: 700; }
.metric strong {
  display: block;
  margin-top: 9px;
  font-size: 31px;
  line-height: 1;
}
.two-col { grid-template-columns: 1fr 1fr; margin-top: 16px; }
.panel { padding: 16px; }
.panel h3 { margin: 0 0 12px; font-size: 16px; }
.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}
.section-head h3 { margin: 0; }

.dashboard-board {
  display: grid;
  gap: 12px;
}
.dashboard-control-row {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 48px;
  padding: 10px;
  border: 1px solid #edf0f5;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 1px 2px rgba(16, 24, 40, .025);
}
.dashboard-control-row label {
  min-width: 180px;
}
.dashboard-control-row select {
  width: 100%;
  min-height: 34px;
  border-color: #e4e7ec;
  background: #fff;
  color: #344054;
  font-size: 13px;
  font-weight: 800;
}
.dashboard-shop-picker {
  position: relative;
  min-width: 220px;
  max-width: 360px;
}
.dashboard-year-picker {
  position: relative;
  min-width: 126px;
}
.dashboard-production-head-tools {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
}
.dashboard-production-year-picker {
  min-width: 112px;
}
.dashboard-production-year-compare {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 14px;
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid #eef2f7;
}
.dashboard-production-year-compare article {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  min-height: 78px;
  padding: 16px 18px;
  border: 1px solid #e4e7ec;
  border-radius: 7px;
  background: #fff;
}
.dashboard-completed-year-card {
  cursor: pointer;
  transition: border-color .18s ease, box-shadow .18s ease, transform .18s ease;
}
.dashboard-completed-year-card:hover,
.dashboard-completed-year-card:focus-visible {
  border-color: #84adff;
  box-shadow: 0 8px 22px rgba(23, 92, 211, .12);
  transform: translateY(-1px);
  outline: none;
}
.dashboard-production-year-compare strong {
  color: #175cd3;
  font-size: 19px;
}
.dashboard-production-year-compare span {
  color: #101828;
  font-size: 16px;
  font-weight: 900;
}
.dashboard-production-year-compare small {
  color: #667085;
  font-size: 14px;
  font-weight: 800;
}
.dashboard-completed-year-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 12px;
  padding: 12px 14px;
  border: 1px solid #dbeafe;
  border-radius: 8px;
  background: #eff6ff;
}
.dashboard-completed-year-summary strong {
  color: #175cd3;
  font-size: 17px;
}
.dashboard-completed-year-summary span {
  color: #344054;
  font-weight: 800;
}
.dashboard-completed-year-table {
  max-height: min(62vh, 620px);
  overflow: auto;
}
.dashboard-completed-year-table .move-thumb {
  width: 46px;
  height: 46px;
}
.dashboard-shop-trigger,
.dashboard-year-trigger {
  display: flex;
  align-items: center;
  width: 100%;
  min-height: 34px;
  padding: 0 12px;
  border: 1px solid #e4e7ec;
  border-radius: 8px;
  background: #fff;
  color: #344054;
  font-size: 13px;
  font-weight: 900;
  cursor: pointer;
  list-style: none;
  transition: border-color .22s var(--ease-ui), box-shadow .22s var(--ease-ui), background .22s var(--ease-ui), color .22s var(--ease-ui);
}
.dashboard-shop-trigger:hover,
.dashboard-year-trigger:hover {
  border-color: #bfdbfe;
  background: #f8fbff;
  box-shadow: 0 2px 8px rgba(37, 99, 235, .07);
}
.dashboard-shop-trigger::after,
.dashboard-year-trigger::after {
  content: "▾";
  margin-left: auto;
  color: #667085;
  transition: transform .22s var(--ease-soft), color .22s var(--ease-ui);
}
.dashboard-shop-picker.open .dashboard-shop-trigger::after,
.dashboard-year-picker.open .dashboard-year-trigger::after {
  transform: rotate(180deg);
}
.dashboard-shop-menu,
.dashboard-year-menu {
  position: absolute;
  z-index: 30;
  top: calc(100% + 6px);
  left: 0;
  display: grid;
  gap: 4px;
  width: min(420px, 80vw);
  max-height: 320px;
  overflow: auto;
  padding: 8px;
  border: 1px solid #e4e7ec;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 14px 28px rgba(16, 24, 40, .14);
  transform-origin: top center;
}
.dashboard-shop-menu {
  display: none;
}
.dashboard-shop-picker.open .dashboard-shop-menu {
  display: grid;
  animation: dropdownSoftIn .24s var(--ease-soft) both;
}
.dashboard-year-menu {
  display: none;
  width: 150px;
}
.dashboard-year-picker.open .dashboard-year-menu {
  display: grid;
  animation: dropdownSoftIn .24s var(--ease-soft) both;
}
.dashboard-shop-tools {
  display: flex;
  gap: 6px;
  padding-bottom: 6px;
  border-bottom: 1px solid #eef2f7;
}
.dashboard-shop-tools button {
  min-height: 30px;
  padding: 0 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 900;
}
.dashboard-shop-mode-btn {
  border-color: #2563eb;
  background: #fff;
  color: #2563eb;
}
.dashboard-shop-mode-btn.active {
  background: #2563eb;
  color: #fff;
}
.dashboard-shop-clear-btn {
  border-color: #dbeafe;
  background: #eff6ff;
  color: #1d4ed8;
}
.dashboard-shop-option,
.dashboard-year-option {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  min-height: 30px;
  padding: 6px 8px;
  border-radius: 7px;
  color: #344054;
  font-size: 13px;
  font-weight: 850;
  cursor: pointer;
  transition: background .18s var(--ease-ui), color .18s var(--ease-ui), transform .18s var(--ease-soft);
}
.dashboard-shop-single {
  width: 100%;
  border: 0;
  background: transparent;
  text-align: left;
}
.dashboard-shop-single.selected {
  background: #eff6ff;
  color: #1d4ed8;
}
.dashboard-control-row .dashboard-shop-option,
.dashboard-trend-tools .dashboard-year-option {
  display: flex;
  min-width: 0;
}
.dashboard-shop-option input,
.dashboard-year-option input {
  flex: 0 0 auto;
  width: 15px;
  height: 15px;
  min-height: 15px;
  margin: 0;
  padding: 0;
  border-radius: 4px;
}
.dashboard-shop-option span,
.dashboard-year-option span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}
.dashboard-shop-option:hover,
.dashboard-year-option:hover {
  background: #f8fafc;
  transform: translateX(2px);
}
.dashboard-shop-option.all-option {
  color: #1d4ed8;
  background: #eff6ff;
}
.dashboard-refresh-time {
  margin-left: auto;
  color: #667085;
  font-size: 13px;
  font-weight: 800;
  white-space: nowrap;
}
.dashboard-kpi-strip {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 0;
  overflow: hidden;
  border: 1px solid #f5df8d;
  border-radius: 8px;
  background: #fff9df;
}
.dashboard-kpi-strip article {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 8px;
  min-height: 42px;
  padding: 10px 14px;
  border-right: 1px solid rgba(245, 158, 11, .24);
}
.dashboard-kpi-strip article:last-child {
  border-right: 0;
}
.dashboard-kpi-strip span {
  color: #7c5b12;
  font-size: 13px;
  font-weight: 900;
}
.dashboard-kpi-strip strong {
  color: #344054;
  font-size: 16px;
  font-weight: 950;
  white-space: nowrap;
}
.dashboard-main-grid,
.dashboard-top-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  align-items: start;
}
.dashboard-column-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  align-items: start;
}
.dashboard-column {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 12px;
}
@media (max-width: 1100px) {
  .dashboard-column-grid {
    grid-template-columns: 1fr;
  }
}
.dashboard-main-grid.dashboard-main-grid-single {
  grid-template-columns: 1fr;
}
.dashboard-bottom-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.dashboard-panel {
  min-width: 0;
  padding: 14px 16px 16px;
  border: 1px solid #edf0f5;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 1px 2px rgba(16, 24, 40, .04);
}
.dashboard-panel h3 {
  margin: 0 0 12px;
  color: #101828;
  font-size: 16px;
  font-weight: 950;
}
.dashboard-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
  padding-bottom: 10px;
  border-bottom: 1px dashed #edf0f5;
}
.dashboard-panel-head h3 {
  position: relative;
  margin: 0;
  padding-left: 10px;
}
.dashboard-panel-head h3::before {
  content: "";
  position: absolute;
  left: 0;
  top: 3px;
  width: 3px;
  height: 15px;
  border-radius: 999px;
  background: #7a5af8;
}
.dashboard-mini-tabs {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  white-space: nowrap;
}
.dashboard-mini-tabs span {
  min-height: 24px;
  padding: 4px 9px;
  border: 1px solid #e4e7ec;
  border-radius: 6px;
  color: #667085;
  background: #fff;
  font-size: 12px;
  font-weight: 900;
}
.dashboard-mini-tabs button {
  min-height: 24px;
  padding: 4px 10px;
  border: 1px solid #e4e7ec;
  border-radius: 6px;
  background: #fff;
  color: #667085;
  font-size: 12px;
  font-weight: 900;
  cursor: pointer;
}
.dashboard-mini-tabs span.active,
.dashboard-mini-tabs button.active {
  border-color: #7a5af8;
  color: #6941c6;
  background: #f4f0ff;
}
.dashboard-mini-tabs button:hover {
  border-color: #a78bfa;
  color: #6941c6;
}
.dashboard-product-rank-month-picker {
  width: 116px;
  min-height: 24px;
  padding: 3px 7px;
  border: 1px solid #7a5af8;
  border-radius: 6px;
  color: #6941c6;
  background: #f4f0ff;
  font-size: 12px;
  font-weight: 900;
}
.dashboard-trend-tools {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
}
.dashboard-trend-tools label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #475467;
  font-size: 13px;
  font-weight: 900;
  white-space: nowrap;
}
.dashboard-year-select {
  width: 104px;
  min-height: 30px;
  padding: 4px 8px;
  border-color: #d0d5dd;
  background: #fff;
  color: #344054;
  font-size: 13px;
  font-weight: 900;
}
.dashboard-live-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(118px, 1fr));
  gap: 12px;
}
.dashboard-live-metric {
  position: relative;
  min-height: 94px;
  padding: 14px;
  overflow: hidden;
  border: 1px solid #edf0f5;
  border-radius: 8px;
  background: linear-gradient(180deg, #fff, #fbfcff);
}
.dashboard-status-link {
  cursor: pointer;
  transition: transform .16s ease, box-shadow .16s ease, border-color .16s ease;
}
.dashboard-status-link:hover,
.dashboard-status-link:focus-visible {
  transform: translateY(-1px);
  border-color: #bfdbfe;
  box-shadow: 0 10px 24px rgba(37, 99, 235, .10);
  outline: none;
}
.dashboard-live-metric::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 4px;
  background: #7a5af8;
}
.dashboard-live-metric span {
  color: #667085;
  font-size: 13px;
  font-weight: 900;
}
.dashboard-live-metric strong {
  display: block;
  margin-top: 10px;
  color: #101828;
  font-size: 30px;
  line-height: 1;
  font-weight: 950;
}
.dashboard-live-metric small {
  display: block;
  margin-top: 8px;
  color: #98a2b3;
  font-size: 12px;
  font-weight: 800;
}
.dashboard-live-metric .dashboard-money,
.dashboard-money {
  margin-top: 8px;
  color: #dc2626;
  font-size: 13px;
  font-weight: 950;
}
.dashboard-completion-amount-card::before {
  background: #ef4444;
}
.dashboard-completion-amount-card strong {
  color: #dc2626;
  font-size: 26px;
}
.dashboard-completion-quantity-card::before {
  background: #2563eb;
}
.dashboard-status-waiting::before,
.dashboard-status-waiting .dashboard-bar-fill { background: #facc15; }
.dashboard-status-purchase::before,
.dashboard-status-purchase .dashboard-bar-fill { background: #2563eb; }
.dashboard-status-schedule::before,
.dashboard-status-schedule .dashboard-bar-fill { background: #f97316; }
.dashboard-status-production::before,
.dashboard-status-production .dashboard-bar-fill { background: #8b5cf6; }
.dashboard-status-outsourced::before,
.dashboard-status-outsourced .dashboard-bar-fill { background: #06b6d4; }
.dashboard-status-completed::before,
.dashboard-status-completed .dashboard-bar-fill { background: #16a34a; }
.dashboard-chart-panel {
  min-height: 306px;
}
.dashboard-bar-chart {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(70px, 1fr));
  align-items: end;
  gap: 14px;
  min-height: 238px;
  padding: 8px 4px 0;
}
.dashboard-bar-item {
  display: grid;
  justify-items: center;
  gap: 8px;
  min-width: 0;
}
.dashboard-bar-value {
  min-height: 18px;
  color: #6941c6;
  font-size: 12px;
  font-weight: 950;
  white-space: nowrap;
}
.dashboard-amount-value {
  color: #dc2626;
}
.dashboard-bar-track {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  width: 100%;
  height: 178px;
  border-bottom: 1px solid #edf0f5;
}
.dashboard-bar-fill {
  width: min(38px, 68%);
  min-height: 4px;
  border-radius: 7px 7px 0 0;
  background: linear-gradient(180deg, #7a5af8, #9b8afb);
  box-shadow: 0 8px 18px rgba(122, 90, 248, .18);
}
.dashboard-bar-label {
  color: #667085;
  font-size: 12px;
  font-weight: 900;
  white-space: nowrap;
}
.dashboard-trend-chart .dashboard-bar-fill {
  background: linear-gradient(180deg, #7a5af8, #c084fc);
}
.dashboard-trend-chart small {
  color: #98a2b3;
  font-size: 11px;
  font-weight: 800;
  white-space: nowrap;
}
.dashboard-month-chart {
  grid-template-columns: repeat(12, minmax(42px, 1fr));
  gap: 8px;
}
.dashboard-month-chart .dashboard-bar-fill {
  width: min(28px, 72%);
}
.dashboard-month-chart .dashboard-month-dual-track {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 4px;
}
.dashboard-month-chart .dashboard-month-dual-track.has-custom .dashboard-bar-fill {
  width: 14px;
}
.dashboard-month-chart .dashboard-bar-label {
  font-size: 11px;
}
.dashboard-year-track {
  gap: 5px;
}
.dashboard-year-track .dashboard-bar-fill {
  width: min(22px, 40%);
}
.dashboard-current-year-fill {
  background: linear-gradient(180deg, #7a5af8, #9b8afb);
}
.dashboard-amount-fill {
  background: linear-gradient(180deg, #f97316, #fb923c);
  box-shadow: 0 8px 18px rgba(249, 115, 22, .18);
}
.dashboard-custom-month-fill {
  background: linear-gradient(180deg, #10b981, #06b6d4);
  box-shadow: 0 8px 18px rgba(6, 182, 212, .18);
}
.dashboard-previous-year-fill {
  background: linear-gradient(180deg, #94a3b8, #cbd5e1);
  box-shadow: 0 8px 18px rgba(100, 116, 139, .14);
}
.dashboard-amount-label {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  min-height: 20px;
  padding: 2px 7px;
  border: 1px solid #fecaca;
  border-radius: 999px;
  background: #fff1f2;
  color: #101828;
  font-size: 12px;
  font-weight: 950;
  white-space: nowrap;
}
.dashboard-amount-label b {
  color: #101828;
}
.dashboard-trend-chart .dashboard-amount-label,
.dashboard-trend-chart .dashboard-amount-label b {
  color: #101828;
}
.dashboard-custom-month-label {
  max-width: 96px;
  color: #0f766e;
  font-size: 11px;
  font-weight: 950;
  text-align: center;
  overflow-wrap: anywhere;
}
.dashboard-chart-legend {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
  color: #667085;
  font-size: 12px;
  font-weight: 850;
}
.dashboard-chart-legend span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}
.dashboard-chart-legend i {
  width: 10px;
  height: 10px;
  border-radius: 999px;
}
.dashboard-chart-legend i.current { background: #7a5af8; }
.dashboard-chart-legend i.previous { background: #94a3b8; }
.dashboard-chart-legend i.amount { background: #dc2626; }
.dashboard-chart-legend i.custom { background: #06b6d4; }
.dashboard-compare-month {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: #475467;
  font-size: 12px;
  font-weight: 900;
}
.dashboard-compare-month span {
  white-space: nowrap;
}
.dashboard-compare-pill {
  min-width: 74px;
  min-height: 30px;
  padding: 4px 10px;
  border: 1px solid #d0d5dd;
  border-radius: 999px;
  background: #fff;
  color: #101828;
  font-size: 12px;
  font-weight: 850;
}
.dashboard-time-panel {
  min-height: 240px;
}
.dashboard-time-compare {
  display: grid;
  gap: 14px;
}
.dashboard-time-card {
  display: grid;
  gap: 10px;
  padding: 14px;
  border: 1px solid #edf0f5;
  border-radius: 8px;
  background: linear-gradient(180deg, #fff, #fbfcff);
}
.dashboard-time-title {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}
.dashboard-time-title span {
  color: #344054;
  font-size: 14px;
  font-weight: 950;
}
.dashboard-time-title strong {
  color: #101828;
  font-size: 22px;
  font-weight: 950;
  white-space: nowrap;
}
.dashboard-time-track {
  height: 12px;
  border-radius: 999px;
  background: #eef2f7;
  overflow: hidden;
}
.dashboard-time-track i {
  display: block;
  height: 100%;
  min-width: 4px;
  border-radius: inherit;
}
.dashboard-time-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  color: #667085;
  font-size: 12px;
  font-weight: 850;
}
.dashboard-time-monthly {
  display: grid;
  grid-template-columns: repeat(12, minmax(46px, 1fr));
  align-items: end;
  gap: 8px;
  min-height: 238px;
}
.dashboard-time-month {
  display: grid;
  justify-items: center;
  gap: 7px;
  min-width: 0;
}
.dashboard-time-bars {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 5px;
  width: 100%;
  height: 154px;
  border-bottom: 1px solid #edf0f5;
}
.dashboard-time-bars i {
  display: block;
  width: min(18px, 42%);
  min-height: 4px;
  border-radius: 7px 7px 0 0;
}
.dashboard-time-bars i.single,
.dashboard-time-legend i.single {
  background: #2563eb;
}
.dashboard-time-bars i.batch,
.dashboard-time-legend i.batch {
  background: #f97316;
}
.dashboard-time-bars i.current,
.dashboard-time-legend i.current {
  background: #7a5af8;
}
.dashboard-time-bars i.custom,
.dashboard-time-legend i.custom {
  background: #06b6d4;
}
.dashboard-time-month-dual-bars.has-custom i {
  width: min(16px, 38%);
}
.dashboard-time-month strong {
  color: #667085;
  font-size: 11px;
  font-weight: 900;
}
.dashboard-time-month-values {
  display: grid;
  gap: 2px;
  color: #475467;
  font-size: 10.5px;
  font-weight: 850;
  text-align: center;
  white-space: nowrap;
}
.dashboard-time-custom-value {
  color: #0f766e;
  font-weight: 950;
}
.dashboard-time-legend {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  color: #667085;
  font-size: 12px;
  font-weight: 850;
}
.dashboard-time-legend span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}
.dashboard-time-legend i {
  width: 10px;
  height: 10px;
  border-radius: 999px;
}

.dashboard-owner-ranking {
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid #e4e7ec;
}
.dashboard-owner-ranking-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}
.dashboard-owner-ranking-head > div {
  display: flex;
  align-items: baseline;
  gap: 9px;
  min-width: 0;
}
.dashboard-owner-ranking-head h4 {
  margin: 0;
  color: #101828;
  font-size: 15px;
  font-weight: 950;
}
.dashboard-owner-ranking-head > div > span {
  color: #667085;
  font-size: 12px;
  font-weight: 850;
  white-space: nowrap;
}
.dashboard-owner-ranking-head label {
  display: flex;
  align-items: center;
  gap: 7px;
  color: #475467;
  font-size: 12px;
  font-weight: 900;
  white-space: nowrap;
}
.dashboard-owner-ranking-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
}
.dashboard-owner-ranking-toggle {
  display: inline-flex;
  align-items: center;
  padding: 3px;
  border: 1px solid #d0d5dd;
  border-radius: 8px;
  background: #f8fafc;
}
.dashboard-owner-ranking-toggle button {
  min-width: 86px;
  height: 28px;
  padding: 0 10px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: #344054;
  font-size: 12px;
  font-weight: 850;
  cursor: pointer;
}
.dashboard-owner-ranking-toggle button:hover {
  color: #1d4ed8;
}
.dashboard-owner-ranking-toggle button.active {
  background: #2563eb;
  color: #fff;
  box-shadow: 0 6px 14px rgba(37, 99, 235, .18);
}
.dashboard-owner-ranking-head input[type="month"] {
  box-sizing: border-box;
  width: 142px;
  min-height: 32px;
  padding: 4px 8px;
  border: 1px solid #d0d5dd;
  border-radius: 6px;
  background: #fff;
  color: #344054;
  font-size: 13px;
  font-weight: 850;
}
.dashboard-owner-ranking-table table {
  min-width: 540px;
  table-layout: fixed;
}
.dashboard-owner-ranking-table th,
.dashboard-owner-ranking-table td {
  padding: 9px 8px;
  vertical-align: middle;
}
.dashboard-owner-ranking-table th:first-child,
.dashboard-owner-ranking-table td:first-child {
  width: 48px;
  text-align: center;
}
.dashboard-owner-ranking-table th:nth-child(2),
.dashboard-owner-ranking-table td:nth-child(2) {
  width: 34%;
}
.dashboard-owner-ranking-table th:nth-child(n+3),
.dashboard-owner-ranking-table td:nth-child(n+3) {
  text-align: center;
}
.dashboard-owner-ranking-section-row td {
  padding: 8px 10px;
  background: #f8fafc;
  color: #344054;
  font-weight: 900;
}
.dashboard-owner-ranking-section-row strong {
  margin-right: 8px;
  color: #101828;
}
.dashboard-owner-ranking-section-row span {
  color: #667085;
  font-size: 12px;
  font-weight: 800;
}
.dashboard-owner-rank-number span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border: 1px solid #d0d5dd;
  border-radius: 50%;
  background: #f8fafc;
  color: #475467;
  font-size: 12px;
  font-weight: 950;
}
.dashboard-owner-rank-number .rank-1 {
  border-color: #f59e0b;
  background: #fffbeb;
  color: #b45309;
}
.dashboard-owner-rank-number .rank-2 {
  border-color: #94a3b8;
  background: #f1f5f9;
  color: #475569;
}
.dashboard-owner-rank-number .rank-3 {
  border-color: #d97706;
  background: #fff7ed;
  color: #9a3412;
}
.dashboard-owner-name {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  min-width: 0;
}
.dashboard-owner-name strong {
  min-width: 0;
  overflow: hidden;
  color: #101828;
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.dashboard-owner-ranking-row {
  cursor: pointer;
}
.dashboard-owner-ranking-row td {
  transition: background-color .16s ease;
}
.dashboard-owner-ranking-row:hover td,
.dashboard-owner-ranking-row:focus-visible td {
  background: #f5f8ff;
}
.dashboard-owner-ranking-row:hover .dashboard-owner-name strong,
.dashboard-owner-ranking-row:focus-visible .dashboard-owner-name strong {
  color: #1d4ed8;
}
.dashboard-owner-ranking-row:focus-visible {
  outline: 2px solid #2563eb;
  outline-offset: -2px;
}
.dashboard-owner-name small {
  flex: 0 0 auto;
  color: #667085;
  font-size: 11px;
  font-weight: 850;
  white-space: nowrap;
}
.dashboard-owner-compare-track {
  height: 4px;
  margin-top: 6px;
  overflow: hidden;
  border-radius: 4px;
  background: #eef2f7;
}
.dashboard-owner-compare-track span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: #2563eb;
}
.dashboard-owner-metric {
  font-size: 14px;
  font-weight: 950;
  white-space: nowrap;
}
.dashboard-owner-metric.replenishment {
  color: #c2410c;
}
.dashboard-owner-metric.purchase {
  color: #1d4ed8;
}
.dashboard-owner-metric.purchase-quantity {
  color: #7c3aed;
}
.dashboard-owner-metric.purchase-actual {
  color: #0f766e;
}
.dashboard-owner-metric.air {
  color: #7c3aed;
}
.dashboard-owner-metric.sea {
  color: #0f766e;
}
.dashboard-owner-metric.actual-air {
  color: #2563eb;
}
.dashboard-owner-metric.actual-sea {
  color: #047857;
}
.dashboard-owner-ranking-table tfoot td {
  border-top: 2px solid #dbe4f0;
  background: #f8fafc;
  color: #344054;
  font-weight: 950;
}

.dashboard-purchase-statistics {
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid #e4e7ec;
}
.dashboard-purchase-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}
.dashboard-purchase-head > div {
  display: flex;
  align-items: baseline;
  gap: 9px;
  min-width: 0;
}
.dashboard-purchase-head h4,
.dashboard-purchase-detail-grid h5 {
  margin: 0;
  color: #101828;
  font-weight: 950;
}
.dashboard-purchase-head h4 {
  font-size: 15px;
}
.dashboard-purchase-head span {
  overflow: hidden;
  color: #667085;
  font-size: 12px;
  font-weight: 850;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.dashboard-purchase-head select {
  width: 150px;
  flex: 0 0 150px;
  min-height: 32px;
  padding: 4px 30px 4px 10px;
  border: 1px solid #d0d5dd;
  border-radius: 7px;
  background: #fff;
  color: #344054;
  font-size: 13px;
  font-weight: 850;
}
.dashboard-purchase-metrics {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 14px;
}
.dashboard-purchase-metric {
  min-width: 0;
  padding: 10px 11px;
  border: 1px solid #e4e7ec;
  border-radius: 8px;
  background: #f8fafc;
}
.dashboard-purchase-metric span {
  display: block;
  margin-bottom: 5px;
  color: #667085;
  font-size: 11px;
  font-weight: 850;
  white-space: nowrap;
}
.dashboard-purchase-metric strong {
  color: #101828;
  font-size: 21px;
  font-weight: 950;
  white-space: nowrap;
}
.dashboard-purchase-metric.pending { border-color: #bfdbfe; background: #eff6ff; }
.dashboard-purchase-metric.pending strong { color: #2563eb; }
.dashboard-purchase-metric.approved { border-color: #fde68a; background: #fffbeb; }
.dashboard-purchase-metric.approved strong { color: #d97706; }
.dashboard-purchase-metric.completed { border-color: #bbf7d0; background: #f0fdf4; }
.dashboard-purchase-metric.completed strong { color: #16a34a; }
.dashboard-purchase-metric.required { border-color: #ddd6fe; background: #f5f3ff; }
.dashboard-purchase-metric.required strong { color: #7c3aed; }
.dashboard-purchase-metric.actual { border-color: #a5f3fc; background: #ecfeff; }
.dashboard-purchase-metric.actual strong { color: #0891b2; }
.dashboard-purchase-detail-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(240px, .75fr);
  gap: 12px;
}
.dashboard-purchase-detail-grid.single {
  grid-template-columns: 1fr;
}
.dashboard-purchase-detail-grid > section {
  min-width: 0;
  padding: 12px;
  border: 1px solid #e4e7ec;
  border-radius: 8px;
  background: #fbfdff;
}
.dashboard-purchase-detail-grid h5 {
  margin-bottom: 10px;
  font-size: 13px;
}
.dashboard-purchase-month-chart {
  display: grid;
  grid-template-columns: repeat(12, minmax(24px, 1fr));
  gap: 5px;
  min-height: 158px;
  align-items: end;
}
.dashboard-purchase-month {
  display: grid;
  grid-template-rows: 18px 120px 18px;
  align-items: end;
  min-width: 0;
  text-align: center;
}
.dashboard-purchase-month strong,
.dashboard-purchase-month span {
  overflow: hidden;
  color: #667085;
  font-size: 10px;
  font-weight: 850;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.dashboard-purchase-month-track {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  height: 120px;
  border-bottom: 1px solid #dbe4f0;
}
.dashboard-purchase-month-track i {
  display: block;
  width: min(22px, 74%);
  min-height: 4px;
  border-radius: 5px 5px 1px 1px;
  background: linear-gradient(180deg, #60a5fa 0%, #2563eb 100%);
}
.dashboard-purchase-types {
  display: grid;
  gap: 9px;
}
.dashboard-purchase-type-row {
  width: 100%;
  padding: 0;
  border: 0;
  background: transparent;
  text-align: left;
  cursor: pointer;
}
.dashboard-purchase-type-row:hover strong {
  color: #2563eb;
}
.dashboard-purchase-type-row:focus-visible {
  outline: 2px solid #2f6df6;
  outline-offset: 3px;
  border-radius: 8px;
}
.dashboard-purchase-type-row > div:first-child {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 4px;
}
.dashboard-purchase-type-row strong {
  color: #344054;
  font-size: 12px;
}
.dashboard-purchase-type-row span {
  color: #667085;
  font-size: 10.5px;
  font-weight: 800;
  white-space: nowrap;
}
.dashboard-purchase-type-track {
  height: 6px;
  overflow: hidden;
  border-radius: 999px;
  background: #eaf0f7;
}
.dashboard-purchase-type-track i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #8b5cf6 0%, #ec4899 100%);
}
.dashboard-purchase-empty {
  display: grid;
  min-height: 140px;
  place-items: center;
  color: #98a2b3;
  font-size: 12px;
  font-weight: 850;
}
.dashboard-purchase-rank-modal table {
  width: 100%;
  min-width: 0;
  table-layout: fixed;
}
.dashboard-purchase-rank-modal th,
.dashboard-purchase-rank-modal td {
  padding: 8px 10px;
  white-space: nowrap;
}
.dashboard-purchase-rank-modal th:nth-child(1),
.dashboard-purchase-rank-modal td:nth-child(1) {
  width: 48px;
}
.dashboard-purchase-rank-modal th:nth-child(2),
.dashboard-purchase-rank-modal td:nth-child(2) {
  width: 42%;
  min-width: 150px;
  white-space: normal;
  overflow: visible;
  text-overflow: clip;
  word-break: break-all;
  line-height: 1.35;
}
.dashboard-purchase-rank-modal th:nth-child(n+3),
.dashboard-purchase-rank-modal td:nth-child(n+3) {
  text-align: right;
}
.dashboard-purchase-rank-modal-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}
.dashboard-purchase-rank-modal-grid h5 {
  margin: 0 0 8px;
  color: #101828;
  font-size: 14px;
  font-weight: 900;
}
#modal:has(.dashboard-purchase-rank-modal-grid) {
  width: min(1280px, calc(100vw - 32px));
}
@media (max-width: 1380px) {
  .dashboard-purchase-metrics { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .dashboard-purchase-detail-grid { grid-template-columns: 1fr; }
}
@media (max-width: 720px) {
  .dashboard-purchase-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .dashboard-purchase-month-chart { overflow-x: auto; grid-template-columns: repeat(12, minmax(36px, 1fr)); }
  .dashboard-purchase-rank-modal-grid { grid-template-columns: 1fr; }
}

#modal:has(.dashboard-owner-year-detail) {
  width: min(980px, calc(100vw - 32px));
}
#modal:has(.dashboard-owner-month-detail) {
  width: min(1040px, calc(100vw - 32px));
}
.dashboard-owner-year-detail {
  display: grid;
  gap: 14px;
}
.dashboard-owner-year-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.dashboard-owner-year-head > div {
  display: grid;
  gap: 3px;
  min-width: 0;
}
.dashboard-owner-year-head > div > strong {
  overflow: hidden;
  color: #101828;
  font-size: 18px;
  font-weight: 950;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.dashboard-owner-year-head > div > span {
  color: #667085;
  font-size: 12px;
  font-weight: 800;
}
.dashboard-owner-year-head label {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #475467;
  font-size: 12px;
  font-weight: 900;
  white-space: nowrap;
}
.dashboard-owner-detail-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  margin-left: auto;
  flex-wrap: wrap;
}
.dashboard-owner-year-head select {
  width: 112px;
  min-height: 34px;
}
.dashboard-owner-year-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  border: 1px solid #dbe4f0;
  border-radius: 6px;
  background: #f8fafc;
}
.dashboard-owner-year-summary span {
  display: grid;
  gap: 2px;
  min-width: 0;
  padding: 10px 12px;
  color: #667085;
  font-size: 11px;
  font-weight: 850;
}
.dashboard-owner-year-summary span + span {
  border-left: 1px solid #dbe4f0;
}
.dashboard-owner-year-summary b {
  overflow: hidden;
  color: #101828;
  font-size: 17px;
  font-weight: 950;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.dashboard-owner-year-table table {
  min-width: 740px;
  table-layout: fixed;
}
.dashboard-owner-year-table th,
.dashboard-owner-year-table td {
  padding: 8px 10px;
  vertical-align: middle;
}
.dashboard-owner-year-table th:first-child,
.dashboard-owner-year-table td:first-child {
  width: 76px;
  text-align: center;
}
.dashboard-owner-year-table th:nth-child(n+2) {
  text-align: center;
}
.dashboard-owner-year-table th:nth-child(n+3),
.dashboard-owner-year-table td:nth-child(n+3) {
  border-left: 1px solid #edf1f7;
}
.dashboard-owner-year-table tbody tr.current-month td {
  background: #eff6ff;
}
.dashboard-owner-year-table tbody tr.current-month td:first-child {
  color: #1d4ed8;
}
.dashboard-owner-year-row {
  cursor: pointer;
}
.dashboard-owner-year-row:hover td {
  background: #f0f7ff;
}
.dashboard-owner-year-row:focus-visible {
  outline: 2px solid #2563eb;
  outline-offset: -2px;
}
.dashboard-owner-year-metric {
  display: grid;
  grid-template-columns: 52px minmax(50px, 1fr);
  align-items: center;
  gap: 8px;
}
.dashboard-owner-year-metric strong {
  text-align: right;
  font-size: 13px;
  font-weight: 950;
  white-space: nowrap;
}
.dashboard-owner-year-metric > span {
  height: 5px;
  overflow: hidden;
  border-radius: 5px;
  background: #eef2f7;
}
.dashboard-owner-year-metric i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: currentColor;
}
.dashboard-owner-year-metric.replenishment {
  color: #c2410c;
}
.dashboard-owner-year-metric.purchase {
  color: #1d4ed8;
}
.dashboard-owner-year-metric.air {
  color: #7c3aed;
}
.dashboard-owner-year-metric.sea {
  color: #0f766e;
}
.dashboard-owner-year-table tfoot td {
  border-top: 2px solid #dbe4f0;
  background: #f8fafc;
  color: #344054;
  font-weight: 950;
  text-align: center;
}
.dashboard-owner-year-loading {
  display: grid;
  place-items: center;
  min-height: 260px;
  color: #667085;
  font-size: 14px;
  font-weight: 850;
}
.dashboard-owner-year-loading.error {
  color: #b42318;
}
.dashboard-owner-month-detail {
  display: grid;
  gap: 14px;
}
.dashboard-owner-month-head {
  display: flex;
  align-items: center;
  gap: 14px;
}
.dashboard-owner-month-head > button {
  flex: 0 0 auto;
  border-color: #bfdbfe;
  background: #eff6ff;
  color: #1d4ed8;
  font-weight: 900;
}
.dashboard-owner-year-link {
  flex: 0 0 auto;
  min-height: 34px;
  border-color: #bfdbfe;
  background: #eff6ff;
  color: #1d4ed8;
  font-weight: 900;
}
.dashboard-owner-month-picker {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #475467;
  font-size: 12px;
  font-weight: 900;
  white-space: nowrap;
}
.dashboard-owner-month-picker input[type="month"] {
  width: 134px;
  min-height: 34px;
  border: 1px solid #d0d9e8;
  border-radius: 8px;
  padding: 0 10px;
  color: #101828;
  font-size: 13px;
  font-weight: 900;
}
.dashboard-owner-month-head > div {
  display: grid;
  gap: 2px;
  min-width: 0;
}
.dashboard-owner-month-head > .dashboard-owner-detail-actions {
  display: grid;
  grid-template-columns: max-content max-content;
  align-items: center;
  justify-content: end;
  gap: 8px 10px;
}
.dashboard-owner-month-head > .dashboard-owner-detail-actions > .dashboard-owner-ranking-toggle {
  grid-column: 1 / -1;
  justify-self: end;
}
.dashboard-owner-month-head strong {
  overflow: hidden;
  color: #101828;
  font-size: 18px;
  font-weight: 950;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.dashboard-owner-month-head span {
  color: #667085;
  font-size: 12px;
  font-weight: 800;
}
.dashboard-owner-month-summary {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  border: 1px solid #dbe4f0;
  border-radius: 8px;
  background: #f8fafc;
}
.dashboard-owner-month-summary > span {
  display: grid;
  gap: 2px;
  min-width: 0;
  padding: 11px 13px;
  color: #667085;
  font-size: 11px;
  font-weight: 850;
}
.dashboard-owner-month-summary > span + span {
  border-left: 1px solid #dbe4f0;
}
.dashboard-owner-month-summary b {
  overflow: hidden;
  color: #101828;
  font-size: 18px;
  font-weight: 950;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.dashboard-owner-month-shops {
  display: grid;
  gap: 12px;
}
.dashboard-owner-month-shop {
  overflow: hidden;
  border: 1px solid #dbe4f0;
  border-radius: 10px;
  background: #fff;
}
.dashboard-owner-month-shop > summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 11px 13px;
  background: #f8fafc;
  cursor: pointer;
  list-style: none;
}

.dashboard-owner-month-shop[open] > summary {
  border-bottom: 1px solid #e5eaf1;
}

.dashboard-owner-month-shop > summary::-webkit-details-marker {
  display: none;
}

.dashboard-owner-month-shop > summary::before {
  flex: 0 0 auto;
  color: #2563eb;
  font-size: 12px;
  font-weight: 950;
  content: '展开';
}

.dashboard-owner-month-shop[open] > summary::before {
  content: '收起';
}
.dashboard-owner-month-shop > summary > strong {
  min-width: 0;
  color: #101828;
  font-size: 15px;
  font-weight: 950;
}
.dashboard-owner-month-shop > summary > div {
  display: flex;
  justify-content: flex-end;
  gap: 7px;
  flex-wrap: wrap;
}
.dashboard-owner-month-shop > summary span {
  padding: 3px 8px;
  border-radius: 999px;
  background: #eef4ff;
  color: #344054;
  font-size: 11px;
  font-weight: 850;
  white-space: nowrap;
}
.dashboard-owner-month-batches table {
  min-width: 700px;
}

.dashboard-owner-month-products table {
  min-width: 760px;
}

.dashboard-owner-month-products td:nth-child(2) strong,
.dashboard-owner-month-products td:nth-child(2) small {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

.dashboard-owner-month-products td:nth-child(2) small {
  margin-top: 3px;
  color: #667085;
  font-size: 12px;
  font-weight: 750;
}

.dashboard-owner-month-products th:last-child,
.dashboard-owner-month-products td:last-child {
  text-align: right;
}

.dashboard-owner-shop-product-thumb {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 46px;
  height: 46px;
  border: 1px solid #dbe5f2;
  border-radius: 8px;
  object-fit: cover;
  background: #fff;
  color: #94a3b8;
  font-size: 12px;
  font-weight: 800;
  vertical-align: middle;
}

.dashboard-owner-shop-product-thumb.clickable-image {
  cursor: zoom-in;
}

.dashboard-owner-month-batches th,
.dashboard-owner-month-batches td {
  padding: 9px 12px;
}
.dashboard-owner-month-batches th:nth-last-child(-n+2),
.dashboard-owner-month-batches td:nth-last-child(-n+2) {
  text-align: right;
}

.dashboard-owner-purchase-thumb {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border: 1px solid #dbe5f2;
  border-radius: 8px;
  object-fit: cover;
  background: #fff;
  color: #94a3b8;
  font-size: 12px;
  font-weight: 800;
  vertical-align: middle;
}

.dashboard-owner-purchase-thumb.clickable-image {
  cursor: zoom-in;
}
.dashboard-owner-month-section-title {
  color: #101828;
  font-size: 15px;
  font-weight: 950;
}
.dashboard-owner-month-empty {
  display: grid;
  place-items: center;
  min-height: 180px;
  border: 1px dashed #cbd5e1;
  border-radius: 10px;
  color: #667085;
  font-weight: 850;
}
.dashboard-owner-ranking {
  margin-top: 12px;
  padding: 12px;
  border: 1px solid #e4e7ec;
  border-radius: 8px;
  background: #fff;
}
.dashboard-owner-ranking-head {
  margin-bottom: 10px;
  padding-bottom: 8px;
  border-bottom: 1px solid #eef2f6;
}
.dashboard-owner-ranking-head > div {
  align-items: center;
}
.dashboard-owner-ranking-head h4,
.dashboard-owner-year-head > div > strong,
.dashboard-owner-month-head strong {
  letter-spacing: 0;
}
.dashboard-owner-ranking-head h4 {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
}
.dashboard-owner-ranking-head h4::before {
  content: "";
  width: 3px;
  height: 14px;
  border-radius: 999px;
  background: #2563eb;
}
.dashboard-owner-ranking-head > div > span {
  padding: 2px 8px;
  border-radius: 999px;
  background: #f2f4f7;
  color: #475467;
  font-weight: 800;
}
.dashboard-owner-ranking-head input[type="month"],
.dashboard-owner-year-head select {
  border-radius: 8px;
  box-shadow: 0 1px 2px rgba(16, 24, 40, .04);
}
.dashboard-owner-ranking-table {
  border: 1px solid #e4e7ec;
  border-radius: 8px;
  background: #fff;
  overflow: hidden;
}
.dashboard-owner-ranking-table table,
.dashboard-owner-year-table table,
.dashboard-owner-month-batches table {
  border-collapse: separate;
  border-spacing: 0;
}
.dashboard-owner-ranking-table th,
.dashboard-owner-year-table th,
.dashboard-owner-month-batches th {
  background: #f5f7fb;
  color: #475467;
  font-size: 12px;
  font-weight: 900;
}
.dashboard-owner-ranking-table td,
.dashboard-owner-year-table td,
.dashboard-owner-month-batches td {
  border-top: 1px solid #edf0f5;
}
.dashboard-owner-ranking-table th,
.dashboard-owner-ranking-table td {
  padding: 10px 9px;
}
.dashboard-owner-ranking-row:hover td,
.dashboard-owner-ranking-row:focus-visible td,
.dashboard-owner-year-row:hover td {
  background: #f7fbff;
}
.dashboard-owner-ranking-row:hover .dashboard-owner-rank-number span,
.dashboard-owner-ranking-row:focus-visible .dashboard-owner-rank-number span {
  border-color: #93c5fd;
  background: #eff6ff;
  color: #1d4ed8;
}
.dashboard-owner-rank-number span {
  width: 34px;
  height: 24px;
  border-radius: 999px;
  background: #f8fafc;
}
.dashboard-owner-compare-track {
  height: 4px;
  background: #edf2f7;
}
.dashboard-owner-compare-track span {
  background: #2563eb;
}
.dashboard-owner-metric,
.dashboard-owner-year-metric strong {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 42px;
  min-height: 22px;
  padding: 0;
  border-radius: 0;
  background: transparent;
}
.dashboard-owner-metric.replenishment,
.dashboard-owner-year-metric.replenishment strong {
  background: transparent;
}
.dashboard-owner-metric.purchase,
.dashboard-owner-year-metric.purchase strong {
  background: transparent;
}
.dashboard-owner-metric.air,
.dashboard-owner-year-metric.air strong {
  background: transparent;
}
.dashboard-owner-metric.sea,
.dashboard-owner-year-metric.sea strong {
  background: transparent;
}
#modal:has(.dashboard-owner-year-detail),
#modal:has(.dashboard-owner-month-detail) {
  border-radius: 12px;
}
.dashboard-owner-year-detail,
.dashboard-owner-month-detail {
  gap: 12px;
}
.dashboard-owner-year-head,
.dashboard-owner-month-head {
  padding: 10px 12px;
  border: 1px solid #dbe4f0;
  border-radius: 8px;
  background: #f8fbff;
}
.dashboard-owner-year-summary,
.dashboard-owner-month-summary {
  overflow: hidden;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 1px 2px rgba(16, 24, 40, .03);
}
.dashboard-owner-year-summary span,
.dashboard-owner-month-summary > span {
  background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
}
.dashboard-owner-year-table,
.dashboard-owner-month-batches {
  border: 1px solid #e4e7ec;
  border-radius: 8px;
  background: #fff;
}
.dashboard-owner-year-table tbody tr.current-month td {
  background: #eff6ff;
}
.dashboard-owner-year-metric {
  grid-template-columns: 58px minmax(56px, 1fr);
}
.dashboard-owner-month-shops {
  gap: 10px;
}
.dashboard-owner-month-shop {
  border-color: #dbe4f0;
  border-radius: 8px;
  box-shadow: 0 1px 2px rgba(16, 24, 40, .03);
}
.dashboard-owner-month-shop > header {
  background: #f8fbff;
}
.dashboard-owner-month-shop > header span {
  border: 1px solid #dbeafe;
  background: #eff6ff;
  color: #1d4ed8;
}
.dashboard-owner-month-section-title {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 2px;
}
.dashboard-owner-month-section-title::before {
  content: "";
  width: 3px;
  height: 14px;
  border-radius: 999px;
  background: #2563eb;
}
@media (max-width: 720px) {
  .dashboard-owner-year-head {
    align-items: flex-start;
  }
  .dashboard-owner-year-summary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .dashboard-owner-year-summary span:nth-child(3) {
    border-left: 0;
    border-top: 1px solid #dbe4f0;
  }
  .dashboard-owner-year-summary span:nth-child(4) {
    border-top: 1px solid #dbe4f0;
  }
  .dashboard-owner-month-head,
  .dashboard-owner-month-shop > header {
    align-items: flex-start;
    flex-direction: column;
  }
  .dashboard-owner-month-head > .dashboard-owner-detail-actions {
    width: 100%;
    max-width: 100%;
    margin-left: 0;
    overflow-x: auto;
  }
  .dashboard-owner-month-summary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .dashboard-owner-month-summary > span:nth-child(3) {
    border-left: 0;
    border-top: 1px solid #dbe4f0;
  }
  .dashboard-owner-month-summary > span:nth-child(4) {
    border-top: 1px solid #dbe4f0;
  }
  .dashboard-owner-month-shop > header > div {
    justify-content: flex-start;
  }
}

.dashboard-rank-wrap {
  display: grid;
  gap: 10px;
}
.dashboard-rank-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}
.dashboard-rank-tabs button {
  min-height: 30px;
  padding: 5px 12px;
  border: 1px solid #d0d5dd;
  border-radius: 7px;
  background: #fff;
  color: #344054;
  font-size: 12px;
  font-weight: 900;
  cursor: pointer;
}
.dashboard-rank-tabs button:hover {
  border-color: #9db7f8;
  color: #1d4ed8;
}
.dashboard-rank-tabs button.active {
  border-color: #2f6df6;
  background: #2f6df6;
  color: #fff;
  box-shadow: 0 5px 12px rgba(47, 109, 246, .18);
}
.dashboard-rank-table-combined {
  margin-top: 0;
}

.dashboard-rank-table table,
.dashboard-rank-summary table {
  min-width: 100%;
}

.dashboard-rank-table td,
.dashboard-rank-summary td {
  vertical-align: top;
}

.dashboard-rank-table h4,
.dashboard-rank-summary h4 {
  margin: 0 0 8px;
  font-size: 15px;
  color: #0f172a;
}
.dashboard-rank-product {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  align-items: center;
  gap: 8px;
  min-width: 0;
}
.dashboard-rank-product.compact {
  grid-template-columns: 34px minmax(0, 1fr);
}
.dashboard-rank-thumb {
  width: 44px;
  height: 44px;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  background: #fff;
  object-fit: contain;
}
.dashboard-rank-thumb.compact {
  width: 34px;
  height: 34px;
}
.dashboard-rank-thumb.placeholder {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #94a3b8;
  font-size: 11px;
  font-weight: 900;
}
.dashboard-rank-product strong,
.dashboard-rank-product .muted {
  overflow-wrap: anywhere;
}

.filter-bar {
  display: grid;
  grid-template-columns: repeat(4, minmax(160px, 1fr)) auto;
  gap: 10px;
  align-items: end;
  margin-bottom: 16px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: 0 1px 2px rgba(16, 24, 40, .04);
}
.filter-bar label {
  gap: 5px;
  font-size: 15px;
  font-weight: 800;
}
.filter-bar select,
.filter-bar input {
  font-size: 15px;
}
.outbound-filter-bar {
  grid-template-columns: 240px 180px minmax(220px, 520px) auto auto auto;
  align-items: end;
  justify-content: start;
}
.outbound-filter-bar .filter-mini-btn {
  width: 72px;
  min-width: 72px;
  max-width: 72px;
  height: 38px;
  min-height: 38px;
  align-self: end;
}
.outbound-filter-bar .outbound-search-confirm-btn {
  height: 40px;
  min-height: 40px;
}
.outbound-filter-bar .outbound-compare-screenshot-btn {
  width: 132px;
  min-width: 132px;
  max-width: 132px;
  color: #fff;
  border-color: #0f766e;
  background: #0f766e;
}
.outbound-filter-bar .outbound-cost-status-btn {
  position: relative;
  overflow: visible;
  width: 132px;
  min-width: 132px;
  max-width: 132px;
  color: #b42318;
  border-color: #fecaca;
  background: #fff1f2;
  font-weight: 900;
}
.outbound-filter-bar .outbound-cost-status-badge {
  position: absolute;
  top: -10px;
  right: -16px;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 20px;
  padding: 0 7px;
  border: 2px solid #fff;
  border-radius: 999px;
  background: #16a34a;
  color: #fff;
  box-shadow: 0 2px 6px rgba(21, 128, 61, 0.28);
  font-size: 11px;
  font-weight: 950;
  line-height: 16px;
  white-space: nowrap;
  pointer-events: none;
}
.inventory-batch-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  gap: 6px;
  align-self: end;
  justify-self: start;
  grid-column: 1 / -1;
  width: 100%;
  overflow-x: auto;
  padding-bottom: 2px;
}
.inventory-batch-actions-right {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 4px;
  margin-left: auto;
}
.inventory-cost-draft-actions {
  display: flex;
  grid-column: 1 / -1;
  justify-content: flex-start;
  margin-top: -4px;
}
.inventory-filter {
  position: sticky;
  top: 0;
  z-index: 85;
  grid-template-columns: 220px 360px 180px auto;
  justify-content: start;
  align-items: end;
  background: rgba(255, 255, 255, .98);
  box-shadow: 0 8px 18px rgba(15, 23, 42, .08);
}
.inventory-sort-field select {
  min-width: 180px;
}
.inventory-filter .inventory-batch-btn {
  width: 128px;
  min-width: 128px;
  max-width: 128px;
  height: 38px;
  min-height: 38px;
  padding: 0 10px;
  white-space: nowrap;
  color: #fff;
  font-weight: 900;
}
.batch-replenish-btn {
  border-color: #2563eb;
  background: #2563eb;
}
.batch-replenish-btn:hover {
  border-color: #1d4ed8;
  background: #1d4ed8;
}
.batch-stock-btn {
  border-color: #079455;
  background: #12b76a;
}
.batch-stock-btn:hover {
  border-color: #067647;
  background: #079455;
}
.batch-out-btn {
  border-color: #ea580c;
  background: #f97316;
}
.batch-out-btn:hover {
  border-color: #c2410c;
  background: #ea580c;
}
.batch-draft-btn {
  border-color: #0f766e;
  background: #14b8a6;
}
.batch-draft-btn:hover {
  border-color: #0f766e;
  background: #0f766e;
}
.batch-cost-draft-btn {
  border-color: #db2777;
  background: #ec4899;
}
.batch-cost-draft-btn:hover {
  border-color: #be185d;
  background: #db2777;
}
.batch-ocr-btn {
  border-color: #6d28d9;
  background: #7c3aed;
}
.batch-ocr-btn:hover {
  border-color: #5b21b6;
  background: #6d28d9;
}
.batch-delete-btn {
  border-color: #b42318;
  background: #d92d20;
  color: #ffffff;
}
.batch-delete-btn:hover {
  border-color: #912018;
  background: #b42318;
  color: #ffffff;
}
.danger-btn.flow-batch-delete-btn {
  border-color: #98a2b3;
  background: #d0d5dd;
  color: #344054;
}
.danger-btn.flow-batch-delete-btn:hover {
  border-color: #667085;
  background: #98a2b3;
  color: #ffffff;
}
.batch-head .actions .flow-batch-add-btn {
  border-color: #93c5fd;
  background: #eff6ff;
  color: #1d4ed8;
}
.batch-head .actions .flow-batch-add-btn:hover {
  border-color: #60a5fa;
  background: #dbeafe;
  color: #1e40af;
}
.batch-clear-btn {
  border-color: #b42318;
  background: #d92d20;
}
.batch-clear-btn:hover {
  border-color: #912018;
  background: #b42318;
}
.batch-history-btn {
  border-color: #047857;
  background: #059669;
}
.batch-history-btn:hover {
  border-color: #065f46;
  background: #047857;
}
.batch-moves-btn {
  border-color: #475467;
  background: #667085;
}
.batch-moves-btn:hover {
  border-color: #344054;
  background: #475467;
}
.batch-trend-btn {
  border-color: #1d4ed8;
  background: #2563eb;
}
.batch-trend-btn:hover {
  border-color: #1e40af;
  background: #1d4ed8;
}
.inventory-transfer-panel {
  margin-top: 12px;
}
.inventory-transfer-list {
  display: grid;
  gap: 8px;
}
.inventory-transfer-card,
.transfer-source-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border: 1px solid #dbeafe;
  border-radius: 8px;
  background: #f8fbff;
}
.inventory-transfer-main {
  flex: 1;
  min-width: 0;
}
.inventory-transfer-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  justify-content: flex-end;
}
.status-pill {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0 9px;
  border-radius: 999px;
  color: #0f766e;
  background: #ccfbf1;
  font-size: 12px;
  font-weight: 950;
}
.inventory-transfer-form .transfer-source-card {
  grid-column: 1 / -1;
  background: #fff;
}
.danger-note {
  padding: 10px 12px;
  border: 1px solid rgba(217, 45, 32, .28);
  border-radius: 8px;
  color: #b42318;
  background: #fff4f2;
  font-weight: 800;
}
.production-stats {
  margin-top: 12px;
}
.purchase-inventory-inbound-note {
  margin: 0 0 12px;
  padding: 9px 11px;
  border: 1px solid #fedf89;
  border-radius: 7px;
  background: #fffaeb;
  color: #7a2e0e;
  font-size: 12px;
  font-weight: 750;
}
.purchase-inventory-inbound-note strong {
  color: #d92d20;
  font-weight: 950;
}
.purchase-type-inventory-hint {
  margin-left: 8px;
  color: #d92d20;
  font-size: 12px;
  font-weight: 700;
  line-height: 1;
  white-space: nowrap;
}
.table-wrap {
  width: 100%;
  overflow-x: auto;
}
.date-segmented {
  display: inline-flex;
  align-items: center;
  margin: 0 0 12px;
  border: 1px solid #d0d5dd;
  border-radius: 6px;
  overflow: hidden;
  background: #fff;
}
.date-segmented button {
  min-height: 30px;
  padding: 0 10px;
  border: 0;
  border-right: 1px solid #d0d5dd;
  border-radius: 0;
  background: #fff;
  color: #344054;
  font-size: 13px;
}
.date-segmented button:last-child {
  border-right: 0;
}
.date-segmented button.active {
  background: #f4f3ff;
  color: #6941c6;
  box-shadow: inset 0 0 0 1px #7a5af8;
  font-weight: 800;
}
#outboundView .date-segmented button.active {
  background: #2563eb;
  color: #fff;
  box-shadow: inset 0 0 0 1px #1d4ed8;
}
#outboundView .date-segmented button.outbound-last-month-preset,
#outboundView .date-segmented button.outbound-last-month-preset.active {
  background: #ea580c;
  color: #fff;
  box-shadow: inset 0 0 0 1px #c2410c;
  font-weight: 900;
}
#outboundView .date-segmented button.outbound-last-month-preset.cost-completed,
#outboundView .date-segmented button.outbound-last-month-preset.cost-completed.active {
  background: #079455;
  color: #fff;
  box-shadow: inset 0 0 0 1px #067647;
}
.outbound-custom-date {
  margin: -4px 0 12px;
}
.outbound-cost-complete-panel {
  border-color: #bbf7d0;
  background: #f0fdf4;
}
.outbound-cost-complete-panel.muted-panel {
  border-color: #e4e7ec;
  background: #f8fafc;
}
.outbound-cost-complete-tool {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}
@keyframes outbound-cost-submit-ring-pulse {
  0%, 100% {
    opacity: .30;
    transform: scale(1.005);
    box-shadow: 0 0 0 2px rgba(249, 115, 22, .10), 0 0 10px rgba(234, 88, 12, .22);
  }
  50% {
    opacity: .72;
    transform: scale(1.055);
    box-shadow: 0 0 0 5px rgba(249, 115, 22, .05), 0 0 18px rgba(234, 88, 12, .38);
  }
}
.outbound-cost-complete-tool .outbound-cost-submit-btn {
  width: 100px;
  min-width: 100px;
  max-width: 100px;
  min-height: 40px;
  height: 40px;
  padding: 0 12px;
  font-weight: 900;
}
.outbound-cost-complete-tool button.primary.outbound-cost-submit-btn:not(.submitted) {
  position: relative;
  overflow: visible;
  background: #f97316 !important;
  border-color: #ea580c !important;
  color: #fff !important;
  box-shadow: 0 4px 12px rgba(234, 88, 12, .22) !important;
}
.outbound-cost-complete-tool button.primary.outbound-cost-submit-btn:not(.submitted)::after {
  position: absolute;
  inset: -3px;
  border: 1px solid rgba(249, 115, 22, .42);
  border-radius: 13px;
  content: "";
  pointer-events: none;
  will-change: transform, opacity, box-shadow;
  animation: outbound-cost-submit-ring-pulse 1.9s cubic-bezier(.4, 0, .2, 1) infinite !important;
}
.outbound-cost-complete-tool button.primary.outbound-cost-submit-btn:not(.submitted):hover {
  background: #ea580c !important;
  border-color: #c2410c !important;
}
.outbound-cost-complete-tool .outbound-cost-submit-btn:disabled {
  opacity: 0.72;
  cursor: not-allowed;
}
.outbound-cost-complete-panel.completed-panel {
  border-color: #d0d5dd;
  background: #f2f4f7;
  color: #667085;
}
.outbound-cost-complete-panel.completed-panel h3,
.outbound-cost-complete-panel.completed-panel .muted,
.outbound-cost-complete-panel.completed-panel small {
  color: #667085;
}
.outbound-cost-complete-panel.completed-panel .outbound-cost-complete-tool .outbound-cost-submit-btn,
.outbound-cost-complete-panel.completed-panel .outbound-cost-complete-tool .outbound-cost-submit-btn:disabled {
  background: #16a34a !important;
  border-color: #15803d !important;
  color: #fff !important;
  opacity: 1;
  animation: none !important;
  box-shadow: 0 4px 12px rgba(22, 163, 74, .20);
}
.outbound-cost-complete-panel.completed-panel .outbound-cost-submit-btn::after {
  content: none;
  animation: none !important;
}
.cost-completion-done-text {
  font-weight: 800;
}
.outbound-cost-status-modal {
  display: grid;
  gap: 14px;
}
.outbound-cost-status-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}
.outbound-cost-status-summary article,
.outbound-cost-status-summary button {
  border: 1px solid #d0d5dd;
  border-radius: 10px;
  padding: 12px 14px;
  background: #f8fafc;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
}
.outbound-cost-status-summary button {
  display: block;
  width: 100%;
  height: auto;
  min-height: 66px;
  line-height: 1.2;
  appearance: none;
}
.outbound-cost-status-summary .submitted {
  border-color: #bbf7d0;
  background: #f0fdf4;
  color: #15803d;
}
.outbound-cost-status-summary .pending {
  border-color: #fecaca;
  background: #fff1f2;
  color: #dc2626;
}
.outbound-cost-status-summary button:hover,
.outbound-cost-status-summary button.active {
  border-color: #2563eb;
  box-shadow: 0 0 0 2px rgba(37, 99, 235, .14);
}
.outbound-cost-status-summary span,
.outbound-cost-status-row small {
  display: block;
  color: #667085;
  font-size: 13px;
  font-weight: 700;
}
.outbound-cost-status-summary strong {
  display: block;
  margin-top: 3px;
  font-size: 24px;
  line-height: 1;
}
.outbound-cost-status-list {
  display: grid;
  gap: 8px;
  max-height: 58vh;
  overflow: auto;
}
.outbound-cost-status-row {
  display: grid;
  grid-template-columns: minmax(160px, 1fr) auto minmax(180px, 1.2fr);
  align-items: center;
  gap: 10px;
  border: 1px solid #e4e7ec;
  border-radius: 10px;
  padding: 10px 12px;
  background: #fff;
  width: 100%;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
}
.outbound-cost-status-row:hover,
.outbound-cost-status-row:focus-visible {
  border-color: #60a5fa;
  box-shadow: 0 0 0 2px rgba(37, 99, 235, .12);
  outline: none;
}
.outbound-cost-status-row.submitted {
  border-color: #bbf7d0;
  background: #f0fdf4;
}
.outbound-cost-status-row.pending {
  border-color: #fecaca;
  background: #fff1f2;
}
.outbound-cost-status-pill {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  min-width: 72px;
  min-height: 26px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 950;
}
.outbound-cost-status-row.submitted .outbound-cost-status-pill {
  color: #15803d;
  background: #dcfce7;
}
.outbound-cost-status-row.pending .outbound-cost-status-pill {
  color: #b42318;
  background: #fee2e2;
}
dialog:has(.outbound-cost-submit-alert) {
  width: min(620px, calc(100vw - 32px));
}
.outbound-cost-submit-alert {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  align-items: start;
  gap: 14px;
  padding: 18px;
  border: 1px solid #fed7aa;
  border-radius: 10px;
  background: #fffaf5;
}
.outbound-cost-submit-alert-icon {
  display: inline-flex;
  width: 40px;
  height: 40px;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  color: #fff;
  background: #dc2626;
  font-size: 24px;
  font-weight: 950;
  line-height: 1;
}
.outbound-cost-submit-alert strong {
  display: block;
  margin: 1px 0 7px;
  color: #9a3412;
  font-size: 16px;
  font-weight: 950;
}
.outbound-cost-submit-alert p {
  margin: 0;
  color: #475467;
  font-size: 14px;
  font-weight: 750;
  line-height: 1.7;
  white-space: pre-wrap;
}
.outbound-cost-submit-alert.success {
  border-color: #abefc6;
  background: #f6fef9;
}
.outbound-cost-submit-alert.success .outbound-cost-submit-alert-icon {
  background: #16a34a;
}
.outbound-cost-submit-alert.success strong {
  color: #166534;
}
.success-text {
  color: #15803d;
  font-weight: 800;
}
.outbound-metric {
  min-height: 118px;
  padding: 16px 18px;
  border: 1px solid var(--line);
  background: var(--surface);
}
.outbound-metric::before {
  height: 4px;
  background: linear-gradient(90deg, var(--primary), #14b8a6);
}
.outbound-metric span {
  color: var(--muted);
  font-size: 16px;
  font-weight: 950;
}
.outbound-metric strong {
  margin-top: 10px;
  color: var(--ink);
  font-size: 36px;
  font-weight: 950;
  letter-spacing: 0;
}
.outbound-metric small {
  margin-top: 8px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 900;
}
.outbound-money-metric span,
.outbound-money-metric strong,
.outbound-money-metric small {
  color: #dc2626;
}
.outbound-money-metric strong {
  white-space: nowrap;
  word-spacing: 0.08em;
}
.outbound-money-metric.historical-settlement-metric strong {
  color: #16a34a;
}
.dashboard-money {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  margin-top: 8px;
  padding: 5px 10px;
  border-radius: 999px;
  background: #fef2f2;
  color: #b42318;
  font-size: 15px;
  font-weight: 950;
}
.outbound-products {
  display: block;
  max-width: 420px;
  white-space: normal;
  line-height: 1.6;
}
.outbound-batch-meta {
  margin-top: 5px;
  font-size: 13.5px;
  line-height: 1.45;
  font-weight: 750;
}
.outbound-batch-date {
  color: #101828;
  font-weight: 900;
}
.outbound-batch-money {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  justify-content: flex-end;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}
.outbound-money-item {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  min-height: 26px;
  padding: 2px 7px 2px 3px;
  border: 1px solid #bfdbfe;
  border-radius: 999px;
  background: #eff6ff;
  color: #1e3a8a;
  white-space: nowrap;
}
.outbound-money-item b {
  display: inline-flex;
  align-items: center;
  height: 20px;
  padding: 0 6px;
  border-radius: 999px;
  background: #2563eb;
  color: #ffffff;
  font-size: 12px;
  font-weight: 900;
  line-height: 1;
}
.outbound-money-item em {
  font-style: normal;
  font-weight: 900;
}
button.outbound-money-item {
  font: inherit;
  cursor: pointer;
  appearance: none;
}
.outbound-money-action {
  transition: border-color .15s ease, background .15s ease, box-shadow .15s ease, transform .15s ease;
}
.outbound-money-action:hover,
.outbound-money-action:focus-visible {
  border-color: #2563eb;
  background: #dbeafe;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, .12);
  transform: translateY(-1px);
}
.outbound-money-item-muted {
  border-color: #d8dee8;
  background: #f8fafc;
  color: #475569;
}
.outbound-money-item-muted b {
  background: #64748b;
}
.outbound-money-locked {
  border-color: #d8dee8;
  background: #f1f5f9;
  color: #64748b;
  cursor: not-allowed;
}
.outbound-money-locked b {
  background: #94a3b8;
}
.outbound-money-item-muted.outbound-money-action:hover,
.outbound-money-item-muted.outbound-money-action:focus-visible {
  border-color: #64748b;
  background: #eef2f7;
  box-shadow: 0 0 0 3px rgba(100, 116, 139, .12);
}
.outbound-freight-estimated-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: #ea580c;
  font-size: 12px;
  font-weight: 900;
  line-height: 1;
  white-space: nowrap;
}
.outbound-freight-field {
  display: grid;
  align-content: start;
  gap: 7px;
  min-width: 0;
  color: #344054;
  font-size: 14px;
  font-weight: 600;
}
.outbound-freight-combined {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: stretch;
  min-width: 0;
  height: 40px;
  min-height: 40px;
  overflow: hidden;
  border: 1px solid #cbd8ea;
  border-radius: var(--radius-md);
  background: #fff;
  transition: border-color .16s ease, box-shadow .16s ease;
}
.outbound-freight-combined:focus-within {
  border-color: #6ea0ff;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, .10);
}
.form-grid .outbound-freight-amount {
  width: 100%;
  min-width: 0;
  height: 38px;
  min-height: 38px;
  padding: 8px 11px;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}
.form-grid .outbound-freight-amount:focus {
  outline: 0;
  box-shadow: none;
}
.outbound-estimated-freight-check {
  display: flex !important;
  flex-direction: row !important;
  align-items: center;
  justify-content: center;
  width: auto;
  gap: 6px;
  min-height: 0;
  margin: 0;
  padding: 0 11px;
  border: 0;
  border-left: 1px solid #dbe4f0;
  border-radius: 0;
  background: #fffaf5;
  cursor: pointer;
  white-space: nowrap;
}
.outbound-estimated-freight-check input[type="checkbox"] {
  display: grid;
  place-content: center;
  flex: 0 0 auto;
  width: 18px !important;
  min-width: 18px !important;
  max-width: 18px !important;
  height: 18px !important;
  min-height: 18px !important;
  max-height: 18px !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 1px solid #cbd5e1 !important;
  border-radius: 3px !important;
  outline: 0 !important;
  background: #fff !important;
  box-shadow: none !important;
  appearance: none !important;
  -webkit-appearance: none !important;
  cursor: pointer;
}
.outbound-estimated-freight-check input[type="checkbox"]::before {
  content: "";
  color: #fff;
  font-size: 13px;
  font-weight: 900;
  line-height: 1;
}
.outbound-estimated-freight-check input[type="checkbox"]:checked::before {
  content: "✓";
}
.outbound-estimated-freight-check input[type="checkbox"]:checked {
  border-color: #f97316 !important;
  background: #f97316 !important;
}
.outbound-estimated-freight-check strong {
  color: #c2410c;
  font-size: 13px;
  line-height: 1.2;
}
.outbound-freight-hint {
  color: #667085;
  font-size: 11px;
  line-height: 1.25;
}
.outbound-estimated-freight-check:has(input:checked) {
  background: #fff7ed;
  box-shadow: none;
}
.outbound-estimated-freight-check:has(input:disabled) {
  cursor: not-allowed;
  opacity: .62;
}
.outbound-batch-money strong {
  color: #0f766e;
}
.outbound-batch-money .outbound-batch-total {
  border-color: #fecaca;
  background: #fff1f2;
  color: #dc2626;
}
.outbound-batch-money .outbound-batch-total b {
  background: #dc2626;
}
.outbound-batch-list-head {
  flex-wrap: wrap;
  align-items: center;
  row-gap: 8px;
  padding-bottom: 4px;
}
.outbound-batch-total-count {
  display: inline-flex;
  align-items: center;
  min-height: 20px;
  margin-left: 8px;
  padding: 1px 7px;
  border: 1px solid #bfdbfe;
  border-radius: 999px;
  background: #eff6ff;
  color: #1d4ed8;
  font-size: 12px;
  font-weight: 900;
  vertical-align: middle;
  white-space: nowrap;
}
.outbound-batch-product-total-count {
  display: inline-flex;
  align-items: center;
  min-height: 20px;
  margin-left: 8px;
  padding: 1px 7px;
  border: 1px solid #c4b5fd;
  border-radius: 999px;
  background: #f5f3ff;
  color: #6d28d9;
  font-size: 12px;
  font-weight: 900;
  vertical-align: middle;
  white-space: nowrap;
}
.outbound-batch-head-tools {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  align-items: center;
  gap: 8px 12px;
  margin-left: auto;
  min-width: min(100%, 460px);
  max-width: 100%;
}
.outbound-shop-month-freight {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
  min-height: 28px;
  padding: 0;
  border: 0;
  background: transparent;
  color: #334155;
  font-size: 12px;
  font-weight: 800;
}
.outbound-shop-month-freight.locked {
  min-height: 30px;
  padding: 5px 11px;
  border: 1px solid #cbd5e1;
  border-radius: 999px;
  background: #f1f5f9;
  color: #64748b;
  cursor: not-allowed;
  pointer-events: none;
  white-space: nowrap;
}
.outbound-shop-month-freight input {
  width: 112px;
  height: 28px;
  padding: 4px 8px;
  border: 1px solid #cbd5e1;
  border-radius: 7px;
  font-size: 12px;
  font-weight: 800;
  text-align: right;
}
.outbound-shop-month-freight .filter-mini-btn {
  height: 28px;
  padding: 0 10px;
}
.outbound-shop-month-freight.disabled input {
  background: #e5e7eb;
  color: #94a3b8;
}
.outbound-batch .batch-head,
html.tablet-desktop-mode .outbound-batch .batch-head {
  grid-template-columns: minmax(0, 1fr) minmax(140px, auto) minmax(120px, auto) max-content;
  align-items: center;
}
.outbound-batch .batch-head > .actions,
html.tablet-desktop-mode .outbound-batch .batch-head > .actions {
  grid-column: 4;
  justify-self: end;
  justify-content: flex-end;
  width: auto;
  min-width: max-content;
  max-width: none;
  flex-wrap: nowrap;
}
.outbound-average-freight,
.outbound-total-average-freight {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  color: #0f766e;
  font-size: 13px;
  font-weight: 900;
  white-space: nowrap;
}
.outbound-total-average-freight {
  font-size: 14px;
  flex: 0 0 auto;
}
.dividend-panel {
  display: grid;
  gap: 16px;
}
.dividend-head {
  align-items: stretch;
  margin-bottom: 2px;
  padding: 14px;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  background: #f8fafc;
}
.dividend-heading {
  display: grid;
  align-content: center;
  gap: 7px;
  min-width: 320px;
}
.dividend-title-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.dividend-title-row h3 {
  margin: 0;
  color: #0f172a;
  font-size: 20px;
  font-weight: 950;
}
.dividend-status-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 28px;
  padding: 4px 12px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 950;
}
.dividend-status-pill.editing {
  border: 1px solid #86efac;
  background: #dcfce7;
  color: #15803d;
}
.dividend-status-pill.archived {
  border: 1px solid #cbd5e1;
  background: #e2e8f0;
  color: #475569;
}
.dividend-status-line {
  display: flex;
  align-items: center;
  gap: 10px;
  width: fit-content;
  max-width: 100%;
  padding: 8px 10px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 850;
}
.dividend-status-line strong {
  font-size: 15px;
  font-weight: 950;
}
.dividend-status-line.editing {
  border: 1px solid #bbf7d0;
  background: #f0fdf4;
  color: #166534;
}
.dividend-status-line.archived {
  border: 1px solid #e2e8f0;
  background: #f1f5f9;
  color: #475569;
}
.dividend-actions {
  display: flex;
  align-items: end;
  gap: 10px;
  flex-wrap: wrap;
}
.dividend-toolbar {
  align-content: center;
  justify-content: flex-end;
  min-width: 360px;
  padding: 10px;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  background: #fff;
}
.dividend-actions label {
  min-width: 220px;
}
.dividend-month-picker {
  display: grid;
  gap: 5px;
}
.dividend-month-picker span {
  color: #475569;
  font-size: 13px;
  font-weight: 950;
}
.dividend-month-menu {
  position: relative;
  min-width: 280px;
}
.dividend-month-menu summary {
  list-style: none;
}
.dividend-month-menu summary::-webkit-details-marker {
  display: none;
}
.dividend-month-current {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 46px;
  padding: 7px 10px 7px 14px;
  border: 2px solid #22c55e;
  border-radius: 999px;
  background: linear-gradient(180deg, #f0fdf4, #dcfce7);
  color: #166534;
  cursor: pointer;
  box-shadow: 0 8px 20px rgba(34, 197, 94, .12);
  transition: border-color .22s var(--ease-ui), box-shadow .22s var(--ease-ui), background .22s var(--ease-ui), transform .18s var(--ease-soft);
}
.dividend-month-current:hover {
  box-shadow: 0 10px 24px rgba(34, 197, 94, .16);
  transform: translateY(-1px);
}
.dividend-month-current.archived {
  border-color: #94a3b8;
  background: linear-gradient(180deg, #f8fafc, #e2e8f0);
  color: #475569;
  box-shadow: 0 8px 20px rgba(100, 116, 139, .12);
}
.dividend-month-current b {
  font-size: 16px;
  font-weight: 950;
}
.dividend-month-current small {
  padding: 4px 9px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .86);
  font-size: 12px;
  font-weight: 950;
  white-space: nowrap;
}
.dividend-month-current::after {
  content: "⌄";
  color: currentColor;
  font-size: 14px;
  font-weight: 950;
  transition: transform .22s var(--ease-soft);
}
.dividend-month-menu[open] .dividend-month-current::after {
  content: "⌃";
}
.dividend-month-list {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 30;
  display: grid;
  gap: 12px;
  width: min(440px, calc(100vw - 36px));
  max-height: 430px;
  overflow: auto;
  padding: 12px;
  border: 1px solid #dbeafe;
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 18px 42px rgba(16, 24, 40, .18);
  transform-origin: top right;
  animation: dropdownSoftIn .26s var(--ease-soft) both;
}
.dividend-month-year-group {
  display: grid;
  gap: 8px;
}
.dividend-month-year-group h4 {
  position: sticky;
  top: -12px;
  z-index: 1;
  margin: 0;
  padding: 8px 4px 6px;
  background: #fff;
  color: #0f172a;
  font-size: 15px;
  font-weight: 950;
}
.dividend-month-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(72px, 1fr));
  gap: 8px;
}
.dividend-month-option {
  display: grid;
  align-items: center;
  justify-items: center;
  gap: 4px;
  min-height: 58px;
  padding: 8px 8px;
  border-radius: 12px;
  background: #fff;
  text-align: center;
  transition: background .18s var(--ease-ui), border-color .18s var(--ease-ui), box-shadow .18s var(--ease-ui), transform .18s var(--ease-soft);
}
.dividend-month-option:hover {
  background: #f8fbff;
  transform: translateY(-1px);
}
.dividend-month-option span,
.dividend-month-option strong,
.dividend-month-option small,
.dividend-month-option em {
  display: block;
}
.dividend-month-option strong {
  color: #111827;
  font-size: 16px;
  font-weight: 950;
}
.dividend-month-option small {
  margin-top: 0;
  color: #64748b;
  font-size: 12px;
  font-weight: 950;
  white-space: nowrap;
}
.dividend-month-option.editing {
  border-color: #bbf7d0;
}
.dividend-month-option.editing small {
  background: #dcfce7;
  color: #166534;
}
.dividend-month-option.archived {
  border-color: #e2e8f0;
}
.dividend-month-option.archived small {
  background: #f1f5f9;
  color: #475569;
}
.dividend-month-option small {
  padding: 3px 7px;
  border-radius: 999px;
}
.dividend-month-option.active {
  border-color: #2563eb;
  background: #eff6ff;
  box-shadow: inset 0 0 0 1px #2563eb;
}
.dividend-toolbar button {
  min-height: 46px;
  padding-inline: 16px;
  border-radius: 8px;
  font-weight: 950;
}
.dividend-metric-grid {
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
}
.dividend-metric {
  position: relative;
  overflow: hidden;
  min-height: 96px;
  padding: 14px 16px;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  background: #fff;
}
.dividend-metric::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 4px;
  background: #60a5fa;
}
.dividend-metric span {
  display: block;
  color: #667085;
  font-weight: 900;
}
.dividend-metric strong {
  display: block;
  margin-top: 8px;
  color: #101828;
  font-size: 24px;
  font-weight: 950;
}
.dividend-main-metric {
  border-color: #fecaca;
  background: #fff7f7;
}
.dividend-main-metric::before {
  background: #ef4444;
}
.dividend-main-metric strong {
  color: #dc2626;
}
.dividend-money-metric {
  border-color: #fecaca;
  background: #fff7f7;
}
.dividend-money-metric::before {
  background: #ef4444;
}
.dividend-money-metric strong {
  color: #dc2626;
}
.dividend-table-wrap {
  overflow-x: hidden;
  overflow-y: auto;
  max-height: 68vh;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  background: #fff;
}
.dividend-table {
  width: 100%;
  min-width: 0;
  table-layout: fixed;
  border-collapse: separate;
  border-spacing: 0;
}
.dividend-col-short {
  width: 3.6%;
}
.dividend-col-owner {
  width: 4.8%;
}
.dividend-col-shop {
  width: 8.2%;
}
.dividend-col-money {
  width: 5.15%;
}
.dividend-col-cost {
  width: 5.7%;
}
.dividend-col-freight {
  width: 6.5%;
}
.dividend-col-rate {
  width: 4.7%;
}
.dividend-col-percent {
  width: 4.2%;
}
.dividend-col-note {
  width: 5.8%;
}
.dividend-table th {
  position: sticky;
  top: 0;
  z-index: 20;
  padding: 10px 5px;
  border-bottom: 3px solid #60a5fa;
  background: linear-gradient(180deg, #eff6ff 0%, #dbeafe 100%);
  color: #0f172a;
  font-size: 13.5px;
  line-height: 1.2;
  font-weight: 950;
  box-shadow: 0 5px 12px rgba(37, 99, 235, 0.16);
  white-space: normal;
}
.dividend-table td {
  padding: 6px 5px;
  vertical-align: top;
  color: #0f172a;
  font-size: 13.5px;
  line-height: 1.25;
  white-space: normal;
  word-break: break-word;
}
.dividend-table td:first-child strong {
  display: block;
  color: #101828;
  font-size: 13.5px;
}
.dividend-table td:first-child small,
.dividend-table td small {
  display: block;
  margin-top: 3px;
  color: #667085;
  font-size: 11.5px;
  font-weight: 800;
}
.dividend-table tbody tr[class*="dividend-store-color-"] td {
  background: var(--store-row-bg, #fff);
}
.dividend-table tbody tr[class*="dividend-store-color-"] input,
.dividend-table tbody tr[class*="dividend-store-color-"] select {
  border-color: var(--store-input-border, #d0d5dd);
  background: var(--store-input-bg, #fff);
}
.dividend-table tbody tr[class*="dividend-store-color-"] input:focus {
  border-color: var(--store-accent, #2563eb);
  box-shadow: 0 0 0 3px var(--store-focus, rgba(37, 99, 235, .12));
}
.dividend-store-color-1 { --store-row-bg: #fffdf9; --store-input-bg: #fffaf3; --store-input-border: #fdebd1; --store-accent: #f97316; --store-focus: rgba(249, 115, 22, .10); }
.dividend-store-color-2 { --store-row-bg: #fbfffc; --store-input-bg: #f6fef9; --store-input-border: #d9f8e6; --store-accent: #16a34a; --store-focus: rgba(22, 163, 74, .10); }
.dividend-store-color-3 { --store-row-bg: #fbfdff; --store-input-bg: #f6f9ff; --store-input-border: #dbeafe; --store-accent: #2563eb; --store-focus: rgba(37, 99, 235, .10); }
.dividend-store-color-4 { --store-row-bg: #fffafd; --store-input-bg: #fff5fb; --store-input-border: #fce7f3; --store-accent: #db2777; --store-focus: rgba(219, 39, 119, .10); }
.dividend-store-color-5 { --store-row-bg: #fdfcff; --store-input-bg: #faf7ff; --store-input-border: #ede9fe; --store-accent: #7c3aed; --store-focus: rgba(124, 58, 237, .10); }
.dividend-store-color-6 { --store-row-bg: #fbfeff; --store-input-bg: #f2fcfd; --store-input-border: #cffafe; --store-accent: #0891b2; --store-focus: rgba(8, 145, 178, .10); }
.dividend-store-color-7 { --store-row-bg: #fffef7; --store-input-bg: #fffbed; --store-input-border: #fef3c7; --store-accent: #ca8a04; --store-focus: rgba(202, 138, 4, .10); }
.dividend-store-color-8 { --store-row-bg: #fbfffe; --store-input-bg: #f3fdfa; --store-input-border: #ccfbf1; --store-accent: #0f766e; --store-focus: rgba(15, 118, 110, .10); }
.dividend-store-color-9 { --store-row-bg: #fffafb; --store-input-bg: #fff5f6; --store-input-border: #ffe4e6; --store-accent: #e11d48; --store-focus: rgba(225, 29, 72, .10); }
.dividend-store-color-10 { --store-row-bg: #fcfdfe; --store-input-bg: #f8fafc; --store-input-border: #e2e8f0; --store-accent: #475569; --store-focus: rgba(71, 85, 105, .10); }
.dividend-store-color-11 { --store-row-bg: #fffdf6; --store-input-bg: #fffae8; --store-input-border: #fde68a; --store-accent: #d97706; --store-focus: rgba(217, 119, 6, .10); }
.dividend-store-color-12 { --store-row-bg: #fbfcff; --store-input-bg: #f6f7ff; --store-input-border: #e0e7ff; --store-accent: #4f46e5; --store-focus: rgba(79, 70, 229, .10); }
.dividend-share-row td:first-child {
  background: var(--store-row-bg, #fff7ed);
}
.dividend-owner-group-start td {
  border-top: 3px solid #bfdbfe;
}
.dividend-owner-name {
  color: #1d4ed8;
  font-weight: 950;
  background: var(--store-row-bg, #eff6ff);
  box-shadow: inset 4px 0 0 var(--store-accent, #1d4ed8);
}
.dividend-table input,
.dividend-table select {
  width: 100%;
  min-width: 0;
  height: 34px;
  padding: 5px 6px;
  font-size: 14px;
}
.dividend-table select {
  min-width: 0;
}
.dividend-fixed-shop-cell {
  color: #111827;
  font-weight: 900;
}
.dividend-fixed-shop {
  display: block;
  max-height: 38px;
  overflow: hidden;
  color: #111827;
  font-size: 13px;
  line-height: 1.25;
}
.readonly-money {
  color: #0f766e;
  font-weight: 900;
}
.manual-sync-cell input {
  border-color: var(--store-input-border, #93c5fd);
  background: var(--store-input-bg, #f8fbff);
  color: #0f172a;
  font-weight: 900;
}
.manual-sync-cell small {
  max-width: 100%;
  white-space: normal;
  line-height: 1.25;
}
.carryover-reimbursement-note {
  color: #dc2626 !important;
  font-weight: 950 !important;
}
.result-money,
.result-percent {
  color: #1d4ed8;
  font-size: 13.5px;
  font-weight: 950;
}
.dividend-bonus-value,
.dividend-deng-value,
.dividend-partner-value {
  color: #dc2626;
}
.dividend-bonus-input-cell input {
  color: #dc2626;
  border-color: #fecaca !important;
  font-weight: 950;
}
.dividend-bonus-value small {
  color: #b42318 !important;
}
.dividend-person-fold {
  display: grid;
  gap: 10px;
  justify-items: start;
}
.dividend-person-fold-head {
  display: grid;
  grid-template-columns: minmax(150px, 1fr) auto;
  align-items: center;
  gap: 12px;
  width: min(100%, 280px);
  min-height: 54px;
  padding: 10px 14px;
  border: 1px solid #fed7aa;
  border-radius: 8px;
  background: #fff7ed;
  color: #111827;
  text-align: left;
}
.dividend-person-fold-head span,
.dividend-person-fold-head strong,
.dividend-person-fold-head small,
.dividend-person-fold-head em {
  display: block;
}
.dividend-person-fold-head strong {
  font-size: 15px;
  font-weight: 950;
}
.dividend-person-fold-head small {
  margin-top: 3px;
  color: #9a3412;
  font-size: 12px;
  font-weight: 900;
}
.dividend-person-fold-head em {
  min-width: 58px;
  padding: 7px 12px;
  border-radius: 999px;
  background: #f97316;
  color: #fff;
  font-style: normal;
  font-weight: 950;
  text-align: center;
}
.dividend-person-fold.open .dividend-person-fold-head {
  border-color: #fdba74;
}
.dividend-person-summary {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 10px;
}
.dividend-person-summary article {
  padding: 13px 15px;
  border: 1px solid #fed7aa;
  border-radius: 8px;
  background: #fff7ed;
}
.dividend-person-summary span,
.dividend-owner-summary h4 {
  color: #111827;
  font-weight: 950;
}
.dividend-person-summary small {
  margin-left: 8px;
  color: #ea580c;
  font-weight: 900;
}
.dividend-person-summary strong {
  display: block;
  margin-top: 6px;
  color: #dc2626;
  font-size: 22px;
  font-weight: 950;
}
.dividend-owner-summary {
  display: grid;
  gap: 10px;
}
.compact-section-head {
  margin-bottom: 0;
}
.dividend-owner-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 8px;
}
.dividend-owner-grid article {
  padding: 10px 12px;
  border: 1px solid #dbeafe;
  border-radius: 8px;
  background: #f8fbff;
}
.dividend-owner-grid strong,
.dividend-owner-grid span,
.dividend-owner-grid small {
  display: block;
}
.dividend-owner-grid span {
  margin-top: 4px;
  color: #dc2626;
  font-size: 18px;
  font-weight: 950;
}
.dividend-owner-grid small {
  margin-top: 4px;
  color: #64748b;
  font-size: 12px;
  font-weight: 800;
}
.dividend-owner-grid .dividend-owner-note {
  color: #ea580c;
  font-weight: 950;
}
.dividend-archive-note {
  margin: 6px 0 0;
  color: #0f766e;
  font-size: 13px;
  font-weight: 900;
}
.dividend-rules {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.dividend-rules span {
  padding: 7px 10px;
  border: 1px solid #dbeafe;
  border-radius: 999px;
  background: #eff6ff;
  color: #1d4ed8;
  font-size: 13px;
  font-weight: 900;
}
.outbound-proof {
  display: flex;
  align-items: center;
  gap: 7px;
  color: #475467;
  font-size: 12px;
  font-weight: 800;
}
.outbound-proof-multiple {
  flex-wrap: wrap;
  justify-content: center;
  max-width: 250px;
}
.outbound-proof-multiple > span {
  flex-basis: 100%;
  text-align: center;
}
.outbound-proof-thumb {
  width: 54px;
  height: 54px;
  border: 1px solid var(--line);
  border-radius: 8px;
  object-fit: contain;
  background: #fff;
}
.outbound-shop-name {
  color: #101828;
  font-size: 17px;
  font-weight: 950;
}
.outbound-batch-title-line {
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}
.outbound-shipment-code,
.outbound-batch-info-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  width: fit-content;
  margin: 0;
  padding: 2px 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: #24364f;
  font-size: 13px;
  font-weight: 950;
  line-height: 1.2;
  white-space: nowrap;
  box-shadow: none;
}
.outbound-shipping-method-chip {
  color: #1d4ed8;
}
.outbound-batch-quantity-chip {
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: #111827;
}
.outbound-history-stock-btn {
  cursor: pointer;
}
.outbound-history-stock-btn:hover,
.outbound-history-stock-btn:focus-visible {
  background: transparent;
  color: #0f172a;
}
.outbound-history-stock-empty {
  color: #64748b;
}
.history-stock-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 12px;
}
.history-stock-summary span {
  border: 1px solid #d8e3f3;
  border-radius: 8px;
  background: #f8fbff;
  padding: 10px 12px;
  color: #52627a;
  font-size: 13px;
}
.history-stock-summary strong {
  display: block;
  margin-top: 4px;
  color: #0f172a;
  font-size: 17px;
}
.history-stock-product {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 260px;
}
.history-stock-product strong,
.history-stock-product small {
  display: block;
}
.history-stock-product small {
  color: #64748b;
  margin-top: 3px;
}
.history-stock-thumb {
  width: 44px;
  height: 44px;
  border-radius: 8px;
  border: 1px solid #d8e3f3;
  object-fit: contain;
  background: #fff;
  flex: 0 0 auto;
}
.history-stock-thumb.placeholder {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #94a3b8;
  font-size: 12px;
}
.history-stock-table td:nth-child(n+3),
.history-stock-table th:nth-child(n+3) {
  text-align: right;
}
.outbound-product-row {
  margin-top: 8px;
}
.outbound-product-total-price {
  color: #dc2626;
  font-weight: 950;
}
.segmented-control {
  display: inline-flex;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
}
.segmented-control button {
  min-height: 32px;
  border: 0;
  border-right: 1px solid var(--line);
  border-radius: 0;
}
.segmented-control button:last-child { border-right: 0; }
.segmented-control button.active {
  background: var(--primary);
  color: #fff;
}
.outbound-compare-tools {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
}
.outbound-compare-metric-control button.active {
  background: #f97316;
}
.outbound-chart-subtitle {
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}
.outbound-average-freight-legend {
  color: #ea580c;
}
.outbound-compare-month {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 900;
}
.outbound-compare-month span {
  white-space: nowrap;
}
.outbound-year-pair-picker em {
  color: #475467;
  font-style: normal;
  font-weight: 950;
}
.outbound-compare-toggle {
  min-height: 34px;
  padding: 6px 14px;
  border: 1px solid #bfdbfe;
  border-radius: 999px;
  background: #eff6ff;
  color: #1d4ed8;
  font-weight: 950;
}
.outbound-compare-toggle.active {
  border-color: #2563eb;
  background: #2563eb;
  color: #fff;
}
.outbound-compare-pill {
  min-width: 86px;
  min-height: 34px;
  padding: 6px 13px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  color: var(--ink);
  font-weight: 850;
}
.outbound-compare-pill-month {
  min-width: 78px;
}
.outbound-compare-pill-date {
  min-width: 148px;
  border-radius: 999px;
}
.outbound-compare-pill:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
  outline: none;
}
.pager {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin: 12px 0 4px;
  color: #667085;
  font-size: 13px;
  font-weight: 800;
}
.pager button {
  min-height: 32px;
  padding: 0 12px;
}
.pager button:disabled {
  opacity: .45;
  cursor: not-allowed;
}
.bar-chart {
  display: flex;
  align-items: end;
  gap: 10px;
  min-height: 230px;
  overflow-x: auto;
  padding: 12px 0 4px;
}
.bar-item {
  display: grid;
  justify-items: center;
  gap: 6px;
  min-width: 74px;
}
.bar-track {
  display: flex;
  align-items: end;
  width: 34px;
  height: 160px;
  border-radius: 8px;
  background: #eef2f7;
  overflow: hidden;
}
.bar-fill {
  width: 100%;
  border-radius: 8px 8px 0 0;
  background: linear-gradient(180deg, #34d399, #2563eb);
}
.bar-value {
  color: #0f766e;
  font-size: 15px;
  font-weight: 950;
}
.bar-label {
  max-width: 104px;
  color: #101828;
  font-size: 14px;
  font-weight: 950;
  text-align: center;
  overflow-wrap: anywhere;
}
.bar-note {
  max-width: 138px;
  color: #475467;
  font-size: 12px;
  font-weight: 850;
  text-align: center;
  line-height: 1.35;
}
.period-compare-chart .bar-item {
  min-width: 118px;
}
.outbound-chart-stack {
  display: grid;
  gap: 18px;
}
.outbound-year-month-section {
  padding-top: 6px;
  border-top: 1px dashed #d0d5dd;
}
.outbound-year-month-section:first-child {
  padding-top: 0;
  border-top: 0;
}
.outbound-chart-title {
  margin: 0 0 8px;
  color: #101828;
  font-size: 15px;
  font-weight: 950;
}
.outbound-chart-legend {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: -2px 0 8px;
  color: #475467;
  font-size: 12px;
  font-weight: 900;
}
.outbound-chart-legend span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.outbound-chart-legend i {
  width: 18px;
  height: 8px;
  border-radius: 999px;
}
.outbound-chart-legend .legend-current {
  background: linear-gradient(90deg, #60a5fa, #2563eb);
}
.outbound-chart-legend .legend-custom {
  background: linear-gradient(90deg, #fdba74, #f97316);
}
.year-month-chart .bar-item {
  min-width: 74px;
}
.year-month-chart .bar-track {
  width: 30px;
}
.year-month-chart .year-month-dual-track {
  justify-content: center;
  gap: 4px;
  width: 42px;
  padding: 0 5px;
}
.year-month-chart .year-month-dual-track .bar-fill {
  flex: 0 0 22px;
  width: 22px;
}
.year-month-chart .year-month-dual-track.has-custom .bar-fill {
  flex-basis: 13px;
  width: 13px;
}
.year-month-chart .current-year-fill {
  background: linear-gradient(180deg, #60a5fa, #2563eb);
}
.year-month-chart .custom-compare-fill {
  background: linear-gradient(180deg, #fdba74, #f97316);
}
.custom-compare-note {
  max-width: 124px;
  color: #c2410c;
  font-weight: 950;
}
.outbound-combined-chart .bar-item {
  min-width: 108px;
}
.outbound-combined-value {
  display: grid;
  gap: 3px;
  justify-items: center;
  min-height: 36px;
  line-height: 1.1;
}
.outbound-combined-value strong {
  color: #0f766e;
  font-size: 14px;
  font-weight: 950;
}
.outbound-combined-value span {
  color: #ea580c;
  font-size: 12px;
  font-weight: 900;
  white-space: nowrap;
}
.outbound-year-summary-chart {
  justify-content: flex-start;
  gap: 48px;
  min-height: 230px;
  padding-left: 36px;
}
.outbound-year-summary-chart .bar-item {
  min-width: 150px;
}
.outbound-year-summary-chart .bar-track {
  width: 64px;
}
.outbound-year-summary-chart .current-year-fill {
  background: linear-gradient(180deg, #60a5fa, #2563eb);
}
.outbound-year-summary-chart .custom-compare-fill {
  background: linear-gradient(180deg, #fdba74, #f97316);
}
.year-compare-chart .bar-item {
  min-width: 96px;
}
.custom-time-chart .bar-item {
  min-width: 138px;
}
.shop-period-picker {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin: 4px 0 12px;
  padding: 10px;
  border: 1px solid #dbeafe;
  border-radius: 8px;
  background: #eff6ff;
}
.shop-period-picker > span {
  color: #1d4ed8;
  font-size: 13px;
  font-weight: 950;
}
.shop-period-toggle-all {
  min-height: 30px;
  padding: 0 12px;
  border: 1px solid #2563eb;
  border-radius: 999px;
  background: #2563eb;
  color: #fff;
  font-size: 12px;
  font-weight: 950;
}
.shop-period-toggle-all:hover {
  border-color: #1d4ed8;
  background: #1d4ed8;
}
.shop-period-picker label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 30px;
  padding: 4px 9px;
  border: 1px solid #bfdbfe;
  border-radius: 999px;
  background: #fff;
  color: #1e3a8a;
  font-size: 12px;
  font-weight: 900;
}
.shop-period-picker input {
  width: 14px;
  height: 14px;
  min-height: 14px;
  margin: 0;
}
.shop-period-chart {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 8px;
}
.shop-period-row {
  display: grid;
  grid-template-columns: minmax(140px, 190px) minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  padding: 12px;
  border: 1px solid #e4e7ec;
  border-radius: 8px;
  background: #fff;
}
.shop-period-row > strong {
  color: #101828;
  font-size: 16px;
  font-weight: 950;
  overflow-wrap: anywhere;
}
.shop-period-bars {
  display: grid;
  gap: 10px;
}
.shop-period-group {
  display: grid;
  gap: 5px;
}
.shop-period-group + .shop-period-group {
  padding-top: 8px;
  border-top: 1px dashed #d0d5dd;
}
.shop-period-label {
  color: #344054;
  font-size: 13px;
  font-weight: 950;
}
.shop-period-line {
  display: grid;
  grid-template-columns: 82px minmax(80px, 1fr) 88px;
  gap: 8px;
  align-items: center;
}
.shop-period-line span {
  color: #475467;
  font-size: 13px;
  font-weight: 950;
}
.shop-period-line b {
  font-size: 14px;
  font-weight: 950;
  text-align: right;
}
.shop-period-track {
  height: 12px;
  border-radius: 999px;
  background: #eef2f7;
  overflow: hidden;
}
.shop-period-track i {
  display: block;
  height: 100%;
  border-radius: inherit;
}
.shop-period-product-cost .shop-period-track i {
  background: #3b82f6;
}
.shop-period-product-cost b {
  color: #1d4ed8;
}
.shop-period-freight-cost .shop-period-track i {
  background: #f97316;
}
.shop-period-freight-cost b {
  color: #c2410c;
}
@media (max-width: 1180px) {
  .shop-period-chart {
    grid-template-columns: 1fr;
  }
}

.metric small {
  display: block;
  margin-top: 6px;
  color: var(--muted);
  font-weight: 700;
}
.flow-note-display {
  grid-column: 1 / -1;
  min-height: 24px;
  padding: 0;
  border-radius: 0;
  background: transparent;
  color: #344054;
  font-size: 13px;
  font-weight: 800;
}
.job-duration {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  min-height: 24px;
  padding: 2px 9px;
  border-radius: 999px;
  border: 1px solid var(--duration-border, #e2e8f0);
  background: var(--duration-bg, #ffffff);
  color: var(--duration-text, #1d4ed8);
  font-size: 13px;
  font-weight: 900;
  box-shadow: 0 1px 4px var(--duration-shadow, rgba(37, 99, 235, .08));
}
.completed-toolbar {
  grid-template-columns: max-content auto auto;
  justify-content: start;
  align-items: end;
}
.completed-toolbar label {
  width: 320px;
}
.completed-toolbar select {
  width: 320px;
}
.completed-toolbar .custom-select-shell,
.completed-toolbar .custom-select-trigger {
  width: 320px;
  max-width: 320px;
}
.completed-custom-date {
  align-items: end;
}
.completed-custom-date label {
  width: auto;
  min-width: 140px;
}
.completed-custom-date select,
.completed-month-pill {
  min-width: 116px;
  min-height: 34px;
  padding: 6px 12px;
  border: 1px solid #d0d5dd;
  border-radius: 999px;
  background: #fff;
  color: #101828;
  font-size: 13px;
  font-weight: 850;
}
.completed-total {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 38px;
  color: var(--muted);
}
.completed-total strong {
  color: var(--ink);
}
.completed-total span {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 12px;
  border-radius: 999px;
  background: #ecfdf3;
  color: #067647;
  font-weight: 900;
}
.completed-batch-out-btn {
  border-color: #ea580c;
  background: #f97316;
  color: #fff;
  font-weight: 900;
}
.completed-batch-out-btn:hover {
  border-color: #c2410c;
  background: #ea580c;
  color: #fff;
}

.kanban {
  grid-template-columns: repeat(7, minmax(220px, 1fr));
  align-items: start;
  overflow-x: auto;
  padding-bottom: 10px;
}
.lane {
  min-width: 220px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f9fafb;
}
.lane-title {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
  font-size: 14px;
  font-weight: 800;
}
.job-card {
  padding: 13px;
  margin-bottom: 10px;
}
.flow-list {
  display: grid;
  gap: 8px;
}
.batch-lines {
  display: grid;
  gap: 8px;
  margin-top: 8px;
}
.batch-lines.collapsed {
  display: none;
}
.batch-collapsed-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
  padding: 8px;
  border: 1px dashed #fed7aa;
  border-radius: 8px;
  background: #fffaf5;
}
.batch-collapsed-summary span {
  display: inline-flex;
  align-items: center;
  max-width: 360px;
  padding: 5px 8px;
  border-radius: 999px;
  background: #fff;
  color: #9a3412;
  font-size: 13px;
  font-weight: 800;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.batch-group {
  --batch-border: #fed7aa;
  --batch-bg: #fffaf5;
  --batch-rail: #fdba74;
  --batch-text: #9a3412;
  --batch-on-rail: var(--batch-text);
  padding: 12px;
  border: 2px solid var(--batch-border);
  border-radius: 8px;
  background: var(--batch-bg);
  box-shadow: inset 3px 0 0 var(--batch-rail), 0 2px 8px rgba(16, 24, 40, .06);
  cursor: pointer;
  position: relative;
  overflow: visible;
}
.batch-progress-pill {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0 9px;
  border-radius: 999px;
  border: 1px solid var(--batch-border);
  background: var(--batch-bg);
  color: var(--batch-on-rail);
  font-size: 12px;
  font-weight: 900;
  box-shadow: 0 1px 3px rgba(16, 24, 40, .06);
}
.batch-download-count {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0 9px;
  border-radius: 999px;
  border: 1px solid #d0d5dd;
  background: #f8fafc;
  color: #667085;
  font-size: 12px;
  font-weight: 850;
  white-space: nowrap;
}
.batch-download-count-tablet {
  display: none;
}
.batch-duration-wrap {
  display: contents;
}
.batch-status-counts {
  display: grid;
  grid-template-columns: repeat(6, 54px);
  align-items: center;
  justify-content: start;
  justify-self: stretch;
  column-gap: 7px;
  row-gap: 6px;
  min-height: 28px;
  min-width: 0;
  margin: 0;
}
.batch-status-count {
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  gap: 4px;
  width: 54px;
  min-height: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  font-size: 12px;
  font-weight: 900;
  line-height: 1;
  color: #334155 !important;
  background: transparent !important;
  white-space: nowrap;
  appearance: none;
  cursor: pointer;
}
.batch-status-count:hover .batch-status-item {
  filter: brightness(1.02);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .46), inset 0 -2px 0 rgba(15, 23, 42, .14);
}
.batch-status-count.active .batch-status-item {
  box-shadow: inset 0 0 0 2px rgba(255, 255, 255, .36), inset 0 -2px 0 rgba(15, 23, 42, .16);
}
.batch-status-item {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 38px;
  min-height: 24px;
  padding: 3px 7px;
  border-radius: 999px;
  color: #fff !important;
  font-size: 13px;
  font-weight: 900;
  line-height: 1;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .38), inset 0 -2px 0 rgba(15, 23, 42, .12);
  white-space: nowrap;
  box-sizing: border-box;
  overflow: hidden;
  transition: box-shadow .16s ease, filter .16s ease;
}
.batch-status-item.status-waiting { background: #16a34a; }
.batch-status-item.status-purchase { background: #eab308; }
.batch-status-item.status-schedule,
.batch-status-item.status-production,
.batch-status-item.status-outsourced { background: #ef4444; }
.batch-status-item.status-completed { background: #64748b; }
.batch-status-number {
  min-width: 16px;
  background: transparent !important;
  color: #334155 !important;
  font-size: 15px;
  font-weight: 950;
  line-height: 1;
  text-align: center;
}
.batch-status-count.status-waiting .batch-status-number { color: #15803d !important; }
.batch-status-count.status-purchase .batch-status-number { color: #a16207 !important; }
.batch-status-count.status-schedule .batch-status-number,
.batch-status-count.status-production .batch-status-number,
.batch-status-count.status-outsourced .batch-status-number { color: #dc2626 !important; }
.batch-status-count.status-completed .batch-status-number { color: #475569 !important; }
.batch-owner-shop {
  display: inline-flex;
  align-items: center;
  max-width: 100%;
  min-height: 28px;
  padding: 4px 11px;
  border: 1px solid rgba(251, 146, 60, .24);
  border-radius: 999px;
  background: #ffffff;
  color: #101828;
  font-size: 15px;
  font-weight: 950;
  line-height: 1.25;
  box-shadow: 0 1px 4px rgba(249, 115, 22, .08);
}
.batch-head {
  display: grid;
  grid-template-columns: minmax(420px, 1.35fr) 360px auto auto;
  align-items: center;
  gap: 12px;
}
.batch-duration {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  justify-self: stretch;
  min-height: 32px;
  padding: 4px 12px;
  border: 1px dashed var(--duration-border, #e2e8f0);
  border-radius: 8px;
  background: var(--duration-bg, #ffffff);
  color: var(--duration-text, var(--batch-text));
  font-size: 14px;
  font-weight: 950;
  white-space: nowrap;
  pointer-events: none;
  box-shadow: 0 1px 4px var(--duration-shadow, rgba(16, 24, 40, .06));
}
.batch-group button,
.batch-group input,
.batch-group select,
.batch-group textarea,
.batch-group label,
.batch-group img,
.batch-group .clickable-image {
  cursor: auto;
}
.batch-line, .batch-form-line {
  display: grid;
  align-items: center;
  gap: 10px;
  padding: 8px;
  border: 1px solid #e6edf5;
  border-radius: 8px;
  background: #ffffff;
}
.batch-line {
  grid-template-columns: minmax(160px, 1fr) auto auto;
}
.batch-form-line {
  grid-template-columns: minmax(150px, 1fr) minmax(130px, .9fr) minmax(86px, 108px) minmax(200px, 1.2fr);
}
.batch-product-summary {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}
.batch-product-summary > span:last-child {
  min-width: 0;
}
.batch-product-thumb {
  width: 56px;
  height: 56px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #eef2f7;
  flex: 0 0 auto;
  object-fit: contain;
}
.batch-product-thumb.placeholder {
  display: grid;
  place-items: center;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}
.batch-form-list {
  display: grid;
  gap: 8px;
}
.batch-form-line input {
  width: 100%;
}

.stock-source-field,
.batch-source-cell {
  display: grid;
  gap: 6px;
}
.stock-source-picker {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}
.stock-source-picker.compact {
  grid-template-columns: 1fr;
  gap: 6px;
}
.stock-source-choice {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 48px;
  padding: 8px 10px;
  border: 1px solid #cbd5e1;
  border-radius: 10px;
  background: #fff;
  cursor: pointer;
}
.stock-source-choice input {
  width: 16px;
  height: 16px;
  min-height: 16px;
  padding: 0;
  accent-color: #2563eb;
  flex: 0 0 auto;
}
.stock-source-choice span {
  display: grid;
  gap: 2px;
  min-width: 0;
}
.stock-source-choice strong {
  color: #0f172a;
  font-size: 13px;
  font-weight: 950;
  white-space: nowrap;
}
.stock-source-choice small {
  color: #2563eb;
  font-size: 12px;
  font-weight: 850;
}
.stock-source-choice:has(input:checked) {
  border-color: #2563eb;
  background: #eff6ff;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, .12);
}
.stock-source-choice.disabled {
  opacity: .55;
  cursor: not-allowed;
}
.stock-source-choice.disabled small {
  color: #64748b;
}
.batch-out-form .batch-form-line {
  grid-template-columns: minmax(300px, 1fr) minmax(210px, 240px) minmax(130px, 150px) minmax(120px, 150px) auto;
}
.batch-out-add {
  display: grid;
  grid-template-columns: minmax(150px, .8fr) auto minmax(260px, 1.2fr) auto auto;
  gap: 8px;
  align-items: center;
}
.batch-out-add input {
  min-width: 150px;
}
.batch-out-add select {
  min-width: 260px;
}
.batch-job-fnsku-add {
  grid-template-columns: minmax(220px, 1fr) auto;
  max-width: 460px;
}
.batch-job-fnsku-add input {
  min-width: 220px;
}
.batch-draft-image-preview {
  grid-column: 1 / span 2;
  align-self: center;
}
.batch-out-form .batch-out-line {
  grid-template-columns: minmax(300px, 1fr) minmax(210px, 240px) minmax(130px, 150px) minmax(120px, 150px) auto;
}
.batch-out-new-section {
  display: grid;
  gap: 10px;
  padding-top: 8px;
  border-top: 1px solid var(--line);
}
.batch-out-form .batch-out-new-line {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  border-color: #93c5fd;
  background: #f8fbff;
}
.batch-new-product-fields {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  align-items: end;
}
.batch-new-image-field {
  grid-column: span 2;
  display: grid !important;
  grid-template-columns: minmax(160px, 1fr) auto;
  align-items: center;
  column-gap: 12px;
  min-height: 74px;
  padding: 8px 10px;
}
.batch-new-image-field .batch-product-thumb {
  grid-column: 2;
  grid-row: 1 / span 3;
  width: 58px;
  height: 58px;
  margin-top: 0;
  object-fit: contain;
}
.batch-new-image-field .field-title,
.batch-new-image-field input,
.batch-new-image-field .muted {
  grid-column: 1;
}
.batch-new-price-field.price-autosave-missing {
  padding: 6px;
  border: 1px solid #ef4444;
  border-radius: 8px;
  background: #fff7f7;
}
.batch-new-price-hint {
  align-self: center;
  padding: 10px;
}
.batch-new-fnsku-confirm {
  grid-column: 1 / -1;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  justify-self: start;
  width: fit-content;
  max-width: 100%;
  min-height: 24px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
}
.batch-new-fnsku-confirm input {
  width: 16px;
  min-width: 16px;
  height: 16px;
  min-height: 16px;
  margin: 0;
  padding: 0;
  box-shadow: none;
  flex: 0 0 auto;
}
.batch-out-price-cell {
  display: grid;
  gap: 6px;
  align-self: center;
}
.batch-out-price-cell input {
  min-height: 40px;
}
.batch-out-line-price-missing {
  border-color: #ef4444 !important;
  background: #fff7f7 !important;
  box-shadow: inset 4px 0 0 #ef4444;
}
.batch-out-price-missing {
  padding: 8px;
  border: 1px solid #ef4444;
  border-radius: 8px;
  background: #fff;
}
.batch-out-price-missing input {
  border-color: #ef4444 !important;
  background: #fff !important;
}
.batch-out-price-current {
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  color: #047857;
  font-weight: 950;
}
.hidden-price-cell {
  min-height: 1px;
}
.batch-out-remove {
  align-self: end;
  min-height: 40px;
  padding: 0 14px;
  white-space: nowrap;
}
@media (max-width: 1280px) {
  .batch-out-form .batch-out-new-line {
    grid-template-columns: minmax(0, 1fr);
  }
  .batch-new-product-fields {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .batch-out-new-line .batch-out-remove {
    justify-self: end;
  }
}
.outbound-draft-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  padding: 10px 12px;
  border: 1px solid #bfdbfe;
  border-radius: 8px;
  background: #f8fbff;
}
.outbound-draft-actions button {
  min-height: 34px;
  padding: 0 12px;
  font-weight: 850;
}
.outbound-draft-actions .draft-save-btn {
  border-color: #0284c7;
  background: #0ea5e9;
  color: #fff;
}
.outbound-draft-actions .draft-save-btn:hover {
  border-color: #0369a1;
  background: #0284c7;
  color: #fff;
}
.outbound-draft-actions .muted {
  font-size: 13px;
  font-weight: 800;
}
.outbound-draft-list {
  display: grid;
  gap: 10px;
}
.outbound-draft-card {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 12px;
  border: 1px solid #e4e7ec;
  border-radius: 8px;
  background: #fff;
}
.outbound-draft-new-badge {
  position: absolute;
  top: 9px;
  left: 9px;
  z-index: 2;
  display: inline-grid;
  place-items: center;
  width: 21px;
  height: 21px;
  border-radius: 6px;
  background: #ef4444;
  color: #fff;
  font-size: 12px;
  font-weight: 950;
  line-height: 1;
  box-shadow: 0 2px 6px rgba(239, 68, 68, .24);
}
.outbound-draft-card.is-new-draft > div:first-of-type > strong {
  padding-left: 29px;
}
.outbound-draft-card strong {
  display: block;
  color: #101828;
  font-size: 15px;
  font-weight: 950;
}
.outbound-draft-status {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  margin-left: 8px;
  padding: 0 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 900;
  vertical-align: middle;
}
.outbound-draft-status.normal {
  color: #075985;
  background: #e0f2fe;
}
.outbound-draft-status.price-review {
  color: #b42318;
  background: #fee4e2;
}
.outbound-draft-section + .outbound-draft-section {
  margin-top: 18px;
}
.outbound-draft-section > h4 {
  margin: 0 0 10px;
  color: #344054;
}
.outbound-draft-collapsible {
  overflow: hidden;
  border: 1px solid #dbe5f1;
  border-radius: 12px;
  background: #fff;
}
.outbound-draft-collapsible > summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 64px;
  padding: 14px 18px;
  color: #344054;
  font-size: 15px;
  font-weight: 900;
  cursor: pointer;
  list-style: none;
  user-select: none;
}
.outbound-draft-collapsible > summary::-webkit-details-marker {
  display: none;
}
.outbound-draft-collapsible > summary::before {
  content: "▶";
  margin-right: 9px;
  color: #64748b;
  font-size: 11px;
  transition: transform .2s ease;
}
.outbound-draft-collapsible[open] > summary::before {
  transform: rotate(90deg);
}
.outbound-draft-section-label {
  position: relative;
  display: inline-flex;
  align-items: center;
  margin-right: auto;
}
.outbound-draft-section-count {
  position: absolute;
  top: -10px;
  left: calc(100% + 4px);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 19px;
  height: 19px;
  padding: 0 5px;
  border: 2px solid #fff;
  border-radius: 999px;
  background: #ef4444;
  box-shadow: 0 2px 6px rgba(220, 38, 38, .25);
  color: #fff;
  font-size: 11px;
  font-weight: 900;
  line-height: 1;
}
.outbound-draft-section-content {
  padding: 0 16px 16px;
  border-top: 1px solid #eef2f6;
}
.outbound-draft-section-content > .outbound-draft-list,
.outbound-draft-section-content > .muted {
  margin-top: 12px;
}
.outbound-draft-card p,
.outbound-draft-card small,
.outbound-draft-card em {
  display: block;
  margin: 4px 0 0;
  color: #475467;
  font-style: normal;
  font-weight: 800;
}
.outbound-draft-card small {
  color: #667085;
  font-size: 12px;
}
.outbound-draft-card em {
  color: #98a2b3;
  font-size: 12px;
}
.outbound-draft-card-actions {
  display: inline-flex;
  gap: 8px;
}
.outbound-draft-card.price-inline-card {
  align-items: stretch;
}
.outbound-draft-card.price-inline-card .outbound-draft-card-actions {
  align-self: end;
}
.outbound-draft-inline-submit {
  min-width: 76px;
}
.outbound-draft-inline-submit:disabled {
  border-color: #cbd5e1;
  background: #cbd5e1;
  color: #fff;
  cursor: not-allowed;
  opacity: 1;
}
.outbound-draft-products {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(284px, 1fr));
  gap: 8px;
  margin-top: 10px;
}
.outbound-draft-product {
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr) auto;
  gap: 9px;
  align-items: center;
  min-height: 66px;
  padding: 8px;
  border: 1px solid #dbe3ee;
  border-radius: 8px;
  background: #f8fafc;
}
.outbound-draft-product.is-price-missing {
  border-color: #ef4444;
  background: #fff7f7;
  box-shadow: inset 3px 0 0 #ef4444;
}
.outbound-draft-product-image {
  width: 52px;
  height: 52px;
  border: 1px solid #e2e8f0;
  border-radius: 7px;
  background: #fff;
  object-fit: contain;
}
.outbound-draft-product-image.placeholder {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #94a3b8;
  font-size: 12px;
  font-weight: 800;
}
.outbound-draft-product-copy {
  display: grid;
  gap: 2px;
  min-width: 0;
}
.outbound-draft-product-copy strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.outbound-draft-product-copy span {
  overflow: hidden;
  color: #64748b;
  font-size: 12px;
  font-weight: 750;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.outbound-draft-price-status {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 0 9px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 900;
  white-space: nowrap;
}
.outbound-draft-price-status.missing {
  background: #fee2e2;
  color: #dc2626;
}
.outbound-draft-price-status.ready {
  background: #dcfce7;
  color: #15803d;
}
.outbound-draft-price-entry {
  display: grid;
  grid-template-columns: auto 104px;
  align-items: center;
  gap: 6px;
  color: #475467;
  font-size: 12px;
  font-weight: 900;
  white-space: nowrap;
}
.outbound-draft-price-entry input {
  box-sizing: border-box;
  width: 104px;
  min-width: 0;
  height: 32px;
  padding: 0 8px;
  border-radius: 7px;
  font-weight: 850;
}
.outbound-draft-price-entry.missing input {
  border-color: #ef4444;
  background: #fff;
}
.outbound-draft-price-entry.ready input {
  border-color: #22c55e;
  background: #f0fdf4;
}
.outbound-draft-products-empty {
  margin-top: 10px !important;
}
.cost-draft-page {
  display: grid;
  gap: 14px;
}
.cost-draft-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 18px;
  border: 1px solid #dbeafe;
  border-radius: 10px;
  background: #eff6ff;
}
.cost-draft-header h3 {
  margin: 0;
  color: #0f172a;
  font-size: 20px;
}
.cost-draft-header p {
  margin: 4px 0 0;
  color: #475569;
  font-size: 14px;
}
.cost-draft-header button {
  min-height: 36px;
  padding: 0 14px;
  border: 1px solid #bfdbfe;
  border-radius: 8px;
  background: #ffffff;
  color: #1d4ed8;
  font-weight: 900;
}
.cost-draft-summary {
  display: inline-flex;
  align-items: baseline;
  gap: 6px;
  justify-self: start;
  padding: 8px 14px;
  border: 1px solid #fed7aa;
  border-radius: 999px;
  background: #fff7ed;
  color: #c2410c;
  font-weight: 900;
}
.cost-draft-summary strong {
  color: #ea580c;
  font-size: 20px;
}
.historical-transfer-table-wrap {
  max-height: 360px;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}
.historical-transfer-table {
  margin: 0;
}
.historical-transfer-table th,
.historical-transfer-table td {
  padding: 10px 12px;
  vertical-align: middle;
}
.historical-settlement-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 20px;
  align-items: center;
  padding: 12px 14px;
  border: 1px solid #fdba74;
  border-radius: 8px;
  background: #fff7ed;
}
.historical-settlement-summary strong,
.historical-settlement-value {
  color: #dc2626;
  font-weight: 950;
}
.historical-qty-input {
  width: 120px;
  margin-right: 6px;
  font-weight: 900;
}
.historical-manager-panel {
  display: grid;
  gap: 14px;
  width: 100%;
  min-width: 0;
}
.historical-manager-form {
  display: grid;
  gap: 12px;
}
.historical-manager-filters {
  display: grid;
  grid-template-columns: 180px minmax(260px, 420px) 180px;
  gap: 12px;
  align-items: end;
  justify-content: start;
}
.historical-manager-summary {
  display: grid;
  grid-template-columns: repeat(6, minmax(130px, 1fr));
  gap: 10px;
}
.historical-manager-card {
  display: grid;
  gap: 4px;
  padding: 12px 14px;
  border: 1px solid #dbeafe;
  border-left: 4px solid #2f6bff;
  border-radius: 10px;
  background: #fff;
}
.historical-manager-card span,
.historical-manager-card small {
  color: var(--muted);
  font-weight: 800;
}
.historical-manager-card strong {
  color: var(--ink);
  font-size: 20px;
  font-weight: 950;
}
.historical-manager-card.amount-card strong {
  color: #dc2626;
}
.historical-manager-card.settlement-card strong {
  color: #059669;
}
.historical-manager-card.warning-card {
  border-color: #fed7aa;
  border-left-color: #f97316;
  background: #fff7ed;
}
.historical-manager-section {
  display: grid;
  gap: 8px;
}
.historical-manager-section h4 {
  margin: 0;
  color: var(--ink);
}
.historical-manager-table-wrap {
  max-height: 320px;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
}
.historical-manager-table th,
.historical-manager-table td {
  white-space: nowrap;
}
.historical-manager-shop-row.is-expanded > td {
  background: #f8fbff;
}
.historical-manager-detail-row > td {
  padding: 0;
  background: #fbfdff;
}
.historical-manager-product-list {
  display: grid;
  gap: 8px;
  padding: 12px;
}
.historical-manager-product-line {
  display: grid;
  grid-template-columns: 52px minmax(260px, 1fr) repeat(5, minmax(92px, max-content));
  gap: 12px;
  align-items: center;
  padding: 10px 12px;
  border: 1px solid #e5edf7;
  border-radius: 10px;
  background: #fff;
}
.historical-manager-product-line > div {
  display: grid;
  gap: 3px;
  min-width: 0;
}
.historical-manager-product-line span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}
.historical-manager-product-line b,
.historical-manager-product-line strong {
  color: var(--ink);
  font-weight: 950;
}
.historical-manager-product-main strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.historical-manager-inline-empty {
  padding: 14px;
}
.historical-record-list {
  display: grid;
  gap: 10px;
}
.historical-record-card {
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  overflow: hidden;
}
.historical-record-card summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  cursor: pointer;
  background: #f8fafc;
}
.historical-record-meta {
  padding: 10px 14px;
  color: var(--muted);
  border-top: 1px solid var(--line);
}
.historical-record-products {
  display: grid;
  gap: 8px;
  padding: 10px 14px 14px;
}
.historical-record-product {
  display: grid;
  grid-template-columns: 46px minmax(220px, 1fr) 80px 110px 110px;
  gap: 10px;
  align-items: center;
  padding: 8px;
  border: 1px solid #e5eaf3;
  border-radius: 8px;
  background: #fff;
}
.historical-record-product span {
  display: block;
  color: var(--muted);
  font-size: 12px;
}
.money-red {
  color: #dc2626;
  font-weight: 950;
}
.money-green {
  color: #059669;
  font-weight: 950;
}
.batch-replenish-remove {
  align-self: end;
  min-height: 34px;
  white-space: nowrap;
}
.ocr-box {
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px dashed #93c5fd;
  border-radius: 10px;
  background: #f8fbff;
}
.ocr-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}
.ocr-paste-zone {
  display: grid;
  place-items: center;
  min-height: 84px;
  border: 2px dashed #7c3aed;
  border-radius: 12px;
  background: #ffffff;
  color: #4c1d95;
  font-weight: 900;
  cursor: text;
  outline: none;
}
.ocr-paste-zone:focus {
  border-color: #2563eb;
  box-shadow: 0 0 0 4px rgba(37, 99, 235, .14);
  background: #f8fbff;
}
.ocr-paste-zone.active {
  border-color: #2563eb;
  background: #eff6ff;
}
.ocr-result {
  display: grid;
  gap: 10px;
}
.ocr-shop-required {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 380px);
  align-items: end;
  gap: 16px;
  padding: 12px;
  border: 1px solid #fb923c;
  border-radius: 8px;
  background: #fff7ed;
  color: #9a3412;
}
.ocr-shop-required p {
  margin: 4px 0 0;
  color: #9a3412;
}
.ocr-shop-required label {
  display: grid;
  gap: 6px;
  min-width: 0;
}
.ocr-shop-required select {
  width: 100%;
  min-width: 0;
  min-height: 38px;
  border-color: #fb923c;
  background: #fff;
}
.ocr-confirm-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
}
.ocr-summary-count {
  color: #dc2626;
}
@media (max-width: 720px) {
  .ocr-shop-required {
    grid-template-columns: minmax(0, 1fr);
    align-items: stretch;
    gap: 10px;
  }
}
.ocr-table th,
.ocr-table td {
  padding: 8px;
}
.ocr-qty-input {
  width: 92px;
  min-height: 34px;
  border: 1px solid #98a2b3;
  border-radius: 8px;
  padding: 0 8px;
  font-weight: 900;
  text-align: center;
}
.ocr-price-locked {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 0 10px;
  border: 1px solid #bbf7d0;
  border-radius: 8px;
  background: #f0fdf4;
  color: #047857;
  font-weight: 900;
  white-space: nowrap;
}
.ocr-price-missing-row {
  background: #fff7f7;
}
.ocr-price-missing-row td {
  border-top-color: #fecaca;
  border-bottom-color: #fecaca;
}
.ocr-price-missing-input {
  border-color: #ef4444 !important;
  background: #fff !important;
  box-shadow: 0 0 0 2px rgba(239, 68, 68, 0.1);
}
.price-autosave-required.price-autosave-missing {
  border-color: #ef4444 !important;
  background: #fff7f7 !important;
  box-shadow: 0 0 0 2px rgba(239, 68, 68, 0.12);
}
.ocr-thumb {
  width: 48px;
  height: 48px;
  border-radius: 8px;
  object-fit: contain;
  border: 1px solid var(--line);
}
.ocr-thumb.placeholder {
  display: grid;
  place-items: center;
  background: #eef2ff;
  color: #4f46e5;
  font-size: 12px;
  font-weight: 900;
}
.ocr-edit-section {
  display: grid;
  gap: 8px;
}
.ocr-edit-section h3 {
  margin: 4px 0 0;
  font-size: 15px;
}
.ocr-edit-line {
  display: grid;
  grid-template-columns: 52px minmax(220px, 1fr) minmax(120px, 160px);
  gap: 10px;
  align-items: end;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #ffffff;
}
.ocr-edit-line.missing {
  grid-template-columns: 52px minmax(150px, 1fr) minmax(170px, 1.1fr) minmax(180px, 1.1fr) minmax(110px, .75fr) minmax(150px, .9fr);
  border-color: #c4b5fd;
  background: #fbfaff;
}
.ocr-edit-line input,
.ocr-edit-line select {
  width: 100%;
  min-height: 42px;
}
.ocr-edit-line.missing .ocr-price-field input {
  min-width: 150px;
  font-size: 15px;
  font-weight: 900;
}
.ocr-edit-line.missing .ocr-image-field {
  grid-column: 2 / -1;
}
.danger-text {
  color: #dc2626;
  font-weight: 800;
}
.ocr-fnsku-confirm input:checked + .danger-text {
  color: #94a3b8;
  font-weight: 700;
}
.ocr-result pre {
  max-height: 120px;
  overflow: auto;
  white-space: pre-wrap;
  margin: 0;
  padding: 8px;
  border-radius: 8px;
  background: #ffffff;
  border: 1px solid var(--line);
}
.batch-note-field textarea {
  min-height: 48px;
  resize: vertical;
}
.batch-note-default-field {
  display: flex;
  align-items: flex-end;
  gap: 10px;
  min-width: 0;
}
.batch-note-default-field .batch-note-field {
  flex: 0 1 min(380px, 72%);
  min-width: 180px;
}
.batch-note-default-field .batch-note-field textarea {
  width: 100%;
}
.batch-default-note {
  align-self: end;
  white-space: nowrap;
}
.batch-add-head {
  margin: 4px 0 0;
}
.batch-add-bottom {
  display: flex;
  justify-content: flex-start;
  margin-top: 8px;
}
.batch-add-bottom .primary {
  min-width: 120px;
}
.batch-new-product-line {
  display: grid;
  grid-template-columns: repeat(5, minmax(105px, 1fr)) auto;
  align-items: end;
  gap: 10px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}
.batch-image-field {
  grid-column: 1 / span 2;
}
.batch-new-product-line .batch-note-default-field {
  grid-column: 3 / span 3;
}
.batch-new-product-line button {
  align-self: end;
}
.batch-job-form {
  max-height: min(78vh, 820px);
  overflow-y: auto;
  overflow-x: hidden;
  padding-right: 6px;
}
.batch-append-notice {
  padding: 8px 10px;
  border-left: 3px solid #3b82f6;
  border-radius: 4px;
  background: #eff6ff;
  color: #344054;
  font-size: 13px;
  line-height: 1.5;
}
.batch-job-form .batch-form-line {
  grid-template-columns: minmax(300px, 1.35fr) minmax(170px, .8fr) minmax(110px, 120px) minmax(240px, 1fr) minmax(110px, auto) auto;
  align-items: center;
  gap: 12px;
  padding: 12px;
}
.batch-material-status-wrap {
  display: block;
  margin-top: 6px;
}
.batch-replenish-material-status {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 3px 9px;
  border: 1px solid currentColor;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 900;
  line-height: 1;
  white-space: nowrap;
  cursor: pointer;
}
.batch-replenish-material-status.sufficient {
  color: #067647;
  background: #ecfdf3;
}
.batch-replenish-material-status.shortage {
  color: #b42318;
  background: #fff1f0;
}
.batch-replenish-material-status.unbound {
  color: #475467;
  background: #f8fafc;
}
.batch-job-form .batch-default-note {
  grid-column: auto;
  justify-self: start;
}
.batch-job-form .batch-new-product-line {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}
.batch-job-form .batch-image-field {
  grid-column: span 2;
}
.batch-job-form .batch-new-product-line .batch-note-default-field {
  grid-column: span 3;
}
.batch-job-form .batch-new-product-line button {
  grid-column: auto;
  justify-self: end;
}
.action-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.action-grid button {
  min-height: 64px;
  font-size: 16px;
}
.picker-list {
  display: grid;
  gap: 8px;
  max-height: 440px;
  overflow: auto;
}
.picker-line {
  grid-template-columns: 22px 58px 1fr;
  align-items: center;
  gap: 10px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}
.picker-thumb {
  width: 58px;
  height: 58px;
  object-fit: contain;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fafc;
}
.picker-thumb.placeholder {
  display: grid;
  place-items: center;
  color: #98a2b3;
  font-size: 12px;
  font-weight: 800;
}
.picker-line input {
  width: 18px;
  height: 18px;
  min-height: 18px;
  margin: 0;
}
.picker-line small {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
}
.picker-shop-filter {
  max-width: 320px;
}
.flow-row {
  display: grid;
  grid-template-columns: minmax(280px, 1.35fr) minmax(250px, 1fr) auto;
  gap: 10px;
  align-items: center;
  padding: 9px 10px;
  background: #fcfdff;
  border: 1px solid #e6edf5;
  border-radius: 8px;
  box-shadow: 0 1px 2px rgba(16, 24, 40, .025);
  position: relative;
  overflow: visible;
}
.new-job-badge {
  position: absolute;
  z-index: 80;
  top: -7px;
  left: -7px;
  display: grid;
  place-items: center;
  width: 20px;
  height: 20px;
  border: 2px solid #fff;
  border-radius: 999px;
  background: #ef4444;
  color: #fff;
  box-shadow: 0 3px 8px rgba(239, 68, 68, .28);
  font-size: 12px;
  font-weight: 950;
  line-height: 1;
  pointer-events: none;
}

.today-completed-badge {
  position: absolute;
  z-index: 81;
  top: -7px;
  left: -7px;
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border: 2px solid #fff;
  border-radius: 999px;
  background: #16a34a;
  color: #fff;
  box-shadow: 0 3px 8px rgba(22, 163, 74, .28);
  font-size: 12px;
  font-weight: 950;
  line-height: 1;
  pointer-events: none;
}

.batch-group.is-new-job {
  z-index: 5;
  overflow: visible !important;
}

.batch-group.is-today-completed,
.flow-row.is-today-completed {
  z-index: 5;
  overflow: visible !important;
}
.job-draft-list {
  max-height: min(68vh, 720px);
  overflow: auto;
}
.job-draft-card {
  align-items: center;
}
.job-draft-card > div:first-child {
  display: grid;
  gap: 5px;
}
.job-draft-type {
  width: fit-content;
  padding: 3px 8px;
  border-radius: 999px;
  background: #dbeafe;
  color: #1d4ed8;
  font-size: 12px;
  font-weight: 900;
}
.flow-main {
  display: flex;
  align-items: center;
  gap: 9px;
  min-width: 0;
}
.flow-check {
  width: 18px;
  height: 18px;
  min-height: 18px;
  flex: 0 0 auto;
  padding: 0;
}
.batch-check {
  margin: 0;
}
.flow-thumb {
  width: 72px;
  height: 72px;
  object-fit: contain;
  border: 1px solid #e6edf5;
  border-radius: 8px;
  background: #f8fafc;
}
.flow-thumb.placeholder {
  display: grid;
  place-items: center;
  color: #98a2b3;
  font-size: 12px;
  font-weight: 800;
}
.flow-title {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin-bottom: 3px;
  font-size: 14px;
}
.flow-meta {
  display: grid;
  grid-template-columns: repeat(2, minmax(110px, 1fr));
  gap: 4px 10px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 650;
}
#completedView .flow-meta {
  justify-self: stretch;
  width: 100%;
  grid-template-columns: repeat(2, minmax(190px, 1fr));
}
#completedView .flow-row,
html.tablet-desktop-mode #completedView .flow-row {
  grid-template-columns: minmax(500px, 43vw) minmax(460px, 520px) 118px minmax(220px, 1fr);
}
#completedView .flow-row > .actions,
html.tablet-desktop-mode #completedView .flow-row > .actions {
  justify-self: end;
  min-width: 220px;
  width: max-content;
}

@media (min-width: 1201px) {
  html.full-hd-completed-layout #completedView .job-quantity-diff-col {
    transform: translateX(-60px);
  }
}
@media (max-width: 1200px) {
  #completedView .flow-row,
  html.tablet-desktop-mode #completedView .flow-row {
    grid-template-columns: 1fr;
  }
  #completedView .flow-meta {
    grid-template-columns: 1fr;
  }
}
.clickable-image { cursor: zoom-in; }
.inline-number,
.inline-date {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}
.inline-number input {
  width: 82px;
  min-height: 30px;
  padding: 5px 9px;
  font-size: 13px;
  font-weight: 800;
}
.inline-date input {
  width: 138px;
  min-height: 30px;
  padding: 5px 9px;
  font-size: 13px;
  font-weight: 800;
}
.batch-created-date {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 3px 10px;
  border: 1px solid var(--batch-border);
  border-radius: 999px;
  background: var(--batch-bg);
  color: var(--batch-on-rail);
  font-size: 14px;
  font-weight: 950;
  box-shadow: 0 1px 3px rgba(16, 24, 40, .06);
}
.status-select {
  width: 112px;
  min-height: 30px;
  padding: 5px 8px;
  font-size: 13px;
  font-weight: 800;
}
.status-badge {
  display: inline-flex;
  align-items: center;
  min-height: 23px;
  padding: 2px 9px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 800;
}
.status-waiting { color: #166534; background: #dcfce7; }
.status-purchase { color: #a16207; background: #fef3c7; }
.status-schedule { color: #b91c1c; background: #fee2e2; }
.status-production { color: #b91c1c; background: #fee2e2; }
.status-badge.outbound-product-count-badge {
  flex: 0 0 auto;
  width: fit-content;
  min-height: 21px;
  padding: 2px 8px;
  border: 1px solid #86efac;
  background: #dcfce7;
  color: #15803d;
  font-size: 12px;
  line-height: 1.15;
  font-weight: 950;
  box-shadow: 0 2px 6px rgba(22, 163, 74, .12);
}
.status-outsourced { color: #b91c1c; background: #fee2e2; }
.status-completed { color: #475467; background: #e5e7eb; }
.status-inventory { color: #0369a1; background: #e0f2fe; }
.status-outbound { color: #b91c1c; background: #fee2e2; }
.creator-locked-field {
  color: #475467;
  background: #f2f4f7;
  cursor: not-allowed;
}
.creator-field-hint {
  display: block;
  margin-top: 5px;
  color: #b54708;
  font-size: 12px;
  font-weight: 700;
}
.job-thumb {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: contain;
  margin-bottom: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #eef2f6;
}
.job-thumb.placeholder {
  display: grid;
  place-items: center;
  color: #98a2b3;
  font-size: 13px;
  font-weight: 800;
}
.job-card h4 {
  margin: 0 0 7px;
  font-size: 15px;
  line-height: 1.35;
}
.meta { display: flex; flex-wrap: wrap; gap: 6px; margin: 11px 0; }
.pill {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 2px 8px;
  border-radius: 999px;
  background: #eef2f6;
  color: #475467;
  font-size: 12px;
  font-weight: 700;
}
.actions { display: flex; gap: 5px; flex-wrap: wrap; }
.actions button { min-height: 28px; padding: 0 8px; font-size: 12px; }
.flow-row .actions button,
.batch-head .actions button {
  min-height: 30px;
  padding: 0 9px;
  font-size: 13px;
  font-weight: 750;
}
.danger-btn {
  border-color: #fecaca;
  background: #fef2f2;
  color: #475467;
}
.danger-btn:hover {
  border-color: #fca5a5;
  background: #fee2e2;
}
.inline-confirm {
  display: inline-flex;
  position: absolute;
  z-index: 80;
  align-items: center;
  gap: 8px;
  width: max-content;
  padding: 8px 10px;
  border: 1px solid #d0d5dd;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 10px 24px rgba(16, 24, 40, .16);
  color: #475467;
  font-size: 14px;
  font-weight: 800;
  line-height: 1.2;
  white-space: nowrap;
}

.inline-confirm.inline-confirm-in-dialog {
  position: fixed;
  z-index: 2147483647;
}
.inline-confirm > span {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
}
.inline-confirm button {
  min-height: 34px;
  padding: 0 12px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 900;
  border-color: #d0d5dd;
  background: #fff;
  color: #344054;
}

.inline-confirm button.inline-confirm-danger-btn {
  border-color: #dc2626;
  background: #dc2626;
  color: #fff;
}

.inline-confirm button.inline-confirm-danger-btn:hover,
.inline-confirm button.inline-confirm-danger-btn:focus-visible {
  border-color: #b91c1c;
  background: #b91c1c;
  color: #fff;
}

#modalSave.is-saving,
.inline-confirm button:disabled {
  cursor: wait;
  opacity: .78;
}

#modalSave.is-saving::before {
  content: "";
  display: inline-block;
  width: 13px;
  height: 13px;
  margin-right: 7px;
  border: 2px solid rgba(255, 255, 255, .52);
  border-top-color: currentColor;
  border-radius: 50%;
  vertical-align: -2px;
  animation: spin .75s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}
.recycle-panel {
  margin-bottom: 14px;
}
.recycle-batch-panel {
  background: #f8fbff;
  border-color: #dbeafe;
}
.recycle-toolbar,
.recycle-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.recycle-toolbar {
  flex-wrap: wrap;
}
.recycle-toolbar-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}
.recycle-select,
.recycle-check {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #344054;
  font-size: 13px;
  font-weight: 850;
  white-space: nowrap;
}
.recycle-select input,
.recycle-check input {
  width: 18px;
  height: 18px;
  accent-color: var(--primary);
}
.recycle-selected-count {
  margin-right: auto;
  color: #0f766e;
  font-size: 14px;
  font-weight: 950;
}
.recycle-list {
  display: grid;
  gap: 8px;
}
.recycle-card {
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}
.recycle-item-card {
  grid-template-columns: 28px 58px minmax(0, 1fr) auto;
}
.recycle-check {
  justify-content: center;
}
.delete-approval-card {
  align-items: start;
  border-color: #f59e0b;
  background: #fffbeb;
}

.delete-approval-detail {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.delete-approval-source-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.delete-approval-source,
.delete-approval-object-type,
.delete-approval-action {
  display: inline-flex;
  min-height: 25px;
  align-items: center;
  border: 1px solid #f4c67a;
  border-radius: 999px;
  padding: 2px 9px;
  color: #92400e;
  background: #fff7df;
  font-size: 11px;
  font-weight: 800;
}

.delete-approval-source {
  border-color: #9dc0ff;
  color: #174ea6;
  background: #eff5ff;
}

.delete-approval-action {
  border-color: #f3a7a7;
  color: #b42318;
  background: #fff1f1;
}

.delete-approval-core {
  color: #475467;
  font-size: 12px;
  font-weight: 700;
}

.delete-approval-context {
  display: flex;
  flex-wrap: wrap;
  gap: 5px 12px;
  margin: 0;
  padding: 8px 10px;
  border: 1px solid #f4d89e;
  border-radius: 7px;
  color: #344054;
  background: rgba(255, 255, 255, .72);
  list-style: none;
  font-size: 12px;
}

.delete-approval-context li {
  overflow-wrap: anywhere;
}
.recycle-thumb {
  width: 58px;
  height: 58px;
  object-fit: contain;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f2f4f7;
}
.recycle-thumb.placeholder {
  display: grid;
  place-items: center;
  color: #98a2b3;
  font-size: 12px;
  font-weight: 800;
}

.inventory-grid {
  position: relative;
  z-index: 0;
  display: flex;
  flex-direction: column;
  grid-template-columns: 1fr;
  gap: 0;
  min-height: 420px;
  overflow: hidden;
}
.inventory-grid table {
  width: 100%;
  table-layout: fixed;
}
.inventory-grid-head {
  flex: 0 0 auto;
}
.inventory-grid-head th {
  background: #f8fafc;
}
.inventory-grid-body {
  flex: 1 1 auto;
  min-height: 360px;
  overflow: auto;
}
.inventory-grid th,
.inventory-grid td {
  padding: 6px 8px;
  border-bottom-color: #cbd5e1;
  vertical-align: middle;
  font-size: 13px;
}
.inventory-grid tbody tr:not(:last-child) td {
  box-shadow: inset 0 -1px 0 rgba(148, 163, 184, .18);
}
.inventory-grid .inventory-check-col,
.inventory-grid .check-cell {
  width: 42px;
  min-width: 42px;
  max-width: 42px;
}
.inventory-draggable-row {
  cursor: grab;
  user-select: none;
}
.inventory-draggable-row:active {
  cursor: grabbing;
}
.inventory-draggable-row input,
.inventory-draggable-row select,
.inventory-draggable-row textarea,
.inventory-draggable-row label {
  cursor: auto;
  user-select: text;
}
.inventory-draggable-row .check-cell {
  cursor: default;
}
.inventory-draggable-row button,
.inventory-draggable-row a,
.inventory-draggable-row [role="button"] {
  cursor: pointer;
}
.inventory-draggable-row img {
  -webkit-user-drag: none;
}
.inventory-row-dragging {
  opacity: .45;
}
.inventory-grid tbody tr.inventory-drag-before td {
  box-shadow: inset 0 3px 0 #60a5fa;
}
.inventory-grid tbody tr.inventory-drag-after td {
  box-shadow: inset 0 -3px 0 #60a5fa;
}
.inventory-grid .inventory-name-col,
.inventory-grid .inventory-name-cell { width: 19%; }
.inventory-grid .inventory-shop-col,
.inventory-grid .inventory-shop-cell { width: 16%; }
.inventory-grid .inventory-type-col,
.inventory-grid .inventory-type-cell { width: 6%; }
.inventory-grid .inventory-price-col,
.inventory-grid .inventory-price-cell { width: 14%; }
.inventory-grid .inventory-qty-col,
.inventory-grid .inventory-qty-cell { width: 16%; }
.inventory-grid .inventory-note-col,
.inventory-grid .inventory-note-cell { width: 14%; text-align: center; }
.inventory-grid .inventory-actions-col,
.inventory-grid td.actions { width: 15%; }
.inventory-grid .inventory-no-price-table .inventory-name-col,
.inventory-grid .inventory-no-price-table .inventory-name-cell { width: 23%; }
.inventory-grid .inventory-no-price-table .inventory-shop-col,
.inventory-grid .inventory-no-price-table .inventory-shop-cell { width: 18%; }
.inventory-grid .inventory-no-price-table .inventory-type-col,
.inventory-grid .inventory-no-price-table .inventory-type-cell { width: 7%; }
.inventory-grid .inventory-no-price-table .inventory-qty-col,
.inventory-grid .inventory-no-price-table .inventory-qty-cell { width: 21%; }
.inventory-grid .inventory-no-price-table .inventory-note-col,
.inventory-grid .inventory-no-price-table .inventory-note-cell { width: 16%; }
.inventory-grid .inventory-no-price-table .inventory-actions-col,
.inventory-grid .inventory-no-price-table td.actions { width: 15%; }
.inventory-grid th.check-cell,
.inventory-grid td.check-cell {
  padding-left: 4px;
  padding-right: 4px;
  text-align: center;
}
.inventory-tool-row th {
  height: 50px;
  padding: 8px;
  border-bottom: 0;
  background: #f3f6fb;
  vertical-align: middle;
}
.inventory-tool-row .inventory-table-date-list {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-start;
  gap: 6px;
}
.inventory-tool-row .inventory-table-date-list button,
.inventory-tool-row .price-pending-filter-btn,
.inventory-table-limit-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 34px;
  min-height: 34px;
  padding: 0 14px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 900;
  white-space: nowrap;
}
.inventory-tool-row .inventory-table-date-list button {
  border-color: #bfdbfe;
  background: #fff;
  color: #1d4ed8;
}
.inventory-tool-row .inventory-table-date-list button.active {
  border-color: #2563eb;
  background: #2563eb;
  color: #fff;
}
.inventory-tool-price-cell,
.inventory-tool-limit-cell {
  text-align: center;
  vertical-align: middle;
}
.inventory-price-tool-split {
  display: grid;
  grid-template-columns: minmax(74px, 1fr) minmax(90px, 1fr);
  align-items: center;
  gap: 8px;
  width: 100%;
}
.inventory-price-tool-split > div:first-child {
  display: flex;
  justify-content: center;
}
.inventory-tool-row .price-pending-filter-btn {
  width: 118px;
  min-width: 118px;
  max-width: 118px;
}
.inventory-table-limit-btn {
  color: #fff;
}
.inventory-price-head,
.inventory-price-pair {
  display: grid;
  grid-template-columns: minmax(74px, 1fr) minmax(90px, 1fr);
  align-items: center;
  gap: 8px;
  max-width: 100%;
}
.inventory-price-head span:nth-child(2),
.inventory-price-pair > strong {
  text-align: center;
}
.inventory-price-head span {
  color: #344054;
  font-size: 12px;
  font-weight: 900;
  white-space: nowrap;
}
.inventory-price-pair > div {
  min-width: 0;
  color: #101828;
  font-size: 12px;
  font-weight: 950;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.inventory-price-pair > strong {
  min-width: 0;
  color: #dc2626;
  font-size: 12px;
  font-weight: 950;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.inventory-price-pair .price-pending-text {
  color: #f97316;
}
.inventory-name-cell .stock-name > div {
  min-width: 0;
}
.inventory-name-cell .stock-name strong,
.inventory-name-cell .stock-name .muted {
  display: block;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.inventory-row-pinned td {
  background: #fff7ed;
}
.inventory-row-pinned .inventory-name-cell {
  box-shadow: inset 3px 0 0 #f97316;
}
.inventory-pin-badge {
  display: inline-flex;
  align-items: center;
  min-height: 20px;
  margin-left: 8px;
  padding: 0 7px;
  border: 1px solid #fdba74;
  border-radius: 999px;
  color: #c2410c;
  background: #ffedd5;
  font-size: 11px;
  font-weight: 900;
  vertical-align: middle;
}
.inventory-grid td.actions {
  display: table-cell;
  vertical-align: middle;
}
.inventory-grid .inventory-actions-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(60px, 1fr));
  gap: 5px;
  align-items: center;
}
.inventory-grid .inventory-actions-grid button {
  min-height: 28px;
  padding: 0 6px;
  font-size: 12px;
  white-space: nowrap;
}
.inventory-grid .inventory-actions-grid .inventory-pin-button {
  border-color: #fdba74;
  color: #c2410c;
  background: #fff7ed;
  font-weight: 800;
}
.inventory-grid .inventory-actions-grid .inventory-pin-button.active {
  border-color: #f97316;
  background: #ffedd5;
}
.batch-limit-btn {
  background: #0ea5e9;
}
.inventory-max-modal {
  display: grid;
  gap: 12px;
}
.inventory-max-tools {
  display: flex;
  align-items: end;
  gap: 10px;
  padding: 10px;
  border: 1px solid #dbeafe;
  border-radius: 10px;
  background: #f8fbff;
}
.inventory-max-tools label {
  display: grid;
  gap: 5px;
  min-width: 180px;
}
.inventory-max-list {
  display: grid;
  gap: 8px;
  max-height: 58vh;
  overflow: auto;
}
.inventory-max-row {
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr) 130px 130px;
  align-items: center;
  gap: 10px;
  padding: 10px;
  border: 1px solid #dbe4f0;
  border-radius: 10px;
  background: #fff;
}
.inventory-max-info {
  display: grid;
  gap: 3px;
  min-width: 0;
}
.inventory-max-input {
  display: grid;
  gap: 5px;
  font-weight: 800;
}
.inventory-max-input input {
  min-height: 38px;
  text-align: center;
  font-weight: 900;
}
.money-cell {
  color: #0f766e;
  font-weight: 900;
  white-space: nowrap;
}
.inventory-price-view {
  display: inline-grid;
  gap: 4px;
  justify-items: start;
}
.inventory-price-display {
  border: 0;
  background: transparent;
  padding: 0;
  color: #0f766e;
  font-weight: 900;
  font-size: 13px;
  cursor: pointer;
}
.inventory-price-display.editable {
  text-decoration: underline;
  text-underline-offset: 3px;
}
.inventory-price-display.editable:hover {
  color: #0369a1;
}
.inventory-price-readonly {
  color: #0f766e;
  font-weight: 900;
}
.price-pending-text {
  color: #d97706 !important;
  font-weight: 950;
}
.price-paid-text {
  color: #047857;
  font-weight: 950;
  margin-top: 2px;
}
.inventory-inbound-modal {
  display: grid;
  gap: 12px;
}
.inventory-inbound-head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fafc;
}
.inventory-inbound-table table {
  min-width: 420px;
}
.inventory-inbound-table th,
.inventory-inbound-table td {
  white-space: nowrap;
}
.inventory-outbound-history {
  display: grid;
  gap: 8px;
  margin-top: 2px;
}
.inventory-inbound-history {
  display: grid;
  gap: 8px;
}
.inventory-inbound-history-head,
.inventory-outbound-history-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: #344054;
}
.inventory-inbound-history-head > strong,
.inventory-outbound-history-head > strong {
  color: #101828;
  font-size: 14px;
  font-weight: 950;
}
.inventory-inbound-history-head > span,
.inventory-outbound-history-head > span {
  color: #64748b;
  font-size: 12px;
  font-weight: 800;
}
.inventory-inbound-period-filter,
.inventory-outbound-period-filter {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}
.inventory-outbound-period-label {
  color: #475467;
  font-size: 13px;
  font-weight: 900;
}
.inventory-inbound-period-filter .date-segmented,
.inventory-outbound-period-filter .date-segmented {
  margin: 0;
  border-radius: 12px;
}
.inventory-inbound-period-filter .date-segmented button:first-child,
.inventory-outbound-period-filter .date-segmented button:first-child {
  border-radius: 11px 0 0 11px;
}
.inventory-inbound-period-filter .date-segmented button:last-child,
.inventory-outbound-period-filter .date-segmented button:last-child {
  border-radius: 0 11px 11px 0;
}
.inventory-outbound-custom-range {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}
.inventory-outbound-custom-range input {
  width: 132px;
  min-height: 32px;
  padding: 4px 8px;
  font-size: 12px;
}
.inventory-outbound-custom-range em {
  color: #64748b;
  font-size: 12px;
  font-style: normal;
  font-weight: 900;
}
.inventory-outbound-table table {
  min-width: 560px;
}
.inventory-fifo-note {
  margin: 0;
  color: #475467;
  font-size: 13px;
  font-weight: 800;
}
.inventory-age-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(92px, 1fr));
  gap: 8px;
}
.inventory-age-card {
  padding: 9px 10px;
  border: 1px solid #dbeafe;
  border-radius: 10px;
  background: #f8fbff;
}
.inventory-age-card span {
  display: block;
  color: #64748b;
  font-size: 12px;
  font-weight: 800;
}
.inventory-age-card strong {
  display: block;
  margin-top: 4px;
  color: #1f2937;
  font-size: 15px;
  font-weight: 900;
}
.inventory-age-card.danger {
  border-color: #fecaca;
  background: #fff1f2;
}
.inventory-age-card.danger span,
.inventory-age-card.danger strong {
  color: #dc2626;
}
.inventory-batch-over-year td {
  color: #dc2626;
  background: #fff1f2;
  font-weight: 900;
}
.inventory-batch-age-tag {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  margin-left: 10px;
  padding: 0 8px;
  border: 1px solid #fda4af;
  border-radius: 999px;
  background: #fff;
  color: #dc2626;
  font-size: 12px;
  font-weight: 900;
}
label.check-line.price-pending-check {
  display: flex !important;
  grid-template-columns: none !important;
  flex-direction: row !important;
  align-self: end;
  align-items: center !important;
  justify-content: flex-start;
  gap: 7px;
  width: max-content;
  min-height: 38px;
  height: 38px;
  margin: 0;
  padding: 0;
  color: #92400e;
  font-weight: 800;
  line-height: 16px;
  white-space: nowrap;
}
label.check-line.price-pending-check input[type="checkbox"] {
  flex: 0 0 16px;
  width: 16px !important;
  min-width: 16px;
  height: 16px !important;
  min-height: 16px !important;
  margin: 0 !important;
  padding: 0 !important;
  line-height: 16px;
  vertical-align: middle;
}
label.check-line.price-pending-check span {
  display: block;
  height: 16px;
  margin: 0;
  padding: 0;
  line-height: 16px;
}
.price-history-inline,
.price-history-modal-btn {
  border: 1px solid #d0d5dd;
  background: #f8fafc;
  color: #475467;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
}
.price-history-inline {
  min-height: 22px;
  padding: 0 8px;
}
.price-history-modal-btn {
  justify-self: start;
  min-height: 30px;
  padding: 0 12px;
}
.price-edit-summary,
.price-history-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
  align-items: center;
  padding: 10px 12px;
  border: 1px solid #e4e7ec;
  border-radius: 8px;
  background: #f8fafc;
}
.price-edit-summary span,
.price-history-summary span {
  color: #475467;
  font-weight: 800;
}
.price-history-table {
  max-height: 420px;
  overflow: auto;
}
.price-history-table th,
.price-history-table td {
  white-space: nowrap;
}
.inventory-qty-cell {
  min-width: 136px;
  vertical-align: middle;
}
.inventory-qty-head-label {
  display: block;
  width: 158px;
  max-width: 100%;
  text-align: center;
}
.inventory-qty-lines {
  display: grid;
  grid-template-columns: minmax(126px, max-content) minmax(80px, 1fr);
  column-gap: 12px;
  align-items: center;
  gap: 14px;
  width: 100%;
}
.inventory-qty-line {
  display: grid;
  grid-template-columns: 58px minmax(64px, 1fr);
  align-items: baseline;
  column-gap: 10px;
  white-space: nowrap;
}
.inventory-qty-lines .inventory-qty-line:not(.inventory-qty-total) {
  grid-column: 1;
  width: 158px;
  max-width: 100%;
  justify-self: center;
  display: flex;
  justify-content: center;
  align-items: baseline;
  gap: 8px;
}
.inventory-qty-total {
  grid-column: 2;
  grid-row: 1 / 4;
  display: flex;
  justify-content: center;
  align-items: baseline;
  align-self: center;
  justify-self: center;
  flex-direction: column;
  gap: 9px;
}
.inventory-qty-total-main {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 8px;
}
.inventory-qty-total .inventory-qty-total-main span {
  color: #111827;
  font-size: 14px;
  font-weight: 900;
}
.inventory-qty-total .inventory-qty-total-main strong {
  font-size: 15px;
  font-weight: 950;
}
.inventory-qty-total-main strong.inventory-total-stock-safe {
  color: #7c3aed;
}
.inventory-qty-total-main strong.inventory-total-stock-danger {
  color: #7c3aed;
}
.inventory-qty-limits {
  color: #667085;
  font-size: 13px;
  font-weight: 800;
  line-height: 1.1;
  white-space: nowrap;
}
.inventory-inline-remark {
  box-sizing: border-box;
  width: 100%;
  min-width: 0;
  height: 34px;
  min-height: 34px;
  padding: 6px 9px;
  border: 1px solid #d0d5dd;
  border-radius: 8px;
  background: #fff;
  color: #344054;
  font-size: 12px;
  font-weight: 700;
  transition: border-color 160ms ease, box-shadow 160ms ease, background 160ms ease;
}
.inventory-inline-remark:focus {
  border-color: #84adff;
  outline: none;
  box-shadow: 0 0 0 3px rgba(46, 112, 255, .12);
}
.inventory-inline-remark.is-pending,
.inventory-inline-remark.is-saving {
  border-color: #f5b041;
  background: #fffdf7;
}
.inventory-inline-remark.is-saved {
  border-color: #47cd89;
  background: #f6fef9;
}
.inventory-inline-remark.is-error {
  border-color: #f04438;
  background: #fff6f6;
}
.inventory-inline-remark-readonly {
  display: block;
  max-width: 100%;
  overflow: hidden;
  color: #475467;
  font-size: 12px;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.inventory-qty-out {
  padding-top: 10px;
  border-top: 1px dashed #e4e7ec;
}
.inventory-qty-line span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-align: right;
}
.inventory-qty-line strong {
  color: #0f172a;
  font-size: 13px;
  font-weight: 900;
  line-height: 1.15;
  text-align: left;
  font-variant-numeric: tabular-nums;
}
.inventory-qty-total span,
.inventory-qty-total strong {
  text-align: center;
}
.inventory-qty-history strong {
  color: #64748b;
}
.inventory-qty-clickable {
  cursor: pointer;
  border-radius: 6px;
  transition: color 160ms ease, background 160ms ease;
}
.inventory-qty-clickable span,
.inventory-qty-clickable strong {
  color: #14532d;
}
.inventory-qty-clickable strong {
  text-decoration: underline;
  text-decoration-thickness: 1.5px;
  text-underline-offset: 3px;
}
.inventory-qty-clickable:hover,
.inventory-qty-clickable:focus-visible {
  background: #fff7ed;
  outline: none;
}
.inventory-qty-clickable:hover span,
.inventory-qty-clickable:hover strong,
.inventory-qty-clickable:focus-visible span,
.inventory-qty-clickable:focus-visible strong {
  color: #c2410c;
}
.inventory-qty-out span,
.inventory-qty-out strong {
  color: #dc2626;
}
.inventory-year-end-banner {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 10px;
  padding: 10px 12px;
  border: 1px solid #f59e0b;
  border-radius: 12px;
  background: #fffbeb;
  box-shadow: 0 6px 18px rgba(245, 158, 11, .16);
  overflow: hidden;
}
.inventory-year-end-track {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  white-space: nowrap;
}
.inventory-year-end-flow {
  display: inline-flex;
  gap: 72px;
  min-width: max-content;
  animation: inventoryYearEndFlow 18s linear infinite;
}
.inventory-year-end-flow span {
  color: #b45309;
  font-size: 15px;
  font-weight: 950;
}
.inventory-year-end-confirm {
  flex: 0 0 auto;
  min-height: 34px;
  border-color: #f97316;
  background: #f97316;
  color: #fff;
  font-weight: 950;
}
.inventory-year-end-confirm:hover {
  border-color: #ea580c;
  background: #ea580c;
}
@keyframes inventoryYearEndFlow {
  from { transform: translateX(0); }
  to { transform: translateX(calc(-50% - 36px)); }
}
.inventory-summary {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(118px, 1fr));
  gap: 10px;
  align-items: stretch;
  margin: 10px 0 12px;
}
.inventory-summary article {
  display: flex;
  min-height: 62px;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  gap: 5px;
  padding: 10px 12px;
  border: 1px solid #dbeafe;
  border-radius: 8px;
  background: #f8fbff;
}
.inventory-summary span {
  display: block;
  width: 100%;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.2;
  font-weight: 800;
  white-space: nowrap;
}
.inventory-summary strong {
  display: block;
  width: 100%;
  color: #0f172a;
  font-size: 18px;
  line-height: 1.1;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  text-align: left;
}
.inventory-summary .inventory-period-card {
  border-color: #dbeafe;
  background: #f8fbff;
}
.inventory-summary .inventory-movement-filter-card {
  cursor: pointer;
  transition: transform .16s ease, box-shadow .16s ease, border-color .16s ease;
}
.inventory-summary .inventory-movement-filter-card:hover {
  transform: translateY(-1px);
  box-shadow: 0 5px 14px rgba(15, 23, 42, .08);
}
.inventory-summary .inventory-movement-filter-card.active {
  border-width: 2px;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, .10);
}
.inventory-summary .inventory-in-card {
  border-color: #bbf7d0;
  background: #f0fdf4;
}
.inventory-summary .inventory-in-card span,
.inventory-summary .inventory-in-card strong {
  color: #15803d;
}
.inventory-summary .inventory-out-card {
  border-color: #fed7aa;
  background: #fff7ed;
}
.inventory-summary .inventory-out-card span,
.inventory-summary .inventory-out-card strong {
  color: #ea580c;
}
.inventory-summary .inventory-total-money {
  border-color: #fecaca;
  background: #fff7f7;
}
.inventory-summary .inventory-total-money span,
.inventory-summary .inventory-total-money strong {
  color: #dc2626;
}
.inventory-summary .inventory-trend-card {
  position: relative;
  cursor: pointer;
  transition: transform .16s ease, box-shadow .16s ease, border-color .16s ease, background .16s ease;
}
.inventory-summary .inventory-trend-card:hover,
.inventory-summary .inventory-trend-card:focus-visible {
  transform: translateY(-1px);
  border-color: #93c5fd;
  box-shadow: 0 8px 20px rgba(15, 23, 42, .10);
  outline: none;
}
.inventory-summary .inventory-trend-card small {
  display: inline-flex;
  width: auto;
  margin-top: 1px;
  color: #64748b;
  font-size: 11px;
  line-height: 1;
  font-weight: 800;
}
.inventory-trend-panel {
  display: grid;
  gap: 14px;
}
dialog:has(.inventory-trend-panel) {
  width: min(940px, calc(100vw - 24px));
}
dialog:has(.inventory-trend-panel-wide-values) {
  width: min(1040px, calc(100vw - 24px));
}
.inventory-trend-panel-wide-values {
  --inventory-trend-table-width: 420px;
}
.inventory-trend-tabs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}
.inventory-trend-tabs button,
.inventory-trend-month-select {
  min-height: 34px;
  padding: 0 14px;
  border: 1px solid #bfdbfe;
  border-radius: 999px;
  background: #fff;
  color: #1d4ed8;
  font-size: 13px;
  font-weight: 900;
}
.inventory-trend-tabs button {
  cursor: pointer;
  transition: background .16s ease, color .16s ease, box-shadow .16s ease, border-color .16s ease;
}
.inventory-trend-tabs button:hover {
  border-color: #60a5fa;
  box-shadow: 0 5px 14px rgba(37, 99, 235, .12);
}
.inventory-trend-tabs button.active {
  border-color: #2563eb;
  background: #2563eb;
  color: #fff;
  box-shadow: 0 7px 16px rgba(37, 99, 235, .20);
}
.inventory-trend-month-select {
  width: min(220px, 100%);
  min-width: 132px;
  border-radius: 10px;
  color: #0f172a;
}
.inventory-trend-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 14px;
  border: 1px solid #dbeafe;
  border-radius: 10px;
  background: #f8fbff;
}
.inventory-trend-head div {
  display: grid;
  gap: 4px;
}
.inventory-trend-head strong {
  color: #0f172a;
  font-size: 16px;
}
.inventory-trend-head span {
  color: #64748b;
  font-size: 12px;
  font-weight: 800;
}
.inventory-trend-head b {
  font-size: 22px;
  font-variant-numeric: tabular-nums;
}
.inventory-trend-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) var(--inventory-trend-table-width, 320px);
  gap: 14px;
  align-items: stretch;
}
.inventory-trend-chart {
  display: block;
  width: 100%;
  min-height: 260px;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  background: #fff;
}
.inventory-trend-chart line {
  stroke: #e2e8f0;
  stroke-width: 1.4;
}
.inventory-trend-chart path[stroke] {
  fill: none;
  stroke-width: 3;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.inventory-trend-chart circle {
  fill: #fff;
  stroke: currentColor;
  stroke-width: 2;
}
.inventory-trend-chart circle.inventory-trend-detail-point {
  cursor: pointer;
  transition: fill .16s ease, stroke-width .16s ease;
}
.inventory-trend-chart circle.inventory-trend-detail-point:hover,
.inventory-trend-chart circle.inventory-trend-detail-point:focus {
  fill: #dbeafe;
  stroke-width: 3.5;
  outline: none;
}
.inventory-trend-table-scroll {
  width: 100%;
  max-height: 360px;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  background: #fff;
}
.inventory-trend-table-scroll:focus-visible {
  outline: 2px solid #93c5fd;
  outline-offset: 2px;
}
.inventory-trend-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  border: 0;
  background: #fff;
}
.inventory-trend-table th,
.inventory-trend-table td {
  padding: 9px 10px;
  border-bottom: 1px solid #edf2f7;
  color: #334155;
  font-size: 12px;
  text-align: left;
  white-space: nowrap;
  font-weight: 800;
}
.inventory-trend-table th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: #f8fafc;
  color: #64748b;
  box-shadow: 0 1px 0 #e2e8f0;
}
.inventory-trend-table th:last-child,
.inventory-trend-table td:last-child {
  text-align: right;
}
.inventory-trend-table tr:last-child td {
  border-bottom: 0;
}
.inventory-trend-table tr.inventory-trend-detail-trigger {
  cursor: pointer;
  transition: background .14s ease;
}
.inventory-trend-table tr.inventory-trend-detail-trigger:hover,
.inventory-trend-table tr.inventory-trend-detail-trigger:focus {
  background: #eff6ff;
  outline: none;
}
.inventory-trend-change {
  display: inline-flex;
  min-width: 64px;
  align-items: center;
  justify-content: flex-end;
  font-variant-numeric: tabular-nums;
  font-weight: 900;
}
.inventory-trend-change.positive {
  color: #dc2626;
}
.inventory-trend-change.negative {
  color: #16a34a;
}
.inventory-trend-change.zero {
  color: #64748b;
}
.inventory-trend-empty {
  padding: 28px;
  border: 1px dashed #cbd5e1;
  border-radius: 10px;
  color: #64748b;
  text-align: center;
  font-weight: 800;
}
.inventory-trend-detail-hint {
  margin: -5px 0 0;
  color: #2563eb;
  font-size: 12px;
  font-weight: 850;
}
dialog:has(.inventory-trend-detail-panel) {
  width: min(1280px, calc(100vw - 20px));
}
dialog:has(.inventory-trend-detail-panel) #modalBody {
  max-height: calc(100dvh - 150px);
  overflow: auto;
}
.inventory-trend-detail-panel {
  display: grid;
  gap: 12px;
  min-width: 0;
}
.inventory-trend-detail-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.inventory-trend-detail-toolbar span {
  color: #64748b;
  font-size: 13px;
  font-weight: 850;
}
.inventory-trend-detail-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}
.inventory-trend-detail-summary article {
  display: grid;
  gap: 5px;
  min-width: 0;
  padding: 12px 14px;
  border: 1px solid #dbe4f0;
  border-left: 4px solid #2563eb;
  border-radius: 12px;
  background: #f8fbff;
}
.inventory-trend-detail-summary article.increase {
  border-left-color: #dc2626;
  background: #fff7f7;
}
.inventory-trend-detail-summary article.decrease {
  border-left-color: #16a34a;
  background: #f3fcf6;
}
.inventory-trend-detail-summary article.net {
  border-left-color: #0f766e;
}
.inventory-trend-detail-summary span {
  color: #64748b;
  font-size: 12px;
  font-weight: 800;
}
.inventory-trend-detail-summary strong {
  color: #0f172a;
  font-size: 18px;
  font-variant-numeric: tabular-nums;
  font-weight: 900;
}
.inventory-trend-detail-summary .inventory-trend-change {
  justify-content: flex-start;
}
.inventory-trend-detail-table-wrap {
  max-height: 58dvh;
  overflow: auto;
  border: 1px solid #dbe4f0;
  border-radius: 12px;
  background: #fff;
}
.inventory-trend-detail-table {
  width: 100%;
  min-width: 1040px;
  border-collapse: separate;
  border-spacing: 0;
}
.inventory-trend-detail-table th,
.inventory-trend-detail-table td {
  padding: 10px 12px;
  border-bottom: 1px solid #edf2f7;
  color: #334155;
  font-size: 12px;
  text-align: left;
  vertical-align: top;
}
.inventory-trend-detail-table th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: #f5f8fc;
  color: #475569;
  white-space: nowrap;
  font-weight: 900;
}
.inventory-trend-detail-table td > strong,
.inventory-trend-detail-table td > small {
  display: block;
}
.inventory-trend-detail-table td > strong {
  font-weight: 900;
}
.inventory-trend-detail-table td > small {
  margin-top: 4px;
  color: #64748b;
  line-height: 1.45;
  font-weight: 750;
}
.inventory-trend-detail-table tr:last-child td {
  border-bottom: 0;
}
.inventory-trend-detail-kind {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 76px;
  min-height: 26px;
  padding: 0 9px;
  border-radius: 999px;
  font-weight: 900;
  white-space: nowrap;
}
.inventory-trend-detail-kind.increase {
  background: #fee2e2;
  color: #b91c1c;
}
.inventory-trend-detail-kind.decrease {
  background: #dcfce7;
  color: #15803d;
}
@media (max-width: 900px) {
  .inventory-trend-grid {
    grid-template-columns: 1fr;
  }
  .inventory-trend-detail-summary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
dialog:has(.inventory-trend-workspace),
dialog:has(.inventory-trend-loading) {
  width: min(1240px, calc(100vw - 20px));
}
dialog:has(.inventory-trend-multi-workspace) {
  width: min(1460px, calc(100vw - 16px));
}
dialog:has(.inventory-trend-workspace) #modalBody {
  max-height: calc(100dvh - 150px);
  overflow: auto;
}
dialog:has(.inventory-trend-multi-workspace) #modalBody {
  max-height: calc(100dvh - 112px);
  padding: 18px;
}
.inventory-trend-loading {
  display: grid;
  min-height: 300px;
  place-items: center;
  color: #64748b;
  font-size: 14px;
  font-weight: 850;
}
.inventory-trend-workspace {
  display: grid;
  gap: 14px;
  min-width: 0;
}
.inventory-trend-combined-panel {
  display: grid;
  gap: 12px;
  min-width: 0;
}
.inventory-trend-combined-panel .inventory-trend-comparison-chart {
  min-width: 1120px;
  min-height: 460px;
}
.inventory-trend-toolbar {
  display: grid;
  gap: 10px;
  padding-bottom: 12px;
  border-bottom: 1px solid #e2e8f0;
}
.inventory-trend-metrics {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 6px;
}
.inventory-trend-metrics button {
  display: flex;
  min-width: 0;
  min-height: 38px;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 0 10px;
  border: 1px solid #d0d5dd;
  border-radius: 6px;
  background: #fff;
  color: #475467;
  font-size: 13px;
  font-weight: 900;
  cursor: pointer;
}
.inventory-trend-metrics button i {
  flex: 0 0 auto;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--metric-color);
}
.inventory-trend-metrics button span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.inventory-trend-metrics button:hover {
  border-color: var(--metric-color);
  color: #101828;
}
.inventory-trend-metrics button.active {
  border-color: var(--metric-color);
  background: #f8fafc;
  color: #101828;
  box-shadow: inset 0 -2px 0 var(--metric-color);
}
.inventory-trend-period-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.inventory-trend-top-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  margin-left: auto;
  flex-wrap: wrap;
}
.inventory-owner-shop-rank-open {
  min-height: 34px;
  border-color: #16a34a;
  background: #16a34a;
  color: #fff;
  font-weight: 900;
  box-shadow: 0 6px 14px rgba(22, 163, 74, .22);
}
.inventory-owner-shop-rank-open:hover {
  border-color: #15803d;
  background: #15803d;
  color: #fff;
}
.inventory-trend-periods {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
}
.inventory-trend-periods button {
  min-height: 34px;
  padding: 0 14px;
  border: 1px solid #d0d5dd;
  border-radius: 10px;
  background: #fff;
  color: #475467;
  font-size: 12px;
  font-weight: 900;
  cursor: pointer;
}
.inventory-trend-periods button + button {
  margin-left: 0;
}
.inventory-trend-periods button:first-child {
  border-radius: 10px;
}
.inventory-trend-periods button:last-child {
  border-radius: 10px;
}
.inventory-trend-periods button:hover {
  position: relative;
  border-color: #84adff;
  color: #1d4ed8;
}
.inventory-trend-periods button.active {
  position: relative;
  border-color: #2563eb;
  background: #eff6ff;
  color: #1d4ed8;
}
.inventory-trend-compare-toggle {
  display: inline-flex;
  min-height: 34px;
  align-items: center;
  gap: 7px;
  padding: 0 10px;
  border: 1px solid #d0d5dd;
  border-radius: 6px;
  background: #fff;
  color: #344054;
  font-size: 12px;
  font-weight: 900;
  white-space: nowrap;
  cursor: pointer;
}
.inventory-trend-compare-toggle input {
  width: 16px;
  height: 16px;
  margin: 0;
  accent-color: #2563eb;
}
.inventory-trend-custom-range {
  display: flex;
  align-items: end;
  gap: 8px;
}
.inventory-trend-custom-range label {
  display: grid;
  gap: 4px;
  color: #475467;
  font-size: 11px;
  font-weight: 850;
}
.inventory-trend-custom-range input {
  width: 156px;
  min-height: 36px;
  padding: 5px 8px;
  border: 1px solid #d0d5dd;
  border-radius: 6px;
  background: #fff;
  color: #101828;
  font-size: 13px;
  font-weight: 800;
}
.inventory-trend-custom-range button {
  min-height: 36px;
  border-radius: 6px;
}
.inventory-trend-date-separator {
  align-self: end;
  padding-bottom: 9px;
  color: #667085;
  font-size: 12px;
  font-weight: 800;
}
.inventory-trend-workspace .inventory-trend-head {
  padding: 10px 12px;
  border-color: #dbe4f0;
  border-radius: 6px;
  background: #f8fafc;
}
.inventory-trend-current {
  display: flex !important;
  align-items: center;
  justify-content: flex-end;
  gap: 14px !important;
}
.inventory-trend-current > span {
  display: inline-flex;
  align-items: baseline;
  gap: 5px;
  white-space: nowrap;
}
.inventory-trend-current b {
  color: var(--trend-color);
  font-size: 20px;
  font-variant-numeric: tabular-nums;
}
.inventory-trend-chart-shell {
  overflow-x: auto;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  background: #fff;
}
.inventory-trend-chart-stage {
  position: relative;
  min-width: 0;
}
.inventory-trend-comparison-chart {
  display: block;
  width: 100%;
  min-width: 1120px;
  min-height: 450px;
  border: 0;
  border-radius: 0;
  color: #667085;
}
.inventory-trend-grid-lines line {
  stroke: #e7edf5;
  stroke-width: 1;
}
.inventory-trend-grid-lines text,
.inventory-trend-x-labels text {
  fill: #667085;
  font-size: 11px;
  font-weight: 750;
}
.inventory-trend-line {
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.inventory-trend-line.current {
  stroke: var(--series-color, var(--trend-color));
  stroke-width: 1.45;
}
.inventory-trend-line.compare {
  stroke: var(--series-color, #94a3b8);
  stroke-width: .9;
  stroke-dasharray: 6 5;
  opacity: .55;
}
.inventory-trend-comparison-chart circle {
  fill: #fff;
  stroke-width: 1.4;
}
.inventory-trend-comparison-chart .current-point {
  stroke: var(--series-color, var(--trend-color));
}
.inventory-trend-comparison-chart .compare-point {
  stroke: var(--series-color, #94a3b8);
  opacity: .55;
}
.inventory-trend-line-label {
  fill: var(--series-color);
  font-size: 12px;
  font-weight: 900;
  paint-order: stroke;
  pointer-events: none;
  stroke: #fff;
  stroke-linejoin: round;
  stroke-width: 3px;
}
.inventory-trend-line-label.compare {
  opacity: .78;
}
.inventory-trend-combined-chart {
  cursor: crosshair;
}
.inventory-trend-combined-chart .inventory-trend-line,
.inventory-trend-combined-chart .current-point,
.inventory-trend-combined-chart .compare-point {
  pointer-events: none;
}
.inventory-trend-hover-layer {
  pointer-events: none;
}
.inventory-trend-hover-layer line {
  stroke: #64748b;
  stroke-width: 1;
  stroke-dasharray: 3 4;
  opacity: .75;
  vector-effect: non-scaling-stroke;
}
.inventory-trend-hover-layer circle {
  fill: #fff;
  stroke: var(--series-color);
  stroke-width: 2;
  vector-effect: non-scaling-stroke;
}
.inventory-trend-combined-tooltip {
  position: absolute;
  z-index: 4;
  width: min(320px, calc(100% - 16px));
  padding: 10px 12px;
  border: 1px solid #d0d5dd;
  border-radius: 6px;
  background: rgba(255, 255, 255, .98);
  box-shadow: 0 8px 24px rgba(15, 23, 42, .16);
  color: #101828;
  pointer-events: none;
}
.inventory-trend-combined-tooltip[hidden] {
  display: none;
}
.inventory-trend-tooltip-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid #e2e8f0;
}
.inventory-trend-tooltip-head strong {
  font-size: 13px;
}
.inventory-trend-tooltip-head span {
  color: #667085;
  font-size: 11px;
  font-weight: 800;
  text-align: right;
}
.inventory-trend-tooltip-values {
  display: grid;
}
.inventory-trend-tooltip-row {
  display: grid;
  grid-template-columns: minmax(108px, 1fr) minmax(76px, auto);
  align-items: center;
  gap: 10px;
  min-height: 30px;
  border-bottom: 1px solid #f1f5f9;
  font-size: 12px;
}
.inventory-trend-tooltip-row.with-compare {
  grid-template-columns: minmax(96px, 1fr) minmax(68px, auto) minmax(68px, auto);
}
.inventory-trend-tooltip-row:last-child {
  border-bottom: 0;
}
.inventory-trend-tooltip-row.headings {
  min-height: 28px;
  color: #667085;
  font-size: 11px;
  font-weight: 850;
}
.inventory-trend-tooltip-row > span {
  display: inline-flex;
  min-width: 0;
  align-items: center;
  gap: 7px;
  font-weight: 850;
  white-space: nowrap;
}
.inventory-trend-tooltip-row > span i {
  display: inline-block;
  flex: 0 0 auto;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--series-color);
}
.inventory-trend-tooltip-row > strong,
.inventory-trend-tooltip-row > em,
.inventory-trend-tooltip-row > b {
  font-size: 12px;
  font-style: normal;
  font-variant-numeric: tabular-nums;
  text-align: right;
  white-space: nowrap;
}
.inventory-trend-tooltip-row > em {
  color: #667085;
  font-weight: 750;
}
.inventory-trend-period-key,
.inventory-trend-combined-legend {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
}
.inventory-trend-period-key {
  justify-content: flex-end;
  gap: 14px;
  color: #475467;
  font-size: 12px;
  font-weight: 850;
}
.inventory-trend-period-key span {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  white-space: nowrap;
}
.inventory-trend-period-key i {
  display: inline-block;
  width: 24px;
  height: 0;
  border-top: 2px solid #475467;
}
.inventory-trend-period-key i.compare {
  border-top-width: 1px;
  border-top-style: dashed;
}
.inventory-trend-combined-legend {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 8px 14px;
}
.inventory-trend-series-key {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 7px;
  color: var(--series-color);
  font-size: 12px;
  font-weight: 900;
}
.inventory-trend-series-key i,
.inventory-trend-table-metric i {
  display: inline-block;
  flex: 0 0 auto;
  width: 24px;
  height: 3px;
  border-radius: 999px;
  background: var(--series-color);
}
.inventory-trend-series-key b {
  color: var(--series-color);
  white-space: nowrap;
}
.inventory-trend-series-key em {
  overflow: hidden;
  margin-left: auto;
  color: #667085;
  font-style: normal;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.inventory-trend-combined-table table {
  min-width: 720px;
}
.inventory-trend-period-summary-table table {
  width: 100%;
  min-width: 0;
  table-layout: fixed;
}
.inventory-trend-period-summary-table th:first-child,
.inventory-trend-period-summary-table td:first-child {
  width: 34%;
}
.inventory-trend-period-summary-table th:nth-child(2),
.inventory-trend-period-summary-table td:nth-child(2) {
  width: 26%;
}
.inventory-trend-period-summary-table th:nth-child(3),
.inventory-trend-period-summary-table td:nth-child(3) {
  width: 40%;
}
.inventory-trend-combined-table th,
.inventory-trend-combined-table td {
  padding: 8px 10px;
  text-align: right;
  white-space: nowrap;
}
.inventory-trend-combined-table th:first-child,
.inventory-trend-combined-table td:first-child {
  text-align: left;
}
.inventory-trend-table-metric {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--series-color);
  font-weight: 850;
}
.inventory-trend-legend {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px;
  color: #475467;
  font-size: 12px;
  font-weight: 850;
}
.inventory-trend-legend span {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}
.inventory-trend-legend i,
.inventory-trend-compare-table td:first-child i {
  display: inline-block;
  width: 22px;
  height: 3px;
  margin-right: 7px;
  border-radius: 2px;
  vertical-align: middle;
}
.inventory-trend-legend i.current,
.inventory-trend-compare-table i.current {
  background: var(--trend-color);
}
.inventory-trend-legend i.compare,
.inventory-trend-compare-table i.compare {
  height: 0;
  border-top: 2px dashed #94a3b8;
}
.inventory-trend-compare-table table {
  min-width: 680px;
}
.inventory-trend-compare-table th,
.inventory-trend-compare-table td {
  padding: 8px 10px;
  text-align: right;
  white-space: nowrap;
}
.inventory-trend-compare-table th:first-child,
.inventory-trend-compare-table td:first-child,
.inventory-trend-compare-table th:nth-child(2),
.inventory-trend-compare-table td:nth-child(2) {
  text-align: left;
}
.inventory-trend-workspace .inventory-trend-change.positive {
  color: #15803d;
}
.inventory-trend-workspace .inventory-trend-change.negative {
  color: #dc2626;
}
@media (max-width: 760px) {
  .inventory-trend-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .inventory-trend-period-row,
  .inventory-trend-head {
    align-items: flex-start;
    flex-direction: column;
  }
  .inventory-trend-period-key {
    justify-content: flex-start;
  }
  .inventory-trend-current {
    width: 100%;
    justify-content: flex-start;
    flex-wrap: wrap;
  }
  .inventory-trend-custom-range {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: end;
  }
  .inventory-trend-custom-range input {
    width: 100%;
  }
  .inventory-trend-custom-range button {
    grid-column: 1 / -1;
  }
}
.inventory-month-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-content: center;
  justify-content: flex-start;
  grid-column: 1 / -1;
}
.inventory-month-tabs button {
  min-height: 30px;
  padding: 0 10px;
  border-color: #bfdbfe;
  background: #fff;
  color: #1d4ed8;
  font-size: 12px;
  font-weight: 900;
}
.inventory-month-tabs button.active {
  border-color: #2563eb;
  background: #2563eb;
  color: #fff;
}
.inventory-summary .inventory-month-tabs {
  display: grid;
  grid-template-columns: 54px 18fr 14fr 13fr 6fr 10fr 14fr 5fr 20fr;
  align-items: center;
}
.inventory-date-preset-list {
  grid-column: 1 / 6;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  min-width: 0;
}
.inventory-summary .inventory-month-tabs .inventory-price-pending-inline {
  grid-column: 6;
  justify-self: center;
  margin: 0;
}
.inventory-custom-date {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 10px;
  clear: both;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  margin: 0 0 18px;
  padding: 12px;
  border: 1px solid #ecebff;
  border-radius: 8px;
  background: #fff;
  isolation: isolate;
}
.inventory-calendar-tools {
  display: grid;
  grid-template-columns: auto minmax(180px, 1fr) auto;
  align-items: center;
  gap: 8px;
  width: 100%;
}
.inventory-calendar-tools > strong {
  min-width: 0;
  color: #344054;
  font-size: 13px;
  font-weight: 900;
  line-height: 1.35;
  overflow-wrap: anywhere;
}
.inventory-date-mode {
  display: inline-flex;
  align-items: center;
  justify-self: start;
  min-height: 34px;
  padding: 3px;
  border: 1px solid #bfdbfe;
  border-radius: 8px;
  background: #fff;
}
.inventory-date-mode button {
  min-height: 28px;
  padding: 0 12px;
  border-color: transparent;
  background: transparent;
  color: #1d4ed8;
  font-size: 12px;
  font-weight: 900;
}
.inventory-date-mode button.active {
  background: #2563eb;
  color: #fff;
}
.inventory-custom-date button {
  min-height: 34px;
}
.inventory-calendar {
  width: min(360px, 100%);
  max-width: 100%;
  color: #344054;
}
.inventory-calendar-head {
  display: grid;
  grid-template-columns: 60px 1fr 60px;
  align-items: center;
  min-height: 34px;
  margin-bottom: 8px;
}
.inventory-calendar-head strong {
  text-align: center;
  color: #101828;
  font-size: 14px;
  font-weight: 900;
}
.inventory-calendar-nav {
  display: flex;
  gap: 2px;
}
.inventory-calendar-nav:last-child {
  justify-content: flex-end;
}
.inventory-calendar-nav button {
  min-width: 24px;
  min-height: 24px;
  padding: 0;
  border: 0;
  background: transparent;
  color: #98a2b3;
  font-size: 18px;
  line-height: 1;
}
.inventory-calendar-weekdays,
.inventory-calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 0;
}
.inventory-calendar-weekdays span {
  display: grid;
  place-items: center;
  height: 28px;
  color: #475467;
  font-size: 14px;
  font-weight: 800;
}
.inventory-calendar-day {
  display: grid;
  place-items: center;
  min-width: 0;
  height: 30px;
  min-height: 30px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: #344054;
  font-size: 14px;
  font-weight: 700;
}
.inventory-calendar-day.outside {
  color: #d0d5dd;
}
.inventory-calendar-day.in-range {
  background: #eeeaff;
}
.inventory-calendar-day.selected {
  border-radius: 4px;
  background: #7a5af8;
  color: #fff;
  box-shadow: inset 0 0 0 1px #6941c6;
}
.inventory-calendar-day.selected + .inventory-calendar-day.in-range,
.inventory-calendar-day.in-range + .inventory-calendar-day.selected {
  border-radius: 4px;
}
.inventory-custom-date + .inventory-grid {
  margin-top: 4px;
}
.inventory-moves-panel {
  margin-top: 12px;
}
.inventory-moves-modal {
  display: grid;
  gap: 12px;
}
.inventory-moves-modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fafc;
}
.inventory-moves-modal-head strong {
  display: block;
  font-size: 15px;
  color: var(--ink);
}
.inventory-moves-modal-head span {
  font-size: 12px;
  color: var(--muted);
}
.inventory-moves-count {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  background: #eef4ff;
  color: #1d4ed8 !important;
  font-weight: 900;
}
.inventory-moves-filter-row {
  display: grid;
  grid-template-columns: minmax(180px, 260px) minmax(310px, 390px) max-content;
  gap: 10px;
  align-items: end;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}
.inventory-moves-filter-row label {
  display: grid;
  gap: 5px;
  color: #344054;
  font-size: 12px;
  font-weight: 900;
}
.inventory-moves-filter-row select,
.inventory-moves-filter-row input {
  height: 34px;
  min-height: 34px;
}
.inventory-moves-date-range {
  display: flex;
  align-items: center;
  gap: 0;
  min-height: 34px;
  overflow: hidden;
  border: 1px solid #d0d5dd;
  border-radius: 12px;
  background: #fff;
  transition: border-color .15s ease, box-shadow .15s ease;
}
.inventory-moves-date-range:focus-within {
  border-color: #84adff;
  box-shadow: 0 0 0 2px rgba(37, 99, 235, .1);
}
.inventory-moves-filter-row .inventory-moves-date-range input {
  min-width: 0;
  flex: 1 1 145px;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}
.inventory-moves-date-range em {
  flex: 0 0 auto;
  padding: 0 3px;
  color: #64748b;
  font-size: 12px;
  font-style: normal;
  font-weight: 900;
}
.inventory-moves-filter-row button {
  height: 34px;
  min-height: 34px;
  padding: 0 14px;
}
.inventory-moves-modal-list {
  max-height: min(62vh, 620px);
  overflow: auto;
  padding-right: 4px;
}
.inventory-move-quantity {
  font-weight: 950;
}
.inventory-move-quantity.inbound {
  color: #16a34a;
}
.inventory-move-quantity.outbound {
  color: #dc2626;
}
.inventory-moves-modal-pager {
  margin-top: 0;
}
@media (max-width: 720px) {
  .inventory-moves-filter-row {
    grid-template-columns: 1fr;
  }
}
.inventory-moves-toggle {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-top: 12px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: 0 1px 2px rgba(16, 24, 40, .04);
}
.inventory-moves-toggle button {
  min-width: 126px;
  height: 38px;
  min-height: 38px;
}
.inventory-move-item,
.dashboard-due-item {
  display: flex;
  align-items: center;
  gap: 10px;
}
.move-thumb {
  flex: 0 0 auto;
  width: 54px;
  height: 54px;
  object-fit: contain;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #eef2f6;
}
.move-thumb.placeholder {
  display: grid;
  place-items: center;
  color: #98a2b3;
  font-size: 12px;
  font-weight: 800;
}
table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 1px 2px rgba(16, 24, 40, .04);
}
th, td {
  padding: 12px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}
.check-cell {
  width: 54px;
  min-width: 54px;
  max-width: 54px;
  padding-left: 0;
  padding-right: 0;
  text-align: center;
  vertical-align: middle;
}
.inventory-grid .check-cell input[type="checkbox"],
.inventory-grid .inventory-check,
.inventory-grid #inventoryCheckAll {
  width: 19px;
  height: 19px;
  min-width: 19px;
  min-height: 19px;
  padding: 0;
  margin: 0 auto;
  vertical-align: middle;
  cursor: pointer;
}
th {
  background: #f9fafb;
  color: #475467;
  font-size: 12px;
  font-weight: 800;
}
tr:last-child td { border-bottom: 0; }
tbody tr:hover td { background: #fcfcfd; }
.low { color: var(--danger); font-weight: 800; }
.stock-name {
  display: flex;
  align-items: center;
  gap: 9px;
  min-width: 0;
}
.stock-thumb {
  flex: 0 0 auto;
  width: 72px;
  height: 72px;
  object-fit: contain;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #eef2f6;
}
.stock-thumb.placeholder {
  display: grid;
  place-items: center;
  color: #98a2b3;
  font-size: 12px;
  font-weight: 800;
}
.tiny-img {
  width: 46px;
  height: 46px;
  object-fit: contain;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}
.stock-name strong,
.stock-name .muted {
  word-break: break-word;
  line-height: 1.3;
}
.list { display: grid; gap: 8px; }
.logs-toolbar {
  margin-bottom: 12px;
  align-items: end;
}
.logs-toolbar label {
  max-width: 260px;
}
.security-log-row {
  background: #f8fbff;
}
.security-log-row td:first-child,
.security-log-row td:nth-child(2) {
  color: #2563eb;
  font-weight: 800;
}
.log-groups {
  display: grid;
  gap: 14px;
}
.log-user-group {
  display: grid;
  gap: 8px;
}
.log-user-group h3 {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  color: #101828;
  font-size: 16px;
}
.log-user-group h3 span {
  padding: 2px 8px;
  border-radius: 999px;
  background: #eef2ff;
  color: #475467;
  font-size: 12px;
  font-weight: 900;
}
.list-item {
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
}
.list-item:last-child { border-bottom: 0; }
.notice-unread {
  padding: 12px;
  border: 1px solid #bfdbfe;
  border-radius: 8px;
  background: #eff6ff;
}
.notice-image {
  display: block;
  width: 140px;
  height: 100px;
  object-fit: contain;
  margin: 8px 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #eef2f6;
}
.notice-dot {
  display: inline-flex;
  margin-left: 6px;
  padding: 2px 7px;
  border-radius: 999px;
  background: #dc2626;
  color: #fff;
  font-size: 12px;
}
.notice-read-dot {
  display: inline-flex;
  margin-left: 6px;
  padding: 2px 7px;
  border-radius: 999px;
  background: #e5e7eb;
  color: #475467;
  font-size: 12px;
}
.notice-toolbar {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 10px;
}
.record-dot {
  display: inline-flex;
  margin-left: 6px;
  padding: 2px 7px;
  border-radius: 999px;
  background: #ecfdf3;
  color: #067647;
  font-size: 12px;
  font-weight: 900;
}
.notify-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 20px;
  height: 20px;
  margin-left: 6px;
  padding: 0 6px;
  border-radius: 999px;
  background: var(--danger);
  color: #fff;
  font-size: 12px;
  font-weight: 900;
}

dialog {
  border: 0;
  border-radius: 8px;
  padding: 0;
  width: min(680px, calc(100vw - 24px));
  box-shadow: 0 24px 64px rgba(16, 24, 40, .2);
}
dialog:has(.batch-job-form) {
  width: min(1480px, calc(100vw - 32px));
}
dialog:has(.ocr-outbound-form) {
  width: min(1180px, calc(100vw - 32px));
}
dialog:has(.batch-out-form) {
  width: min(1120px, calc(100vw - 32px));
}
dialog:has(.outbound-compare-result) {
  width: min(980px, calc(100vw - 32px));
}
dialog:has(.inventory-moves-modal) {
  width: min(1120px, calc(100vw - 32px));
}
dialog.historical-products-dialog {
  width: min(1320px, calc(100vw - 28px));
  height: min(860px, calc(100dvh - 28px));
  max-height: calc(100dvh - 28px);
}
dialog.historical-products-dialog .modal-box {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  height: 100%;
  max-height: inherit;
}
dialog.historical-products-dialog .modal-box header,
dialog.historical-products-dialog .modal-box footer {
  flex: 0 0 auto;
}
.historical-products-modal {
  display: grid;
  gap: 12px;
  min-height: 0;
  overflow: auto;
  padding: 16px;
  background: #f8fafc;
}
.historical-products-summary {
  display: grid;
  grid-template-columns: repeat(5, minmax(120px, 1fr));
  gap: 10px;
  align-items: start;
}
.historical-products-summary span {
  display: grid;
  gap: 4px;
  align-content: center;
  min-height: 58px;
  padding: 10px 12px;
  border: 1px solid #dbe7f6;
  border-radius: 10px;
  background: #fff;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}
.historical-products-summary b {
  color: var(--ink);
  font-size: 16px;
  font-weight: 950;
}
dialog.historical-products-dialog .historical-manager-product-list {
  padding: 0;
}
dialog.historical-products-dialog .historical-manager-product-line {
  grid-template-columns: 76px minmax(300px, 1fr) repeat(5, minmax(92px, max-content));
  gap: 12px;
  padding: 10px 12px;
  min-height: 92px;
}
dialog.historical-products-dialog .tiny-img {
  width: 72px;
  height: 72px;
}
dialog:has(.historical-manager-panel) {
  width: calc(100vw - 24px);
  height: calc(100dvh - 24px);
  max-height: calc(100dvh - 24px);
}
dialog::backdrop {
  background: rgba(15, 23, 42, .30);
  backdrop-filter: blur(8px) saturate(1.06);
  -webkit-backdrop-filter: blur(8px) saturate(1.06);
}
dialog[open]::backdrop {
  animation: softBackdropIn .22s var(--ease-ui) both;
}
.modal-box {
  margin: 0;
  background: #fff;
  border-radius: 8px;
  overflow: hidden;
}
dialog[open] .modal-box {
  animation: modalSoftIn .24s var(--ease-soft) both;
}
.modal-box header, .modal-box footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px;
  border-bottom: 1px solid var(--line);
}
.modal-box footer {
  border-top: 1px solid var(--line);
  border-bottom: 0;
  justify-content: flex-end;
  background: #f9fafb;
}
.modal-box h3 { margin: 0; font-size: 18px; }
#modalBody { padding: 16px; display: grid; gap: 12px; }
dialog:has(.historical-manager-panel) .modal-box {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  height: 100%;
  max-height: inherit;
}
dialog:has(.historical-manager-panel) #modalBody {
  overflow: auto;
  padding: 18px;
}
.form-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.inventory-stock-form .form-2 > label {
  align-self: start;
  align-content: start;
}
.inventory-stock-form .inventory-stock-field {
  gap: 6px;
}
.inventory-stock-form .inventory-stock-field > input,
.inventory-stock-form .inventory-stock-field > select {
  height: 40px;
  min-height: 40px;
}
.inventory-stock-form .inventory-history-field .hint {
  line-height: 1.35;
}
.shop-scope-field { grid-column: 1 / -1; }
.shop-scope-field .field-title {
  display: block;
  margin-bottom: 6px;
  color: var(--ink);
  font-size: 13px;
  font-weight: 850;
}
.shop-scope-search {
  margin-bottom: 8px;
  background: #fff;
}
.shop-check-list {
  display: grid;
  gap: 8px;
  max-height: 180px;
  overflow: auto;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f9fafb;
}
.shop-scope-columns {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.shop-check-column {
  display: grid;
  align-content: start;
  gap: 8px;
}
.shop-check-column > strong {
  color: var(--ink);
  font-size: 13px;
}
.shop-check {
  display: flex;
  grid-template-columns: none;
  align-items: center;
  gap: 8px;
  min-height: 34px;
  padding: 6px 8px;
  border: 1px solid #e4e7ec;
  border-radius: 8px;
  background: #fff;
  font-size: 13px;
  font-weight: 700;
}
.shop-check input {
  width: 16px;
  height: 16px;
  min-height: 16px;
  padding: 0;
}
.permission-editor {
  display: grid;
  gap: 12px;
  grid-column: 1 / -1;
  margin-top: 4px;
  padding: 12px;
  border: 1px solid #dbeafe;
  border-radius: 8px;
  background: #f8fbff;
}
.permission-editor-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.permission-editor-head strong {
  display: block;
  color: #101828;
  font-size: 15px;
  font-weight: 950;
}
.permission-editor-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 6px;
}
.permission-editor-actions button {
  min-height: 30px;
  padding: 0 10px;
  font-size: 12px;
}
.permission-editor-grid {
  display: grid;
  gap: 10px;
}
.permission-group {
  display: grid;
  gap: 8px;
  padding: 10px;
  border: 1px solid #e4e7ec;
  border-radius: 8px;
  background: #fff;
}
.permission-group > strong {
  color: #1d4ed8;
  font-size: 13px;
  font-weight: 950;
}
.permission-check-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}
.permission-check {
  display: flex;
  align-items: center;
  gap: 7px;
  min-height: 32px;
  padding: 6px 8px;
  border: 1px solid #eef2f6;
  border-radius: 8px;
  background: #fcfcfd;
  color: #344054;
  font-size: 12px;
  font-weight: 800;
}
.permission-check input {
  flex: 0 0 16px;
  width: 16px;
  height: 16px;
  min-height: 16px;
  padding: 0;
}
.account-submenu-panel {
  margin-bottom: 10px;
  padding: 12px 14px;
}
.account-submenu-head {
  align-items: center;
  margin-bottom: 0;
}
.account-submenu-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}
.role-template-panel {
  margin-bottom: 14px;
}
.role-template-head p {
  margin: 4px 0 0;
  color: #667085;
  font-size: 12px;
  font-weight: 800;
}
.role-template-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 10px 0;
}
.role-template-tabs button {
  min-height: 32px;
  padding: 0 14px;
  border-color: #d0d5dd;
  border-radius: 999px;
  background: #fff;
  color: #344054;
  font-weight: 900;
}
.role-template-tabs button.active {
  border-color: #2563eb;
  background: #2563eb;
  color: #fff;
}
.role-template-editor {
  margin-top: 0;
}
.role-template-save-status {
  min-width: 80px;
  color: #667085;
  font-size: 12px;
  font-weight: 950;
  text-align: right;
}
.role-template-save-status.saving {
  color: #f97316;
}
.role-template-save-status.saved {
  color: #059669;
}
.role-template-save-status.error {
  color: #dc2626;
}
.system-init-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}
.system-init-menu {
  display: grid;
  gap: 10px;
}
.system-init-menu button {
  justify-content: center;
  min-height: 38px;
}
.system-init-actions button {
  min-height: 34px;
  padding: 0 14px;
}
#modal:has(.staff-roster-panel) .modal-box {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  width: min(1700px, calc(100vw - 32px));
  height: min(88vh, 900px);
  max-height: min(88vh, 900px);
}
#modal:has(.staff-roster-panel) #modalBody {
  min-height: 0;
  overflow: auto;
}
#modal:has(.staff-roster-inline-form) .modal-box {
  width: 100%;
}
#modal:has(.staff-roster-inline-form) {
  width: min(920px, calc(100vw - 32px));
}
#modal:has(.staff-roster-inline-form) #modalBody {
  overflow-x: hidden;
  overflow-y: auto;
}
.staff-roster-panel {
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr);
  gap: 12px;
  min-height: 0;
}
#staffRosterView .staff-roster-panel,
#staffRosterView .staff-roster-page-shell {
  width: 100%;
  box-sizing: border-box;
  min-height: calc(100vh - 150px);
  padding: 16px;
  border: 1px solid #dbe7f5;
  border-radius: 8px;
  background: #fff;
}
.staff-roster-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 12px;
  border: 1px solid #dbe7f5;
  border-radius: 8px;
  background: #f8fbff;
}
.staff-roster-head strong {
  display: block;
  color: #0f172a;
  font-size: 15px;
}
.staff-roster-head span {
  display: block;
  margin-top: 2px;
  color: #64748b;
  font-size: 12px;
}
.staff-roster-filters {
  display: grid;
  grid-template-columns: minmax(240px, 1.5fr) minmax(150px, .8fr) minmax(150px, .8fr) auto;
  gap: 10px;
  align-items: center;
  padding: 10px 12px;
  border: 1px solid #dbe7f5;
  border-radius: 8px;
  background: #f8fbff;
}
.staff-roster-filters input,
.staff-roster-filters select {
  width: 100%;
  min-height: 36px;
  padding: 0 10px;
  border: 1px solid #cbd8e8;
  border-radius: 8px;
  background: #fff;
  color: #0f172a;
  font-size: 13px;
  font-weight: 800;
}
.staff-roster-filters button {
  min-height: 36px;
  padding: 0 14px;
  border-color: #cbd8e8;
  background: #fff;
  color: #475467;
  font-weight: 900;
}
.staff-roster-table-wrap {
  overflow: auto;
  min-height: 0;
  border: 1px solid #dbe7f5;
  border-radius: 8px;
  background: #fff;
}
.staff-roster-table {
  width: 100%;
  min-width: 1320px;
  border-collapse: collapse;
  font-size: 13px;
}
.staff-roster-table th,
.staff-roster-table td {
  padding: 11px 12px;
  border-bottom: 1px solid #edf2f7;
  text-align: left;
  white-space: nowrap;
  color: #334155;
}
.staff-roster-table th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: #f8fafc;
  color: #64748b;
  font-weight: 900;
}
.staff-roster-table tbody tr:hover {
  background: #f8fbff;
  cursor: pointer;
}
.staff-roster-table tbody tr.is-active {
  background: #eef6ff;
  box-shadow: inset 3px 0 0 #2f6fed;
}
.staff-roster-table td:first-child {
  color: #0f172a;
  font-weight: 900;
}
.staff-roster-action-head,
.staff-roster-action-cell {
  width: 86px;
  text-align: center !important;
}
.staff-roster-edit-btn {
  min-height: 28px;
  padding: 0 12px;
  border: 1px solid #bfd4ee;
  border-radius: 8px;
  background: #fff;
  color: #1d4ed8;
  font-size: 12px;
  font-weight: 900;
}
.staff-roster-edit-btn:hover {
  border-color: #2f6fed;
  background: #eff6ff;
}
.staff-roster-inline-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  padding: 16px;
  border: 1px solid #dbe7f5;
  border-radius: 8px;
  background: #f8fbff;
}
.staff-roster-inline-form label {
  display: grid;
  gap: 6px;
  color: #334155;
  font-size: 12px;
  font-weight: 900;
}
.staff-roster-inline-form input,
.staff-roster-inline-form select,
.staff-roster-inline-form textarea {
  width: 100%;
  min-height: 36px;
  padding: 0 10px;
  border: 1px solid #cbd8e8;
  border-radius: 8px;
  background: #fff;
  color: #0f172a;
  font-size: 13px;
  font-weight: 800;
}
.staff-roster-inline-form textarea {
  min-height: 72px;
  padding: 10px;
  resize: vertical;
  line-height: 1.45;
}
.staff-roster-inline-form input[readonly] {
  background: #f8fafc;
  color: #475467;
}
.staff-roster-id-field {
  grid-column: 1 / -1;
}
.staff-roster-resignation-fields {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  padding: 12px;
  border: 1px solid #fecaca;
  border-radius: 8px;
  background: #fff7ed;
}
.staff-roster-resignation-reason {
  grid-column: 1 / -1;
}
.staff-roster-form-actions {
  display: flex;
  align-items: end;
  justify-content: flex-end;
  gap: 8px;
}
@media (max-width: 760px) {
  #modal:has(.staff-roster-inline-form) {
    width: min(96vw, calc(100vw - 16px));
  }
  .staff-roster-inline-form {
    grid-template-columns: 1fr;
  }
  .staff-roster-resignation-fields {
    grid-template-columns: 1fr;
  }
}
.danger-soft-btn {
  border-color: #fca5a5;
  background: #fff1f2;
  color: #b91c1c;
  font-weight: 950;
}
.shop-name-list {
  display: grid;
  gap: 4px;
  min-width: 150px;
}
.shop-name-list span {
  display: block;
  padding: 2px 0;
  line-height: 1.35;
  color: var(--ink);
  font-weight: 700;
}
.image-preview {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f9fafb;
}
.image-preview img {
  width: 78px;
  height: 58px;
  object-fit: contain;
  border-radius: 8px;
}
.image-dropzone {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 4px;
  min-height: 78px;
  padding: 10px 92px 10px 12px;
  border: 1.5px dashed #b9c7dc;
  border-radius: 8px;
  background: #f8fbff;
  cursor: pointer;
  transition: border-color .15s ease, background .15s ease, box-shadow .15s ease;
}
.image-dropzone.drag-over {
  border-color: #2563eb;
  background: #eff6ff;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, .12);
}
.image-dropzone input[type="file"] {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}
.image-dropzone-hint {
  display: grid;
  gap: 2px;
  color: #475467;
  font-size: 13px;
  font-weight: 800;
}
.image-dropzone-hint strong {
  color: #1d4ed8;
  font-size: 14px;
  font-weight: 950;
}
.image-dropzone-preview:empty {
  display: none;
}
.image-dropzone-preview {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.image-dropzone-preview img {
  width: 62px;
  height: 52px;
  object-fit: contain;
  border: 1px solid #dbeafe;
  border-radius: 8px;
  background: #fff;
}
.image-dropzone-status {
  color: #667085;
  font-size: 12px;
  font-weight: 800;
  word-break: break-all;
}
.detail-image {
  width: 100%;
  max-height: 360px;
  object-fit: contain;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f9fafb;
}
.outbound-compare-paste {
  grid-column: 1 / -1;
}
.outbound-compare-result {
  display: grid;
  gap: 14px;
}
.compare-result-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  border: 1px solid #bbf7d0;
  border-radius: 8px;
  background: #f0fdf4;
}
.outbound-compare-result.mismatch .compare-result-head {
  border-color: #fecaca;
  background: #fff1f2;
}
.compare-result-head strong {
  color: #15803d;
  font-size: 24px;
  font-weight: 950;
}
.outbound-compare-result.mismatch .compare-result-head strong {
  color: #dc2626;
}
.compare-result-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(160px, 1fr));
  gap: 10px;
}
.compare-result-grid article {
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}
.compare-result-grid span {
  display: block;
  color: #667085;
  font-size: 13px;
  font-weight: 800;
}
.compare-result-grid strong {
  display: block;
  margin-top: 5px;
  color: #0f172a;
  font-size: 22px;
  font-weight: 950;
}
.outbound-compare-result tr.compare-row-mismatch td {
  background: #fff1f2;
  color: #b42318;
  font-weight: 900;
}
.ok-text {
  color: #15803d;
  font-weight: 900;
}
.preview-image {
  width: 100%;
  max-height: 78vh;
  object-fit: contain;
  border-radius: 8px;
  background: #f9fafb;
}
img.outbound-proof-thumb,
img.batch-product-thumb,
img.ocr-thumb,
img.picker-thumb,
img.flow-thumb,
img.job-thumb,
img.recycle-thumb,
img.move-thumb,
img.stock-thumb,
img.notice-image,
.image-preview img {
  background: #fff;
}
.detail-image-button {
  display: inline-flex;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: zoom-in;
}
.icon-btn {
  width: 36px;
  padding: 0;
  font-size: 22px;
  line-height: 1;
  color: #667085;
}
.toast {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 2147483647;
  max-width: 360px;
  background: #101828;
  color: #fff;
  padding: 12px 14px;
  border-radius: 8px;
  box-shadow: var(--shadow);
  animation: toastSoftIn .24s var(--ease-soft) both;
}

.draft-success-notice {
  position: fixed;
  top: 18%;
  left: 50%;
  z-index: 2147483647;
  display: flex;
  min-width: min(360px, calc(100vw - 32px));
  max-width: min(560px, calc(100vw - 32px));
  align-items: center;
  justify-content: center;
  gap: 10px;
  border: 1px solid #75e0a7;
  border-radius: 12px;
  padding: 15px 20px;
  color: #05603a;
  background: #ecfdf3;
  box-shadow: 0 18px 44px rgba(16, 24, 40, .22);
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, -12px) scale(.98);
  transition: opacity .2s ease, transform .2s ease;
}

.draft-success-notice.is-visible {
  opacity: 1;
  transform: translate(-50%, 0) scale(1);
}

.draft-success-notice > span {
  display: inline-grid;
  flex: 0 0 28px;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  color: #fff;
  background: #12b76a;
  font-size: 18px;
  font-weight: 900;
  place-items: center;
}

@keyframes softPopoverIn {
  from {
    opacity: 0;
    transform: translateY(4px) scale(.985);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}
@keyframes dropdownSoftIn {
  from {
    opacity: 0;
    transform: translateY(-4px);
  }
  70% {
    opacity: 1;
  }
  to {
    opacity: 1;
    transform: none;
  }
}
@keyframes dropdownTabletIn {
  from { opacity: 0; }
  to { opacity: 1; }
}
@keyframes softBackdropIn {
  from { opacity: 0; }
  to { opacity: 1; }
}
@keyframes modalSoftIn {
  from {
    opacity: 0;
    transform: translateY(8px) scale(.985);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}
@keyframes modalTabletSoftIn {
  from {
    opacity: 0;
    transform: translateY(4px) scale(.992);
  }
  to {
    opacity: 1;
    transform: none;
  }
}
@keyframes toastSoftIn {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

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

@media (min-width: 1181px) and (max-width: 1366px),
       (hover: none) and (pointer: coarse) and (min-width: 1181px) and (max-width: 1920px),
       (min-width: 1600px) and (max-width: 1920px) and (min-height: 1100px) and (max-height: 1220px) {
  .app-shell {
    grid-template-columns: 180px minmax(0, 1fr);
  }
  .sidebar {
    gap: 8px;
    padding: 10px 8px;
  }
  .brand {
    gap: 7px;
    min-height: 34px;
    padding: 0;
  }
  .brand-mark {
    width: 34px;
    height: 34px;
    min-width: 34px;
    aspect-ratio: 1 / 1;
    transform: none;
  }
  .brand strong {
    flex-wrap: wrap;
    gap: 4px 6px;
    font-size: 12px;
    line-height: 1.15;
  }
  .brand .app-version {
    font-size: 10px;
  }
  nav {
    gap: 5px;
  }
  nav button {
    min-height: 38px;
    padding: 0 10px;
    font-size: 14px;
    line-height: 1.25;
  }
  .online-status-btn,
  .offline-status-btn,
  #logoutBtn {
    min-height: 30px;
  }
  .current-account {
    padding: 7px;
  }
  .current-account strong {
    font-size: 12px;
  }
  .current-account span,
  .current-account small {
    font-size: 11px;
  }
  .content {
    padding: 12px;
  }
  .topbar {
    gap: 8px;
    margin-bottom: 10px;
  }
  .topbar h2 {
    font-size: 21px;
  }
  .topbar p,
  .hint {
    font-size: 12px;
  }
  .toolbar {
    gap: 6px;
  }
  .toolbar button,
  .filter-bar button,
  .batch-head .actions button {
    min-height: 30px;
    padding: 0 9px;
    font-size: 12px;
  }
  .filter-bar {
    grid-template-columns: minmax(170px, .9fr) minmax(170px, .9fr) minmax(260px, 1.2fr) minmax(180px, 1fr) auto;
    gap: 5px;
    padding: 7px;
    margin-bottom: 8px;
  }
  .filter-bar label {
    font-size: 12px;
  }
  .filter-bar select,
  .filter-bar input {
    min-height: 30px;
    font-size: 12px;
  }
  .outbound-filter-bar {
    grid-template-columns: 178px 178px auto auto;
    justify-content: start;
  }
  .inventory-filter {
    grid-template-columns: 190px 280px 150px auto;
    justify-content: start;
  }
  .inventory-batch-actions {
    grid-column: 1 / -1;
  }
  .inventory-filter .inventory-batch-btn {
    width: 108px;
    min-width: 108px;
    max-width: 108px;
    height: 30px;
    min-height: 30px;
    font-size: 12px;
  }
  .metric-grid,
  .inventory-summary {
    grid-template-columns: repeat(7, minmax(84px, 1fr));
    gap: 5px;
  }
  .metric,
  .inventory-summary article {
    padding: 7px 8px;
  }
  .metric strong {
    font-size: 21px;
  }
  .inventory-summary strong {
    font-size: 19px;
  }
  .dashboard-kpi-strip {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .dashboard-main-grid,
  .dashboard-top-grid,
  .dashboard-bottom-grid {
    grid-template-columns: 1fr;
  }
  .dashboard-panel {
    padding: 10px;
  }
  .dashboard-month-chart {
    grid-template-columns: repeat(12, minmax(36px, 1fr));
  }
  .completed-toolbar {
    grid-template-columns: max-content max-content max-content;
  }
  .flow-row {
    grid-template-columns: minmax(300px, 1.08fr) minmax(260px, .92fr);
    align-items: start;
    gap: 6px;
    padding: 6px;
  }
  .flow-row .actions {
    grid-column: 1 / -1;
    justify-content: flex-end;
  }
  .flow-thumb {
    width: 52px;
    height: 52px;
  }
  .flow-meta {
    grid-template-columns: repeat(2, minmax(118px, 1fr));
    gap: 4px 6px;
  }
  .batch-head {
    grid-template-columns: minmax(300px, 1fr) 360px auto;
    gap: 5px;
  }
  .batch-duration {
    min-height: 26px;
    padding: 2px 7px;
    font-size: 11px;
  }
  .batch-head > .actions {
    grid-column: 1 / -1;
    justify-content: flex-end;
  }
  .batch-line {
    grid-template-columns: minmax(180px, 1fr) auto auto;
    padding: 5px;
  }
  .batch-form-line {
    grid-template-columns: minmax(140px, 1fr) minmax(120px, .8fr) minmax(88px, 110px) minmax(180px, 1.1fr);
    padding: 5px;
  }
  .batch-product-thumb {
    width: 44px;
    height: 44px;
  }
  .batch-product-summary {
    gap: 6px;
  }
  .outbound-products {
    gap: 8px;
  }
  .outbound-product-row {
    grid-template-columns: minmax(220px, 1.1fr) minmax(150px, .8fr) minmax(100px, 120px) minmax(210px, 1fr) minmax(96px, auto) auto;
  }
  .outbound-batch-money {
    justify-content: flex-start;
  }
  .table-wrap,
  .inventory-grid {
    overflow-x: auto;
  }
  .inventory-grid {
    display: block;
  }
  .inventory-grid table {
    min-width: 1040px;
  }
  .inventory-grid th,
  .inventory-grid td {
    padding: 3px 5px;
    font-size: 11px;
  }
  .inventory-grid .inventory-actions-grid {
    grid-template-columns: repeat(3, minmax(54px, 1fr));
    gap: 4px;
  }
  .inventory-grid .inventory-actions-grid button {
    min-height: 25px;
    padding: 0 4px;
    font-size: 11px;
  }
  .inventory-qty-lines {
    column-gap: 6px;
    gap: 6px;
  }
  .batch-out-form .batch-form-line,
  .batch-out-form .batch-out-line {
    grid-template-columns: minmax(260px, 1fr) minmax(190px, 230px) minmax(120px, 145px) minmax(112px, 140px) auto;
  }
  .batch-out-add {
    grid-template-columns: minmax(150px, .8fr) auto minmax(240px, 1fr) auto;
  }
  .batch-job-form .batch-form-line {
    grid-template-columns: minmax(210px, 1fr) minmax(150px, .8fr) minmax(96px, 112px) minmax(190px, 1fr) minmax(104px, auto) auto;
  }
  .batch-job-form .batch-new-product-line {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 6px;
  }
  .batch-job-form .batch-image-field {
    grid-column: span 2;
  }
  .ocr-edit-line {
    grid-template-columns: 52px minmax(190px, 1fr) minmax(130px, 160px);
  }
  .ocr-edit-line.missing {
    grid-template-columns: 52px minmax(160px, 1fr) minmax(170px, 1fr) minmax(170px, 1fr) minmax(110px, .75fr) minmax(140px, .8fr);
  }
  dialog {
    width: min(860px, calc(100vw - 48px));
    max-height: calc(100dvh - 24px);
  }
  dialog:has(.batch-job-form),
  dialog:has(.batch-out-form),
  dialog:has(.ocr-outbound-form) {
    width: min(1180px, calc(100vw - 48px));
  }
  .modal-box {
    display: grid;
    grid-template-rows: auto minmax(0, 1fr) auto;
    max-height: inherit;
  }
  #modalBody {
    overflow: auto;
    padding: 10px;
  }
}

@media (min-width: 1181px) and (max-width: 1260px) {
  .app-shell {
    grid-template-columns: 172px minmax(0, 1fr);
  }
  .brand strong {
    font-size: 13px;
  }
  .content {
    padding: 10px;
  }
  .filter-bar,
  .inventory-filter {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .inventory-filter {
    grid-template-columns: 190px 280px 150px auto;
    justify-content: start;
  }
  .inventory-batch-actions,
  .filter-bar > .download-list-btn,
  .filter-bar > .flow-batch-delete-btn {
    grid-column: 1 / -1;
  }
  .batch-head {
    grid-template-columns: minmax(260px, 1fr) 360px auto;
  }
  .batch-duration,
  .batch-head > .actions {
    grid-column: auto;
    justify-content: flex-start;
  }
  .flow-row,
  .outbound-product-row {
    grid-template-columns: minmax(210px, .95fr) minmax(320px, 1.05fr) max-content;
  }
  .flow-row .actions,
  .batch-head > .actions {
    justify-content: flex-start;
  }
  .metric-grid,
  .inventory-summary {
    grid-template-columns: repeat(6, minmax(0, 1fr));
  }
}

@media (hover: hover) and (pointer: fine) and (min-width: 1181px) {
  .flow-row .actions {
    max-width: 440px;
    overflow: visible;
  }

  .flow-row .actions .status-select {
    flex: 0 0 112px;
    width: 112px;
    min-height: 30px;
    height: 30px;
    padding: 4px 8px;
    font-size: 13px;
  }

  .flow-row .actions button {
    min-height: 30px;
    height: 30px;
    padding-inline: 8px;
    font-size: 12px;
    white-space: nowrap;
  }
}

@media (min-width: 1181px) and (max-width: 1366px),
       (hover: none) and (pointer: coarse) and (min-width: 1181px) and (max-width: 1920px),
       (min-width: 1600px) and (max-width: 1920px) and (min-height: 1100px) and (max-height: 1220px) {
  .flow-list {
    gap: 4px;
  }
  .batch-group {
    padding: 5px 6px;
    border-width: 1px;
    border-radius: 7px;
    box-shadow: inset 3px 0 0 var(--batch-rail), 0 1px 4px rgba(16, 24, 40, .04);
  }
  .batch-lines {
    gap: 4px;
    margin-top: 4px;
  }
  .batch-collapsed-summary {
    gap: 4px;
    margin-top: 4px;
    padding: 4px;
  }
  .batch-collapsed-summary span {
    max-width: 300px;
    padding: 2px 6px;
    font-size: 11px;
  }
  .batch-created-date,
  .batch-owner-shop {
    min-height: 21px;
    padding: 1px 7px;
    font-size: 12px;
    line-height: 1.15;
  }
  .batch-progress-pill,
  .batch-download-count {
    min-height: 19px;
    padding: 0 6px;
    font-size: 11px;
  }
  .flow-row {
    gap: 5px;
    padding: 4px 5px;
    border-radius: 6px;
  }
  .flow-main {
    gap: 5px;
  }
  .flow-check,
  .batch-check {
    width: 14px;
    height: 14px;
    min-height: 14px;
  }
  .flow-thumb {
    width: 40px;
    height: 40px;
    border-radius: 6px;
  }
  .flow-title {
    gap: 4px;
    margin-bottom: 1px;
    font-size: 12px;
    line-height: 1.15;
  }
  .flow-meta {
    gap: 2px 5px;
    font-size: 11px;
    line-height: 1.15;
  }
  .flow-note-display {
    min-height: 16px;
    font-size: 11px;
    line-height: 1.2;
  }
  .inline-number,
  .inline-date {
    gap: 4px;
    font-size: 11px;
    line-height: 1.15;
  }
  .inline-number input {
    width: 58px;
    min-height: 23px;
    padding: 1px 5px;
    font-size: 11px;
  }
  .inline-date input {
    width: 108px;
    min-height: 23px;
    padding: 1px 5px;
    font-size: 11px;
  }
  .status-select {
    width: 90px;
    min-height: 23px;
    padding: 1px 5px;
    font-size: 11px;
    border-radius: 6px;
  }
  .status-badge {
    min-height: 18px;
    padding: 1px 6px;
    font-size: 11px;
  }
  .actions {
    gap: 3px;
  }
  .flow-row .actions button,
  .batch-head .actions button,
  .actions button {
    min-height: 23px;
    padding: 0 6px;
    border-radius: 6px;
    font-size: 11px;
  }
  .batch-line,
  .batch-form-line {
    gap: 5px;
    padding: 4px;
    border-radius: 6px;
  }
  .batch-product-thumb {
    width: 38px;
    height: 38px;
    border-radius: 6px;
  }
  .batch-product-summary {
    gap: 5px;
    font-size: 12px;
    line-height: 1.15;
  }
  .stock-source-picker {
    gap: 5px;
  }
  .stock-source-choice {
    min-height: 34px;
    gap: 5px;
    padding: 4px 6px;
    border-radius: 7px;
  }
  .stock-source-choice input {
    width: 13px;
    height: 13px;
    min-height: 13px;
  }
  .stock-source-choice strong {
    font-size: 11px;
  }
  .stock-source-choice small {
    font-size: 10px;
  }
}

@media (min-width: 1500px) and (max-width: 1920px) and (min-height: 980px) and (max-height: 1220px) {
  .flow-row {
    grid-template-columns: minmax(260px, 1fr) minmax(220px, .78fr) auto;
  }
  .flow-row .actions {
    grid-column: auto;
    justify-content: flex-end;
  }
  .batch-head {
    grid-template-columns: minmax(420px, 1fr) 360px auto auto;
  }
  .batch-head > .actions {
    grid-column: auto;
    justify-content: flex-end;
  }
}

@media (min-width: 1181px) and (max-width: 1366px),
       (hover: none) and (pointer: coarse) and (min-width: 1181px) and (max-width: 1920px),
       (min-width: 1500px) and (max-width: 1920px) and (min-height: 900px) and (max-height: 1220px) {
  .app-shell,
  dialog {
    font-size: 12px;
  }
  .flow-row {
    grid-template-columns: minmax(230px, .9fr) minmax(420px, 1.15fr) max-content;
    gap: 4px;
    padding: 3px 4px;
    align-items: center;
  }
  .flow-main {
    gap: 4px;
  }
  .flow-thumb {
    width: 34px;
    height: 34px;
  }
  .flow-title {
    display: block;
    max-width: 100%;
    margin-bottom: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 11px;
  }
  .flow-meta {
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
    gap: 5px;
    min-width: 0;
    overflow: hidden;
    font-size: 10.5px;
    line-height: 1.1;
  }
  .flow-meta > * {
    flex: 0 0 auto;
    min-width: 0;
  }
  .flow-note-display {
    grid-column: auto;
    max-width: 160px;
    min-height: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 10.5px;
    line-height: 1.1;
  }
  .inline-number,
  .inline-date {
    gap: 3px;
    font-size: 10.5px;
    white-space: nowrap;
  }
  .inline-number input {
    width: 50px;
  }
  .inline-date input {
    width: 96px;
  }
  .status-select,
  .inline-number input,
  .inline-date input {
    min-height: 20px;
    height: 20px;
    padding: 0 4px;
    font-size: 10.5px;
    border-radius: 5px;
  }
  .status-select {
    width: 78px;
  }
  .status-badge {
    min-height: 16px;
    padding: 0 5px;
    font-size: 10px;
  }
  .flow-row .actions {
    grid-column: auto;
    flex-wrap: nowrap;
    justify-content: flex-end;
    gap: 2px;
    max-width: 320px;
    overflow-x: auto;
    scrollbar-width: none;
  }
  .flow-row .actions::-webkit-scrollbar {
    display: none;
  }
  .flow-row .actions button,
  .batch-head .actions button,
  .actions button {
    min-height: 20px;
    height: 20px;
    padding: 0 5px;
    border-radius: 5px;
    font-size: 10.5px;
    line-height: 1;
  }
  .batch-group {
    padding: 4px 5px;
    border-radius: 6px;
  }
  .batch-head {
    grid-template-columns: minmax(360px, 1fr) 360px max-content;
    gap: 4px;
  }
  .batch-head > .actions {
    grid-column: auto;
    flex-wrap: nowrap;
    justify-content: flex-end;
    max-width: 360px;
    overflow-x: auto;
    scrollbar-width: none;
  }
  .batch-head > .actions::-webkit-scrollbar {
    display: none;
  }
  .batch-created-date,
  .batch-owner-shop,
  .batch-progress-pill,
  .batch-download-count {
    min-height: 18px;
    padding: 0 5px;
    font-size: 10.5px;
    line-height: 1;
  }
  .batch-owner-shop {
    max-width: 430px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  .batch-duration {
    min-height: 20px;
    padding: 1px 6px;
    font-size: 10.5px;
  }
  .batch-lines {
    gap: 3px;
    margin-top: 3px;
  }
  .batch-line,
  .batch-form-line {
    gap: 4px;
    padding: 3px;
    border-radius: 5px;
  }
  .batch-line {
    grid-template-columns: minmax(180px, 1fr) minmax(110px, auto) max-content;
  }
  .batch-product-summary {
    gap: 4px;
    font-size: 11px;
    line-height: 1.1;
  }
  .batch-product-thumb {
    width: 32px;
    height: 32px;
    border-radius: 5px;
  }
  .batch-collapsed-summary {
    gap: 3px;
    margin-top: 3px;
    padding: 3px;
  }
  .batch-collapsed-summary span {
    max-width: 260px;
    padding: 1px 5px;
    font-size: 10.5px;
  }
}

@media (min-width: 1181px) and (max-width: 1260px) {
  .flow-row {
    grid-template-columns: minmax(200px, .8fr) minmax(360px, 1.15fr) max-content;
  }
  .flow-row .actions {
    max-width: 280px;
  }
  .batch-head {
    grid-template-columns: minmax(300px, 1fr) 360px max-content;
  }
  .batch-head > .actions {
    max-width: 300px;
  }
  .batch-owner-shop {
    max-width: 340px;
  }
}

@media (max-width: 1100px) {
  .metric-grid { grid-template-columns: repeat(3, 1fr); }
  .dashboard-main-grid,
  .dashboard-top-grid,
  .dashboard-bottom-grid {
    grid-template-columns: 1fr;
  }
  .dashboard-kpi-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .dashboard-kpi-strip article {
    border-right: 0;
    border-bottom: 1px solid rgba(245, 158, 11, .24);
  }
  .filter-bar { grid-template-columns: repeat(2, minmax(160px, 1fr)); }
  .outbound-filter-bar {
    grid-template-columns: 220px 220px auto;
    justify-content: start;
  }
  .inventory-summary { grid-template-columns: repeat(2, minmax(120px, 1fr)); }
  .inventory-month-tabs { justify-content: flex-start; }
}

@media (max-width: 960px) {
  .app-shell { grid-template-columns: 1fr; }
  .sidebar {
    position: static;
    height: auto;
    display: grid;
    grid-template-columns: 1fr;
  }
  nav { grid-template-columns: repeat(4, 1fr); }
  nav button { justify-content: center; text-align: center; }
  .current-account { margin-top: 0; }
  .online-status { margin-top: 0; }
  .online-users-panel {
    width: min(260px, calc(100vw - 32px));
    right: auto;
  }
  #logoutBtn { margin-top: 0; }
  .two-col, .inventory-grid { grid-template-columns: 1fr; }
  .batch-head { grid-template-columns: 1fr; align-items: stretch; }
  .batch-duration { justify-content: flex-start; }
  .batch-form-line,
  .batch-new-product-line {
    grid-template-columns: 1fr 1fr;
  }
  .picker-line {
    grid-template-columns: 22px 1fr;
  }
  .batch-new-product-line .batch-note-default-field {
    grid-column: 1 / -1;
  }
  .batch-image-field {
    grid-column: 1 / -1;
  }
  .batch-new-product-line button {
    grid-column: 1 / -1;
    justify-self: end;
  }
}

@media (min-width: 621px) and (max-width: 1180px) {
  .app-shell {
    grid-template-columns: 212px minmax(0, 1fr);
  }
  .sidebar {
    gap: 14px;
    padding: 16px 12px;
  }
  .brand {
    gap: 10px;
    padding: 0;
  }
  .brand-mark {
    width: 42px;
    height: 42px;
    min-width: 42px;
    aspect-ratio: 1 / 1;
    transform: none;
  }
  nav {
    gap: 5px;
  }
  nav button {
    min-height: 39px;
    padding: 0 10px;
  }
  .content {
    padding: 20px;
  }
  .topbar {
    align-items: flex-start;
    flex-wrap: wrap;
  }
  .dashboard-control-row {
    flex-wrap: wrap;
  }
  .dashboard-refresh-time {
    width: 100%;
    margin-left: 0;
  }
  .topbar h2 {
    font-size: 25px;
  }
  .toolbar {
    justify-content: flex-start;
  }
  .toolbar button {
    min-height: 36px;
    padding: 0 12px;
  }
  .filter-bar {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }
  .filter-button-pair {
    align-self: end;
  }
  .filter-bar > .download-list-btn,
  .filter-bar > .flow-batch-delete-btn {
    min-height: 36px;
  }
  .outbound-filter-bar {
    grid-template-columns: 220px 220px auto;
    justify-content: start;
  }
  .inventory-filter {
    grid-template-columns: 190px 260px 150px auto;
    justify-content: start;
  }
  .inventory-batch-actions {
    grid-column: 1 / -1;
  }
  .inventory-filter .inventory-batch-btn {
    width: 122px;
    min-width: 122px;
    max-width: 122px;
  }
  .completed-toolbar {
    grid-template-columns: max-content max-content max-content;
  }
  .metric-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .two-col {
    grid-template-columns: 1fr;
  }
  .flow-row {
    grid-template-columns: minmax(300px, 1.08fr) minmax(260px, .92fr);
    align-items: start;
    padding: 10px;
  }
  .flow-row .actions {
    grid-column: 1 / -1;
    justify-content: flex-end;
  }
  .flow-thumb {
    width: 68px;
    height: 68px;
  }
  .flow-meta {
    grid-template-columns: repeat(2, minmax(118px, 1fr));
  }
  .batch-head {
    grid-template-columns: minmax(260px, 1fr) auto;
    align-items: start;
  }
  .batch-duration {
    grid-column: 1 / -1;
    justify-content: flex-start;
  }
  .batch-head > .actions {
    grid-column: 1 / -1;
    justify-content: flex-end;
  }
  .outbound-batch-money {
    justify-content: flex-start;
  }
  .outbound-proof {
    justify-content: flex-end;
  }
  .inventory-grid {
    display: block;
    overflow-x: auto;
  }
  .inventory-grid table {
    min-width: 1040px;
  }
  .inventory-summary {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .batch-out-add {
    grid-template-columns: minmax(140px, .85fr) auto minmax(220px, 1.15fr) auto;
  }
  .batch-job-form .batch-form-line {
    grid-template-columns: minmax(210px, 1fr) minmax(150px, .8fr) minmax(96px, 112px) minmax(190px, 1fr) minmax(104px, auto) auto;
  }
  .batch-job-form .batch-new-product-line {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .batch-job-form .batch-image-field,
  .batch-job-form .batch-new-product-line .batch-note-default-field {
    grid-column: span 3;
  }
  .ocr-edit-line {
    grid-template-columns: 52px minmax(180px, 1fr) minmax(120px, 150px);
  }
  dialog {
    width: min(760px, calc(100vw - 32px));
    max-height: calc(100dvh - 32px);
  }
  dialog:has(.batch-job-form) {
    width: min(1080px, calc(100vw - 32px));
  }
  dialog:has(.ocr-outbound-form) {
    width: min(1080px, calc(100vw - 32px));
  }
  .modal-box {
    display: grid;
    grid-template-rows: auto minmax(0, 1fr) auto;
    max-height: inherit;
  }
  #modalBody {
    overflow: auto;
  }
}

@media (min-width: 621px) and (max-width: 960px) {
  .app-shell {
    display: block;
  }
  .sidebar {
    position: sticky;
    top: 0;
    z-index: 60;
    height: auto;
    padding: 12px 16px;
    gap: 10px;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }
  .brand {
    min-height: 42px;
  }
  nav {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    overflow-x: auto;
    padding-bottom: 2px;
  }
  nav button {
    min-width: 112px;
    white-space: nowrap;
  }
  .current-account {
    grid-template-columns: auto 1fr;
    align-items: center;
  }
  .current-account small {
    grid-column: 2;
  }
  .content {
    padding: 18px;
  }
  .topbar {
    align-items: stretch;
    flex-direction: column;
  }
  .toolbar button {
    flex: 0 0 auto;
  }
  .metric-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .dashboard-kpi-strip,
  .dashboard-main-grid,
  .dashboard-top-grid,
  .dashboard-bottom-grid {
    grid-template-columns: 1fr;
  }
  .dashboard-month-chart {
    grid-template-columns: repeat(6, minmax(0, 1fr));
  }
  .dashboard-panel-head {
    align-items: flex-start;
    flex-direction: column;
  }
  .filter-bar,
  .outbound-filter-bar,
  .inventory-filter,
  .completed-toolbar {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .inventory-filter {
    grid-template-columns: 190px 260px 150px auto;
    justify-content: start;
  }
  .outbound-filter-bar {
    grid-template-columns: 200px 200px auto;
    justify-content: start;
  }
  .inventory-batch-actions,
  .completed-total,
  .completed-batch-out-btn,
  .filter-bar > .download-list-btn,
  .filter-bar > .flow-batch-delete-btn {
    grid-column: 1 / -1;
  }
  .flow-row,
  .outbound-product-row {
    grid-template-columns: 1fr;
  }
  .flow-row .actions {
    justify-content: flex-start;
  }
  .batch-head {
    grid-template-columns: 1fr;
  }
  .batch-duration { justify-content: flex-start; }
  .batch-head > .actions {
    justify-content: flex-start;
  }
  .outbound-batch-money {
    justify-content: flex-start;
  }
  .inventory-summary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .batch-out-add,
  .batch-out-form .batch-out-line,
  .batch-job-form .batch-form-line,
  .batch-job-form .batch-new-product-line,
  .ocr-edit-line,
  .ocr-edit-line.missing {
    grid-template-columns: 1fr 1fr;
  }
  .batch-out-add select,
  .batch-job-form .batch-image-field,
  .batch-job-form .batch-new-product-line .batch-note-default-field,
  .ocr-edit-line.missing .ocr-image-field,
  .ocr-edit-line.missing .batch-image-field {
    grid-column: 1 / -1;
  }
}

@media (max-width: 620px) {
  .content { padding: 16px; }
  .topbar { align-items: stretch; flex-direction: column; }
  nav { grid-template-columns: repeat(2, 1fr); }
  .metric-grid { grid-template-columns: 1fr; }
  .dashboard-control-row {
    align-items: stretch;
    flex-direction: column;
  }
  .dashboard-control-row label,
  .dashboard-control-row .filter-mini-btn {
    width: 100%;
  }
  .dashboard-refresh-time {
    width: 100%;
    margin-left: 0;
    white-space: normal;
  }
  .dashboard-kpi-strip,
  .dashboard-main-grid,
  .dashboard-top-grid,
  .dashboard-bottom-grid {
    grid-template-columns: 1fr;
  }
  .dashboard-kpi-strip article {
    border-right: 0;
    border-bottom: 1px solid rgba(245, 158, 11, .24);
  }
  .dashboard-panel-head {
    align-items: flex-start;
    flex-direction: column;
  }
  .dashboard-bar-chart {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .dashboard-month-chart {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .filter-bar { grid-template-columns: 1fr; }
  .inventory-summary { grid-template-columns: 1fr; }
  .inventory-calendar-tools {
    grid-template-columns: 1fr;
    align-items: stretch;
  }
  .inventory-calendar-tools > strong {
    order: 3;
  }
  .inventory-calendar-tools .filter-mini-btn {
    justify-self: start;
  }
  .form-2 { grid-template-columns: 1fr; }
  .shop-scope-columns { grid-template-columns: 1fr; }
  .flow-row { grid-template-columns: 1fr; }
  .flow-meta { grid-template-columns: 1fr; }
  .batch-form-line,
  .batch-new-product-line,
  .ocr-edit-line,
  .ocr-edit-line.missing {
    grid-template-columns: 1fr;
  }
  .picker-line {
    grid-template-columns: 1fr;
  }
  .picker-line input[type="checkbox"] {
    justify-self: start;
  }
  .batch-new-product-line .batch-note-default-field,
  .batch-image-field,
  .ocr-edit-line.missing .ocr-image-field,
  .batch-new-product-line button {
    grid-column: auto;
  }
  .batch-note-default-field {
    flex-wrap: wrap;
  }
  .batch-note-default-field .batch-note-field {
    flex-basis: 100%;
    min-width: 0;
  }
  .login-form { padding: 20px; }
}

/* Dashboard period analysis */
.dashboard-analysis-open-btn {
  min-height: 36px;
  padding: 0 18px;
  border: 1px solid #7c3aed;
  border-radius: 10px;
  background: linear-gradient(135deg, #7c3aed 0%, #db2777 100%);
  color: #fff;
  font-weight: 800;
  letter-spacing: .04em;
  white-space: nowrap;
  box-shadow: 0 6px 16px rgba(124, 58, 237, .3);
}

.dashboard-analysis-open-btn:hover {
  border-color: #6d28d9;
  background: linear-gradient(135deg, #6d28d9 0%, #be185d 100%);
  box-shadow: 0 7px 18px rgba(124, 58, 237, .38);
}

#modal:has(.dashboard-analysis-workspace) {
  width: min(1280px, calc(100vw - 28px));
  height: min(900px, calc(100vh - 28px));
  max-width: none;
  max-height: none;
}

#modal:has(.dashboard-analysis-workspace) .modal-box {
  height: 100%;
  min-height: 0;
}

#modal:has(.dashboard-analysis-workspace) #modalBody {
  display: block;
  min-height: 0;
  overflow: auto;
  background: #f5f8fc;
}

.dashboard-analysis-workspace {
  display: grid;
  gap: 14px;
  min-width: 0;
}

.dashboard-analysis-controls {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px;
  border: 1px solid #dbe5f2;
  border-radius: 14px;
  background: #fff;
}

.dashboard-analysis-preset-tabs {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-right: auto;
}

.dashboard-analysis-preset-tabs button {
  min-height: 36px;
  padding: 0 16px;
  border: 1px solid #cdd9ea;
  border-radius: 10px;
  background: #fff;
  color: #334155;
  font-weight: 800;
}

.dashboard-analysis-preset-tabs button.active {
  border-color: #2563eb;
  background: #2563eb;
  color: #fff;
}

.dashboard-analysis-controls > label {
  display: flex;
  align-items: center;
  gap: 7px;
  color: #64748b;
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
}

.dashboard-analysis-controls input,
.dashboard-analysis-controls select {
  width: 150px;
  min-height: 36px;
  padding: 0 10px;
  border: 1px solid #cdd9ea;
  border-radius: 10px;
  background: #fff;
  color: #1e293b;
  font-weight: 700;
}

.dashboard-analysis-select-field {
  position: relative;
}

.dashboard-analysis-select-field .custom-select-shell {
  width: 132px;
}

.dashboard-analysis-select-field .custom-select-trigger {
  width: 100%;
  min-height: 36px;
  border-color: #cdd9ea;
  border-radius: 10px;
  background: #fff;
  color: #1e293b;
  font-weight: 800;
}

.dashboard-analysis-select-field .custom-select-value {
  min-width: 0;
}

.dashboard-analysis-period-head {
  display: grid;
  grid-template-columns: minmax(210px, 1fr) minmax(210px, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  border: 1px solid #cfdded;
  border-radius: 14px;
  background: linear-gradient(135deg, #eff6ff, #f8fbff);
}

.dashboard-analysis-period-head > div {
  display: grid;
  gap: 3px;
}

.dashboard-analysis-period-head strong {
  color: #1d4ed8;
  font-size: 19px;
}

.dashboard-analysis-period-head span,
.dashboard-analysis-period-head small {
  color: #64748b;
}

.dashboard-analysis-period-head em {
  max-width: 360px;
  padding: 7px 11px;
  overflow: hidden;
  border: 1px solid #bfdbfe;
  border-radius: 999px;
  background: #fff;
  color: #1e40af;
  font-size: 12px;
  font-style: normal;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dashboard-analysis-card-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
}

.dashboard-analysis-card {
  position: relative;
  display: grid;
  align-content: start;
  gap: 5px;
  min-height: 145px;
  padding: 15px 14px 12px 17px;
  overflow: hidden;
  border: 1px solid #dbe4ef;
  border-radius: 14px;
  background: #fff;
}

.dashboard-analysis-card::before {
  position: absolute;
  inset: 0 auto 0 0;
  width: 4px;
  background: #2563eb;
  content: "";
}

.dashboard-analysis-card.tone-green::before { background: #16a34a; }
.dashboard-analysis-card.tone-purple::before { background: #7c3aed; }
.dashboard-analysis-card.tone-cyan::before { background: #0891b2; }
.dashboard-analysis-card.tone-orange::before { background: #f97316; }
.dashboard-analysis-card.tone-yellow::before { background: #eab308; }
.dashboard-analysis-card.tone-red::before { background: #dc2626; }

.dashboard-analysis-card > span {
  color: #64748b;
  font-size: 13px;
  font-weight: 800;
}

.dashboard-analysis-card > strong {
  overflow: hidden;
  color: #172033;
  font-size: clamp(22px, 2vw, 30px);
  line-height: 1.15;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dashboard-analysis-card > p {
  min-height: 18px;
  margin: 0;
  color: #64748b;
  font-size: 12px;
}

.dashboard-analysis-delta {
  display: block;
  margin-top: auto;
  font-weight: 800;
}

.dashboard-analysis-comparisons {
  display: grid;
  align-content: end;
  gap: 3px;
  margin-top: auto;
}

.dashboard-analysis-comparisons .dashboard-analysis-delta {
  margin-top: 0;
}

.dashboard-analysis-delta.positive { color: #15803d; }
.dashboard-analysis-delta.negative { color: #dc2626; }
.dashboard-analysis-delta.neutral { color: #64748b; }

.dashboard-analysis-section,
.dashboard-analysis-insights {
  min-width: 0;
  padding: 14px;
  border: 1px solid #dbe4ef;
  border-radius: 14px;
  background: #fff;
}

.dashboard-analysis-section h4,
.dashboard-analysis-insights h4 {
  margin: 0 0 11px;
  color: #1e293b;
  font-size: 15px;
}

.dashboard-analysis-status-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 9px;
}

.dashboard-analysis-status-grid article {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 4px 10px;
  padding: 11px 12px;
  border-radius: 11px;
  background: #f7f9fc;
}

.dashboard-analysis-status-grid span {
  color: #475569;
  font-weight: 800;
}

.dashboard-analysis-status-grid strong {
  color: #172033;
  font-size: 21px;
}

.dashboard-analysis-status-grid small {
  grid-column: 1 / -1;
  color: #64748b;
}

.dashboard-analysis-insights {
  border-color: #c7d9fa;
  background: #f2f7ff;
}

.dashboard-analysis-insights ul {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 9px;
  margin: 0;
  padding: 0;
  list-style: none;
  color: #334155;
  line-height: 1.55;
}

.dashboard-analysis-insights li {
  position: relative;
  padding: 10px 12px 10px 31px;
  border: 1px solid #d8e4f6;
  border-radius: 10px;
  background: rgba(255, 255, 255, .78);
}

.dashboard-analysis-insights li::before {
  position: absolute;
  top: 12px;
  left: 12px;
  color: #2563eb;
  font-weight: 900;
  content: "•";
}

.dashboard-analysis-recommendations {
  min-width: 0;
  padding: 14px;
  border: 1px solid #fed7aa;
  border-radius: 14px;
  background: #fff8ed;
}

.dashboard-analysis-recommendations-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 11px;
}

.dashboard-analysis-recommendations-head h4 {
  margin: 0;
  color: #9a3412;
  font-size: 15px;
}

.dashboard-analysis-recommendations-head span {
  color: #c2410c;
  font-size: 12px;
  font-weight: 800;
}

.dashboard-analysis-recommendation-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.dashboard-analysis-recommendation-list article {
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr);
  gap: 10px;
  padding: 12px;
  border: 1px solid #fed7aa;
  border-left: 4px solid #f59e0b;
  border-radius: 11px;
  background: #fff;
}

.dashboard-analysis-recommendation-list article.priority-high { border-left-color: #dc2626; }
.dashboard-analysis-recommendation-list article.priority-normal { border-left-color: #16a34a; }

.dashboard-analysis-recommendation-list article > span {
  display: grid;
  width: 28px;
  height: 28px;
  place-items: center;
  border-radius: 50%;
  background: #ffedd5;
  color: #9a3412;
  font-weight: 900;
}

.dashboard-analysis-recommendation-list strong {
  display: block;
  margin-bottom: 4px;
  color: #7c2d12;
}

.dashboard-analysis-recommendation-list p {
  margin: 0;
  color: #475569;
  line-height: 1.55;
}

.dashboard-analysis-tables {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(0, .75fr);
  gap: 12px;
  align-items: start;
}

.dashboard-analysis-tables table {
  width: 100%;
  min-width: 0;
  border-collapse: collapse;
}

.dashboard-analysis-tables .table-wrap {
  width: 100%;
  min-width: 0;
  max-width: 100%;
  overflow-x: auto;
}

.dashboard-analysis-tables th,
.dashboard-analysis-tables td {
  padding: 9px 10px;
  border-bottom: 1px solid #e7edf5;
  text-align: left;
  white-space: nowrap;
}

.dashboard-analysis-tables th {
  background: #f7f9fc;
  color: #475569;
  font-size: 12px;
}

.dashboard-analysis-tables td small {
  display: block;
  margin-top: 2px;
  color: #64748b;
}

.dashboard-analysis-tables td:nth-child(2) strong {
  display: block;
  max-width: 250px;
  overflow: hidden;
  text-overflow: ellipsis;
}

.dashboard-analysis-loading {
  display: grid;
  min-height: 360px;
  place-items: center;
  border: 1px dashed #bfcee1;
  border-radius: 14px;
  background: #fff;
  color: #2563eb;
  font-size: 17px;
  font-weight: 800;
}

.dashboard-analysis-loading.error { color: #dc2626; }

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

@media (max-width: 760px) {
  #modal:has(.dashboard-analysis-workspace) {
    width: calc(100vw - 12px);
    height: calc(100vh - 12px);
  }

  .dashboard-analysis-open-btn {
    flex: 0 0 auto;
    padding: 0 13px;
  }

  .dashboard-analysis-controls {
    align-items: stretch;
    flex-wrap: wrap;
  }

  .dashboard-analysis-preset-tabs {
    width: 100%;
    overflow-x: auto;
  }

  .dashboard-analysis-preset-tabs button { flex: 0 0 auto; }

  .dashboard-analysis-controls > label {
    flex: 1 1 210px;
    justify-content: space-between;
  }

  .dashboard-analysis-controls input,
  .dashboard-analysis-controls select {
    width: min(160px, 58vw);
  }

  .dashboard-analysis-select-field .custom-select-shell {
    width: min(160px, 58vw);
  }

  .dashboard-analysis-period-head { grid-template-columns: minmax(0, 1fr); }
  .dashboard-analysis-period-head em { max-width: 100%; justify-self: start; }
  .dashboard-analysis-card-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .dashboard-analysis-status-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .dashboard-analysis-insights ul { grid-template-columns: minmax(0, 1fr); }
  .dashboard-analysis-recommendation-list { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 460px) {
  .dashboard-analysis-card-grid { grid-template-columns: minmax(0, 1fr); }
  .dashboard-analysis-status-grid { grid-template-columns: minmax(0, 1fr); }
}

@media (orientation: portrait) and (min-width: 700px) and (max-width: 1300px) {
  .app-shell {
    display: block;
  }
  .sidebar {
    position: sticky;
    top: 0;
    z-index: 70;
    height: auto;
    display: grid;
    grid-template-columns: minmax(150px, auto) minmax(0, 1fr);
    gap: 8px 10px;
    padding: 8px 10px;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }
  .brand {
    min-height: 32px;
    gap: 7px;
    padding: 0;
  }
  .brand-mark {
    width: 32px;
    height: 32px;
    min-width: 32px;
    aspect-ratio: 1 / 1;
    border-radius: 7px;
    transform: none;
  }
  .brand strong {
    flex-wrap: wrap;
    gap: 3px 5px;
    font-size: 12px;
    line-height: 1.1;
  }
  .brand .app-version {
    font-size: 10px;
  }
  nav {
    grid-column: 1 / -1;
    display: flex;
    gap: 5px;
    overflow-x: auto;
    padding-bottom: 2px;
    scrollbar-width: thin;
  }
  nav button {
    flex: 0 0 auto;
    min-width: 84px;
    min-height: 38px;
    padding: 0 10px;
    justify-content: center;
    text-align: center;
    font-size: 14px;
    line-height: 1.25;
    white-space: nowrap;
  }
  .online-status,
  .offline-status,
  .current-account,
  #logoutBtn {
    margin-top: 0;
  }
  .online-status,
  .offline-status {
    grid-column: auto;
    align-self: center;
  }
  .online-status-btn,
  .offline-status-btn,
  #logoutBtn {
    min-height: 30px;
    padding: 0 8px;
    font-size: 12px;
  }
  .current-account {
    grid-column: 1 / -1;
    grid-template-columns: auto auto 1fr;
    align-items: center;
    gap: 6px;
    padding: 6px 8px;
  }
  .current-account span,
  .current-account strong,
  .current-account small {
    font-size: 11px;
    line-height: 1.15;
  }
  .online-users-panel {
    left: auto;
    right: 0;
    bottom: auto;
    top: calc(100% + 6px);
    width: min(300px, calc(100vw - 20px));
    max-height: min(360px, calc(100vh - 160px));
  }
  .online-users-panel::after {
    display: none;
  }
  .content {
    padding: 10px;
  }
  .topbar {
    align-items: flex-start;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 10px;
  }
  .topbar h2 {
    font-size: 21px;
  }
  .toolbar {
    gap: 6px;
  }
  .toolbar button {
    min-height: 30px;
    padding: 0 9px;
    font-size: 12px;
  }
  .filter-bar,
  .inventory-filter,
  .outbound-filter-bar,
  .completed-toolbar {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 6px;
    padding: 7px;
    margin-bottom: 8px;
  }
  .inventory-filter {
    grid-template-columns: 180px 240px 150px auto;
    justify-content: start;
  }
  .filter-bar label,
  .filter-bar select,
  .filter-bar input {
    font-size: 12px;
  }
  .filter-bar select,
  .filter-bar input {
    min-height: 30px;
  }
  .inventory-batch-actions,
  .completed-total,
  .completed-batch-out-btn,
  .filter-bar > .download-list-btn,
  .filter-bar > .flow-batch-delete-btn {
    grid-column: 1 / -1;
  }
  .inventory-filter .inventory-batch-btn {
    width: 108px;
    min-width: 108px;
    max-width: 108px;
    height: 30px;
    min-height: 30px;
    font-size: 12px;
  }
  .metric-grid,
  .inventory-summary {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 5px;
  }
  .metric,
  .inventory-summary article {
    padding: 7px 8px;
  }
  .metric strong,
  .inventory-summary strong {
    font-size: 19px;
  }
  .dashboard-kpi-strip,
  .dashboard-main-grid,
  .dashboard-top-grid,
  .dashboard-bottom-grid {
    grid-template-columns: 1fr;
  }
  .dashboard-month-chart {
    grid-template-columns: repeat(6, minmax(0, 1fr));
  }
  .flow-list {
    gap: 4px;
  }
  .batch-group {
    padding: 5px 6px;
    border-width: 1px;
    border-radius: 7px;
  }
  .batch-head {
    grid-template-columns: 1fr;
    gap: 5px;
  }
  .batch-duration,
  .batch-head > .actions {
    grid-column: auto;
    justify-content: flex-start;
  }
  .batch-created-date,
  .batch-owner-shop,
  .batch-progress-pill,
  .batch-download-count {
    min-height: 20px;
    padding: 1px 6px;
    font-size: 11px;
  }
  .batch-lines {
    gap: 4px;
    margin-top: 4px;
  }
  .flow-row,
  .outbound-product-row {
    grid-template-columns: 1fr;
    gap: 5px;
    padding: 4px 5px;
    border-radius: 6px;
  }
  .flow-row .actions {
    grid-column: auto;
    justify-content: flex-start;
  }
  .flow-main {
    gap: 5px;
  }
  .flow-thumb {
    width: 40px;
    height: 40px;
    border-radius: 6px;
  }
  .flow-title {
    gap: 4px;
    margin-bottom: 1px;
    font-size: 12px;
    line-height: 1.15;
  }
  .flow-meta {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 2px 5px;
    font-size: 11px;
    line-height: 1.15;
  }
  .inline-number,
  .inline-date {
    gap: 4px;
    font-size: 11px;
  }
  .inline-number input {
    width: 58px;
  }
  .inline-date input {
    width: 108px;
  }
  .status-select,
  .inline-number input,
  .inline-date input {
    min-height: 23px;
    padding: 1px 5px;
    font-size: 11px;
  }
  .actions {
    gap: 3px;
  }
  .actions button,
  .flow-row .actions button,
  .batch-head .actions button {
    min-height: 23px;
    padding: 0 6px;
    border-radius: 6px;
    font-size: 11px;
  }
  .inventory-grid {
    display: block;
    overflow-x: auto;
  }
  .inventory-grid table {
    min-width: 980px;
  }
  .inventory-grid th,
  .inventory-grid td {
    padding: 3px 5px;
    font-size: 11px;
  }
  dialog {
    width: min(900px, calc(100vw - 20px));
    max-height: calc(100dvh - 20px);
  }
  dialog:has(.batch-job-form),
  dialog:has(.batch-out-form),
  dialog:has(.ocr-outbound-form) {
    width: min(980px, calc(100vw - 20px));
  }
  #modalBody {
    padding: 10px;
    overflow: auto;
  }
}

@media (orientation: portrait) and (min-width: 900px) and (max-width: 1300px) {
  .flow-row,
  .outbound-product-row {
    grid-template-columns: minmax(220px, .8fr) minmax(360px, 1fr) max-content;
  }
  .flow-meta {
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
    gap: 5px;
    overflow: hidden;
  }
  .flow-note-display {
    grid-column: auto;
    max-width: 160px;
    min-height: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  .flow-row .actions {
    grid-column: auto;
    flex-wrap: nowrap;
    justify-content: flex-end;
    max-width: 300px;
    overflow-x: auto;
    scrollbar-width: none;
  }
  .flow-row .actions::-webkit-scrollbar {
    display: none;
  }
  .batch-head {
    grid-template-columns: minmax(360px, 1fr) 360px max-content;
  }
  .batch-duration,
  .batch-head > .actions {
    grid-column: auto;
  }
  .batch-head > .actions {
    flex-wrap: nowrap;
    justify-content: flex-end;
    max-width: 340px;
    overflow-x: auto;
    scrollbar-width: none;
  }
  .batch-head > .actions::-webkit-scrollbar {
    display: none;
  }
}

html.tablet-desktop-mode,
html.tablet-desktop-mode body {
  min-width: 1600px;
}
html.tablet-desktop-mode body {
  overflow-x: auto;
}
html.tablet-desktop-mode .login-shell,
html.tablet-desktop-mode .boot-screen {
  min-width: 1600px;
}
html.tablet-desktop-mode .app-shell {
  min-width: 1600px;
  min-height: 100vh;
  display: grid;
  grid-template-columns: 248px minmax(0, 1fr);
}
html.tablet-desktop-mode .sidebar {
  position: sticky;
  top: 0;
  z-index: auto;
  height: 100vh;
  display: flex;
  flex-direction: column;
  gap: 20px;
  padding: 20px 16px;
  border-right: 1px solid var(--line);
  border-bottom: 0;
}
html.tablet-desktop-mode .brand {
  display: flex;
  gap: 12px;
  align-items: center;
  min-height: 50px;
  padding: 0 6px;
}
html.tablet-desktop-mode .brand-mark {
  width: 44px;
  height: 44px;
  min-width: 44px;
  aspect-ratio: 1 / 1;
  border-radius: 8px;
  transform: none;
}
html.tablet-desktop-mode .brand strong {
  display: inline-flex;
  align-items: baseline;
  flex-wrap: nowrap;
  gap: 6px;
  font-size: 15px;
  line-height: normal;
  white-space: nowrap;
}
html.tablet-desktop-mode .brand .app-version {
  font-size: 11px;
}
html.tablet-desktop-mode nav {
  grid-column: auto;
  display: grid;
  gap: 6px;
  overflow: visible;
  padding-bottom: 0;
}
html.tablet-desktop-mode nav button {
  flex: initial;
  min-width: 0;
  min-height: 42px;
  padding: 0 14px;
  justify-content: flex-start;
  text-align: left;
  font-size: 14px;
  white-space: normal;
}
html.tablet-desktop-mode .online-status {
  grid-column: auto;
  margin-top: auto;
}
html.tablet-desktop-mode .offline-status,
html.tablet-desktop-mode .current-account,
html.tablet-desktop-mode #logoutBtn {
  grid-column: auto;
  margin-top: 0;
}
html.tablet-desktop-mode .online-status-btn,
html.tablet-desktop-mode .offline-status-btn {
  min-height: 40px;
  padding: 0 14px;
  font-size: 14px;
}
html.tablet-desktop-mode .current-account {
  display: grid;
  grid-template-columns: none;
  gap: 4px;
  padding: 12px;
}
html.tablet-desktop-mode .current-account span {
  font-size: 12px;
}
html.tablet-desktop-mode .current-account strong {
  font-size: 15px;
}
html.tablet-desktop-mode .current-account small {
  font-size: 13px;
}
html.tablet-desktop-mode .online-users-panel {
  left: 0;
  right: 0;
  top: auto;
  bottom: calc(100% + 8px);
  width: 100%;
  max-height: min(340px, calc(100vh - 180px));
}
html.tablet-desktop-mode .online-users-panel::after {
  display: none;
}
html.tablet-desktop-mode .content {
  padding: 28px;
}
html.tablet-desktop-mode .topbar {
  display: flex;
  align-items: center;
  flex-direction: row;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 20px;
}
html.tablet-desktop-mode .topbar h2 {
  font-size: 28px;
}
html.tablet-desktop-mode .topbar p,
html.tablet-desktop-mode .hint {
  font-size: 13px;
}
html.tablet-desktop-mode .toolbar {
  gap: 10px;
}
html.tablet-desktop-mode .toolbar button,
html.tablet-desktop-mode .filter-bar button,
html.tablet-desktop-mode .batch-head .actions button {
  min-height: 38px;
  padding: 0 14px;
  font-size: 14px;
}
html.tablet-desktop-mode .filter-bar {
  grid-template-columns: repeat(4, minmax(160px, 1fr)) auto;
  gap: 10px;
  padding: 12px;
  margin-bottom: 16px;
}
html.tablet-desktop-mode .filter-bar label {
  font-size: 15px;
}
html.tablet-desktop-mode .filter-bar select,
html.tablet-desktop-mode .filter-bar input {
  min-height: 40px;
  font-size: 15px;
}
html.tablet-desktop-mode .inventory-filter {
  grid-template-columns: 220px 360px 180px auto;
  justify-content: start;
}
html.tablet-desktop-mode .outbound-filter-bar {
  grid-template-columns: 240px 180px minmax(280px, 520px) auto;
}
html.tablet-desktop-mode .inventory-batch-actions {
  grid-column: 1 / -1;
}
html.tablet-desktop-mode .inventory-filter .inventory-batch-btn {
  width: 128px;
  min-width: 128px;
  max-width: 128px;
  height: 38px;
  min-height: 38px;
  font-size: 14px;
}
html.tablet-desktop-mode .metric-grid,
html.tablet-desktop-mode .inventory-summary {
  grid-template-columns: repeat(auto-fit, minmax(132px, 1fr));
  gap: 16px;
}
html.tablet-desktop-mode .metric,
html.tablet-desktop-mode .inventory-summary article {
  padding: 16px;
}
html.tablet-desktop-mode .metric strong {
  font-size: 31px;
}
html.tablet-desktop-mode .inventory-summary strong {
  font-size: 22px;
}
html.tablet-desktop-mode .dashboard-kpi-strip {
  grid-template-columns: repeat(6, minmax(0, 1fr));
}
html.tablet-desktop-mode .dashboard-main-grid,
html.tablet-desktop-mode .dashboard-top-grid,
html.tablet-desktop-mode .dashboard-bottom-grid,
html.tablet-desktop-mode .dashboard-column-grid {
  grid-template-columns: 1fr 1fr;
}
html.tablet-desktop-mode .dashboard-panel {
  padding: 16px;
}
html.tablet-desktop-mode .dashboard-month-chart {
  grid-template-columns: repeat(12, minmax(42px, 1fr));
}
html.tablet-desktop-mode .flow-list {
  gap: 8px;
}
html.tablet-desktop-mode .batch-group {
  padding: 12px;
  border-width: 2px;
  border-radius: 8px;
  box-shadow: inset 3px 0 0 var(--batch-rail), 0 2px 8px rgba(16, 24, 40, .06);
}
html.tablet-desktop-mode .batch-head {
  grid-template-columns: minmax(420px, 1.35fr) 360px auto auto;
  gap: 12px;
  align-items: center;
}
html.tablet-desktop-mode .batch-head > .actions {
  grid-column: auto;
  flex-wrap: wrap;
  justify-content: flex-end;
  max-width: none;
  overflow: visible;
}
html.tablet-desktop-mode .batch-duration {
  min-height: 32px;
  padding: 4px 12px;
  font-size: 14px;
}
html.tablet-desktop-mode .batch-created-date {
  min-height: 28px;
  padding: 3px 10px;
  font-size: 14px;
}
html.tablet-desktop-mode .batch-owner-shop {
  min-height: 28px;
  max-width: 100%;
  padding: 4px 11px;
  overflow: visible;
  text-overflow: clip;
  white-space: normal;
  font-size: 15px;
  line-height: 1.25;
}
html.tablet-desktop-mode .batch-progress-pill,
html.tablet-desktop-mode .batch-download-count {
  min-height: 24px;
  padding: 0 9px;
  font-size: 12px;
}
html.tablet-desktop-mode .batch-lines {
  gap: 8px;
  margin-top: 8px;
}
html.tablet-desktop-mode .flow-row {
  display: grid;
  grid-template-columns: minmax(280px, 1.35fr) minmax(250px, 1fr) auto;
  gap: 10px;
  align-items: center;
  padding: 9px 10px;
  border-radius: 8px;
}
html.tablet-desktop-mode .flow-row .actions {
  grid-column: auto;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 5px;
  max-width: none;
  overflow: visible;
}
html.tablet-desktop-mode .flow-main {
  gap: 9px;
}
html.tablet-desktop-mode .flow-check,
html.tablet-desktop-mode .batch-check {
  width: 18px;
  height: 18px;
  min-height: 18px;
}
html.tablet-desktop-mode .flow-thumb {
  width: 72px;
  height: 72px;
  border-radius: 8px;
}
html.tablet-desktop-mode .flow-title {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 3px;
  overflow: visible;
  text-overflow: clip;
  white-space: normal;
  font-size: 14px;
  line-height: normal;
}
html.tablet-desktop-mode .flow-meta {
  display: grid;
  grid-template-columns: repeat(2, minmax(110px, 1fr));
  gap: 4px 10px;
  overflow: visible;
  font-size: 13px;
  line-height: normal;
}
html.tablet-desktop-mode .flow-meta > * {
  flex: initial;
}
html.tablet-desktop-mode .flow-note-display {
  grid-column: 1 / -1;
  max-width: none;
  min-height: 24px;
  overflow: visible;
  text-overflow: clip;
  white-space: normal;
  font-size: 13px;
  line-height: normal;
}
html.tablet-desktop-mode .inline-number,
html.tablet-desktop-mode .inline-date {
  gap: 8px;
  font-size: 13px;
}
html.tablet-desktop-mode .inline-number input {
  width: 82px;
  min-height: 30px;
  height: auto;
  padding: 5px 9px;
  font-size: 13px;
}
html.tablet-desktop-mode .inline-date input {
  width: 138px;
  min-height: 30px;
  height: auto;
  padding: 5px 9px;
  font-size: 13px;
}
html.tablet-desktop-mode .status-select {
  width: 112px;
  min-height: 30px;
  height: auto;
  padding: 5px 8px;
  font-size: 13px;
}
html.tablet-desktop-mode .status-badge {
  min-height: 23px;
  padding: 2px 9px;
  font-size: 13px;
}
html.tablet-desktop-mode .actions button,
html.tablet-desktop-mode .flow-row .actions button,
html.tablet-desktop-mode .batch-head .actions button {
  min-height: 30px;
  height: auto;
  padding: 0 9px;
  border-radius: 8px;
  font-size: 13px;
  line-height: normal;
}
html.tablet-desktop-mode .batch-line,
html.tablet-desktop-mode .batch-form-line {
  gap: 10px;
  padding: 8px;
  border-radius: 8px;
}
html.tablet-desktop-mode .batch-line {
  grid-template-columns: minmax(160px, 1fr) auto auto;
}
html.tablet-desktop-mode .batch-form-line {
  grid-template-columns: minmax(150px, 1fr) minmax(130px, .9fr) minmax(86px, 108px) minmax(200px, 1.2fr);
}
html.tablet-desktop-mode .batch-product-summary {
  gap: 10px;
  font-size: 14px;
  line-height: normal;
}
html.tablet-desktop-mode .batch-product-thumb {
  width: 56px;
  height: 56px;
  border-radius: 8px;
}
html.tablet-desktop-mode .batch-collapsed-summary {
  gap: 6px;
  margin-top: 10px;
  padding: 8px;
}
html.tablet-desktop-mode .batch-collapsed-summary span {
  max-width: 360px;
  padding: 5px 8px;
  font-size: 13px;
}
html.tablet-desktop-mode .inventory-grid {
  display: grid;
  overflow-x: visible;
}
html.tablet-desktop-mode .inventory-grid table {
  min-width: 0;
  table-layout: fixed;
}
html.tablet-desktop-mode .inventory-grid th,
html.tablet-desktop-mode .inventory-grid td {
  padding: 6px 8px;
  font-size: 13px;
}
html.tablet-desktop-mode .inventory-grid .inventory-actions-grid {
  grid-template-columns: repeat(3, minmax(60px, 1fr));
  gap: 5px;
}
html.tablet-desktop-mode .inventory-grid .inventory-actions-grid button {
  min-height: 28px;
  padding: 0 6px;
  font-size: 12px;
}
html.tablet-desktop-mode dialog {
  width: min(720px, calc(100vw - 32px));
  max-height: calc(100dvh - 32px);
}
html.tablet-desktop-mode dialog::backdrop {
  background: rgba(15, 23, 42, .24);
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  transition: opacity .18s ease-out, background-color .18s ease-out;
}
html.tablet-desktop-mode dialog[open]::backdrop {
  animation: softBackdropIn .18s ease-out both;
}
html.tablet-desktop-mode dialog[open] .modal-box {
  animation: none !important;
  transform: none !important;
}
html.tablet-desktop-mode dialog:has(.batch-job-form),
html.tablet-desktop-mode dialog:has(.batch-out-form),
html.tablet-desktop-mode dialog:has(.ocr-outbound-form) {
  width: min(1180px, calc(100vw - 32px));
}
html.tablet-desktop-mode #modalBody {
  padding: 16px;
  overflow: auto;
}

html.tablet-desktop-mode .saved-login-dropdown,
html.tablet-desktop-mode .dashboard-shop-menu,
html.tablet-desktop-mode .dashboard-year-menu,
html.tablet-desktop-mode .dividend-month-list,
html.tablet-desktop-mode .online-users-panel,
html.tablet-desktop-mode .custom-select-menu {
  padding: 5px !important;
  gap: 4px !important;
  border-radius: 8px !important;
}
html.tablet-desktop-mode .custom-select-menu {
  max-height: 220px !important;
  background: #fff !important;
  border-color: #cbd5e1 !important;
  box-shadow: 0 12px 26px rgba(16, 24, 40, .14) !important;
  transform: none !important;
  filter: none !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  opacity: 1 !important;
  will-change: auto !important;
  contain: none !important;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -webkit-text-size-adjust: 100%;
}
html.tablet-desktop-mode .custom-select-menu-floating {
  position: fixed !important;
  display: grid !important;
  z-index: 99999 !important;
  background: #fff !important;
  opacity: 1 !important;
  transform: none !important;
  filter: none !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  isolation: auto;
  contain: none !important;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -webkit-text-size-adjust: 100%;
}
html.tablet-desktop-mode .custom-select-menu-in-dialog {
  z-index: 2147483647 !important;
}
html.tablet-desktop-mode .custom-select-menu,
html.tablet-desktop-mode .custom-select-menu * {
  -webkit-font-smoothing: antialiased !important;
  text-shadow: none !important;
  filter: none !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
}
html.tablet-desktop-mode .custom-select-shell.open .custom-select-menu {
  animation: none !important;
}
html.tablet-desktop-mode .custom-select-menu-floating.custom-select-menu {
  animation: none !important;
}
html.tablet-desktop-mode .custom-select-option {
  min-height: 32px !important;
  padding: 7px 10px !important;
  border-radius: 6px !important;
  color: #111827 !important;
  font-size: 14px !important;
  font-weight: 900 !important;
  line-height: 1.25 !important;
  text-shadow: none !important;
  transform: none !important;
  filter: none !important;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}
html.tablet-desktop-mode .custom-select-trigger {
  min-height: 36px !important;
  padding: 6px 9px !important;
  border-radius: 7px !important;
  color: #111827 !important;
  font-size: 14px !important;
  font-weight: 900 !important;
  transform: none !important;
  filter: none !important;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}
html.tablet-desktop-mode .custom-select-option:hover {
  color: #1d4ed8 !important;
  background: #eff6ff !important;
  transform: none !important;
}
html.tablet-desktop-mode .custom-select-option.selected {
  color: #1d4ed8 !important;
  background: #dbeafe !important;
}
html.tablet-desktop-mode .filter-bar .custom-select-trigger,
html.tablet-desktop-mode .completed-toolbar .custom-select-trigger,
html.tablet-desktop-mode .inventory-filter .custom-select-trigger,
html.tablet-desktop-mode .outbound-filter-bar .custom-select-trigger {
  min-height: 34px !important;
  font-size: 12.5px !important;
}
html.tablet-desktop-mode .outbound-filter-bar #outboundShopKeywordInput,
html.tablet-desktop-mode .outbound-filter-bar > .filter-mini-btn {
  min-height: 34px !important;
  height: 34px !important;
}
html.tablet-desktop-mode .custom-select-status {
  width: 94px !important;
}
html.tablet-desktop-mode .custom-select-status .custom-select-trigger,
html.tablet-desktop-mode .custom-select-compact .custom-select-trigger {
  min-height: 30px !important;
  padding: 5px 7px !important;
  font-size: 13px !important;
}
html.tablet-desktop-mode .custom-select-status .custom-select-option,
html.tablet-desktop-mode .custom-select-compact .custom-select-option {
  min-height: 28px !important;
  padding: 5px 7px !important;
  font-size: 13px !important;
}
html.tablet-desktop-mode *,
html.tablet-desktop-mode *::before,
html.tablet-desktop-mode *::after {
  filter: none !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  text-shadow: none !important;
}
html.tablet-desktop-mode .sidebar {
  background: #fff !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
}
html.tablet-desktop-mode .custom-select-menu,
html.tablet-desktop-mode .custom-select-menu *,
html.tablet-desktop-mode .dashboard-shop-menu,
html.tablet-desktop-mode .dashboard-shop-menu *,
html.tablet-desktop-mode .dashboard-year-menu,
html.tablet-desktop-mode .dashboard-year-menu *,
html.tablet-desktop-mode .saved-login-dropdown,
html.tablet-desktop-mode .saved-login-dropdown * {
  transform: none !important;
  animation: none !important;
  -webkit-font-smoothing: auto !important;
  text-rendering: auto !important;
}
html.tablet-desktop-mode body.tablet-input-settling,
html.tablet-desktop-mode body.tablet-input-settling .app-shell,
html.tablet-desktop-mode body.tablet-input-settling .content,
html.tablet-desktop-mode body.tablet-input-settling .view,
html.tablet-desktop-mode body.tablet-input-settling dialog {
  filter: none !important;
  backdrop-filter: none !important;
  transform: none !important;
  transition: filter .22s ease-out, backdrop-filter .22s ease-out, transform .22s ease-out, opacity .22s ease-out !important;
  animation-duration: .12s !important;
  animation-timing-function: ease-out !important;
}
html.tablet-desktop-mode input,
html.tablet-desktop-mode textarea,
html.tablet-desktop-mode select,
html.tablet-desktop-mode button {
  text-rendering: auto;
  -webkit-font-smoothing: auto;
}

/* Final tablet clarity override: keep tablet UI crisp, especially floating menus. */
html.tablet-desktop-mode,
html.tablet-desktop-mode body,
html.tablet-desktop-mode .app-shell,
html.tablet-desktop-mode .content,
html.tablet-desktop-mode .view,
html.tablet-desktop-mode dialog,
html.tablet-desktop-mode .modal-box {
  filter: none !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  transform-style: flat !important;
  perspective: none !important;
}

html.tablet-desktop-mode dialog::backdrop,
html.tablet-desktop-mode dialog[open]::backdrop {
  background: rgba(15, 23, 42, .20) !important;
  filter: none !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  animation: none !important;
  transition: none !important;
}

html.tablet-desktop-mode .custom-select-menu-floating,
html.tablet-desktop-mode .custom-select-menu-floating *,
html.tablet-desktop-mode .saved-login-dropdown,
html.tablet-desktop-mode .saved-login-dropdown *,
html.tablet-desktop-mode .dashboard-shop-menu,
html.tablet-desktop-mode .dashboard-shop-menu *,
html.tablet-desktop-mode .dashboard-year-menu,
html.tablet-desktop-mode .dashboard-year-menu *,
html.tablet-desktop-mode .dividend-month-list,
html.tablet-desktop-mode .dividend-month-list *,
html.tablet-desktop-mode .online-users-panel,
html.tablet-desktop-mode .online-users-panel * {
  filter: none !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  transform: none !important;
  animation: none !important;
  transition: background-color .12s ease-out, color .12s ease-out, border-color .12s ease-out !important;
  text-shadow: none !important;
  -webkit-font-smoothing: auto !important;
  text-rendering: auto !important;
}

html.tablet-desktop-mode .custom-select-menu-floating {
  position: fixed !important;
  z-index: 2147483647 !important;
  display: grid !important;
  background: #fff !important;
  color: #0f172a !important;
  border: 1px solid #94a3b8 !important;
  box-shadow: 0 4px 12px rgba(15, 23, 42, .12) !important;
  opacity: 1 !important;
  contain: none !important;
  isolation: auto !important;
  backface-visibility: visible !important;
  -webkit-backface-visibility: visible !important;
  will-change: auto !important;
  transform: none !important;
  -webkit-transform: none !important;
  font-family: Arial, "Microsoft YaHei", "PingFang SC", sans-serif !important;
}

html.tablet-desktop-mode .custom-select-menu-floating .custom-select-option {
  min-height: 30px !important;
  padding: 6px 9px !important;
  color: #0f172a !important;
  font-size: 13px !important;
  font-weight: 700 !important;
  line-height: 1.25 !important;
  background: #fff !important;
  font-family: Arial, "Microsoft YaHei", "PingFang SC", sans-serif !important;
  -webkit-font-smoothing: auto !important;
  text-rendering: auto !important;
}

html.tablet-desktop-mode .custom-select-menu-floating .custom-select-option:hover,
html.tablet-desktop-mode .custom-select-menu-floating .custom-select-option.selected {
  color: #1d4ed8 !important;
  background: #eaf2ff !important;
}

html.tablet-desktop-mode body.tablet-input-settling,
html.tablet-desktop-mode body.tablet-input-settling * {
  filter: none !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  transform: none !important;
  animation: none !important;
  transition: none !important;
}

/* True final guard: compact top filters and slightly deepen batch product-list background. */
#jobsView > .filter-bar {
  grid-template-columns: 280px 280px 280px minmax(320px, 520px) max-content !important;
  justify-content: start !important;
  align-items: end;
}

#jobsView > .filter-bar .download-list-btn {
  grid-column: 1 / 2 !important;
  width: 280px !important;
  max-width: 280px !important;
}

#purchaseView .purchase-filter-grid {
  grid-template-columns: 220px 300px minmax(360px, 560px) max-content !important;
  justify-content: start !important;
  align-items: end;
}

#purchaseView .purchase-filter-actions {
  justify-content: flex-start !important;
}

#purchaseView .purchase-filter-actions button {
  width: auto;
  min-width: 68px;
  white-space: nowrap;
}

.batch-collapsed-summary,
.batch-lines {
  background: #eef5ff !important;
}

.batch-group {
  border-color: var(--batch-rail, #22c55e) !important;
  box-shadow: inset 3px 0 0 var(--batch-rail, #22c55e), 0 2px 8px rgba(16, 24, 40, .06) !important;
}

.batch-group .flow-row,
.batch-group .job-card {
  border-left-color: var(--batch-rail, #22c55e) !important;
}

@media (max-width: 1180px) {
  #jobsView > .filter-bar,
  #purchaseView .purchase-filter-grid {
    grid-template-columns: repeat(2, minmax(180px, 1fr)) !important;
  }

  #jobsView > .filter-bar .download-list-btn {
    grid-column: 1 / -1 !important;
    width: 100% !important;
    max-width: none !important;
  }
}

/* Final toolbar width tune: avoid stretched controls on wide screens. */
#jobsView > .filter-bar {
  grid-template-columns: 280px 280px 280px minmax(320px, 520px) max-content !important;
  justify-content: start !important;
  align-items: end;
}

#jobsView > .filter-bar label,
#purchaseView .purchase-filter-grid label {
  min-width: 0;
}

#jobsView > .filter-bar select,
#jobsView > .filter-bar input,
#jobsView > .filter-bar .custom-select-trigger,
#purchaseView .purchase-filter-grid select,
#purchaseView .purchase-filter-grid input,
#purchaseView .purchase-filter-grid .custom-select-trigger {
  width: 100%;
  max-width: 100%;
}

#jobsView > .filter-bar .filter-button-pair {
  width: max-content;
}

#jobsView > .filter-bar .download-list-btn {
  grid-column: 1 / 2 !important;
  width: 280px !important;
  max-width: 280px !important;
}

#purchaseView .purchase-filter-grid {
  grid-template-columns: 220px 300px minmax(360px, 560px) max-content !important;
  justify-content: start !important;
  align-items: end;
}

#purchaseView .purchase-filter-actions {
  justify-content: flex-start !important;
}

#purchaseView .purchase-filter-actions button {
  width: auto;
  min-width: 68px;
  white-space: nowrap;
}

.batch-collapsed-summary,
.batch-lines {
  background: #eef5ff !important;
}

@media (max-width: 1180px) {
  #jobsView > .filter-bar,
  #purchaseView .purchase-filter-grid {
    grid-template-columns: repeat(2, minmax(180px, 1fr)) !important;
  }

  #jobsView > .filter-bar .download-list-btn {
    grid-column: 1 / -1 !important;
    width: 100% !important;
    max-width: none !important;
  }
}

/* Global soft-rounding pass: keep the ERP professional, but remove the hard-edged feel. */
:root {
  --radius-xs: 8px;
  --radius-sm: 10px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 20px;
}

button,
.ghost,
.primary,
.download-list-btn,
.notice-btn,
.filter-mini-btn,
.small-confirm-btn,
.desktop-notifier-btn,
.install-app-btn,
.inventory-batch-btn,
.completed-batch-out-btn,
.shop-period-toggle-all {
  border-radius: var(--radius-sm);
}

input,
select,
textarea,
.custom-select-trigger,
.login-account-wrap,
.completed-month-pill,
.date-range-single,
.date-range-input,
.form-grid input,
.form-grid select,
.form-grid textarea {
  border-radius: var(--radius-md);
}

.shipping-method-select:required:invalid + .custom-select-trigger,
.custom-select-trigger.custom-select-required-missing {
  border-color: rgba(217, 45, 32, .82) !important;
  background: #fffafa !important;
}
.shipping-method-select:required:invalid + .custom-select-trigger .custom-select-value,
.custom-select-trigger.custom-select-required-missing .custom-select-value {
  color: #98a2b3 !important;
}

.login-form,
.boot-card,
.panel,
.dashboard-panel,
.filter-bar,
.inventory-filter,
.outbound-filter-bar,
.completed-toolbar,
.purchase-filter-panel,
.purchase-board,
.inventory-grid,
.outbound-card,
.card,
.job-card,
.lane,
.metric,
.inventory-summary article,
.outbound-summary-grid article,
.dashboard-kpi-strip article,
.purchase-group,
.outbound-draft-card,
.cost-draft-card {
  border-radius: var(--radius-lg);
}

.modal-box,
dialog .modal-box,
.image-preview-modal,
.draft-page-card,
.system-init-card,
.notification-card {
  border-radius: var(--radius-xl);
}

.modal-box header,
.modal-box footer {
  border-radius: var(--radius-xl) var(--radius-xl) 0 0;
}

.modal-box footer {
  border-radius: 0 0 var(--radius-xl) var(--radius-xl);
}

.sidebar {
  border-radius: 0 var(--radius-lg) var(--radius-lg) 0;
}

.brand-mark,
.app-icon,
.flow-thumb,
.inventory-thumb,
.purchase-image-thumb,
.notice-image,
.clickable-image,
.draft-product-image,
.product-image-preview img {
  border-radius: var(--radius-md);
}

nav button,
.nav-sub-action,
.online-status-btn,
.current-account,
#passwordBtn,
#systemInitBtn,
#staffRosterBtn,
#logoutBtn {
  border-radius: var(--radius-md);
}

/* Keep the three sidebar utility buttons visually identical. */
#passwordBtn,
#systemInitBtn,
#staffRosterBtn,
.sidebar > #sheinPlatformNavBtn.ghost:not(.hidden) {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: calc(100% - 16px) !important;
  max-width: calc(100% - 16px) !important;
  height: 38px !important;
  min-height: 38px !important;
  margin-right: auto !important;
  margin-left: auto !important;
  padding: 0 14px !important;
  box-sizing: border-box !important;
  border: 1px solid #d0d5dd !important;
  border-radius: 8px !important;
  background: #fff !important;
  color: #172033 !important;
  box-shadow: none !important;
  outline: none !important;
  text-align: center !important;
  line-height: 36px !important;
  transform: none !important;
}
#passwordBtn:hover,
#systemInitBtn:hover,
#staffRosterBtn:hover,
.sidebar > #sheinPlatformNavBtn.ghost:not(.hidden):hover {
  border-color: #cbd5e1 !important;
  background: #f8fafc !important;
  box-shadow: none !important;
}
#passwordBtn:focus,
#systemInitBtn:focus,
#staffRosterBtn:focus,
.sidebar > #sheinPlatformNavBtn.ghost:not(.hidden):focus,
#passwordBtn:focus-visible,
#systemInitBtn:focus-visible,
#staffRosterBtn:focus-visible,
.sidebar > #sheinPlatformNavBtn.ghost:not(.hidden):focus-visible,
#passwordBtn:active,
#systemInitBtn:active,
#staffRosterBtn:active,
.sidebar > #sheinPlatformNavBtn.ghost:not(.hidden):active {
  border-color: #d0d5dd !important;
  background: #fff !important;
  box-shadow: none !important;
  outline: none !important;
  transform: none !important;
}

.batch-group,
.completed-batch-group,
.outbound-batch-card {
  border-radius: var(--radius-lg);
}

.batch-line,
.batch-form-line,
.flow-row,
.inventory-row,
.purchase-row,
.batch-collapsed-summary,
.transport-complete-box,
.batch-status-count,
.draft-product-card {
  border-radius: var(--radius-md);
}

.batch-status-item,
.batch-date-pill,
.batch-owner-shop,
.batch-progress-pill,
.batch-download-count,
.status-badge,
.pill,
.purchase-status-pill,
.purchase-type-pill,
.radio-pill,
.shop-period-picker label,
.completed-total span,
.job-duration {
  border-radius: 999px;
}

.batch-duration {
  border-radius: var(--radius-md);
}

.custom-select-menu,
.custom-select-menu-floating,
.dashboard-shop-menu,
.dashboard-year-menu,
.saved-login-dropdown,
.online-users-panel,
.dividend-month-list {
  border-radius: var(--radius-lg);
}

.custom-select-option,
.saved-login-option {
  border-radius: var(--radius-sm);
}

table,
.purchase-table {
  border-radius: var(--radius-md);
}

th:first-child {
  border-top-left-radius: var(--radius-md);
}

th:last-child {
  border-top-right-radius: var(--radius-md);
}

/* Final finance color overrides: outbound total is payable red, historical settlement is receivable green. */
.outbound-metric.outbound-money-metric strong {
  color: #dc2626 !important;
}

.outbound-metric.outbound-money-metric.historical-settlement-metric strong {
  color: #16a34a !important;
}

/* Batch product list color tune: soften the warm block so it fits the blue-white ERP chrome. */
.batch-collapsed-summary {
  border-color: #d9e3f2 !important;
  background: #f8fbff !important;
}

.batch-collapsed-summary span {
  border: 1px solid #e4ebf5 !important;
  background: #ffffff !important;
  color: #40516a !important;
  box-shadow: 0 1px 2px rgba(16, 24, 40, .03);
}

.batch-lines,
.batch-line {
  border-color: #d9e3f2 !important;
  background: #f8fbff !important;
}

.batch-line,
.batch-form-line {
  background: #ffffff !important;
  border-color: #e3ebf6 !important;
}

.batch-product-summary,
.batch-product-summary strong,
.batch-product-summary span {
  color: #344054;
}

/* Batch summary chips: keep FNSKU visible first and keep status counts inside the pill. */
.batch-collapsed-summary .product-summary-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  max-width: 300px;
  min-width: 0;
}

.batch-collapsed-summary .summary-fnsku {
  flex: 0 0 auto;
  color: #1f2937;
  font-size: 13px;
  font-weight: 950;
  line-height: 1;
}

.batch-collapsed-summary .summary-name {
  flex: 0 1 auto;
  min-width: 0;
  max-width: 118px;
  overflow: hidden;
  color: #60708a;
  font-size: 12px;
  font-style: normal;
  font-weight: 850;
  line-height: 1;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Inventory finance emphasis: current total amount should stay red. */
.inventory-summary .inventory-total-money strong {
  color: #dc2626 !important;
}

.inventory-summary .inventory-total-money span {
  color: #b42318 !important;
}

/* Production batch headers: keep progress on the left rail and align every status row. */
.batch-group,
html.tablet-desktop-mode .batch-group {
  border: 2px solid var(--batch-rail);
  background: #fff;
  box-shadow: inset 3px 0 0 var(--batch-rail), 0 2px 8px rgba(16, 24, 40, .06);
}

.batch-head,
html.tablet-desktop-mode .batch-head {
  grid-template-columns: minmax(0, 1fr) 460px 230px 300px;
  gap: 12px;
  align-items: center;
}

.batch-head-main {
  min-width: 0;
  overflow: hidden;
}

.batch-status-counts {
  display: flex;
  flex-wrap: nowrap;
  grid-template-columns: none;
  gap: 14px;
  width: 460px;
  min-width: 460px;
  justify-self: start;
}

.batch-status-count {
  width: auto;
  min-width: 66px;
  justify-content: center;
  overflow: hidden;
  border-radius: 999px;
  box-sizing: border-box;
}

.batch-status-count .batch-status-item {
  gap: 5px;
  width: auto;
  min-width: 66px;
  padding: 4px 8px;
}

.batch-status-label,
.batch-status-number {
  display: inline-flex;
  align-items: center;
  color: inherit !important;
  line-height: 1;
}

.batch-status-count .batch-status-number {
  min-width: 12px;
  color: #fff !important;
  font-size: 13px;
  font-weight: 950;
  text-align: left;
}

.batch-duration,
html.tablet-desktop-mode .batch-duration {
  box-sizing: border-box;
  width: 230px;
  min-width: 230px;
  max-width: 230px;
}

.batch-head > .actions,
html.tablet-desktop-mode .batch-head > .actions {
  box-sizing: border-box;
  grid-column: auto;
  width: 300px;
  min-width: 300px;
  max-width: 300px;
  justify-content: flex-end;
}

@media (min-width: 961px) and (max-width: 1499px) {
  .batch-head {
    grid-template-columns: minmax(0, 1fr) 460px 230px;
  }

  .batch-head > .actions {
    grid-column: 1 / -1;
    width: auto;
    min-width: 0;
    max-width: none;
    justify-content: flex-end;
  }
}

@media (max-width: 960px) {
  .batch-head {
    grid-template-columns: 1fr;
  }

  .batch-status-counts {
    width: min(100%, 460px);
    min-width: 0;
    overflow-x: auto;
  }

  .batch-duration,
  .batch-head > .actions {
    width: auto;
    min-width: 0;
    max-width: none;
  }
}

/* Final batch summary/status override: compact name first, full FNSKU second; number stays inside pill. */
.batch-collapsed-summary .product-summary-chip,
html.tablet-desktop-mode .batch-collapsed-summary .product-summary-chip {
  display: inline-flex !important;
  align-items: center !important;
  gap: 6px !important;
  max-width: 320px !important;
  min-width: 0 !important;
}

.batch-collapsed-summary .summary-name,
html.tablet-desktop-mode .batch-collapsed-summary .summary-name {
  flex: 0 1 auto !important;
  min-width: 0 !important;
  max-width: 118px !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
}

.batch-collapsed-summary .summary-fnsku,
html.tablet-desktop-mode .batch-collapsed-summary .summary-fnsku {
  flex: 0 0 auto !important;
  white-space: nowrap !important;
}

.batch-status-count,
html.tablet-desktop-mode .batch-status-count {
  justify-content: center !important;
  min-width: 66px !important;
  overflow: hidden !important;
  border-radius: 999px !important;
}

.batch-status-count .batch-status-item,
html.tablet-desktop-mode .batch-status-count .batch-status-item {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 5px !important;
  width: auto !important;
  min-width: 66px !important;
  padding: 4px 8px !important;
  color: #fff !important;
  box-sizing: border-box !important;
  overflow: hidden !important;
}

/* Tablet production flow: keep download count beside duration and collapsed products on one compact row. */
html.tablet-desktop-mode #jobsView .batch-head {
  grid-template-columns: minmax(0, 1fr) 460px 382px 300px;
}

html.tablet-desktop-mode #jobsView .batch-download-count-main {
  display: none;
}

html.tablet-desktop-mode #jobsView .batch-duration-wrap {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  width: 382px;
  min-width: 382px;
  max-width: 382px;
}

html.tablet-desktop-mode #jobsView .batch-download-count-tablet {
  display: inline-flex;
  flex: 0 0 auto;
}

html.tablet-desktop-mode #jobsView.workshop-manager-view .batch-download-count {
  display: none !important;
}

html.tablet-desktop-mode #jobsView.workshop-manager-view .batch-duration-wrap {
  width: 220px;
  min-width: 220px;
  max-width: 220px;
  justify-content: center;
}

html.tablet-desktop-mode #jobsView.workshop-manager-view .batch-head {
  grid-template-columns: minmax(720px, 1.75fr) 400px 220px auto;
  column-gap: 18px;
}

html.tablet-desktop-mode #jobsView.workshop-manager-view .batch-duration {
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
  justify-content: center;
  text-align: center;
}

html.tablet-desktop-mode #jobsView.workshop-manager-view > .filter-bar {
  display: grid !important;
  grid-template-columns: repeat(3, minmax(0, 1fr)) minmax(0, 2fr) max-content max-content !important;
  width: 100% !important;
  justify-content: stretch !important;
}

html.tablet-desktop-mode #jobsView.workshop-manager-view > .filter-bar .job-filter-right-actions {
  margin-left: 0;
}

html.tablet-desktop-mode #jobsView.workshop-manager-view > .filter-bar .job-filter-right-actions.is-empty {
  display: none !important;
}

html.tablet-desktop-mode #jobsView .batch-collapsed-summary {
  flex-wrap: nowrap;
  gap: 6px;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  margin-top: 6px;
  padding: 5px 7px;
  box-sizing: border-box;
  overflow: hidden;
  white-space: nowrap;
  contain: inline-size;
}

html.tablet-desktop-mode #jobsView .batch-collapsed-summary .product-summary-chip {
  flex: 0 0 auto;
  gap: 5px !important;
  max-width: none !important;
  overflow: visible !important;
  padding: 6px 10px;
}

html.tablet-desktop-mode #jobsView .batch-collapsed-summary .summary-name {
  flex: 0 0 auto !important;
  max-width: none !important;
  overflow: visible !important;
  text-overflow: clip !important;
  font-size: 14px;
}

html.tablet-desktop-mode #jobsView .batch-collapsed-summary .summary-fnsku {
  font-size: 15px;
}

#jobsView .batch-collapsed-summary .product-summary-more {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 3px;
  min-height: 25px;
  padding: 4px 9px;
  border: 1px solid #cbd5e1;
  border-radius: 999px;
  color: #475467;
  background: #f8fafc;
  font-size: 12px;
  font-weight: 800;
  line-height: 1;
}

#jobsView .batch-collapsed-summary .product-summary-more strong {
  color: #2563eb;
  font-size: 13px;
}

.batch-collapsed-summary .product-summary-chip:nth-child(n + 7) {
  display: none !important;
}

.batch-status-count .batch-status-number,
html.tablet-desktop-mode .batch-status-count .batch-status-number {
  display: inline-flex !important;
  align-items: center !important;
  min-width: 12px !important;
  color: #fff !important;
  font-size: 13px !important;
  font-weight: 950 !important;
  line-height: 1 !important;
}

/* Batch status buttons: make the clickable pill itself carry the color. */
.batch-status-count.status-waiting,
html.tablet-desktop-mode .batch-status-count.status-waiting {
  background: #e7f7ee !important;
  border-color: #16a34a !important;
}

.batch-status-count.status-purchase,
html.tablet-desktop-mode .batch-status-count.status-purchase {
  background: #fff5d6 !important;
  border-color: #eab308 !important;
}

.batch-status-count.status-schedule,
.batch-status-count.status-production,
.batch-status-count.status-outsourced,
html.tablet-desktop-mode .batch-status-count.status-schedule,
html.tablet-desktop-mode .batch-status-count.status-production,
html.tablet-desktop-mode .batch-status-count.status-outsourced {
  background: #ffe8e8 !important;
  border-color: #ef4444 !important;
}

.batch-status-count.status-completed,
html.tablet-desktop-mode .batch-status-count.status-completed {
  background: #eef2f7 !important;
  border-color: #64748b !important;
}

.batch-status-count,
html.tablet-desktop-mode .batch-status-count {
  min-height: 26px !important;
  padding: 0 !important;
  border: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  transition: background-color .14s ease, filter .14s ease !important;
}

.batch-status-count.status-waiting,
.batch-status-count.status-purchase,
.batch-status-count.status-schedule,
.batch-status-count.status-production,
.batch-status-count.status-outsourced,
.batch-status-count.status-completed,
html.tablet-desktop-mode .batch-status-count.status-waiting,
html.tablet-desktop-mode .batch-status-count.status-purchase,
html.tablet-desktop-mode .batch-status-count.status-schedule,
html.tablet-desktop-mode .batch-status-count.status-production,
html.tablet-desktop-mode .batch-status-count.status-outsourced,
html.tablet-desktop-mode .batch-status-count.status-completed {
  background: transparent !important;
  border: 0 !important;
}

.batch-status-count:hover,
html.tablet-desktop-mode .batch-status-count:hover {
  filter: brightness(.98) !important;
}

.batch-status-count .batch-status-item,
html.tablet-desktop-mode .batch-status-count .batch-status-item {
  box-shadow: none !important;
  filter: none !important;
  transform: none !important;
}

.batch-status-count:hover .batch-status-item,
.batch-status-count.active .batch-status-item,
html.tablet-desktop-mode .batch-status-count:hover .batch-status-item,
html.tablet-desktop-mode .batch-status-count.active .batch-status-item {
  background: transparent !important;
  box-shadow: none !important;
  filter: none !important;
  transform: none !important;
}

.batch-status-count.status-waiting .batch-status-item,
html.tablet-desktop-mode .batch-status-count.status-waiting .batch-status-item {
  background: #e7f7ee !important;
  border: 1px solid #bbf7d0 !important;
}

.batch-status-count.status-purchase .batch-status-item,
html.tablet-desktop-mode .batch-status-count.status-purchase .batch-status-item {
  background: #fff5d6 !important;
  border: 1px solid #fde68a !important;
}

.batch-status-count.status-schedule .batch-status-item,
.batch-status-count.status-production .batch-status-item,
.batch-status-count.status-outsourced .batch-status-item,
html.tablet-desktop-mode .batch-status-count.status-schedule .batch-status-item,
html.tablet-desktop-mode .batch-status-count.status-production .batch-status-item,
html.tablet-desktop-mode .batch-status-count.status-outsourced .batch-status-item {
  background: #ffe8e8 !important;
  border: 1px solid #fecaca !important;
}

.batch-status-count.status-completed .batch-status-item,
html.tablet-desktop-mode .batch-status-count.status-completed .batch-status-item {
  background: #eef2f7 !important;
  border: 1px solid #d5dce7 !important;
}

.batch-status-count.status-waiting .batch-status-label,
.batch-status-count.status-waiting .batch-status-number,
html.tablet-desktop-mode .batch-status-count.status-waiting .batch-status-label,
html.tablet-desktop-mode .batch-status-count.status-waiting .batch-status-number {
  color: #111827 !important;
}

.batch-status-count.status-purchase .batch-status-label,
.batch-status-count.status-purchase .batch-status-number,
html.tablet-desktop-mode .batch-status-count.status-purchase .batch-status-label,
html.tablet-desktop-mode .batch-status-count.status-purchase .batch-status-number {
  color: #111827 !important;
}

.batch-status-count.status-schedule .batch-status-label,
.batch-status-count.status-schedule .batch-status-number,
.batch-status-count.status-production .batch-status-label,
.batch-status-count.status-production .batch-status-number,
.batch-status-count.status-outsourced .batch-status-label,
.batch-status-count.status-outsourced .batch-status-number,
html.tablet-desktop-mode .batch-status-count.status-schedule .batch-status-label,
html.tablet-desktop-mode .batch-status-count.status-schedule .batch-status-number,
html.tablet-desktop-mode .batch-status-count.status-production .batch-status-label,
html.tablet-desktop-mode .batch-status-count.status-production .batch-status-number,
html.tablet-desktop-mode .batch-status-count.status-outsourced .batch-status-label,
html.tablet-desktop-mode .batch-status-count.status-outsourced .batch-status-number {
  color: #111827 !important;
}

.batch-status-count.status-completed .batch-status-label,
.batch-status-count.status-completed .batch-status-number,
html.tablet-desktop-mode .batch-status-count.status-completed .batch-status-label,
html.tablet-desktop-mode .batch-status-count.status-completed .batch-status-number {
  color: #111827 !important;
}

/* Login saved-account dropdown: keep the remove buttons aligned and away from the scrollbar. */
.saved-login-dropdown,
html.tablet-desktop-mode .saved-login-dropdown {
  scrollbar-gutter: stable !important;
  padding-right: 10px !important;
}

.saved-login-option,
html.tablet-desktop-mode .saved-login-option {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) 34px !important;
  align-items: center !important;
  column-gap: 8px !important;
  min-height: 38px !important;
  padding: 4px 2px 4px 10px !important;
  box-sizing: border-box !important;
}

.saved-login-name,
html.tablet-desktop-mode .saved-login-name {
  align-self: center !important;
  min-width: 0 !important;
}

.saved-login-remove,
html.tablet-desktop-mode .saved-login-remove {
  justify-self: center !important;
  align-self: center !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: 28px !important;
  height: 28px !important;
  min-width: 28px !important;
  min-height: 28px !important;
  margin: 0 !important;
  padding: 0 !important;
  line-height: 1 !important;
  box-sizing: border-box !important;
}

.image-lightbox {
  position: fixed;
  inset: 0;
  z-index: 2147483647;
  width: 100vw;
  height: 100vh;
  max-width: none;
  max-height: none;
  margin: 0;
  border: 0;
  background: transparent;
  display: grid;
  place-items: center;
  padding: 24px;
}

.image-lightbox:not([open]) {
  display: none;
}

.image-lightbox::backdrop {
  background: rgba(15, 23, 42, .68);
}

.image-lightbox-backdrop {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  border-radius: 0;
  background: transparent;
}

.image-lightbox-panel {
  position: relative;
  z-index: 1;
  display: grid;
  place-items: center;
  max-width: 94vw;
  max-height: 92vh;
  padding: 14px;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 24px 64px rgba(15, 23, 42, .32);
}

.image-lightbox-image {
  display: block;
  max-width: calc(94vw - 28px);
  max-height: calc(92vh - 28px);
  object-fit: contain;
}

.image-lightbox-close {
  position: absolute;
  top: 8px;
  right: 8px;
  z-index: 2;
  width: 34px;
  height: 34px;
  padding: 0;
  border: 1px solid #cbd5e1;
  border-radius: 50%;
  color: #0f172a;
  background: rgba(255, 255, 255, .94);
  font-size: 24px;
  line-height: 30px;
}

.batch-transport-toolbar {
  display: flex;
  align-items: end;
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid #bfdbfe;
  border-radius: 8px;
  background: #eff6ff;
}
.batch-transport-toolbar label {
  display: grid;
  gap: 5px;
  min-width: 210px;
}
.transport-split-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(120px, 1fr));
  gap: 8px;
}
.transport-split-fields.hidden {
  display: none;
}
.transport-actual-grid {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 6px;
  width: max-content;
  max-width: 100%;
}
.transport-actual-grid .inline-number {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 5px;
  padding: 4px 6px;
  border: 1px solid #bfdbfe;
  border-radius: 8px;
  background: #eff6ff;
  white-space: nowrap;
}
.transport-actual-label {
  color: #475467;
  font-size: 12px;
  font-weight: 750;
  white-space: nowrap;
}
.plan-quantity-number {
  color: #dc2626;
  font-weight: 900;
}
.transport-actual-grid input[type="number"] {
  width: 66px;
  min-height: 30px;
  padding: 3px 6px;
}
.transport-actual-grid .transport-posted {
  border-color: #bbf7d0;
  background: #f0fdf4;
}
.transport-complete-btn {
  min-height: 30px;
  padding: 3px 8px;
  border-color: #2563eb;
  background: #2563eb;
  color: #fff;
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}
.transport-complete-btn:disabled {
  border-color: #86efac;
  background: #dcfce7;
  color: #166534;
  opacity: 1;
}

.notice-list-item {
  position: relative;
}

.notice-important {
  border-color: #f59e0b !important;
  background: #fff8e8 !important;
  box-shadow: inset 4px 0 #ef4444;
}

.notice-important-pill {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  margin: 4px 0 6px;
  padding: 2px 10px;
  border-radius: 999px;
  color: #b91c1c;
  background: #fee2e2;
  font-size: 12px;
  font-weight: 800;
}

.notice-item-actions {
  display: flex;
  gap: 8px;
  margin-top: 8px;
}

.purchase-filter-panel {
  margin-bottom: 14px;
  padding: 12px;
}
.purchase-filter-grid {
  display: grid;
  grid-template-columns: minmax(150px, .7fr) minmax(220px, 1fr) minmax(260px, 1.4fr) auto;
  gap: 12px;
  align-items: end;
}
.purchase-filter-grid label,
.purchase-form label {
  font-weight: 800;
  color: #1f2937;
}
#purchaseView .purchase-filter-grid .custom-select-arrow {
  margin-right: 4px;
}
.purchase-filter-grid input,
.purchase-filter-grid select,
.purchase-form input,
.purchase-form select,
.purchase-form textarea {
  width: 100%;
  min-height: 40px;
}
.purchase-filter-actions {
  display: flex;
  gap: 8px;
  align-items: center;
  justify-content: flex-end;
}
.purchase-board {
  display: grid;
  gap: 14px;
}
.purchase-group {
  overflow: hidden;
  border: 1px solid #dbe5f1;
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 8px 18px rgba(15, 23, 42, .045);
}
.purchase-group-focus-view {
  min-height: calc(100vh - 112px);
  display: flex;
  flex-direction: column;
}
.purchase-group-focus-view .purchase-table-wrap {
  flex: 1 1 auto;
}
.purchase-group-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  border-bottom: 1px solid #e5edf7;
  background: #f8fbff;
}
.purchase-group-head > div:first-child {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}
.purchase-group-head strong {
  font-size: 16px;
  color: #0f172a;
}
.purchase-group-head span,
.purchase-group-total {
  color: #64748b;
  font-size: 13px;
  font-weight: 800;
}
.purchase-group-filters {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.purchase-group-filter-select {
  -webkit-appearance: none;
  appearance: none;
  width: 190px;
  min-width: 150px;
  height: 34px;
  padding: 0 32px 0 11px;
  border: 1px solid #fdba74;
  border-radius: 9px;
  background-color: #fff;
  background-image: linear-gradient(45deg, transparent 50%, #475569 50%),
    linear-gradient(135deg, #475569 50%, transparent 50%);
  background-repeat: no-repeat;
  background-position: calc(100% - 13px) center, calc(100% - 8px) center;
  background-size: 5px 5px, 5px 5px;
  color: #334155;
  font-size: 13px;
  font-weight: 800;
}
.purchase-group-shop-filter-select {
  width: 300px;
  min-width: 260px;
}
.purchase-group-filter-shell {
  flex: 0 0 auto;
  width: 190px;
  min-width: 150px;
}
.purchase-group-shop-filter-shell {
  width: 300px;
  min-width: 260px;
}
.purchase-group-filter-shell .custom-select-trigger {
  height: 34px;
  min-height: 34px;
  padding: 0 15px 0 11px;
  border-color: #fdba74;
  border-radius: 9px;
  color: #334155;
  font-size: 13px;
  font-weight: 800;
}
.purchase-group-filter-shell.open .custom-select-trigger {
  border-color: #f97316;
  box-shadow: 0 0 0 3px rgba(249, 115, 22, .12);
}
.purchase-group-filter-select:focus {
  border-color: #f97316;
  box-shadow: 0 0 0 3px rgba(249, 115, 22, .12);
  outline: none;
}
.purchase-status-pending {
  border-color: #bfdbfe;
}
.purchase-status-pending .purchase-group-head {
  background: #eff6ff;
}
.purchase-status-approved {
  border-color: #bbf7d0;
}
.purchase-status-approved .purchase-group-head {
  background: #f0fdf4;
}
.purchase-status-completed {
  border-color: #fed7aa;
}
.purchase-status-completed .purchase-group-head {
  background: #fff7ed;
}
@media (max-width: 720px) {
  .purchase-group-head > div:first-child {
    width: 100%;
    flex-wrap: wrap;
  }
  .purchase-group-filters {
    flex: 1 1 100%;
    width: 100%;
  }
  .purchase-group-filter-select {
    width: 150px;
  }
  .purchase-group-filter-shell {
    width: 150px;
    min-width: 0;
  }
  .purchase-group-shop-filter-select {
    width: min(300px, 100%);
    min-width: 0;
  }
  .purchase-group-shop-filter-shell {
    width: min(300px, 100%);
    min-width: 0;
  }
}
.purchase-table-wrap {
  overflow: auto;
}
.purchase-table {
  min-width: 1360px;
}
.purchase-table.purchase-table-with-stock {
  min-width: 1510px;
}
.purchase-table th {
  background: #fbfdff;
  color: #334155;
  font-weight: 900;
}
.purchase-table td {
  vertical-align: middle;
}
.purchase-table tbody tr {
  transition: opacity .48s cubic-bezier(.22, 1, .36, 1), transform .48s cubic-bezier(.22, 1, .36, 1), background-color .8s ease, box-shadow .8s ease;
}
#purchaseView .purchase-table tbody .purchase-applicant-group-row {
  height: 96px;
}
#purchaseView .purchase-table tbody .purchase-applicant-group-row > td {
  height: 96px;
  min-height: 96px;
}
.purchase-table tbody .purchase-applicant-group-row td {
  padding: 0;
  border-top: 1px solid #dbe5f1;
  border-bottom: 1px solid #dbe5f1;
  background: #f8fafc;
}
.purchase-table tbody .purchase-applicant-group-row:first-child td {
  border-top: 0;
}
#purchaseView .purchase-applicant-group-toggle {
  width: 100%;
  height: 96px;
  min-height: 96px;
  max-height: none;
  box-sizing: border-box;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 12px 16px;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: #0f172a;
  text-align: left;
  box-shadow: none;
  cursor: pointer;
}
.purchase-applicant-group-toggle:hover {
  background: rgba(255, 255, 255, .72);
}
.purchase-applicant-group-toggle:focus-visible {
  outline: 2px solid #2563eb;
  outline-offset: -2px;
}
.purchase-applicant-group-summary {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  flex: 1 1 auto;
}
.purchase-applicant-group-summary strong {
  min-width: 72px;
  color: #0f172a;
  font-size: 14px;
}
.purchase-applicant-group-summary > span:last-child {
  color: #64748b;
  font-size: 13px;
  font-weight: 800;
}
.purchase-applicant-group-chevron {
  width: 9px;
  height: 9px;
  flex: 0 0 9px;
  border-right: 2px solid #2563eb;
  border-bottom: 2px solid #2563eb;
  transform: rotate(-45deg);
  transition: transform .18s ease;
}
.purchase-applicant-group-row.is-expanded .purchase-applicant-group-chevron {
  transform: rotate(45deg);
}
.purchase-applicant-group-action {
  color: #2563eb;
  font-size: 13px;
  font-weight: 900;
}
.purchase-status-pending .purchase-applicant-group-row td {
  background: #f5f9ff;
}
.purchase-status-approved .purchase-applicant-group-row td {
  background: #f5fcf7;
}
.purchase-status-completed .purchase-applicant-group-row td {
  background: #fffaf5;
}
.purchase-applicant-group-item[hidden] {
  display: none !important;
}
.purchase-applicant-group-item td:first-child {
  box-shadow: inset 3px 0 0 #dbeafe;
}
.purchase-board {
  transition: opacity .48s cubic-bezier(.22, 1, .36, 1), filter .48s ease, transform .48s cubic-bezier(.22, 1, .36, 1);
}
.purchase-board-soft-out {
  opacity: .78;
  filter: saturate(.96);
  transform: translateY(1px);
}
.purchase-board-soft-enter {
  animation: purchaseBoardSoftEnter .92s cubic-bezier(.16, 1, .3, 1) both;
}
.purchase-group-soft-enter {
  animation: purchaseGroupSoftEnter 1.18s cubic-bezier(.16, 1, .3, 1) both;
}
.purchase-row-status-preparing {
  background: #f8fbff;
}
.purchase-row-status-preparing td {
  transition: background-color .48s ease;
  background: rgba(248, 251, 255, .82);
}
.purchase-row-status-leaving {
  opacity: .66;
  transform: translateY(1px) scale(.998);
}
.purchase-row-travel {
  position: relative;
  z-index: 20;
  transform-origin: center;
  will-change: transform, opacity;
}
.purchase-row-travel td {
  background: #fff;
}
.purchase-row-soft-land {
  animation: purchaseSoftLand 1.45s cubic-bezier(.16, 1, .3, 1) both;
}
@keyframes purchaseBoardSoftEnter {
  0% {
    opacity: .68;
    filter: saturate(.94);
    transform: translateY(3px);
  }
  100% {
    opacity: 1;
    filter: saturate(1);
    transform: translateY(0);
  }
}
@keyframes purchaseGroupSoftEnter {
  0% {
    opacity: .58;
    filter: saturate(.92);
    transform: translateY(6px);
  }
  45% {
    opacity: .86;
    filter: saturate(.96);
    transform: translateY(2px);
  }
  100% {
    opacity: 1;
    filter: saturate(1);
    transform: translateY(0);
  }
}
@keyframes purchaseSoftLand {
  0% {
    background: #eefbf5;
    box-shadow: inset 3px 0 0 rgba(34, 197, 94, .62);
  }
  55% {
    background: #f5fdf8;
    box-shadow: inset 3px 0 0 rgba(34, 197, 94, .32);
  }
  100% {
    background: transparent;
    box-shadow: inset 0 0 0 rgba(34, 197, 94, 0);
  }
}
.purchase-table th.purchase-quantity-col,
.purchase-table td.purchase-quantity-col {
  width: 88px;
  min-width: 88px;
  text-align: center;
  font-weight: 900;
}
.purchase-table td.purchase-quantity-col:not(.purchase-actual-col) {
  color: #0f172a;
}
.purchase-table td.purchase-quantity-col.purchase-actual-col {
  color: #dc2626;
}
.purchase-actual-col {
  padding-left: 6px;
  padding-right: 6px;
}
.purchase-actual-input {
  width: 74px;
  min-width: 74px;
  height: 30px;
  min-height: 30px;
  padding: 4px 8px;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  background: #fff;
  color: #dc2626;
  font-size: 13px;
  font-weight: 900;
  text-align: center;
}
.purchase-actual-input:focus {
  border-color: #2563eb;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, .14);
  outline: 0;
}
.purchase-actual-input.saving {
  background: #f8fafc;
  color: #94a3b8;
}
.purchase-item-name {
  min-width: 150px;
  max-width: 220px;
}
.purchase-applicant-cell {
  min-width: 92px;
  max-width: 130px;
  white-space: nowrap;
  color: #334155;
  font-weight: 900;
}
.purchase-item-name strong {
  display: block;
  max-width: 220px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.purchase-inventory-fnsku {
  display: flex;
  align-items: center;
  max-width: 100%;
  margin-top: 4px;
  min-height: 20px;
  padding: 1px 0 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: #64748b;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.5;
  white-space: nowrap;
  overflow: visible;
}
.purchase-inventory-fnsku-label {
  color: #64748b;
  font-weight: 750;
}
.purchase-inventory-fnsku-code {
  color: #1d4ed8;
  font-weight: 900;
  letter-spacing: .15px;
}
.purchase-inventory-fnsku.missing .purchase-inventory-fnsku-code {
  color: #dc2626;
}
.purchase-shop-col,
.purchase-shop {
  min-width: 260px;
  max-width: 360px;
}
.purchase-shop {
  white-space: normal;
  word-break: break-all;
  line-height: 1.45;
}
.purchase-table-with-stock th.purchase-shop-col,
.purchase-table-with-stock td.purchase-shop {
  padding-left: 70px;
}
.purchase-stock-col {
  width: 150px;
  min-width: 150px;
  text-align: left;
}
.purchase-stock-summary {
  display: grid;
  gap: 3px;
  color: #475569;
  font-size: 12px;
  line-height: 1.35;
  white-space: nowrap;
}
.purchase-stock-summary strong {
  color: #166534;
  font-size: 13px;
}
.purchase-actions-col,
.purchase-actions-cell {
  width: 150px;
  min-width: 150px;
  text-align: right;
  white-space: nowrap;
}
.purchase-table td.actions.purchase-actions-cell {
  display: table-cell;
}
.purchase-actions-cell button {
  min-height: 28px;
  padding: 0 8px;
}
.purchase-repurchase-btn {
  color: #047857;
  border-color: #bbf7d0;
  background: #ecfdf5;
  font-weight: 900;
}
.purchase-note {
  min-width: 150px;
  max-width: 240px;
  white-space: normal;
  color: var(--danger);
}
.purchase-note-input {
  width: 100%;
  min-width: 150px;
  max-width: 230px;
  height: 34px;
  min-height: 34px;
  max-height: 72px;
  padding: 6px 8px;
  overflow-y: hidden;
  overflow-wrap: anywhere;
  resize: none;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  background: #fff;
  color: var(--danger);
  font-size: 13px;
  line-height: 1.35;
}
.purchase-note-input:focus {
  border-color: #2563eb;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, .12);
  outline: 0;
}
/* Pending and in-progress purchase note controls sit 1 cm farther left. */
.purchase-table:not(.purchase-table-with-stock) td.purchase-note > .purchase-note-input {
  transform: translateX(-38px);
}
.purchase-note-input.saving {
  background: #f8fafc;
  color: #94a3b8;
}
.purchase-type-pill,
.purchase-status-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 26px;
  padding: 3px 9px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 900;
  white-space: nowrap;
}
.purchase-type-0 { color: #be123c; background: #ffe4e6; }
.purchase-type-1 { color: #92400e; background: #fef3c7; }
.purchase-type-2 { color: #1d4ed8; background: #dbeafe; }
.purchase-type-3 { color: #047857; background: #d1fae5; }
.purchase-type-4 { color: #7c3aed; background: #ede9fe; }
.purchase-status-pill.purchase-status-pending { color: #1d4ed8; background: #dbeafe; border: 0; }
.purchase-status-pill.purchase-status-approved { color: #047857; background: #d1fae5; border: 0; }
.purchase-status-pill.purchase-status-completed { color: #c2410c; background: #ffedd5; border: 0; }
.purchase-status-select {
  width: 148px;
  min-width: 148px;
  max-width: 148px;
  min-height: 30px;
  height: 30px;
  padding: 3px 22px 3px 8px;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  background: #fff;
  color: #0f172a;
  font-size: 13px;
  font-weight: 900;
  line-height: 1.1;
}
.purchase-complete-btn {
  width: 112px;
  min-width: 112px;
  min-height: 30px;
  padding: 4px 12px;
  border-color: #86efac;
  background: #ecfdf5;
  color: #047857;
  font-size: 13px;
  font-weight: 900;
}
.purchase-complete-btn:hover:not(:disabled) {
  border-color: #22c55e;
  background: #dcfce7;
}
.purchase-complete-btn:disabled {
  cursor: wait;
  opacity: .62;
}
.purchase-image-thumb {
  width: 64px;
  height: 64px;
  object-fit: contain;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  background: #fff;
}
.purchase-image-thumb.large {
  width: 112px;
  height: 112px;
}
.purchase-current-image {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  width: fit-content;
  margin: 2px 0 8px;
  padding: 8px;
  border: 1px solid #dbe5f1;
  border-radius: 8px;
  background: #f8fafc;
  color: #64748b;
  font-weight: 800;
}
.purchase-link {
  color: #2563eb;
  font-weight: 900;
  max-width: 120px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.purchase-link-note-only {
  color: #475569;
}
.purchase-links {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  min-width: 96px;
}
.purchase-link-editor {
  display: grid;
  gap: 8px;
}
.purchase-link-line {
  display: grid;
  grid-template-columns: minmax(120px, .55fr) minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
}
.purchase-link-line button,
.purchase-add-link {
  min-height: 36px;
  padding: 0 12px;
}
.purchase-add-link {
  width: fit-content;
  color: #2563eb;
  border-color: #bfdbfe;
  background: #eff6ff;
  font-weight: 900;
}
.purchase-form {
  display: grid;
  gap: 12px;
}
#modal:has(.purchase-form) {
  width: min(980px, calc(100vw - 36px));
}
.purchase-common-grid {
  padding: 12px;
  border: 1px solid #dbe5f1;
  border-radius: 10px;
  background: #f8fbff;
}
.purchase-approval-grid {
  padding: 12px;
  border: 1px solid #e5edf7;
  border-radius: 10px;
  background: #fbfdff;
}
.purchase-info-list {
  display: grid;
  gap: 12px;
}
.purchase-info-row {
  display: grid;
  gap: 12px;
  padding: 12px;
  border: 1px solid #dbe5f1;
  border-radius: 10px;
  background: #fff;
}
.purchase-info-row-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 6px;
  border-bottom: 1px dashed #e2e8f0;
}
.purchase-info-row-head strong {
  color: #0f172a;
  font-size: 15px;
  font-weight: 950;
}
.purchase-row-remove {
  min-height: 30px;
  padding: 0 10px;
  border-color: #fecaca;
  background: #fff5f5;
  color: #b42318;
  font-weight: 900;
}
.purchase-add-info {
  justify-self: start;
  border-color: #bfdbfe;
  background: #eff6ff;
  color: #1d4ed8;
  font-weight: 950;
}
.purchase-info-grid {
  align-items: end;
}
.purchase-fnsku-field {
  transition: opacity .18s ease;
}
.purchase-fnsku-field.hidden {
  display: none !important;
}
.form-grid.two {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}
.purchase-unit-field {
  display: grid;
  gap: 6px;
}
.radio-pill-group {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.radio-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 36px;
  padding: 7px 10px;
  border: 1px solid #cbd5e1;
  border-radius: 999px;
  background: #fff;
  cursor: pointer;
}
.radio-pill input {
  width: 15px;
  height: 15px;
  min-height: 15px;
}
.radio-pill span {
  font-weight: 900;
}
.number-cell {
  text-align: right;
  font-weight: 900;
}
.nowrap {
  white-space: nowrap;
}

@media (max-width: 900px) {
  .purchase-filter-grid,
  .form-grid.two {
    grid-template-columns: 1fr;
  }
  .purchase-filter-actions {
    justify-content: flex-start;
  }
}

/* Last rule wins for tablets: keep soft backdrop blur, but keep dropdown text crisp. */
html.tablet-desktop-mode,
html.tablet-desktop-mode body,
html.tablet-desktop-mode .app-shell,
html.tablet-desktop-mode .content,
html.tablet-desktop-mode .view,
html.tablet-desktop-mode dialog,
html.tablet-desktop-mode .modal-box {
  filter: none !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  transform-style: flat !important;
  perspective: none !important;
}

html.tablet-desktop-mode dialog::backdrop,
html.tablet-desktop-mode dialog[open]::backdrop {
  background: rgba(15, 23, 42, .28) !important;
  filter: none !important;
  backdrop-filter: blur(8px) saturate(1.08) !important;
  -webkit-backdrop-filter: blur(8px) saturate(1.08) !important;
  animation: none !important;
  transition: background-color .16s ease-out, backdrop-filter .16s ease-out !important;
}

html.tablet-desktop-mode .custom-select-menu-floating,
html.tablet-desktop-mode .custom-select-menu-floating *,
html.tablet-desktop-mode .saved-login-dropdown,
html.tablet-desktop-mode .saved-login-dropdown *,
html.tablet-desktop-mode .dashboard-shop-menu,
html.tablet-desktop-mode .dashboard-shop-menu *,
html.tablet-desktop-mode .dashboard-year-menu,
html.tablet-desktop-mode .dashboard-year-menu *,
html.tablet-desktop-mode .dividend-month-list,
html.tablet-desktop-mode .dividend-month-list *,
html.tablet-desktop-mode .online-users-panel,
html.tablet-desktop-mode .online-users-panel * {
  filter: none !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  transform: none !important;
  animation: none !important;
  transition: background-color .12s ease-out, color .12s ease-out, border-color .12s ease-out !important;
  text-shadow: none !important;
  -webkit-font-smoothing: auto !important;
  text-rendering: auto !important;
}

html.tablet-desktop-mode .custom-select-menu-floating {
  position: fixed !important;
  z-index: 2147483647 !important;
  display: grid !important;
  background: #fff !important;
  color: #0f172a !important;
  border: 1px solid #94a3b8 !important;
  box-shadow: 0 8px 20px rgba(15, 23, 42, .14) !important;
  opacity: 1 !important;
  contain: none !important;
  isolation: auto !important;
  backface-visibility: visible !important;
  -webkit-backface-visibility: visible !important;
  will-change: auto !important;
  transform: none !important;
  -webkit-transform: none !important;
  font-family: Arial, "Microsoft YaHei", "PingFang SC", sans-serif !important;
}

html.tablet-desktop-mode .custom-select-menu-floating .custom-select-option {
  min-height: 30px !important;
  padding: 6px 9px !important;
  color: #0f172a !important;
  font-size: 13px !important;
  font-weight: 700 !important;
  line-height: 1.25 !important;
  background: #fff !important;
  font-family: Arial, "Microsoft YaHei", "PingFang SC", sans-serif !important;
  -webkit-font-smoothing: auto !important;
  text-rendering: auto !important;
}

html.tablet-desktop-mode .custom-select-menu-floating .custom-select-option:hover,
html.tablet-desktop-mode .custom-select-menu-floating .custom-select-option.selected {
  color: #1d4ed8 !important;
  background: #eaf2ff !important;
}

html.tablet-desktop-mode body.tablet-input-settling,
html.tablet-desktop-mode body.tablet-input-settling * {
  filter: none !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  transform: none !important;
  animation: none !important;
  transition: none !important;
}

/* True final guard: compact top filters and slightly deepen batch product-list background. */
#jobsView > .filter-bar {
  grid-template-columns: 280px 280px 280px minmax(320px, 520px) max-content !important;
  justify-content: start !important;
  align-items: end;
}

#jobsView > .filter-bar .download-list-btn {
  grid-column: 1 / 2 !important;
  width: 280px !important;
  max-width: 280px !important;
}

#purchaseView .purchase-filter-grid {
  grid-template-columns: 220px 300px minmax(360px, 560px) max-content !important;
  justify-content: start !important;
  align-items: end;
}

#purchaseView .purchase-filter-actions {
  justify-content: flex-start !important;
}

#purchaseView .purchase-filter-actions button {
  width: auto;
  min-width: 68px;
  white-space: nowrap;
}

.batch-collapsed-summary,
.batch-lines {
  background: #eef5ff !important;
}

@media (max-width: 1180px) {
  #jobsView > .filter-bar,
  #purchaseView .purchase-filter-grid {
    grid-template-columns: repeat(2, minmax(180px, 1fr)) !important;
  }

  #jobsView > .filter-bar .download-list-btn {
    grid-column: 1 / -1 !important;
    width: 100% !important;
    max-width: none !important;
  }
}

/* Final batch progress rail: left bar follows completion progress color. */
.batch-group {
  border-color: var(--batch-rail, #22c55e) !important;
  box-shadow: inset 3px 0 0 var(--batch-rail, #22c55e), 0 2px 8px rgba(16, 24, 40, .06) !important;
}

/* Inventory table tools live outside the sticky table header so controls never overlap product rows. */

/* Purchase toolbar final layout: keep Clear by Search and Create at the far right. */
#purchaseView .purchase-filter-grid {
  position: relative;
  grid-template-columns: 220px 300px minmax(360px, 560px) max-content !important;
  justify-content: start !important;
}

#purchaseView .purchase-filter-actions {
  width: auto;
  justify-content: flex-start !important;
}

#purchaseView .purchase-filter-actions .primary {
  position: absolute;
  right: 0;
  bottom: 0;
  margin-left: 0;
}

@media (max-width: 1180px) {
  #purchaseView .purchase-filter-grid {
    grid-template-columns: repeat(2, minmax(180px, 1fr)) !important;
  }

  #purchaseView .purchase-filter-actions .primary {
    position: static;
  }
}

@media (max-width: 900px) {
  #purchaseView .purchase-filter-grid {
    grid-template-columns: 1fr !important;
  }
}
.inventory-table-tools {
  display: grid;
  align-items: center;
  min-height: 50px;
  padding: 8px;
  gap: 8px;
  border: 1px solid #dce5f0;
  border-bottom: 0;
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  background: #f3f6fb;
  box-sizing: border-box;
}

.inventory-table-tools.has-price {
  grid-template-columns: 42px minmax(220px, 22fr) minmax(130px, 13fr) minmax(70px, 6fr) minmax(130px, 14fr) minmax(170px, 16fr) minmax(78px, 7fr) minmax(78px, 7fr) minmax(150px, 15fr);
}

.inventory-table-tools.no-price {
  grid-template-columns: 42px minmax(240px, 26fr) minmax(140px, 15fr) minmax(74px, 7fr) minmax(180px, 21fr) minmax(82px, 8fr) minmax(82px, 8fr) minmax(150px, 15fr);
}

.inventory-table-tools .inventory-table-date-list {
  grid-column: 1 / 5;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-start;
  gap: 6px;
  min-width: 0;
}

.inventory-table-tools .inventory-table-date-list button,
.inventory-table-tools .price-pending-filter-btn,
.inventory-table-tools .inventory-table-limit-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 34px;
  min-height: 34px;
  padding: 0 14px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 900;
  white-space: nowrap;
}

.inventory-table-tools .inventory-table-date-list button {
  border-color: #bfdbfe;
  background: #fff;
  color: #1d4ed8;
}

.inventory-table-tools .inventory-table-date-list button.active {
  border-color: #2563eb;
  background: #2563eb;
  color: #fff;
}

.inventory-table-price-slot {
  grid-column: 5;
  justify-self: center;
}

.inventory-table-limit-slot {
  grid-column: 8 / 10;
  justify-self: center;
}

.inventory-table-tools.no-price .inventory-table-limit-slot {
  grid-column: 6 / 9;
}

.inventory-table-tools .price-pending-filter-btn {
  width: 118px;
  min-width: 118px;
  max-width: 118px;
}

.inventory-table-tools + .inventory-grid {
  border-top-left-radius: 0;
  border-top-right-radius: 0;
}

/* Keep the batch progress rail slim: one colored left edge, no doubled inset stripe. */
.batch-group,
html.tablet-desktop-mode .batch-group {
  border-width: 1px 1px 1px 3px !important;
  border-style: solid !important;
  border-color: #dce5f0 !important;
  border-left-color: var(--batch-rail, #22c55e) !important;
  box-shadow: 0 2px 8px rgba(16, 24, 40, .06) !important;
}

/* Inventory uses an inner product scroller: filters and stats stay put, only rows move. */
#inventoryView {
  display: flex;
  flex-direction: column;
  min-height: 0;
  height: calc(100dvh - 12px);
  overflow: hidden;
}

#inventoryView > .inventory-grid {
  flex: 1 1 auto;
}

.inventory-qty-period {
  display: flex;
  align-items: center;
  justify-content: center;
  justify-self: center;
  gap: 8px;
  width: 158px;
  max-width: 100%;
  padding-top: 8px;
  margin-top: 2px;
  border-top: 1px dashed #e4e7ec;
}

.inventory-qty-period span,
.inventory-qty-period strong {
  color: #14532d;
  white-space: nowrap;
}

.inventory-qty-period span {
  text-align: center;
}

.inventory-qty-period strong {
  text-align: center;
}

.batch-stock-existing-tools {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #f8fbff;
}

.batch-stock-existing-tools input {
  width: 220px;
}

.batch-stock-existing-tools select {
  min-width: 280px;
  max-width: 420px;
}

.batch-job-form .batch-stock-existing-row {
  grid-template-columns: minmax(300px, 1fr) minmax(110px, 130px) minmax(110px, 130px) 150px auto;
  align-items: center;
  padding-left: 28px;
}

.batch-existing-product-main {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 10px;
}

.batch-existing-product-main > div {
  min-width: 0;
}

.batch-existing-product-main strong,
.batch-existing-product-main small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.batch-existing-meta {
  display: grid;
  gap: 3px;
  color: #667085;
  font-size: 12px;
  font-weight: 850;
}

.batch-existing-meta strong {
  color: #0f172a;
  font-size: 15px;
  font-weight: 950;
  line-height: 1.2;
  white-space: nowrap;
}

.batch-existing-price strong {
  color: #dc2626;
}

.batch-job-form .batch-existing-qty {
  width: 150px;
  justify-self: end;
}

.batch-job-form .batch-existing-qty input {
  width: 128px;
}

.batch-stock-add-footer {
  display: flex;
  justify-content: flex-end;
  padding: 8px 2px 2px;
}

#modal {
  max-height: calc(100dvh - 24px);
}

#modal .modal-box {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  max-height: calc(100dvh - 24px);
  overflow: hidden;
}

#modal .modal-box > header,
#modal .modal-box > footer {
  position: relative;
  z-index: 4;
  flex: 0 0 auto;
  background: #fff;
}

#modal .modal-box > footer {
  background: #f9fafb;
}

#modalBody {
  min-height: 0;
  overflow: auto;
  overscroll-behavior: contain;
}

#modal .modal-box > footer.has-draft-actions {
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
}

.modal-draft-actions-host {
  flex: 1 1 auto;
  min-width: 0;
}

.modal-draft-actions-host .outbound-draft-actions {
  gap: 6px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
}

.modal-draft-actions-host .outbound-draft-actions button {
  min-height: 34px;
}

.modal-draft-actions-host .outbound-draft-actions .muted {
  min-width: 180px;
  flex: 1 1 220px;
}

@media (max-width: 900px) {
  #modal .modal-box > footer.has-draft-actions {
    flex-wrap: wrap;
  }

  .modal-draft-actions-host {
    flex: 1 0 100%;
  }

  .modal-draft-actions-host .outbound-draft-actions .muted {
    flex-basis: 100%;
  }

  #modal .modal-box > footer.has-draft-actions #modalCancel {
    margin-left: auto;
  }
}

@media (max-width: 620px) {
  #modal:has(.batch-job-form) {
    width: calc(100vw - 16px);
  }

  #modal .batch-job-form {
    padding-right: 0;
  }

  #modal .batch-job-form .batch-form-line,
  #modal .batch-job-form .batch-new-product-line {
    grid-template-columns: minmax(0, 1fr);
  }

  #modal .batch-job-form .batch-image-field,
  #modal .batch-job-form .batch-new-product-line .batch-note-default-field,
  #modal .batch-job-form .batch-new-product-line button {
    grid-column: 1;
    justify-self: stretch;
  }

  #modal .batch-job-form .section-head.batch-add-head {
    align-items: stretch;
    flex-direction: column;
  }

  #modal .batch-job-form .batch-out-add,
  #modal .batch-job-form .batch-job-fnsku-add {
    grid-template-columns: minmax(0, 1fr);
    width: 100%;
  }

  #modal .batch-job-form .batch-out-add button {
    width: 100%;
  }

  #modal .modal-box > footer.has-draft-actions {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  }

  #modal .modal-box > footer.has-draft-actions .modal-draft-actions-host {
    grid-column: 1 / -1;
    width: 100%;
  }

  #modal .modal-box > footer.has-draft-actions .outbound-draft-actions {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  }

  #modal .modal-box > footer.has-draft-actions .outbound-draft-actions button {
    width: 100%;
    min-width: 0;
    padding-right: 6px;
    padding-left: 6px;
  }

  #modal .modal-box > footer.has-draft-actions .outbound-draft-actions .muted {
    grid-column: 1 / -1;
    min-width: 0;
  }

  #modal .modal-box > footer.has-draft-actions #modalCancel,
  #modal .modal-box > footer.has-draft-actions #modalSave {
    width: 100%;
    margin-left: 0;
  }
}

/* Final placement: create replenishment inside the production filter card. */
#jobsView > .filter-bar {
  grid-template-columns: minmax(200px, 280px) minmax(200px, 280px) minmax(200px, 280px) minmax(280px, 520px) max-content minmax(0, 1fr) max-content !important;
}

#jobsView > .filter-bar .job-filter-add-btn {
  grid-column: 7;
  grid-row: 1;
  min-width: 104px;
  min-height: 38px;
  align-self: end;
  justify-self: end;
  border-radius: var(--radius-md);
  white-space: nowrap;
}

/* Inventory filters have one extra branch selector for admins; keep Clear on the first row. */
@media (min-width: 1200px) {
  #inventoryView .inventory-filter {
    grid-template-columns: 220px 360px 360px 72px minmax(0, 1fr) !important;
    justify-content: start !important;
  }

  #inventoryView .inventory-filter.has-branch-filter {
    grid-template-columns: 220px 220px 360px 360px 72px minmax(0, 1fr) !important;
  }

  #inventoryView .inventory-filter > .filter-button-pair {
    grid-column: 4;
    grid-row: 1;
    align-self: end;
    justify-self: start;
  }

  #inventoryView .inventory-filter.has-branch-filter > .filter-button-pair {
    grid-column: 5;
  }

  #inventoryView .inventory-filter > .filter-button-pair .filter-mini-btn {
    width: 72px;
    min-width: 72px;
    max-width: 72px;
  }
}

/* Hidden sidebar admin tools must stay hidden despite the utility-button flex rules above. */
#systemInitBtn.hidden,
#staffRosterBtn.hidden,
#systemInitBtn[hidden],
#staffRosterBtn[hidden],
body[data-platform-inventory-view="1"] #systemInitBtn,
body[data-platform-inventory-view="1"] #staffRosterBtn {
  display: none !important;
}

/* Match inventory action buttons to the rounded inventory cards below. */
#inventoryView .inventory-filter .inventory-batch-actions .inventory-batch-btn {
  border-radius: var(--radius-lg) !important;
}

/* Keep inventory shortcuts compact and distinguish actions with the ERP palette. */
#inventoryView .inventory-filter .inventory-batch-actions {
  column-gap: 4px !important;
  row-gap: 6px !important;
}

#inventoryView .inventory-filter .inventory-batch-actions .inventory-batch-btn {
  color: #344054 !important;
  box-shadow: 0 1px 2px rgba(16, 24, 40, .06);
}

#inventoryView .inventory-filter .inventory-batch-actions .batch-replenish-btn {
  border-color: #93c5fd !important;
  background: #eff6ff !important;
  color: #1d4ed8 !important;
}
#inventoryView .inventory-filter .inventory-batch-actions .batch-replenish-btn:hover {
  background: #dbeafe !important;
}

#inventoryView .inventory-filter .inventory-batch-actions .batch-out-btn {
  border-color: #fdba74 !important;
  background: #fff7ed !important;
  color: #c2410c !important;
}
#inventoryView .inventory-filter .inventory-batch-actions .batch-out-btn:hover {
  background: #ffedd5 !important;
}

#inventoryView .inventory-filter .inventory-batch-actions .batch-stock-btn {
  border-color: #86efac !important;
  background: #ecfdf3 !important;
  color: #067647 !important;
}
#inventoryView .inventory-filter .inventory-batch-actions .batch-stock-btn:hover {
  background: #dcfce7 !important;
}

#inventoryView .inventory-filter .inventory-batch-actions .batch-draft-btn {
  border-color: #cbd5e1 !important;
  background: #f8fafc !important;
  color: #475569 !important;
}
#inventoryView .inventory-filter .inventory-batch-actions .batch-draft-btn:hover {
  background: #f1f5f9 !important;
}

#inventoryView .inventory-filter .inventory-batch-actions .batch-draft-btn {
  position: relative !important;
  overflow: visible !important;
}

#inventoryView .inventory-filter .inventory-batch-actions .batch-draft-count {
  position: absolute;
  z-index: 4;
  top: 2px;
  right: 4px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 17px;
  height: 17px;
  padding: 0 4px;
  border-radius: 999px;
  background: #ff2d2d;
  color: #fff;
  font-size: 10px;
  font-weight: 950;
  line-height: 17px;
  box-shadow: 0 0 0 1px #fff, 0 2px 5px rgba(220, 38, 38, .3);
  pointer-events: none;
}

#inventoryView .inventory-filter .inventory-batch-actions .batch-history-btn {
  border-color: #cbd5e1 !important;
  background: #eef2f6 !important;
  color: #344054 !important;
}
#inventoryView .inventory-filter .inventory-batch-actions .batch-history-btn:hover {
  background: #e2e8f0 !important;
}

#inventoryView .inventory-filter .inventory-batch-actions .batch-moves-btn {
  border-color: #a5d8e6 !important;
  background: #ecfeff !important;
  color: #0e7490 !important;
}
#inventoryView .inventory-filter .inventory-batch-actions .batch-moves-btn:hover {
  background: #cffafe !important;
}

#inventoryView .inventory-filter .inventory-batch-actions .batch-trend-btn {
  border-color: #c4b5fd !important;
  background: #f5f3ff !important;
  color: #6d28d9 !important;
}
#inventoryView .inventory-filter .inventory-batch-actions .batch-trend-btn:hover {
  background: #ede9fe !important;
}

@media (max-width: 1180px) {
  #jobsView > .filter-bar {
    grid-template-columns: repeat(2, minmax(180px, 1fr)) !important;
  }

  #jobsView > .filter-bar .job-filter-add-btn {
    grid-column: 1 / -1;
    grid-row: auto;
    width: 100%;
    justify-self: stretch;
  }
}

/* Desktop: anchor create replenishment at the far-right edge of the filter card. */
@media (min-width: 1181px) {
  #jobsView > .filter-bar {
    position: relative;
    padding-right: 136px;
  }

  #jobsView > .filter-bar .job-filter-add-btn {
    position: absolute !important;
    top: 50%;
    right: 16px;
    z-index: 1;
    width: 104px;
    transform: translateY(-50%);
  }
}

/* Final soft-action tune: highlight drafts and align the limit tool with the palette above. */
#inventoryView .inventory-filter .inventory-batch-actions .batch-draft-btn {
  border-color: #fbbf24 !important;
  background: #fffbeb !important;
  color: #b45309 !important;
  box-shadow: 0 1px 3px rgba(180, 83, 9, .12);
}

#inventoryView .inventory-filter .inventory-batch-actions .batch-draft-btn:hover {
  border-color: #f59e0b !important;
  background: #fef3c7 !important;
  color: #92400e !important;
}

#inventoryView .inventory-table-tools .inventory-table-limit-btn {
  border-color: #93c5fd !important;
  background: #eff6ff !important;
  color: #1d4ed8 !important;
  border-radius: var(--radius-lg) !important;
  box-shadow: 0 1px 2px rgba(37, 99, 235, .08);
}

#inventoryView .inventory-table-tools .inventory-table-limit-btn:hover {
  border-color: #60a5fa !important;
  background: #dbeafe !important;
  color: #1e40af !important;
}

/* Wide desktop: keep the production download and create actions on one line. */
@media (min-width: 1500px) {
  #jobsView > .filter-bar {
    padding-right: 428px;
  }

  #jobsView > .filter-bar .download-list-btn {
    position: absolute !important;
    top: 50%;
    right: 132px !important;
    left: auto !important;
    grid-column: auto !important;
    grid-row: auto !important;
    z-index: 1;
    width: 280px !important;
    max-width: 280px !important;
    transform: translateY(-50%);
  }
}

/* Production filter actions: keep download and create together at the far right. */
@media (min-width: 1500px) {
  #jobsView > .filter-bar {
    position: relative;
    padding-right: 428px !important;
  }

  #jobsView > .filter-bar .job-filter-right-actions {
    position: absolute;
    top: 50%;
    right: 16px;
    z-index: 2;
    display: flex;
    align-items: center;
    gap: 8px;
    transform: translateY(-50%);
  }

  #jobsView > .filter-bar .job-filter-right-actions > .download-list-btn,
  #jobsView > .filter-bar .job-filter-right-actions > .job-filter-add-btn {
    position: static !important;
    top: auto !important;
    right: auto !important;
    left: auto !important;
    grid-column: auto !important;
    grid-row: auto !important;
    transform: none !important;
  }

  #jobsView > .filter-bar .job-filter-right-actions > .download-list-btn {
    width: 280px !important;
    max-width: 280px !important;
  }

  #jobsView > .filter-bar .job-filter-right-actions > .job-filter-add-btn {
    width: 104px !important;
  }
}

@media (max-width: 1499px) {
  #jobsView > .filter-bar .job-filter-right-actions {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: 1fr;
    gap: 8px;
    width: 100%;
  }

  #jobsView > .filter-bar .job-filter-right-actions > .download-list-btn,
  #jobsView > .filter-bar .job-filter-right-actions > .job-filter-add-btn {
    position: static !important;
    width: 100% !important;
    max-width: none !important;
    transform: none !important;
  }
}

/* Production actions sit directly below the shop filter. */
#jobsView > .filter-bar {
  padding-right: 12px !important;
}

#jobsView > .filter-bar .job-filter-right-actions {
  position: static !important;
  top: auto !important;
  right: auto !important;
  grid-column: 1 / span 2 !important;
  grid-row: 2 !important;
  justify-self: start;
  display: flex !important;
  align-items: stretch;
  gap: 8px;
  width: auto !important;
  transform: none !important;
}

#jobsView > .filter-bar .job-filter-right-actions > .download-list-btn,
#jobsView > .filter-bar .job-filter-right-actions > .job-filter-add-btn {
  position: static !important;
  min-height: 38px;
  transform: none !important;
}

#jobsView > .filter-bar .job-filter-right-actions > .download-list-btn {
  width: 280px !important;
  max-width: 280px !important;
}

#jobsView > .filter-bar .job-filter-right-actions > .job-filter-add-btn {
  width: 104px !important;
}

@media (max-width: 640px) {
  #jobsView > .filter-bar .job-filter-right-actions {
    grid-column: 1 / -1 !important;
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) 104px;
    width: 100% !important;
  }

  #jobsView > .filter-bar .job-filter-right-actions > .download-list-btn,
  #jobsView > .filter-bar .job-filter-right-actions > .job-filter-add-btn {
    width: 100% !important;
    min-width: 0;
    max-width: none !important;
  }
}

/* RC469: compact inventory rows without changing thumbnail size. */
.inventory-name-cell .stock-name > div {
  display: grid;
  gap: 2px;
  align-content: center;
}

.inventory-name-cell .stock-name strong,
.inventory-name-cell .stock-name .muted {
  line-height: 1.16;
}

.inventory-grid td {
  padding-top: 4px;
  padding-bottom: 4px;
}

.outbound-batch-note {
  margin-top: 4px;
  color: #7c2d12;
  font-size: 12px;
  font-weight: 850;
}

.direct-purchase-label {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 2px 9px;
  border: 1px solid #f59e0b;
  border-radius: 999px;
  color: #92400e;
  background: #fffbeb;
  font-size: 12px;
  font-weight: 900;
}

.direct-purchase-label.stocked {
  border-color: #34d399;
  color: #047857;
  background: #ecfdf5;
}

.direct-purchase-quantity {
  color: #92400e;
  font-weight: 850;
}

.direct-purchase-submit-btn {
  border-color: #93c5fd !important;
  color: #1d4ed8 !important;
  background: #eff6ff !important;
  box-shadow: 0 1px 2px rgba(16, 24, 40, .06);
}

.direct-purchase-submit-btn:hover {
  border-color: #60a5fa !important;
  background: #dbeafe !important;
}

/* Keep direct-purchase waiting and completed states in the original action slot. */
.direct-purchase-submit-btn.is-awaiting,
.direct-purchase-submit-btn.is-awaiting:hover,
.direct-purchase-submit-btn.is-completed,
.direct-purchase-submit-btn.is-completed:hover {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 30px !important;
  min-height: 30px !important;
  padding: 1px 9px 0 !important;
  border-color: #d0d5dd !important;
  color: #475467 !important;
  background: #f8fafc !important;
  box-shadow: none;
  cursor: default;
  line-height: 18px !important;
  opacity: 1;
  white-space: nowrap;
}

/* Keep an opened status menu above following rows and batches. */
#jobsView .batch-group:focus-within {
  z-index: 90;
  overflow: visible !important;
}

#jobsView .flow-row:focus-within {
  z-index: 100;
  overflow: visible;
}

#jobsView .flow-row > .actions:focus-within {
  position: relative;
  z-index: 110;
  overflow: visible;
}

#jobsView .status-select:focus {
  position: relative;
  z-index: 120;
}

#inventoryView .inventory-filter .inventory-batch-actions .direct-purchase-inbound-btn {
  position: relative;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  padding: 0 10px !important;
  border-color: #fcd34d !important;
  color: #a16207 !important;
  background: #fffbeb !important;
  text-align: center !important;
  line-height: 1 !important;
}

#inventoryView .inventory-filter .inventory-batch-actions .direct-purchase-inbound-btn:hover {
  border-color: #fbbf24 !important;
  background: #fef3c7 !important;
}

.direct-purchase-btn-label {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  display: block;
  width: max-content;
  line-height: 1;
  pointer-events: none;
}

.direct-purchase-count {
  position: absolute;
  top: 50%;
  right: 8px;
  transform: translateY(-50%);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 20px;
  height: 20px;
  padding: 0 5px;
  border-radius: 999px;
  border: 1px solid #fff;
  color: #fff;
  background: #ef4444;
  font-size: 12px;
  font-weight: 950;
  line-height: 18px;
  box-shadow: 0 2px 6px rgba(239, 68, 68, .32);
}

dialog:has(.direct-purchase-inbound-list) {
  width: min(1180px, calc(100vw - 32px));
  max-width: calc(100vw - 32px);
}

.direct-purchase-inbound-list {
  display: grid;
  gap: 8px;
}

.direct-purchase-inbound-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) minmax(390px, 430px);
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border: 1px solid #fde68a;
  border-radius: 10px;
  background: #fffbeb;
}

.direct-purchase-inbound-info {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.direct-purchase-inbound-info span {
  color: #667085;
  font-size: 12px;
}

.direct-purchase-owner-line {
  overflow-wrap: anywhere;
}

.direct-purchase-inbound-row label {
  display: grid;
  gap: 4px;
  color: #475467;
  font-size: 12px;
  font-weight: 850;
}

.direct-purchase-inbound-entry {
  display: grid;
  grid-template-columns: minmax(130px, 1fr) auto auto;
  align-items: end;
  gap: 12px;
}

.direct-purchase-inbound-entry > button {
  align-self: end;
  min-height: 40px;
  height: 40px;
  margin: 0 0 1px;
  white-space: nowrap;
}

.tablet-refresh-btn {
  display: none;
}

html.tablet-desktop-mode,
html.tablet-desktop-mode body {
  overscroll-behavior-x: none;
  overscroll-behavior-y: none;
}

html.tablet-desktop-mode .tablet-refresh-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-align: center;
}

/* Full-image preview: use the actual visual viewport in tablet/PWA mode. */
html.image-preview-open,
body.image-preview-open {
  overflow: hidden !important;
  overscroll-behavior: none;
  touch-action: none;
}

.image-lightbox,
.image-lightbox-panel,
.image-lightbox-image {
  overscroll-behavior: none;
  touch-action: none;
}

.image-lightbox {
  position: fixed !important;
  inset: auto !important;
  left: var(--image-preview-left, 0) !important;
  top: var(--image-preview-top, 0) !important;
  z-index: 2147483647 !important;
  display: flex !important;
  align-items: center;
  justify-content: center;
  width: var(--image-preview-width, 100vw) !important;
  height: var(--image-preview-height, 100vh) !important;
  max-width: var(--image-preview-width, 100vw) !important;
  max-height: var(--image-preview-height, 100vh) !important;
  margin: 0 !important;
  padding: 8px !important;
  border: 0 !important;
  box-sizing: border-box;
  overflow: hidden !important;
  background: rgba(15, 23, 42, .78) !important;
}

.image-lightbox[hidden],
.image-lightbox:not(.is-open) {
  display: none !important;
}

.image-lightbox-panel {
  display: flex !important;
  align-items: center;
  justify-content: center;
  width: 100% !important;
  height: 100% !important;
  max-width: 100% !important;
  max-height: 100% !important;
  min-width: 0;
  min-height: 0;
  box-sizing: border-box;
  overflow: hidden !important;
  padding: 4px !important;
  border: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}

.image-lightbox-image {
  display: block !important;
  width: auto !important;
  height: auto !important;
  max-width: 100% !important;
  max-height: 100% !important;
  min-width: 0;
  min-height: 0;
  object-fit: contain !important;
  object-position: center center !important;
  transform: none !important;
}

.image-lightbox-backdrop {
  position: absolute !important;
  inset: 0 !important;
  width: 100% !important;
  height: 100% !important;
}

.image-lightbox-close {
  position: absolute !important;
  top: 12px !important;
  right: 12px !important;
  z-index: 3 !important;
  width: 42px !important;
  height: 42px !important;
  min-width: 42px !important;
  min-height: 42px !important;
  padding: 0 !important;
  border-radius: 50% !important;
  font-size: 28px !important;
  line-height: 38px !important;
}

/* Realtime data refresh: unchanged views stay still; changed views cross-fade gently. */
::view-transition-group(erp-live-refresh) {
  animation-duration: 360ms;
  animation-timing-function: cubic-bezier(.22, .61, .36, 1);
}

::view-transition-old(erp-live-refresh) {
  animation: erp-live-refresh-old 320ms ease-out both;
}

::view-transition-new(erp-live-refresh) {
  animation: erp-live-refresh-new 360ms ease-out both;
}

@keyframes erp-live-refresh-old {
  from { opacity: 1; }
  to { opacity: 0; }
}

@keyframes erp-live-refresh-new {
  from { opacity: 0; }
  to { opacity: 1; }
}

.view.realtime-refresh-settling {
  animation: erp-live-refresh-fallback 360ms ease-out both;
}

@keyframes erp-live-refresh-fallback {
  from { opacity: .9; }
  to { opacity: 1; }
}

@media (prefers-reduced-motion: reduce) {
  ::view-transition-group(erp-live-refresh),
  ::view-transition-old(erp-live-refresh),
  ::view-transition-new(erp-live-refresh),
  .view.realtime-refresh-settling {
    animation: none !important;
  }
}

@media (max-width: 900px) {
  .direct-purchase-inbound-row {
    grid-template-columns: auto minmax(0, 1fr);
  }
  .direct-purchase-inbound-entry {
    grid-column: 2;
    grid-template-columns: minmax(0, 1fr) auto;
  }
  .direct-purchase-to-purchase-btn {
    grid-column: 1 / -1;
    width: 100%;
  }
  .direct-purchase-owner-line {
    white-space: normal;
  }
}

/* RC497: keep the tablet production toolbar compact and on one row. */
html.tablet-desktop-mode #jobsView > .filter-bar {
  display: flex !important;
  flex-wrap: nowrap !important;
  align-items: flex-end !important;
  gap: 8px !important;
  padding: 10px 12px !important;
  overflow: visible;
}

html.tablet-desktop-mode #jobsView > .filter-bar > label {
  flex: 1 1 0;
  width: auto;
  min-width: 0 !important;
  max-width: none;
}

html.tablet-desktop-mode #jobsView > .filter-bar > label:last-of-type {
  flex: 2 1 0;
  width: auto;
  min-width: 0 !important;
  max-width: none;
}

html.tablet-desktop-mode #jobsView > .filter-bar > label select,
html.tablet-desktop-mode #jobsView > .filter-bar > label input,
html.tablet-desktop-mode #jobsView > .filter-bar > label .custom-select-trigger {
  width: 100% !important;
  min-width: 0 !important;
}

html.tablet-desktop-mode #jobsView > .filter-bar .filter-button-pair {
  flex: 0 0 auto;
  width: auto !important;
  min-width: 0;
}

html.tablet-desktop-mode #jobsView > .filter-bar .job-filter-clear {
  min-width: 66px;
  padding-right: 12px;
  padding-left: 12px;
}

html.tablet-desktop-mode #jobsView > .filter-bar .job-filter-right-actions {
  position: static !important;
  display: flex !important;
  flex: 0 0 auto;
  align-items: flex-end;
  gap: 8px;
  width: auto !important;
  margin-left: auto;
  transform: none !important;
}

html.tablet-desktop-mode #jobsView > .filter-bar .job-filter-right-actions > .download-list-btn {
  width: 190px !important;
  min-width: 190px !important;
  max-width: 190px !important;
}

html.tablet-desktop-mode #jobsView > .filter-bar .job-filter-right-actions > .job-filter-add-btn {
  position: static !important;
  width: 104px !important;
  min-width: 104px !important;
  transform: none !important;
}

/* RC497: date, owner and shop remain side by side in collapsed tablet batches. */
html.tablet-desktop-mode #jobsView .batch-head-main {
  min-width: 0;
  overflow: hidden;
}

html.tablet-desktop-mode #jobsView .batch-head-main .flow-title {
  display: grid !important;
  grid-template-columns: auto auto minmax(0, 1fr);
  align-items: center !important;
  gap: 6px;
  min-width: 0;
  overflow: hidden;
}

html.tablet-desktop-mode #jobsView .batch-head-main .batch-check,
html.tablet-desktop-mode #jobsView .batch-head-main .batch-created-date {
  flex: 0 0 auto;
  white-space: nowrap;
}

html.tablet-desktop-mode #jobsView .batch-head-main .batch-owner-shop {
  display: block !important;
  flex: 1 1 auto;
  min-width: 0;
  max-width: none;
  overflow: visible;
  overflow-wrap: normal;
  text-overflow: clip;
  white-space: nowrap;
  line-height: 1.25;
}

/* RC497 final tablet fit: extend the production filter surface to the right edge. */
html.tablet-desktop-mode #jobsView.workshop-manager-view > .filter-bar {
  width: calc(100% + 56px) !important;
  min-width: 0 !important;
  max-width: none !important;
  margin-left: -28px;
  margin-right: -28px;
  padding-right: 28px !important;
  padding-left: 28px !important;
  box-sizing: border-box;
}

html.tablet-desktop-mode .topbar {
  width: calc(100% + 56px) !important;
  max-width: none !important;
  margin-left: -28px;
  margin-right: -28px;
  padding-left: 28px;
  padding-right: 28px;
  box-sizing: border-box;
  background: var(--surface);
}

html.tablet-desktop-mode .topbar > .toolbar {
  margin-left: auto;
}

html.tablet-desktop-mode #jobsView > .filter-bar .job-filter-right-actions.is-empty {
  display: none !important;
}

/* RC548: compact raw-material availability, without changing production card geometry. */
.job-material-status,
.summary-material-status {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  padding: 2px 8px;
  border: 1px solid currentColor;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
  line-height: 1;
  white-space: nowrap;
  cursor: pointer;
}

.job-material-status.sufficient,
.summary-material-status.sufficient {
  color: #067647;
  background: #ecfdf3;
}

.job-material-status.shortage,
.summary-material-status.shortage {
  color: #b42318;
  background: #fff1f0;
}

#jobsView .flow-meta > .job-material-status {
  grid-column: 2;
  justify-self: start;
  margin-left: 30px;
  width: max-content;
  max-width: 100%;
  min-height: 22px;
  padding: 2px 7px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 900;
  line-height: 1.15;
  white-space: nowrap;
}

#jobsView .flow-meta > .job-material-status.sufficient {
  border-color: #86efac;
  color: #15803d;
  background: #f0fdf4;
}

#jobsView .flow-meta > .job-material-status.shortage {
  border-color: #fdba74;
  color: #c2410c;
  background: #fff7ed;
}

#jobsView .flow-meta > .job-material-status.unbound {
  border: 1px solid #cbd5e1;
  color: #64748b;
  background: #f8fafc;
}

#jobsView .flow-meta > .job-material-status {
  border: 0 !important;
  padding-right: 0;
  padding-left: 0;
  background: transparent !important;
  box-shadow: none;
}

@media (max-width: 760px) {
  html:not(.tablet-desktop-mode) #jobsView .flow-meta > .job-material-status {
    grid-column: auto;
    margin-left: 0;
  }
}

#jobsView .flow-title > .job-material-status {
  display: none;
}

.summary-material-status {
  min-height: 20px;
  padding: 2px 6px;
  font-size: 11px;
}

.job-material-detail {
  display: grid;
  gap: 14px;
}

.job-material-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  border: 1px solid #bbd7ff;
  border-radius: 12px;
  background: #f4f8ff;
}

.job-material-summary.shortage {
  border-color: #f5b7b1;
  background: #fff5f4;
}

.job-material-detail td strong,
.job-material-detail td small {
  display: block;
}

.job-material-detail td small {
  margin-top: 3px;
  color: #667085;
}

.material-positive,
.material-status-text.sufficient { color: #067647; font-weight: 800; }
.material-negative,
.material-status-text.shortage { color: #d92d20; font-weight: 800; }
.material-shortage-row { background: #fff8f7; }

/* Compact image preview: a square on the left half, with the whole image visible. */
.image-lightbox {
  align-items: center !important;
  justify-content: flex-start !important;
  padding: 12px !important;
  background: transparent !important;
  pointer-events: none;
}

.image-lightbox-panel {
  width: min(calc(var(--image-preview-width, 100vw) / 2 - 24px), calc(var(--image-preview-height, 100vh) - 24px)) !important;
  height: min(calc(var(--image-preview-width, 100vw) / 2 - 24px), calc(var(--image-preview-height, 100vh) - 24px)) !important;
  max-width: none !important;
  max-height: none !important;
  flex: 0 0 auto;
  padding: 10px !important;
  border: 1px solid #cbd5e1 !important;
  border-radius: 12px !important;
  background: #fff !important;
  box-shadow: 0 18px 48px rgba(15, 23, 42, .28) !important;
  pointer-events: auto;
}

.image-lightbox-image {
  max-width: 100% !important;
  max-height: 100% !important;
  object-fit: contain !important;
}

.image-lightbox-backdrop {
  display: none !important;
}

/* RC498: tablet completed batches use the same layout as production batches. */
html.tablet-desktop-mode #completedView .batch-head {
  grid-template-columns: minmax(0, 1fr) 460px 382px 300px;
}

html.tablet-desktop-mode #completedView .batch-download-count-main {
  display: none;
}

html.tablet-desktop-mode #completedView .batch-duration-wrap {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  width: 382px;
  min-width: 382px;
  max-width: 382px;
}

html.tablet-desktop-mode #completedView .batch-download-count-tablet {
  display: inline-flex;
  flex: 0 0 auto;
}

html.tablet-desktop-mode #completedView.workshop-manager-view .batch-download-count {
  display: none !important;
}

html.tablet-desktop-mode #completedView.workshop-manager-view .batch-duration-wrap {
  width: 220px;
  min-width: 220px;
  max-width: 220px;
  justify-content: center;
}

html.tablet-desktop-mode #completedView.workshop-manager-view .batch-head {
  grid-template-columns: minmax(720px, 1.75fr) 400px 220px auto;
  column-gap: 18px;
}

html.tablet-desktop-mode #completedView.workshop-manager-view .batch-duration {
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
  justify-content: center;
  text-align: center;
}

html.tablet-desktop-mode #completedView .batch-head-main {
  min-width: 0;
  overflow: hidden;
}

html.tablet-desktop-mode #completedView .batch-head-main .flow-title {
  display: grid !important;
  grid-template-columns: auto auto minmax(0, 1fr);
  align-items: center !important;
  gap: 6px;
  min-width: 0;
  overflow: hidden;
}

html.tablet-desktop-mode #completedView .batch-head-main .batch-check,
html.tablet-desktop-mode #completedView .batch-head-main .batch-created-date {
  flex: 0 0 auto;
  white-space: nowrap;
}

html.tablet-desktop-mode #completedView .batch-head-main .batch-owner-shop {
  display: block !important;
  flex: 1 1 auto;
  min-width: 0;
  max-width: none;
  overflow: visible;
  overflow-wrap: normal;
  text-overflow: clip;
  white-space: nowrap;
  line-height: 1.25;
}

html.tablet-desktop-mode #completedView .batch-collapsed-summary {
  flex-wrap: nowrap;
  gap: 6px;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  margin-top: 6px;
  padding: 5px 7px;
  box-sizing: border-box;
  overflow: hidden;
  white-space: nowrap;
  contain: inline-size;
}

html.tablet-desktop-mode #completedView .batch-collapsed-summary .product-summary-chip {
  flex: 0 0 auto;
  gap: 5px !important;
  max-width: none !important;
  overflow: visible !important;
  padding: 6px 10px;
}

html.tablet-desktop-mode #completedView .batch-collapsed-summary .summary-name {
  flex: 0 0 auto !important;
  max-width: none !important;
  overflow: visible !important;
  text-overflow: clip !important;
  font-size: 14px;
}

html.tablet-desktop-mode #completedView .batch-collapsed-summary .summary-fnsku {
  font-size: 15px;
}

#completedView .batch-collapsed-summary .product-summary-more {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 3px;
  min-height: 25px;
  padding: 4px 9px;
  border: 1px solid #cbd5e1;
  border-radius: 999px;
  color: #475467;
  background: #f8fafc;
  font-size: 12px;
  font-weight: 800;
  line-height: 1;
}

#completedView .batch-collapsed-summary .product-summary-more strong {
  color: #2563eb;
  font-size: 13px;
}

/* RC499: use the full tablet production toolbar width instead of stopping mid-row. */
html.tablet-desktop-mode .topbar {
  position: relative;
}

html.tablet-desktop-mode .topbar > .toolbar {
  position: absolute;
  top: 50%;
  right: 28px;
  margin-left: 0 !important;
  justify-content: flex-end;
  transform: translateY(-50%);
}

html.tablet-desktop-mode #jobsView > .filter-bar {
  display: grid !important;
  grid-template-columns: repeat(3, minmax(0, 1fr)) minmax(0, 2fr) max-content max-content !important;
  align-items: end !important;
  width: calc(100% + 56px) !important;
  min-width: 0 !important;
  max-width: none !important;
  margin-left: -28px;
  margin-right: -28px;
  padding: 10px 28px !important;
  box-sizing: border-box;
}

html.tablet-desktop-mode #jobsView > .filter-bar > label,
html.tablet-desktop-mode #jobsView > .filter-bar > label:last-of-type {
  width: 100% !important;
  min-width: 0 !important;
  max-width: none !important;
}

html.tablet-desktop-mode #jobsView > .filter-bar .filter-button-pair {
  grid-column: 5 !important;
  width: auto !important;
}

html.tablet-desktop-mode #jobsView > .filter-bar .job-filter-right-actions {
  grid-column: 6 !important;
  grid-row: 1 !important;
  position: static !important;
  width: auto !important;
  margin-left: 0 !important;
  transform: none !important;
}

#jobsView > .filter-bar .job-filter-right-actions.is-empty {
  display: none !important;
}

/* RC500: keep production flow inside the tablet content boundary. */
html.tablet-desktop-mode .topbar {
  width: 100% !important;
  max-width: 100% !important;
  margin-right: 0;
  margin-left: 0;
  padding-right: 0;
  padding-left: 0;
  box-sizing: border-box;
}

html.tablet-desktop-mode .topbar > .toolbar {
  position: static;
  top: auto;
  right: auto;
  min-width: 0;
  margin-left: auto !important;
  transform: none;
}

html.tablet-desktop-mode #jobsView {
  min-width: 0;
  max-width: 100%;
}

#jobsView > .job-filter-bar {
  position: sticky;
  top: 0;
  z-index: 80;
  box-shadow: 0 10px 22px rgba(15, 23, 42, 0.08);
}

html.tablet-desktop-mode #jobsView > .job-filter-bar,
html.tablet-desktop-mode #jobsView.workshop-manager-view > .job-filter-bar {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) minmax(0, .85fr) minmax(260px, 1.7fr) max-content max-content !important;
  align-items: end !important;
  justify-content: stretch !important;
  width: 100% !important;
  min-width: 0 !important;
  max-width: 100% !important;
  margin: 0 0 16px !important;
  padding: 10px 12px !important;
  overflow: visible;
  box-sizing: border-box;
}

html.tablet-desktop-mode #jobsView > .job-filter-bar.has-assignee-filter,
html.tablet-desktop-mode #jobsView.workshop-manager-view > .job-filter-bar.has-assignee-filter {
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) minmax(0, .85fr) minmax(240px, 1.7fr) max-content max-content !important;
}

html.tablet-desktop-mode #jobsView > .job-filter-bar > .job-filter-field {
  width: 100% !important;
  min-width: 0 !important;
  max-width: none !important;
}

html.tablet-desktop-mode #jobsView > .job-filter-bar .filter-button-pair,
html.tablet-desktop-mode #jobsView > .job-filter-bar .job-filter-right-actions {
  grid-column: auto !important;
  grid-row: auto !important;
  width: auto !important;
  min-width: 0;
  margin-left: 0 !important;
}

html.tablet-desktop-mode #jobsView > .job-filter-bar .job-filter-right-actions {
  position: static !important;
  display: flex !important;
  align-items: flex-end;
  gap: 8px;
  transform: none !important;
}

html.tablet-desktop-mode #jobsView > .job-filter-bar .job-filter-right-actions.is-empty {
  display: none !important;
}

html.tablet-desktop-mode #jobsView .batch-group,
html.tablet-desktop-mode #jobsView .flow-row {
  min-width: 0;
  max-width: 100%;
  box-sizing: border-box;
}

html.tablet-desktop-mode #jobsView .batch-head {
  grid-template-columns: minmax(300px, 1fr) 354px 270px 300px !important;
  gap: 10px;
  min-width: 0;
}

html.tablet-desktop-mode #jobsView.workshop-manager-view .batch-head {
  grid-template-columns: minmax(320px, 1fr) 354px 190px 300px !important;
}

html.tablet-desktop-mode #jobsView .batch-head-main .batch-owner-shop {
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

html.tablet-desktop-mode #jobsView .batch-status-counts {
  display: flex;
  gap: 6px;
  width: 354px;
  min-width: 0;
  max-width: 354px;
  overflow: hidden;
}

html.tablet-desktop-mode #jobsView .batch-status-count,
html.tablet-desktop-mode #jobsView .batch-status-count .batch-status-item {
  width: 54px !important;
  min-width: 54px !important;
  max-width: 54px;
}

html.tablet-desktop-mode #jobsView .batch-status-count .batch-status-item {
  padding-right: 6px !important;
  padding-left: 6px !important;
}

html.tablet-desktop-mode #jobsView .batch-duration-wrap {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
  width: 270px;
  min-width: 0;
  max-width: 270px;
}

html.tablet-desktop-mode #jobsView.workshop-manager-view .batch-duration-wrap {
  width: 190px;
  max-width: 190px;
}

html.tablet-desktop-mode #jobsView .batch-duration-wrap .batch-duration {
  flex: 1 1 0;
  width: auto;
  min-width: 0;
  max-width: none;
}

html.tablet-desktop-mode #jobsView .batch-head > .actions {
  display: flex;
  grid-column: auto;
  width: 300px;
  min-width: 0;
  max-width: 300px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

html.tablet-desktop-mode #jobsView .flow-row {
  grid-template-columns: minmax(280px, 1.2fr) minmax(260px, .9fr) minmax(210px, auto);
}

html.tablet-desktop-mode #jobsView .flow-main,
html.tablet-desktop-mode #jobsView .flow-main > div:last-child,
html.tablet-desktop-mode #jobsView .flow-meta,
html.tablet-desktop-mode #jobsView .flow-row > .actions {
  min-width: 0;
}

html.tablet-desktop-mode #jobsView .flow-row > .actions {
  max-width: none;
  flex-wrap: wrap;
}

/* RC500: phone production flow stacks controls instead of allowing overlap. */
@media (max-width: 760px) {
  html:not(.tablet-desktop-mode) .content {
    padding: 10px;
  }

  html:not(.tablet-desktop-mode) .topbar {
    align-items: stretch;
    width: 100%;
    min-width: 0;
  }

  html:not(.tablet-desktop-mode) .topbar > .toolbar {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    width: 100%;
    min-width: 0;
    gap: 6px;
  }

  html:not(.tablet-desktop-mode) .topbar > .toolbar > button {
    width: 100%;
    min-width: 0;
    max-width: none;
    white-space: normal;
  }

  html:not(.tablet-desktop-mode) #jobsView,
  html:not(.tablet-desktop-mode) #jobsView .batch-group,
  html:not(.tablet-desktop-mode) #jobsView .batch-head,
  html:not(.tablet-desktop-mode) #jobsView .flow-row {
    width: 100%;
    min-width: 0;
    max-width: 100%;
    box-sizing: border-box;
  }

  html:not(.tablet-desktop-mode) #jobsView > .job-filter-bar,
  html:not(.tablet-desktop-mode) #jobsView > .job-filter-bar.has-assignee-filter {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) !important;
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
    margin: 0 0 10px !important;
    padding: 9px !important;
    gap: 8px;
    box-sizing: border-box;
  }

  html:not(.tablet-desktop-mode) #jobsView > .job-filter-bar > .job-filter-field,
  html:not(.tablet-desktop-mode) #jobsView > .job-filter-bar .filter-button-pair,
  html:not(.tablet-desktop-mode) #jobsView > .job-filter-bar .job-filter-right-actions {
    grid-column: 1 !important;
    grid-row: auto !important;
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
  }

  html:not(.tablet-desktop-mode) #jobsView > .job-filter-bar .job-filter-clear {
    width: 100%;
  }

  html:not(.tablet-desktop-mode) #jobsView > .job-filter-bar .job-filter-right-actions {
    position: static !important;
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) minmax(96px, .55fr);
    gap: 6px;
    margin: 0 !important;
    transform: none !important;
  }

  html:not(.tablet-desktop-mode) #jobsView > .job-filter-bar .job-filter-right-actions.is-empty {
    display: none !important;
  }

  html:not(.tablet-desktop-mode) #jobsView > .job-filter-bar .job-filter-right-actions > button {
    width: 100% !important;
    min-width: 0 !important;
    max-width: none !important;
  }

  html:not(.tablet-desktop-mode) #jobsView .batch-group {
    padding: 8px;
    overflow: hidden;
  }

  html:not(.tablet-desktop-mode) #jobsView .batch-head {
    display: grid;
    grid-template-columns: minmax(0, 1fr) !important;
    gap: 8px;
  }

  html:not(.tablet-desktop-mode) #jobsView .batch-head-main .flow-title {
    display: grid !important;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 6px;
    min-width: 0;
  }

  html:not(.tablet-desktop-mode) #jobsView .batch-head-main .batch-owner-shop,
  html:not(.tablet-desktop-mode) #jobsView .batch-head-main .batch-download-count-main {
    grid-column: 1 / -1;
    width: 100%;
    min-width: 0;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  html:not(.tablet-desktop-mode) #jobsView .batch-status-counts {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 6px;
    width: 100%;
    min-width: 0;
    max-width: 100%;
    overflow: visible;
  }

  html:not(.tablet-desktop-mode) #jobsView .batch-status-count,
  html:not(.tablet-desktop-mode) #jobsView .batch-status-count .batch-status-item {
    width: 100% !important;
    min-width: 0 !important;
    max-width: none;
  }

  html:not(.tablet-desktop-mode) #jobsView .batch-duration-wrap {
    display: flex;
    width: 100%;
    min-width: 0;
    max-width: 100%;
    flex-wrap: wrap;
    gap: 6px;
  }

  html:not(.tablet-desktop-mode) #jobsView .batch-duration-wrap > * {
    flex: 1 1 140px;
    width: auto;
    min-width: 0;
    max-width: none;
  }

  html:not(.tablet-desktop-mode) #jobsView .batch-head > .actions,
  html:not(.tablet-desktop-mode) #jobsView .flow-row > .actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    width: 100%;
    min-width: 0;
    max-width: 100%;
    gap: 6px;
  }

  html:not(.tablet-desktop-mode) #jobsView .batch-head > .actions > *,
  html:not(.tablet-desktop-mode) #jobsView .flow-row > .actions > * {
    width: 100%;
    min-width: 0;
    max-width: none;
  }

  html:not(.tablet-desktop-mode) #jobsView .batch-head > .actions > .status-select,
  html:not(.tablet-desktop-mode) #jobsView .flow-row > .actions > .status-select {
    grid-column: 1 / -1;
  }

  html:not(.tablet-desktop-mode) #jobsView .batch-collapsed-summary {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    width: 100%;
    min-width: 0;
    max-width: 100%;
    overflow: visible;
  }

  html:not(.tablet-desktop-mode) #jobsView .batch-collapsed-summary .product-summary-chip {
    width: 100%;
    min-width: 0;
    max-width: 100% !important;
    box-sizing: border-box;
  }

  html:not(.tablet-desktop-mode) #jobsView .flow-row {
    grid-template-columns: minmax(0, 1fr);
    padding: 7px;
    gap: 8px;
  }

  html:not(.tablet-desktop-mode) #jobsView .flow-main,
  html:not(.tablet-desktop-mode) #jobsView .flow-main > div:last-child,
  html:not(.tablet-desktop-mode) #jobsView .flow-meta {
    min-width: 0;
  }

  html:not(.tablet-desktop-mode) #jobsView .flow-main > div:last-child {
    flex: 1 1 auto;
    overflow-wrap: anywhere;
  }

  html:not(.tablet-desktop-mode) #jobsView .flow-meta {
    grid-template-columns: minmax(0, 1fr);
  }

  html:not(.tablet-desktop-mode) #jobsView .inline-number,
  html:not(.tablet-desktop-mode) #jobsView .inline-date,
  html:not(.tablet-desktop-mode) #jobsView .transport-actual-grid {
    width: 100%;
    min-width: 0;
    max-width: 100%;
  }
}

/* RC507: keep the tablet shop and owner labels clear without making them bold. */
html.tablet-desktop-mode #jobsView .batch-head {
  column-gap: 8px !important;
}

html.tablet-desktop-mode #jobsView .batch-head-main .batch-owner-shop {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr);
  align-content: center;
  gap: 0;
  height: 29px;
  min-height: 29px;
  padding: 0;
  overflow: hidden;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  box-sizing: border-box;
  color: #101828;
  font-size: 13px;
  font-weight: 500;
  line-height: 14.5px;
  white-space: normal;
}

html.tablet-desktop-mode #jobsView .batch-head-main .batch-owner-line,
html.tablet-desktop-mode #jobsView .batch-head-main .batch-shop-line {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

html.tablet-desktop-mode #jobsView .batch-head-main .batch-shop-line {
  order: 1;
}

html.tablet-desktop-mode #jobsView .batch-head-main .batch-owner-line {
  order: 2;
}

html.tablet-desktop-mode #jobsView .batch-head-main .batch-owner-separator {
  display: none;
}

html.tablet-desktop-mode #jobsView .batch-status-count .batch-status-item {
  gap: 3px !important;
  padding-right: 3px !important;
  padding-left: 3px !important;
}

html.tablet-desktop-mode #jobsView .batch-status-count .batch-status-label,
html.tablet-desktop-mode #jobsView .batch-status-count .batch-status-number {
  flex: 0 0 auto;
}

html.tablet-desktop-mode #jobsView .batch-status-count .batch-status-number {
  min-width: 16px;
  font-size: 12px;
}

/* RC504: prevent iPad long-press from selecting whole production batches. */
html.tablet-desktop-mode #jobsView .batch-group {
  -webkit-user-select: none;
  user-select: none;
  -webkit-touch-callout: none;
}

html.tablet-desktop-mode #jobsView input,
html.tablet-desktop-mode #jobsView textarea,
html.tablet-desktop-mode #jobsView [contenteditable="true"] {
  -webkit-user-select: text;
  user-select: text;
  -webkit-touch-callout: default;
}

html.tablet-desktop-mode #jobsView input::selection,
html.tablet-desktop-mode #jobsView textarea::selection,
html.tablet-desktop-mode #jobsView [contenteditable="true"]::selection {
  color: inherit;
  background: rgba(148, 163, 184, .32);
}

/* RC510: center the original-size tablet login card on one white background. */
html.tablet-desktop-mode.auth-loading,
html.tablet-desktop-mode.auth-login {
  min-width: 0 !important;
  background: #fff;
}

html.tablet-desktop-mode.auth-loading body,
html.tablet-desktop-mode.auth-login body {
  width: 100%;
  min-width: 0 !important;
  min-height: 100dvh;
  overflow-x: hidden;
  background: #fff;
}

html.tablet-desktop-mode.auth-loading body::before,
html.tablet-desktop-mode.auth-login body::before {
  display: none;
}

html.tablet-desktop-mode.auth-loading .boot-screen,
html.tablet-desktop-mode.auth-login .login-shell {
  width: 100%;
  min-width: 0 !important;
  min-height: 100dvh;
  place-items: center;
  background: #fff;
}

/* Keep every desktop production status control in one fixed column. */
@media (min-width: 1181px) and (hover: hover) and (pointer: fine) {
  html:not(.tablet-desktop-mode) #jobsView .flow-row {
    --desktop-flow-actions-width: 430px;
    grid-template-columns: minmax(280px, 1.35fr) minmax(250px, 1fr) var(--desktop-flow-actions-width);
  }

  html:not(.tablet-desktop-mode) #jobsView .flow-row > .actions {
    box-sizing: border-box;
    width: var(--desktop-flow-actions-width);
    min-width: var(--desktop-flow-actions-width);
    max-width: var(--desktop-flow-actions-width);
    flex-wrap: nowrap;
    justify-content: flex-end;
    overflow: visible;
  }
}

@media (min-width: 1181px) and (max-width: 1366px) and (hover: hover) and (pointer: fine),
       (min-width: 1500px) and (max-width: 1920px) and (min-height: 900px) and (max-height: 1220px) and (hover: hover) and (pointer: fine) {
  html:not(.tablet-desktop-mode) #jobsView .flow-row {
    --desktop-flow-actions-width: 390px;
    grid-template-columns: minmax(230px, .9fr) minmax(420px, 1.15fr) var(--desktop-flow-actions-width);
  }
}

#modal:has(.inventory-material-usage-modal) {
  width: min(820px, calc(100vw - 28px));
}

#modal:has(.inventory-material-bind-modal) {
  width: min(900px, calc(100vw - 28px));
}

.inventory-grid .inventory-type-col,
.inventory-type-cell {
  text-align: center;
  vertical-align: middle;
}

.inventory-type-content {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
}

.inventory-type-content > span:first-child {
  display: block;
  margin-bottom: 5px;
}

.inventory-grid-head th.inventory-shop-col,
.inventory-grid-head th.inventory-type-col,
.inventory-grid-head th.inventory-price-col,
.inventory-grid-head th.inventory-qty-col,
.inventory-grid-head th.inventory-note-col,
.inventory-grid-body td.inventory-shop-cell,
.inventory-grid-body td.inventory-type-cell,
.inventory-grid-body td.inventory-price-cell,
.inventory-grid-body td.inventory-qty-cell,
.inventory-grid-body td.inventory-note-cell {
  text-align: center;
}

.inventory-grid .inventory-type-content {
  margin-right: auto;
  margin-left: auto;
  transform: none !important;
}

.inventory-grid .inventory-price-head,
.inventory-grid .inventory-price-pair {
  width: 100%;
  margin-right: auto;
  margin-left: auto;
  justify-items: center;
}

.inventory-grid .inventory-price-pair > div,
.inventory-grid .inventory-price-view,
.inventory-grid .inventory-price-readonly {
  width: 100%;
  text-align: center;
  justify-items: center;
}

.inventory-grid .inventory-qty-head-label {
  width: 100%;
  margin-right: auto;
  margin-left: auto;
}

.inventory-grid .inventory-qty-lines {
  margin-right: auto;
  margin-left: auto;
  justify-content: center;
}

.inventory-material-status {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: max-content;
  max-width: 100%;
  margin: 0 auto;
  min-height: 22px;
  padding: 2px 6px;
  border: 1px solid transparent;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 900;
  line-height: 1.15;
  white-space: nowrap;
}

button.inventory-material-status.sufficient {
  border-color: #86efac;
  background: #f0fdf4;
  color: #15803d;
}

button.inventory-material-status.shortage {
  border-color: #fdba74;
  background: #fff7ed;
  color: #c2410c;
}

.inventory-material-status.unbound {
  min-height: 22px;
  padding: 2px 8px;
  border-color: #cbd5e1;
  background: #f8fafc;
  color: #64748b;
  font-size: 10px;
  line-height: 1.15;
}

button.inventory-material-status.unbound {
  height: 22px !important;
  min-height: 22px !important;
  max-height: 22px !important;
  padding: 2px 8px !important;
  cursor: pointer;
  font-size: 10px !important;
  line-height: 16px !important;
}

.inventory-grid button.inventory-material-status.unbound {
  height: 22px !important;
  min-height: 22px !important;
  max-height: 22px !important;
  padding: 2px 8px !important;
  font-size: 10px !important;
  line-height: 16px !important;
}

button.inventory-material-status.unbound:hover {
  border-color: #2563eb;
  background: #eff6ff;
  color: #1d4ed8;
}

.inventory-material-bind-modal {
  display: grid;
  gap: 16px;
}

.inventory-material-bind-product {
  display: grid;
  grid-template-columns: 180px minmax(0, 1fr);
  gap: 18px;
  align-items: center;
  padding: 14px;
  border: 1px solid #dbe3ef;
  border-radius: 8px;
  background: #f8fafc;
}

.inventory-material-bind-image {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 180px !important;
  min-width: 180px;
  height: 180px !important;
  min-height: 180px;
  padding: 0 !important;
  overflow: hidden;
  border: 1px solid #d7e1ef;
  border-radius: 8px;
  background: #fff;
  cursor: zoom-in;
  line-height: 1;
}

.inventory-material-bind-image img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.inventory-material-bind-image.placeholder {
  color: #94a3b8;
  font-weight: 800;
  cursor: default;
}

.inventory-material-bind-product strong,
.inventory-material-bind-product span {
  display: block;
}

.inventory-material-bind-product strong {
  margin-bottom: 6px;
  color: #111827;
  font-size: 16px;
}

.inventory-material-bind-product span {
  margin-top: 3px;
  color: #64748b;
  font-size: 12px;
}

.inventory-material-bind-modal input[name="materialSearch"] {
  width: 100%;
}

.inventory-material-bind-selected {
  display: grid;
  grid-template-columns: 82px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  min-height: 96px;
  padding: 10px;
  border: 1px solid #dbe3ef;
  border-radius: 8px;
  background: #fff;
}

.inventory-material-bind-selected-image {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 82px !important;
  min-width: 82px;
  height: 82px !important;
  min-height: 82px;
  padding: 0 !important;
  overflow: hidden;
  border: 1px solid #d7e1ef;
  border-radius: 8px;
  background: #f8fafc;
  color: #94a3b8;
  font-size: 12px;
  font-weight: 800;
  cursor: zoom-in;
  line-height: 1;
}

.inventory-material-bind-selected-image img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.inventory-material-bind-selected-image.placeholder {
  cursor: default;
}

.inventory-material-bind-selected strong,
.inventory-material-bind-selected span {
  display: block;
}

.inventory-material-bind-selected strong {
  color: #111827;
  font-size: 14px;
}

.inventory-material-bind-selected span {
  margin-top: 4px;
  color: #64748b;
  font-size: 12px;
}

@media (max-width: 640px) {
  .inventory-material-bind-product {
    grid-template-columns: 1fr;
  }

  .inventory-material-bind-image {
    width: min(220px, 100%) !important;
    min-width: 0;
    height: auto !important;
    min-height: 0;
    aspect-ratio: 1 / 1;
  }

  .inventory-material-bind-selected {
    grid-template-columns: 72px minmax(0, 1fr);
  }

  .inventory-material-bind-selected-image {
    width: 72px !important;
    min-width: 72px;
    height: 72px !important;
    min-height: 72px;
  }
}

.inventory-owner-shop-ranking {
  display: grid;
  gap: 10px;
  margin-top: 12px;
  padding: 12px;
  border: 1px solid #dbe3ef;
  border-radius: 8px;
  background: #fff;
}

.inventory-trend-owner-ranking-workspace .inventory-owner-shop-ranking {
  margin-top: 0;
}

.inventory-trend-owner-ranking-toolbar {
  display: flex;
  justify-content: flex-start;
}

.inventory-owner-shop-ranking header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.inventory-owner-shop-ranking header div {
  display: grid;
  gap: 2px;
}

.inventory-owner-shop-ranking header strong {
  font-size: 15px;
  color: #111827;
}

.inventory-owner-shop-ranking header span,
.inventory-owner-shop-ranking td span {
  color: #64748b;
  font-size: 12px;
}

.inventory-owner-shop-ranking table {
  width: 100%;
  border-collapse: collapse;
}

.inventory-owner-shop-ranking th,
.inventory-owner-shop-ranking td {
  padding: 8px 10px;
  border-bottom: 1px solid #edf1f7;
  text-align: left;
  vertical-align: middle;
}

.inventory-owner-shop-ranking td:first-child,
.inventory-owner-shop-ranking th:first-child,
.inventory-owner-shop-ranking td:nth-child(n+4),
.inventory-owner-shop-ranking th:nth-child(n+4) {
  text-align: center;
}

.inventory-owner-shop-ranking td:nth-child(2) {
  min-width: 180px;
}

.inventory-owner-shop-ranking td:nth-child(2) strong,
.inventory-owner-shop-ranking td:nth-child(2) span {
  display: block;
}

.inventory-owner-shop-row {
  cursor: pointer;
}

.inventory-owner-shop-row:hover {
  background: #f8fbff;
}

.inventory-owner-shop-rank-no {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 999px;
  background: #eef4ff;
  color: #2563eb !important;
  font-weight: 900;
}

.inventory-owner-shop-bar {
  width: min(180px, 100%);
  height: 6px;
  margin-bottom: 4px;
  overflow: hidden;
  border-radius: 999px;
  background: #e5e7eb;
}

.inventory-owner-shop-bar i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: #16a34a;
}

.inventory-owner-shop-detail-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.inventory-owner-shop-detail-summary span {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 4px 10px;
  border: 1px solid #dbeafe;
  border-radius: 999px;
  background: #eff6ff;
  color: #1e3a8a;
  font-size: 12px;
  font-weight: 800;
}

.inventory-material-usage-modal {
  display: grid;
  gap: 12px;
}

.inventory-material-usage-modal > header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 11px 12px;
  border: 1px solid #dbe3ef;
  border-radius: 7px;
  background: #f8fafc;
}

.inventory-material-usage-modal > header > div:first-child {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.inventory-material-usage-modal > header span {
  color: #667085;
  font-size: 11px;
}

.inventory-material-usage-modal > header > div:first-child strong {
  overflow: hidden;
  color: #344054;
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.inventory-material-month-summary {
  display: flex;
  align-items: baseline;
  flex: 0 0 auto;
  gap: 7px;
}

.inventory-material-month-summary strong {
  color: #dc2626;
  font-size: 22px;
}

.inventory-material-usage-table-wrap {
  overflow: auto;
  border: 1px solid #dbe3ef;
  border-radius: 7px;
}

.inventory-material-usage-modal table {
  width: 100%;
  min-width: 650px;
  table-layout: fixed;
}

.inventory-material-usage-modal th,
.inventory-material-usage-modal td {
  padding: 9px 10px;
  text-align: center;
  vertical-align: middle;
}

.inventory-material-usage-modal th:first-child,
.inventory-material-usage-modal td:first-child {
  width: 34%;
  text-align: left;
}

.inventory-material-usage-name {
  display: flex;
  align-items: center;
  gap: 9px;
  min-width: 0;
}

.inventory-material-usage-name img,
.inventory-material-usage-placeholder {
  display: grid;
  flex: 0 0 44px;
  width: 44px;
  height: 44px;
  border: 1px solid #dbe3ef;
  border-radius: 6px;
  object-fit: contain;
  color: #98a2b3;
  background: #fff;
  font-size: 10px;
  place-items: center;
}

.inventory-material-usage-name > div {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.inventory-material-usage-name strong,
.inventory-material-usage-name span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.inventory-material-usage-name span {
  color: #667085;
  font-size: 11px;
}

.inventory-material-current-stock {
  color: #067647;
}

.inventory-material-shelf,
.inventory-material-month-used {
  color: #dc2626;
}

@media (max-width: 640px) {
  .inventory-material-usage-modal > header {
    align-items: flex-start;
    flex-direction: column;
  }
}

/* Inventory replenishment-cycle details */
.batch-cycle-btn {
  border-color: #a78bfa !important;
  color: #6d28d9 !important;
  background: #f5f3ff !important;
}

.batch-cycle-btn:hover {
  border-color: #7c3aed !important;
  color: #5b21b6 !important;
  background: #ede9fe !important;
}

.batch-new-product-btn {
  position: relative;
  z-index: 1;
  overflow: visible !important;
  padding-left: 26px !important;
  padding-right: 26px !important;
  text-align: center;
  border-color: #f59e0b !important;
  color: #b45309 !important;
  background: #fffbeb !important;
}

.batch-new-product-btn.has-new-products {
  border-color: #f97316 !important;
  color: #9a3412 !important;
  background: #fff7ed !important;
  box-shadow: 0 0 0 2px rgba(249, 115, 22, .14), 0 4px 12px rgba(249, 115, 22, .18);
}

.batch-new-product-count {
  position: absolute;
  z-index: 4;
  top: 2px;
  right: 4px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  height: 18px;
  padding: 0 4px;
  border: 1px solid #fff;
  border-radius: 999px;
  color: #fff;
  background: #ef4444;
  box-shadow: 0 0 0 2px rgba(239, 68, 68, .14), 0 2px 6px rgba(239, 68, 68, .3);
  font-size: 10px;
  font-weight: 950;
  line-height: 1;
  pointer-events: none;
  animation: inventory-new-product-badge-glow 1.8s ease-in-out infinite;
}

@keyframes inventory-new-product-badge-glow {
  0%, 100% { box-shadow: 0 0 0 2px rgba(239, 68, 68, .12), 0 2px 6px rgba(239, 68, 68, .28); }
  50% { box-shadow: 0 0 0 4px rgba(239, 68, 68, .07), 0 3px 9px rgba(239, 68, 68, .38); }
}

.batch-new-product-btn:hover {
  border-color: #d97706 !important;
  color: #92400e !important;
  background: #fef3c7 !important;
}

#modal:has(.inventory-new-product-list) {
  width: min(1680px, calc(100vw - 8px));
  height: calc(100dvh - 8px);
  max-height: calc(100dvh - 8px);
}

#modal:has(.inventory-new-product-list) .modal-box {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  height: 100%;
  max-height: inherit;
}

#modal:has(.inventory-new-product-list) #modalBody {
  min-height: 0;
  overflow: auto;
  padding: 18px 24px;
}

#modal:has(.inventory-new-product-form) {
  width: min(860px, calc(100vw - 34px));
}

.inventory-new-product-loading {
  min-height: 180px;
  display: grid;
  place-items: center;
  color: #667085;
}

.inventory-new-product-list {
  display: grid;
  grid-template-rows: auto auto auto minmax(0, 1fr);
  gap: 10px;
  min-height: 100%;
}

.inventory-new-product-list > .table-wrap {
  min-height: 0;
  overflow: auto;
}

.inventory-new-product-list table {
  min-width: 1120px;
}

.inventory-new-product-list th,
.inventory-new-product-list td {
  vertical-align: middle;
}

.inventory-new-product-list th:not(:first-child),
.inventory-new-product-list td:not(:first-child) {
  text-align: center;
}

.inventory-new-product-list td.actions {
  display: table-cell;
  text-align: center;
}

.inventory-new-product-list td.actions button {
  margin-inline: 3px;
}

.inventory-new-product-list > header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.inventory-new-product-list > header > div {
  display: grid;
  gap: 4px;
}

.inventory-new-product-list > header strong {
  font-size: 18px;
}

.inventory-new-product-list > header p {
  margin: 0;
  color: #667085;
}

.inventory-new-product-header-actions,
.inventory-new-product-filters {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.inventory-new-product-list > header > .inventory-new-product-header-actions {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
}

.inventory-new-product-list button.inventory-new-product-development-filter {
  position: relative;
  overflow: visible;
  border: 1px solid #22c55e;
  color: #15803d;
  background: #f0fdf4;
}

.inventory-new-product-list button.inventory-new-product-development-filter.has-development-products {
  padding-right: 26px;
  box-shadow: 0 0 0 2px rgba(34, 197, 94, .12), 0 4px 12px rgba(22, 163, 74, .14);
}

.inventory-new-product-development-count {
  position: absolute;
  z-index: 4;
  top: -7px;
  right: -7px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  height: 18px;
  padding: 0 4px;
  border: 1px solid #fff;
  border-radius: 999px;
  color: #fff;
  background: #ef4444;
  box-shadow: 0 0 0 2px rgba(239, 68, 68, .14), 0 2px 6px rgba(239, 68, 68, .3);
  font-size: 10px;
  font-weight: 950;
  line-height: 1;
  pointer-events: none;
  animation: inventory-new-product-badge-glow 1.8s ease-in-out infinite;
}

.inventory-new-product-list button.inventory-new-product-development-filter:hover,
.inventory-new-product-list button.inventory-new-product-development-filter.active {
  border-color: #16a34a;
  color: #fff;
  background: #22c55e;
}

.inventory-new-product-filters {
  padding: 10px 12px;
  border: 1px solid #dbe4f0;
  border-radius: 12px;
  background: #f8fafc;
}

.inventory-new-product-filters label {
  display: grid;
  gap: 5px;
  width: auto;
  min-width: 0;
  color: #475467;
  font-size: 12px;
  font-weight: 850;
}

.inventory-new-product-filters label:first-child,
.inventory-new-product-filters label:first-child .custom-select-shell {
  width: min(260px, 100%);
}

.inventory-new-product-filters label:nth-child(2),
.inventory-new-product-filters label:nth-child(2) .custom-select-shell {
  width: min(180px, 100%);
}

.inventory-new-product-filters .custom-select-trigger {
  min-height: 38px;
  padding: 7px 10px;
}

.inventory-new-product-filters .custom-select-menu,
.inventory-new-product-filters .custom-select-menu-floating {
  min-width: max(260px, 100%);
  width: max-content;
  max-width: min(460px, calc(100vw - 28px));
}

.inventory-new-product-filters .custom-select-option {
  white-space: nowrap;
}

.inventory-new-product-filters label {
  color: #475467;
  font-size: 12px;
  font-weight: 850;
}

.inventory-new-product-filters select {
  min-height: 38px;
  background: #fff;
}

.inventory-new-product-filters > span {
  margin-left: auto;
  color: #667085;
  font-size: 12px;
  font-weight: 800;
}

.inventory-new-product-rule,
.inventory-new-product-form-note {
  padding: 11px 13px;
  border: 1px solid #fcd34d;
  border-radius: 12px;
  color: #92400e;
  background: #fffbeb;
}

.inventory-new-product-form-note {
  grid-column: 1 / -1;
}

.inventory-new-product-name,
.inventory-new-product-summary {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.inventory-new-product-name > div:last-child,
.inventory-new-product-summary > div:last-child {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.inventory-new-product-name span,
.inventory-new-product-summary span {
  color: #667085;
  font-size: 12px;
}

.inventory-new-product-pending {
  display: inline-flex;
  padding: 4px 9px;
  border-radius: 999px;
  color: #b45309;
  background: #fef3c7;
  font-weight: 800;
}

.inventory-new-product-quantity {
  color: #047857;
}

.inventory-new-product-quantity-form {
  max-width: 620px;
}

@media (max-width: 720px) {
  .inventory-new-product-list > header {
    align-items: stretch;
    flex-direction: column;
  }

  .inventory-new-product-list > header > .inventory-new-product-header-actions {
    flex-wrap: wrap;
    justify-content: flex-start;
  }

  .inventory-new-product-filters > span {
    width: 100%;
    margin-left: 0;
  }
}

#modal:has(.replenishment-cycle-modal) {
  width: min(1500px, calc(100vw - 34px));
}

.replenishment-cycle-modal {
  display: grid;
  gap: 13px;
  min-width: 0;
}

.replenishment-cycle-loading,
.replenishment-cycle-empty {
  padding: 34px 18px;
  color: #667085;
  text-align: center;
  font-weight: 800;
}

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

.replenishment-cycle-summary-card {
  display: grid;
  gap: 6px;
  min-width: 0;
  border: 1px solid #dbe4f0;
  border-left: 5px solid #2563eb;
  border-radius: 9px;
  padding: 13px 15px;
  background: #f8fbff;
}

.replenishment-cycle-summary-card.sea {
  border-left-color: #0f8a79;
  background: #f0fdfa;
}

.replenishment-cycle-summary-card > span {
  color: #475467;
  font-size: 12px;
  font-weight: 850;
}

.replenishment-cycle-summary-card > strong {
  color: #101828;
  font-size: 23px;
  line-height: 1.15;
}

.replenishment-cycle-summary-card > div {
  display: flex;
  gap: 18px;
  color: #475467;
}

.replenishment-cycle-summary-card p {
  margin: 0;
  color: #f97316;
  font-size: 13px;
  font-weight: 900;
}

.replenishment-cycle-summary-card.sea p {
  color: #f97316;
}

.replenishment-cycle-filters {
  display: grid;
  grid-template-columns: auto minmax(220px, 300px) minmax(260px, 1fr) auto;
  align-items: end;
  gap: 10px;
  border: 1px solid #dbe4f0;
  border-radius: 9px;
  padding: 10px;
  background: #f8fafc;
}

.replenishment-cycle-filters > label {
  display: grid;
  gap: 5px;
  min-width: 0;
  color: #475467;
  font-size: 11px;
  font-weight: 850;
}

.replenishment-cycle-tabs {
  display: flex;
  align-items: center;
  gap: 6px;
}

.replenishment-cycle-tabs button {
  min-height: 38px;
  border-color: #c8d6ec;
  padding: 7px 16px;
  color: #344054;
  background: #fff;
}

.replenishment-cycle-tabs button.active {
  border-color: #2563eb;
  color: #fff;
  background: #2563eb;
}

.replenishment-cycle-result-count {
  align-self: center;
  color: #475467;
  white-space: nowrap;
  font-size: 12px;
}

.replenishment-cycle-table-wrap {
  max-height: min(62vh, 720px);
  overflow: auto;
  border: 1px solid #dbe4f0;
  border-radius: 9px;
}

.replenishment-cycle-table {
  width: 100%;
  min-width: 980px;
  border-collapse: separate;
  border-spacing: 0;
}

.replenishment-cycle-table thead {
  position: sticky;
  z-index: 2;
  top: 0;
}

.replenishment-cycle-table th,
.replenishment-cycle-table td {
  padding: 10px 11px;
  text-align: left;
  vertical-align: middle;
}

.replenishment-cycle-table th {
  color: #344054;
  background: #f2f6fb;
  font-size: 12px;
}

.replenishment-cycle-table td {
  border-top: 1px solid #e4eaf2;
  color: #344054;
  font-size: 12px;
}

.replenishment-cycle-table td small,
.replenishment-cycle-product small {
  display: block;
  margin-top: 3px;
  color: #667085;
  font-size: 11px;
}

.replenishment-cycle-product {
  min-width: 220px;
}

.replenishment-cycle-product-main {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.replenishment-cycle-product-main > div {
  min-width: 0;
}

.replenishment-cycle-thumb {
  flex: 0 0 54px;
  width: 54px;
  height: 54px;
  border: 1px solid #d9e2ef;
  border-radius: 8px;
  object-fit: contain;
  background: #fff;
}

.replenishment-cycle-thumb.placeholder {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #98a2b3;
  font-size: 11px;
  font-weight: 800;
  background: #f8fafc;
}

.replenishment-product-cycle {
  display: grid;
  gap: 4px;
  min-width: 245px;
  border-left: 3px solid #2563eb;
  border-radius: 6px;
  padding: 8px 10px;
  background: #f5f9ff;
}

.replenishment-product-cycle.sea {
  border-left-color: #0f8a79;
  background: #f0fdfa;
}

.replenishment-product-cycle > div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.replenishment-product-cycle > strong {
  color: #f97316;
  font-size: 14px;
}

.replenishment-cycle-interval {
  color: #6941c6 !important;
  font-weight: 900;
}

.replenishment-cycle-none {
  min-width: 220px;
  color: #98a2b3;
  text-align: center;
  font-size: 12px;
}

.replenishment-transport-badge,
.replenishment-cycle-status {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  border-radius: 999px;
  padding: 4px 9px;
  white-space: nowrap;
  font-size: 11px;
  font-weight: 900;
}

.replenishment-transport-badge.air {
  color: #1d4ed8;
  background: #dbeafe;
}

.replenishment-transport-badge.sea {
  color: #087f5b;
  background: #d5f3ed;
}

.replenishment-cycle-status.completed {
  color: #067647;
  background: #dcfae6;
}

.replenishment-cycle-status.in_progress {
  color: #b54708;
  background: #fef0c7;
}

.replenishment-cycle-duration {
  color: #6941c6;
  white-space: nowrap;
}

@media (max-width: 980px) {
  .replenishment-cycle-filters {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .replenishment-cycle-tabs,
  .replenishment-cycle-keyword {
    grid-column: 1 / -1;
  }

  .replenishment-cycle-result-count {
    justify-self: end;
  }
}

@media (max-width: 640px) {
  #modal:has(.replenishment-cycle-modal) {
    width: calc(100vw - 18px);
  }

  .replenishment-cycle-summary,
  .replenishment-cycle-filters {
    grid-template-columns: 1fr;
  }

  .replenishment-cycle-tabs,
  .replenishment-cycle-keyword {
    grid-column: auto;
  }

  .replenishment-cycle-result-count {
    justify-self: start;
  }
}

/* Final purchase-note color override for desktop, tablet mode, and saving state. */
#purchaseView td.purchase-note,
td.purchase-note {
  color: var(--danger) !important;
}

#purchaseView td.purchase-note > .purchase-note-input,
#purchaseView td.purchase-note > .purchase-note-input.saving,
td.purchase-note > .purchase-note-input,
td.purchase-note > .purchase-note-input.saving,
html.tablet-desktop-mode #purchaseView td.purchase-note > .purchase-note-input,
html.tablet-desktop-mode #purchaseView td.purchase-note > .purchase-note-input.saving {
  color: var(--danger) !important;
  -webkit-text-fill-color: var(--danger) !important;
}

#purchaseView td.purchase-note > .purchase-note-input::placeholder,
td.purchase-note > .purchase-note-input::placeholder,
html.tablet-desktop-mode #purchaseView td.purchase-note > .purchase-note-input::placeholder {
  color: #94a3b8 !important;
  -webkit-text-fill-color: #94a3b8 !important;
  opacity: 1;
}

/* Keep OCR-created batch-out products on their own full-width grid. */
#modal .batch-out-form .batch-form-line.batch-out-new-line,
html.tablet-desktop-mode #modal .batch-out-form .batch-form-line.batch-out-new-line {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
}

#modal .batch-out-form .batch-out-new-line > .batch-new-product-fields,
html.tablet-desktop-mode #modal .batch-out-form .batch-out-new-line > .batch-new-product-fields {
  width: 100%;
  min-width: 0;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

@media (max-width: 1280px) {
  #modal .batch-out-form .batch-form-line.batch-out-new-line,
  html.tablet-desktop-mode #modal .batch-out-form .batch-form-line.batch-out-new-line {
    grid-template-columns: minmax(0, 1fr);
  }

  #modal .batch-out-form .batch-out-new-line > .batch-out-remove,
  html.tablet-desktop-mode #modal .batch-out-form .batch-out-new-line > .batch-out-remove {
    width: auto;
    min-width: 120px;
    max-width: 180px;
    justify-self: end;
  }
}

@media (max-width: 900px) {
  #modal .batch-out-form .batch-out-new-line > .batch-new-product-fields,
  html.tablet-desktop-mode #modal .batch-out-form .batch-out-new-line > .batch-new-product-fields {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  #modal .batch-out-form .batch-out-new-line .batch-new-image-field,
  html.tablet-desktop-mode #modal .batch-out-form .batch-out-new-line .batch-new-image-field {
    grid-column: 1 / -1;
  }
}

@media (max-width: 560px) {
  #modal .batch-out-form .batch-out-new-line > .batch-new-product-fields,
  html.tablet-desktop-mode #modal .batch-out-form .batch-out-new-line > .batch-new-product-fields {
    grid-template-columns: minmax(0, 1fr);
  }

  #modal .batch-out-form .batch-out-new-line .batch-new-image-field,
  #modal .batch-out-form .batch-out-new-line .batch-new-fnsku-confirm,
  html.tablet-desktop-mode #modal .batch-out-form .batch-out-new-line .batch-new-image-field,
  html.tablet-desktop-mode #modal .batch-out-form .batch-out-new-line .batch-new-fnsku-confirm {
    grid-column: 1;
  }

  #modal .batch-out-form .batch-out-new-line > .batch-out-remove,
  html.tablet-desktop-mode #modal .batch-out-form .batch-out-new-line > .batch-out-remove {
    width: 100%;
    max-width: none;
  }
}

/* Batch header direct-purchase summary. */
#jobsView .batch-direct-purchase-summary,
html.tablet-desktop-mode #jobsView .batch-direct-purchase-summary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  min-width: 88px;
  height: 26px;
  padding: 0 10px;
  border: 1px solid #fed7aa;
  border-radius: 999px;
  background: #fff7ed;
  color: #c2410c;
  font-size: 12px;
  font-weight: 900;
  line-height: 1;
  white-space: nowrap;
}

#jobsView .batch-direct-purchase-summary strong,
html.tablet-desktop-mode #jobsView .batch-direct-purchase-summary strong {
  color: #ea580c;
  font-size: 13px;
  font-weight: 950;
}

/* Shein platform module. */
.shein-platform-page {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.shein-filter-row {
  margin-bottom: 10px;
  grid-template-columns: minmax(180px, 220px) minmax(180px, 220px) minmax(240px, 360px) auto minmax(0, 1fr);
  align-items: end;
  justify-content: start;
}

.shein-filter-row label {
  min-width: 0;
  width: 100%;
}

.shein-filter-row input,
.shein-form input,
.shein-form select,
.shein-form textarea {
  min-height: 40px;
  border: 1px solid #cbd5e1;
  border-radius: var(--radius-md);
  background: #fff;
  padding: 9px 11px;
  color: var(--text);
  font: inherit;
  box-shadow: inset 0 1px 0 rgba(15, 23, 42, .02);
}

.shein-dimension-parts {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
}

.shein-dimension-part {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: stretch;
  flex: 1 1 0;
  min-width: 0;
  overflow: hidden;
  border: 1px solid #cbd5e1;
  border-radius: var(--radius-md);
  background: #fff;
}

.shein-dimension-part:focus-within {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, .12);
}

.shein-form .shein-dimension-part input {
  min-width: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  padding-inline: 6px;
  text-align: center;
}

.shein-dimension-part > b {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 6px;
  border-left: 1px solid #e2e8f0;
  background: #f8fafc;
  color: #475569;
  font-size: 11px;
  font-weight: 900;
}

.shein-dimension-multiply {
  flex: 0 0 auto;
  color: #64748b;
  font-weight: 900;
}

.shein-product-spec-box {
  display: grid;
  gap: 8px;
  padding: 8px;
  border: 1px solid #cbd5e1;
  border-radius: var(--radius-md);
  background: #f8fafc;
}

.shein-product-form-columns {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: stretch;
  gap: 12px;
}

dialog:has(.shein-product-edit-form) {
  width: min(860px, calc(100vw - 24px));
}

.shein-product-form-column {
  display: grid;
  align-content: space-between;
  gap: 12px;
  min-width: 0;
}

.shein-product-form-pair {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: start;
  gap: 12px;
  min-width: 0;
}

.shein-product-spec-row {
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr);
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.shein-product-spec-row > span {
  color: #475569;
  font-size: 12px;
  font-weight: 800;
  text-align: center;
}

.shein-product-spec-auto-row .shein-dimension-part {
  background: #f1f5f9;
}

.shein-product-spec-auto-row .shein-dimension-part input {
  color: #475569;
  cursor: default;
}

.shein-product-spec-display {
  display: grid;
  gap: 2px;
  justify-items: start;
  line-height: 1.35;
  white-space: nowrap;
}

.shein-product-spec-cell {
  vertical-align: middle;
}

.shein-form .shein-product-spec-box .shein-dimension-part input {
  min-height: 34px;
  appearance: textfield;
  -moz-appearance: textfield;
}

.shein-form .shein-product-spec-box .shein-dimension-part input::-webkit-inner-spin-button,
.shein-form .shein-product-spec-box .shein-dimension-part input::-webkit-outer-spin-button {
  margin: 0;
  -webkit-appearance: none;
}

.batch-new-product-line .shein-dimension-field {
  grid-column: span 2;
}

.batch-new-product-line .shein-product-spec-field {
  grid-column: span 2;
}

.shein-filter-actions {
  display: inline-flex;
  gap: 8px;
}

.shein-product-type-field {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 64px;
  align-items: stretch;
  gap: 6px;
  width: 100%;
  max-width: 100%;
  min-width: 0;
}

.shein-product-type-field > .ghost {
  width: 64px;
  min-width: 64px;
  max-width: 64px;
  height: 40px;
  min-height: 40px;
  max-height: 40px;
  padding-inline: 0;
  white-space: nowrap;
}

.shein-product-type-field > select,
.shein-product-type-field > .custom-select-shell,
.shein-product-type-field > .custom-select-shell > .custom-select-trigger {
  width: 100% !important;
  max-width: 100% !important;
  height: 40px !important;
  min-height: 40px !important;
  max-height: 40px !important;
}

.shein-action-row {
  display: flex;
  grid-column: 1 / -1;
  gap: 6px;
  align-items: center;
  flex-wrap: wrap;
  overflow-x: auto;
  padding-bottom: 2px;
}

.shein-action-row .inventory-batch-btn {
  border-radius: var(--radius-lg);
}

/* Keep the standalone platform inventory actions consistent with system inventory. */
.shein-platform-page .shein-action-row {
  column-gap: 4px !important;
  row-gap: 6px !important;
}

.shein-platform-page .shein-action-row .inventory-batch-btn {
  border-radius: var(--radius-lg) !important;
  color: #344054 !important;
  box-shadow: 0 1px 2px rgba(16, 24, 40, .06);
}

.shein-platform-page .shein-action-row .batch-replenish-btn {
  border-color: #93c5fd !important;
  background: #eff6ff !important;
  color: #1d4ed8 !important;
}

.shein-platform-page .shein-action-row .batch-replenish-btn:hover {
  background: #dbeafe !important;
}

.shein-platform-page .shein-action-row .batch-out-btn {
  border-color: #fdba74 !important;
  background: #fff7ed !important;
  color: #c2410c !important;
}

.shein-platform-page .shein-action-row .batch-out-btn:hover {
  background: #ffedd5 !important;
}

.shein-platform-page .shein-action-row .batch-stock-btn {
  border-color: #86efac !important;
  background: #ecfdf3 !important;
  color: #067647 !important;
}

.shein-platform-page .shein-action-row .batch-stock-btn:hover {
  background: #dcfce7 !important;
}

.shein-platform-page .shein-action-row .batch-add-products-btn {
  border-color: #c4b5fd !important;
  background: #f5f3ff !important;
  color: #6d28d9 !important;
}

.shein-platform-page .shein-action-row .batch-add-products-btn:hover {
  background: #ede9fe !important;
}

.shein-platform-page .shein-action-row .batch-in-btn {
  border-color: #5eead4 !important;
  background: #f0fdfa !important;
  color: #0f766e !important;
}

.shein-platform-page .shein-action-row .batch-in-btn:hover {
  background: #ccfbf1 !important;
}

.shein-platform-page .shein-action-row .batch-moves-btn {
  border-color: #a5d8e6 !important;
  background: #ecfeff !important;
  color: #0e7490 !important;
}

.shein-platform-page .shein-action-row .batch-moves-btn:hover {
  background: #cffafe !important;
}

.shein-summary-grid {
  margin-top: 0;
}

.shein-summary-card,
.shein-table-wrap {
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: #fff;
}

.shein-summary-grid .shein-summary-card {
  cursor: default;
}

.shein-table-wrap {
  overflow: auto;
  margin-top: 0;
  min-height: 0;
}

.shein-table {
  width: 100%;
  min-width: 2290px;
  border-collapse: collapse;
  table-layout: fixed;
}

.shein-table th:nth-child(2),
.shein-table td:nth-child(2) { width: 360px; }
.shein-table th:nth-child(3),
.shein-table td:nth-child(3),
.shein-table th:nth-child(4),
.shein-table td:nth-child(4),
.shein-table th:nth-child(5),
.shein-table td:nth-child(5) { width: 170px; }
.shein-table th:nth-child(6),
.shein-table td:nth-child(6) { width: 160px; }
.shein-table th:nth-child(7),
.shein-table td:nth-child(7) { width: 190px; }
.shein-table th:nth-child(8),
.shein-table td:nth-child(8) { width: 180px; }
.shein-table th:nth-child(9),
.shein-table td:nth-child(9),
.shein-table th:nth-child(10),
.shein-table td:nth-child(10),
.shein-table th:nth-child(11),
.shein-table td:nth-child(11) { width: 100px; }
.shein-table th:nth-child(12),
.shein-table td:nth-child(12) { width: 180px; }

.shein-table th,
.shein-table td {
  padding: 7px 10px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: middle;
  font-size: 13px;
}

.shein-table tbody td {
  padding-top: 9px;
  padding-bottom: 9px;
}

.shein-table .batch-product-thumb {
  width: 68px;
  height: 68px;
  flex: 0 0 68px;
}

.shein-product-cell-inner {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.shein-product-name,
.shein-table .shein-text-cell,
.shein-table .shein-code-cell {
  min-width: 0;
  white-space: normal;
  overflow-wrap: anywhere;
  word-break: break-word;
  line-height: 1.45;
}

.shein-product-name {
  display: block;
  flex: 1 1 auto;
  max-width: 100%;
  overflow-wrap: break-word;
  word-break: normal;
}

.shein-table .shein-code-cell {
  font-family: ui-monospace, SFMono-Regular, Consolas, "Liberation Mono", monospace;
}

.shein-upload-time-cell {
  white-space: nowrap;
  color: #475467;
  font-variant-numeric: tabular-nums;
}

.shein-package-dimensions {
  display: grid;
  gap: 3px;
  min-width: 0;
  justify-items: center;
}

.shein-package-dimensions span {
  min-width: 0;
  overflow-wrap: anywhere;
}

.shein-table th.shein-dimension-column,
.shein-table td.shein-dimension-column {
  text-align: center;
}

.shein-table th {
  background: var(--surface-muted);
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.shein-table th.check-cell,
.shein-table td.check-cell {
  width: 42px;
  min-width: 42px;
  max-width: 42px;
  padding: 6px 4px;
  text-align: center;
}

.shein-table th.check-cell input[type="checkbox"],
.shein-table td.check-cell input[type="checkbox"] {
  width: 16px;
  height: 16px;
  min-height: 16px;
  padding: 0;
  margin: 0 auto;
  display: block;
}

.shein-table .empty {
  padding: 10px;
  height: 38px;
  color: var(--muted);
}

.shein-table tbody tr:hover {
  background: #f8fbff;
}

.shein-table th.shein-actions-cell,
.shein-table td.shein-actions-cell {
  width: 340px;
  min-width: 340px;
}

.shein-row-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}

.shein-row-actions .ghost,
.shein-row-actions .danger-btn {
  flex: 0 0 auto;
}

.shein-product-link {
  appearance: none;
  border: 0;
  background: transparent;
  padding: 0;
  color: var(--primary);
  font: inherit;
  font-weight: 900;
  text-align: left;
  cursor: pointer;
}

.shein-product-link:hover {
  color: var(--primary-dark);
  text-decoration: underline;
}

.shein-stock-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 58px;
  min-height: 30px;
  padding: 4px 12px;
  border: 1px solid rgba(37, 99, 235, .28);
  border-radius: 999px;
  background: #f8fbff;
  color: var(--primary-dark);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .65);
}

.shein-stock-link:hover {
  border-color: rgba(37, 99, 235, .5);
  background: #eef6ff;
  box-shadow: 0 2px 8px rgba(37, 99, 235, .12);
  text-decoration: none;
}

.shein-detail-modal {
  display: grid;
  gap: 12px;
  width: 100%;
  min-width: 0;
  overflow-x: hidden;
}

#modal:has(.shein-detail-modal) {
  width: min(1320px, calc(100vw - 16px)) !important;
  max-width: calc(100vw - 16px) !important;
  padding: 0 !important;
  overflow-x: hidden !important;
}

#modal:has(.shein-detail-modal) .modal-box {
  width: 100% !important;
  max-width: none !important;
  min-width: 0 !important;
  margin-inline: auto !important;
}

#modal:has(.shein-detail-modal) .modal-box > header,
#modal:has(.shein-detail-modal) .modal-box > footer,
#modal:has(.shein-detail-modal) #modalBody {
  width: 100%;
  box-sizing: border-box;
}

#modal:has(.shein-detail-modal) #modalBody {
  max-height: min(72vh, 760px);
  width: 100%;
  overflow-y: auto !important;
  overflow-x: hidden !important;
  padding-inline: 16px;
}

.shein-detail-filter {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.shein-detail-filter .date-segmented {
  margin: 0;
}

.shein-detail-custom-date {
  display: block;
}

.shein-detail-custom-date label {
  display: grid;
  gap: 4px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.shein-detail-range-field {
  width: max-content;
}

.shein-detail-range-inputs {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 34px;
  padding: 4px 8px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: #f8fbff;
}

.shein-detail-custom-date input {
  width: 132px;
  min-height: 26px;
  border: 0;
  border-radius: 0;
  padding: 2px 0;
  background: transparent;
  color: var(--text);
  font: inherit;
}

.shein-detail-range-inputs em {
  color: var(--muted);
  font-style: normal;
  font-weight: 900;
}

.shein-detail-head {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 8px;
}

.shein-detail-head > div {
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: #f8fbff;
  padding: 9px 10px;
  min-width: 0;
}

.shein-detail-head span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.shein-detail-head strong {
  display: block;
  margin-top: 3px;
  color: var(--text);
  font-size: 15px;
}

#sheinProductShipmentDetail .shein-detail-head span {
  text-align: center;
}

#sheinProductShipmentDetail .shein-detail-head > div > strong {
  font-size: 18px;
  text-align: center;
}

#sheinProductShipmentDetail .shein-detail-product-title {
  justify-content: center;
}

.shein-detail-product-title {
  display: flex !important;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.shein-detail-product-title span {
  min-width: 0;
  overflow-wrap: anywhere;
}

.shein-detail-head-thumb,
.shein-detail-thumb {
  width: 42px;
  height: 42px;
  flex: 0 0 42px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: #fff;
  object-fit: contain;
}

.shein-detail-head-thumb.placeholder,
.shein-detail-thumb.placeholder {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.shein-detail-table td .shein-detail-thumb {
  display: inline-flex;
  vertical-align: middle;
}

.shein-platform-product-stats .shein-detail-table td:first-child {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  align-items: center;
  gap: 8px;
}

.shein-platform-product-copy {
  display: inline-flex;
  align-items: baseline;
  gap: 8px;
  min-width: 0;
}

.shein-platform-product-stats .shein-detail-table td:first-child small {
  margin-top: 0;
}

#sheinStatsDetail .shein-detail-table-wrap.shein-platform-outbound-summary-wrap {
  height: max-content !important;
  min-height: max-content !important;
  max-height: none !important;
  overflow: visible !important;
  flex: 0 0 auto;
}

.shein-platform-product-summary-wrap {
  overflow-x: auto !important;
}

.shein-platform-product-summary-table {
  min-width: 900px;
}

.shein-platform-product-summary-table .shein-platform-summary-product-col {
  width: 32%;
}

.shein-platform-product-summary-table .shein-platform-summary-quantity-col {
  width: 23%;
}

.shein-platform-product-summary-table .shein-platform-summary-count-col {
  width: 20%;
}

.shein-platform-product-summary-table .shein-platform-summary-time-col {
  width: 25%;
}

.shein-platform-product-summary-table th:last-child,
.shein-platform-product-summary-table td:last-child {
  white-space: nowrap;
}

.shein-platform-product-summary-cell {
  min-width: 0;
}

.shein-platform-product-summary-cell .shein-platform-product-copy {
  display: grid;
  align-content: center;
  gap: 3px;
}

.shein-platform-product-summary-cell .shein-platform-product-copy strong,
.shein-platform-product-summary-cell .shein-platform-product-copy small {
  min-width: 0;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.shein-detail-table-wrap {
  max-height: 420px;
  width: 100%;
  min-width: 0;
  overflow-x: hidden !important;
  overflow-y: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
}

.shein-detail-table {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  border-collapse: collapse;
  table-layout: fixed;
}

.shein-detail-table th,
.shein-detail-table td {
  padding: 8px 10px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  font-size: 13px;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.shein-detail-table th {
  background: var(--surface-muted);
  color: var(--muted);
  font-weight: 900;
}

.shein-detail-table td small {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: 12px;
}

.shein-platform-product-stats {
  display: grid;
  gap: 8px;
}

.shein-platform-product-stats-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.shein-platform-product-stats-head strong {
  font-size: 15px;
}

.shein-platform-product-stats-head span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.shein-current-platform-badge {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 4px 10px;
  border: 1px solid rgba(37, 99, 235, .35);
  border-radius: 999px;
  background: #eff6ff;
  color: var(--primary-dark) !important;
  font-size: 14px !important;
  font-weight: 900 !important;
}

.shein-summary-switch-btn {
  min-height: 34px;
  border-color: rgba(37, 99, 235, .4) !important;
  background: #eff6ff !important;
  color: var(--primary-dark) !important;
  font-weight: 900;
}

.shein-summary-switch-btn:hover {
  background: #dbeafe !important;
}

.shein-edit-image-preview {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--surface-muted);
}

.shein-purchase-product-list {
  display: grid;
  gap: 10px;
  max-height: 340px;
  overflow: auto;
  padding-right: 2px;
}

.shein-purchase-product-card {
  display: grid;
  grid-template-columns: 76px minmax(0, 1fr) minmax(120px, 150px);
  align-items: center;
  gap: 12px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: #f8fbff;
}

.shein-purchase-product-image {
  width: 76px;
  height: 76px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: #fff;
  object-fit: contain;
}

.shein-purchase-product-image.placeholder {
  display: grid;
  place-items: center;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.shein-purchase-product-info {
  display: grid;
  gap: 3px;
  min-width: 0;
  color: var(--muted);
  font-size: 13px;
}

.shein-purchase-product-info strong {
  color: var(--text);
  font-size: 15px;
}

.shein-purchase-quantity {
  display: grid;
  gap: 6px;
  min-width: 0;
  color: var(--text);
  font-size: 13px;
  font-weight: 800;
}

.shein-purchase-quantity input {
  width: 100%;
  min-width: 0;
}

@media (min-width: 1200px) {
  .shein-platform-page .shein-filter-row {
    grid-template-columns: minmax(180px, 220px) minmax(180px, 220px) minmax(240px, 360px) auto minmax(0, 1fr);
    justify-content: start;
  }

  .shein-platform-page .shein-filter-actions {
    grid-column: 4;
    grid-row: 1;
    align-self: end;
    justify-self: start;
  }

  .shein-platform-page .shein-action-row {
    grid-column: 1 / -1;
    grid-row: 2;
  }
}

@media (max-width: 1100px) {
  .shein-summary-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 680px) {
  .shein-summary-grid {
    grid-template-columns: 1fr;
  }

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

  .shein-product-form-pair {
    grid-template-columns: 1fr;
  }

  .batch-new-product-line .shein-dimension-field {
    grid-column: auto;
  }

  .batch-new-product-line .shein-product-spec-field {
    grid-column: auto;
  }

  .shein-filter-row label {
    min-width: 100%;
  }

  .shein-purchase-product-card {
    grid-template-columns: 58px minmax(0, 1fr);
  }

  .shein-purchase-product-image {
    width: 58px;
    height: 58px;
  }

  .shein-purchase-quantity {
    grid-column: 1 / -1;
  }
}

/* Final inventory filter sizing: keep sorting near search and Clear right after it. */
@media (min-width: 1200px) {
  #inventoryView .inventory-filter {
    grid-template-columns: 220px 360px 260px 76px minmax(0, 1fr) !important;
    align-items: end !important;
    justify-content: start !important;
  }

  #inventoryView .inventory-filter.has-branch-filter {
    grid-template-columns: 220px 220px 360px 260px 76px minmax(0, 1fr) !important;
  }

  #inventoryView .inventory-filter > .filter-button-pair {
    grid-column: 4 !important;
    grid-row: 1 !important;
    align-self: end !important;
    justify-self: start !important;
  }

  #inventoryView .inventory-filter.has-branch-filter > .filter-button-pair {
    grid-column: 5 !important;
  }

  #inventoryView .inventory-filter > .inventory-batch-actions {
    grid-column: 1 / -1 !important;
    grid-row: 2 !important;
  }
}

/* Inventory trend owner ranking button: highlight the border only. */
#modal .inventory-trend-top-actions > .inventory-owner-shop-rank-open,
.modal-box .inventory-trend-top-actions > .inventory-owner-shop-rank-open,
button.inventory-owner-shop-rank-open {
  border: 2px solid #f97316 !important;
  background: #fff !important;
  color: #9a3412 !important;
  font-weight: 900 !important;
  box-shadow: none !important;
}

#modal .inventory-trend-top-actions > .inventory-owner-shop-rank-open:hover,
.modal-box .inventory-trend-top-actions > .inventory-owner-shop-rank-open:hover,
button.inventory-owner-shop-rank-open:hover {
  border-color: #ea580c !important;
  background: #fff7ed !important;
  color: #ea580c !important;
}
.inventory-new-product-quantity-editor {
  display: grid;
  grid-template-columns: minmax(78px, 112px) auto;
  align-items: center;
  justify-content: center;
  gap: 4px 8px;
  margin: 0;
}

.inventory-new-product-quantity-editor input {
  width: 100%;
  min-width: 78px;
  height: 36px;
  padding: 6px 10px;
  text-align: center;
  font-weight: 700;
  color: #059669;
}

.inventory-new-product-quantity-editor b {
  color: #059669;
  white-space: nowrap;
}

.inventory-new-product-quantity-editor span {
  grid-column: 1 / -1;
  min-height: 16px;
  color: #7b879b;
  font-size: 12px;
  line-height: 16px;
}

.outbound-fee-amount-form {
  grid-template-columns: minmax(220px, 320px);
}

.outbound-fee-amount-form > label {
  grid-column: 1 / -1;
}

.job-quantity-diff {
  font-weight: 800;
}

.job-quantity-diff strong {
  margin-left: 2px;
  font-weight: 950;
}

.job-quantity-diff.shortage {
  color: #dc2626;
}

.job-quantity-diff.surplus {
  color: #059669;
}

.job-quantity-diff.even {
  color: #64748b;
}

.job-quantity-diff-col {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  min-width: 86px;
  color: #64748b;
  font-size: 11px;
  font-weight: 800;
}

.job-quantity-diff-col .job-quantity-diff {
  font-size: 14px;
  line-height: 1;
}

.job-quantity-diff-col.is-split {
  flex-direction: column;
  align-items: stretch;
  gap: 4px;
  min-width: 96px;
}

.job-transport-diff {
  display: grid;
  grid-template-columns: 42px minmax(38px, auto);
  align-items: center;
  gap: 5px;
  white-space: nowrap;
}

.job-transport-diff b {
  color: #64748b;
  font-size: 11px;
  font-weight: 800;
}

.job-transport-diff .job-quantity-diff {
  text-align: left;
}

/* Batch outbound inventory product picker. */
.batch-out-form .batch-out-add.batch-out-product-add-tools,
.batch-out-add.outbound-batch-edit-add-tools {
  grid-template-columns: minmax(150px, .8fr) auto minmax(230px, 1fr);
}

.batch-out-product-picker-trigger {
  min-width: 230px;
  justify-content: center;
}

dialog.batch-out-product-picker-dialog {
  width: min(920px, calc(100vw - 28px));
  max-height: min(780px, calc(100dvh - 28px));
}

dialog.batch-out-product-picker-dialog .modal-box {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  max-height: inherit;
}

.batch-out-product-picker-body {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  gap: 12px;
  min-height: 0;
  padding: 14px 16px;
}

.batch-out-product-picker-search {
  width: 100%;
  height: 40px;
}

.batch-out-product-picker-list {
  display: grid;
  gap: 8px;
  min-height: 0;
  max-height: 580px;
  overflow-y: auto;
}

.batch-out-product-picker-row {
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr) minmax(112px, auto) auto;
  align-items: center;
  gap: 12px;
  min-height: 78px;
  padding: 7px 9px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
}

.batch-out-product-picker-row:hover {
  border-color: #93c5fd;
  background: #f8fbff;
}

.batch-out-product-picker-image {
  width: 62px;
  height: 62px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fafc;
  object-fit: contain;
}

.batch-out-product-picker-image.placeholder {
  display: grid;
  place-items: center;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.batch-out-product-picker-info {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.batch-out-product-picker-info strong,
.batch-out-product-picker-info span,
.batch-out-product-picker-info small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.batch-out-product-picker-info span,
.batch-out-product-picker-info small,
.batch-out-product-picker-stock span {
  color: var(--muted);
}

.batch-out-product-picker-stock {
  display: grid;
  gap: 3px;
  text-align: right;
}

.batch-out-product-picker-stock strong {
  color: #15803d;
}

.batch-out-product-picker-empty {
  padding: 28px 12px;
  text-align: center;
}

@media (max-width: 900px) {
  .batch-out-form .batch-out-add.batch-out-product-add-tools,
  .batch-out-add.outbound-batch-edit-add-tools {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .batch-out-product-picker-trigger {
    grid-column: 1 / -1;
    width: 100%;
  }

  .batch-out-product-picker-row {
    grid-template-columns: 56px minmax(0, 1fr) auto;
  }

  .batch-out-product-picker-image {
    width: 54px;
    height: 54px;
  }

  .batch-out-product-picker-stock {
    grid-column: 2;
    justify-self: start;
    text-align: left;
  }

  .batch-out-product-picker-row > button {
    grid-column: 3;
    grid-row: 1 / span 2;
  }
}

@media (max-width: 560px) {
  .batch-out-form .batch-out-add.batch-out-product-add-tools,
  .batch-out-add.outbound-batch-edit-add-tools {
    grid-template-columns: minmax(0, 1fr);
  }

  .batch-out-form .batch-out-add.batch-out-product-add-tools > *,
  .batch-out-add.outbound-batch-edit-add-tools > * {
    width: 100%;
  }

  .batch-out-product-picker-row {
    grid-template-columns: 52px minmax(0, 1fr);
  }

  .batch-out-product-picker-stock,
  .batch-out-product-picker-row > button {
    grid-column: 1 / -1;
    grid-row: auto;
    width: 100%;
  }
}


/* Outbound batch proof stack and comparison gallery (RC1354). */
html .outbound-proof.outbound-proof-stack-trigger {
  display: inline-flex;
  flex: 0 0 auto;
  flex-direction: column;
  justify-content: center;
  gap: 3px;
  min-width: 80px;
  height: auto;
  min-height: 88px;
  padding: 4px 6px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  box-shadow: none;
  cursor: pointer;
}
html .outbound-proof.outbound-proof-stack-trigger:hover {
  background: #eff6ff;
}
html .outbound-proof.outbound-proof-stack-trigger:focus-visible {
  outline: 2px solid #2563eb;
  outline-offset: 2px;
}
.outbound-proof-stack {
  position: relative;
  display: block;
  flex: 0 0 62px;
  width: 66px;
  height: 62px;
}
.outbound-proof-stack > img {
  position: absolute;
  left: calc(var(--proof-layer) * 5px);
  top: calc(8px - var(--proof-layer) * 4px);
  z-index: calc(3 - var(--proof-layer));
  width: 52px;
  height: 52px;
  border: 1px solid #cbd5e1;
  border-radius: 7px;
  background: #fff;
  object-fit: contain;
  box-shadow: 0 1px 3px #0f172a0d;
}
.outbound-proof-stack-count {
  position: absolute;
  right: 0;
  bottom: 0;
  z-index: 4;
  min-width: 20px;
  padding: 1px 5px;
  border: 2px solid #fff;
  border-radius: 10px;
  background: #2563eb;
  color: #fff;
  font-size: 11px;
  line-height: 16px;
}
.outbound-proof-stack-caption { white-space: nowrap; font-size: 12px; }
#modal:has(.outbound-proof-gallery) {
  width: min(1760px, calc(100vw - 32px));
  max-width: calc(100vw - 32px);
  height: min(960px, calc(100dvh - 32px));
  max-height: calc(100dvh - 32px);
}
#modal:has(.outbound-proof-gallery) .modal-box {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  height: 100%;
  max-height: 100%;
}
#modal:has(.outbound-proof-gallery) #modalBody {
  display: block;
  min-height: 0;
  overflow: auto;
  overscroll-behavior: contain;
  background: #f5f7fb;
}
.outbound-proof-gallery-hint { margin: 0 0 12px; color: #64748b; font-size: 13px; }
.outbound-proof-gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 340px), 1fr));
  align-items: start;
  gap: 16px;
}
.outbound-proof-gallery-item {
  min-width: 0;
  margin: 0;
  border: 1px solid #dbe3ee;
  border-radius: 10px;
  background: #fff;
  overflow: hidden;
}
.outbound-proof-gallery-item:only-child {
  grid-column: 1 / -1;
  width: 100%;
  max-width: 1000px;
  justify-self: center;
}
.outbound-proof-gallery-item figcaption {
  padding: 10px 12px;
  border-bottom: 1px solid #e2e8f0;
  color: #334155;
  font-size: 13px;
  font-weight: 700;
}
html .outbound-proof-gallery .outbound-proof-gallery-image {
  display: block;
  width: 100%;
  height: clamp(240px, calc(100dvh - 260px), 560px);
  min-height: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: #fff;
  box-shadow: none;
  cursor: zoom-in;
}
.outbound-proof-gallery-image img {
  display: block;
  width: 100%;
  height: 100%;
  max-width: 100%;
  max-height: none;
  object-fit: contain;
}
.outbound-proof-gallery-image img[hidden],
.outbound-proof-gallery-error[hidden] { display: none; }
.outbound-proof-gallery-error { display: block; padding: 32px 16px; color: #b42318; font-size: 13px; }
@media (max-width: 700px) {
  #modal:has(.outbound-proof-gallery) { width: calc(100vw - 16px); max-width: calc(100vw - 16px); }
  #modal:has(.outbound-proof-gallery) #modalBody { padding: 10px; }
  .outbound-proof-gallery-grid { grid-template-columns: 1fr; gap: 12px; }
}

/* Completion summary is below live production; purchases remain in the right column. */
.dashboard-purchase-panel > .dashboard-purchase-statistics {
  margin-top: 0;
  padding-top: 0;
  border-top: 0;
}

.dashboard-owner-rank-panel > .dashboard-owner-ranking {
  margin-top: 0;
  padding: 0;
  border: 0;
}

.outbound-filter-bar:has(.outbound-data-compare-btn) { justify-content: stretch; }
.outbound-filter-bar .outbound-data-compare-btn {
  width: 132px;
  min-width: 132px;
  max-width: 132px;
  grid-column: 1 / -1;
  justify-self: end;
}
@media (min-width: 1600px) {
  .outbound-filter-bar:has(.outbound-data-compare-btn) {
    grid-template-columns: 240px 180px minmax(220px, 520px) auto auto auto minmax(132px, 1fr);
    justify-content: stretch;
  }
  .outbound-filter-bar .outbound-data-compare-btn { grid-column: 7; grid-row: 1; }
}
#modal:has(.outbound-data-compare-modal) {
  width: min(1600px, calc(100vw - 32px));
  max-width: calc(100vw - 32px);
}
.outbound-data-compare-modal { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; min-width: 0; }
.outbound-data-compare-modal .outbound-chart-stack { grid-template-columns: minmax(0, 1fr); min-width: 0; }
.outbound-data-compare-modal .outbound-compare-tools { justify-content: flex-start; }
.outbound-data-compare-modal .outbound-month-year-picker { display: inline-flex; margin: 0; }
@media (max-width: 600px) {
  #modal:has(.outbound-data-compare-modal) { width: calc(100vw - 16px); max-width: calc(100vw - 16px); }
  .outbound-data-compare-modal .outbound-year-pair-picker { flex-wrap: wrap; }
}

#completedView .flow-meta > .job-material-status.unbound {
  border: 0;
}

html #completedView .job-quantity-diff-col.is-split {
  flex-direction: row;
  align-items: center;
  gap: 12px;
  min-width: 0;
  transform: none;
}
#completedView .job-quantity-diff-col.is-split .job-transport-diff {
  display: inline-flex;
  gap: 4px;
}
#completedView .flow-row:has(> .job-quantity-diff-col.is-split) .flow-meta {
  display: grid;
  min-width: 0;
}
#completedView .flow-row:has(> .job-quantity-diff-col.is-split) .transport-actual-grid {
  grid-column: 1 / -1;
  justify-self: end;
  flex-wrap: wrap;
  min-width: 0;
}

/* 分红计算：与当前 ERP 控件、统计卡和表格保持一致。 */
#dividendView, #dividendView .dividend-panel, #dividendView #dengDividendForm {
  min-width: 0;
  max-width: 100%;
}
#dividendView .dividend-head {
  flex-wrap: wrap;
  gap: 14px 24px;
  padding: 0 0 14px;
  margin: 0;
  border: 0;
  border-bottom: 1px solid #e5ebf4;
  border-radius: 0;
  background: #fff;
}
#dividendView .dividend-heading { min-width: 0; flex: 1 1 460px; gap: 8px; }
#dividendView .dividend-heading p { margin: 0; line-height: 1.6; }
#dividendView .dividend-status-pill { min-height: 24px; padding: 3px 9px; font-size: 12px; }
#dividendView .dividend-status-line { padding: 5px 8px; font-size: 12px; line-height: 1.5; }
#dividendView .dividend-status-line strong { flex-shrink: 0; font-size: 13px; }
#dividendView .dividend-toolbar {
  min-width: 0;
  max-width: 100%;
  padding: 0;
  border: 0;
  gap: 8px;
  justify-content: flex-start;
  align-content: center;
}
#dividendView .dividend-month-picker { min-width: 210px; }
#dividendView .dividend-month-menu { min-width: 0; }
#dividendView .dividend-month-current {
  min-height: 34px;
  padding: 5px 10px;
  gap: 8px;
  border: 1px solid #cbd8ef;
  border-radius: 10px;
  background: #fff;
  color: #243b64;
  box-shadow: none;
  transform: none;
}
#dividendView .dividend-month-current b { font-size: 13px; }
#dividendView .dividend-month-current small { padding: 2px 6px; font-size: 11px; background: #f1f5fa; }
#dividendView .dividend-month-current.editing small { color: #15803d; background: #ecfdf3; }
#dividendView .dividend-month-current:hover { border-color: #3478f6; }
#dividendView .dividend-month-list { left: 0; right: auto; width: min(400px, calc(100vw - 80px)); }
#dividendView .dividend-month-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
#dividendView .dividend-month-option { height: auto; min-height: 58px; }
#dividendView .dividend-toolbar > button { height: 34px; min-height: 34px; padding-inline: 12px; border-radius: 10px; }
#dividendView .dividend-metric-grid { grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 10px; }
#dividendView .dividend-metric { min-width: 0; min-height: 84px; padding: 12px 14px; border: 1px solid #e0e8f5; border-left: 3px solid #3a7bf4; border-radius: 10px; background: #fff; }
#dividendView .dividend-metric::before { display: none; }
#dividendView .dividend-metric strong { margin-top: 5px; font-variant-numeric: tabular-nums; white-space: nowrap; }
#dividendView .dividend-money-metric { border-left-color: #ef4444; }
#dividendView .dividend-person-fold { justify-items: stretch; }
#dividendView .dividend-person-fold-head {
  width: 100%;
  height: auto;
  min-height: 54px;
  padding: 10px 12px;
  grid-template-columns: minmax(0, 1fr) auto;
  border-color: #dbe5f4;
  border-radius: 10px;
  background: #f7faff;
  white-space: normal;
  line-height: 1.4;
}
#dividendView .dividend-person-fold-head strong { font-size: 13px; color: #243b64; }
#dividendView .dividend-person-fold-head small { color: #667085; font-weight: 600; }
#dividendView .dividend-person-fold-head em { min-width: 48px; padding: 5px 10px; background: #eaf2ff; color: #1767ed; border-radius: 8px; }
#dividendView .dividend-person-summary { width: 100%; }
#dividendView .dividend-person-summary article { border-color: #dbe5f4; background: #fff; border-radius: 10px; }
#dividendView .dividend-person-summary small { color: #667085; }
#dividendView .dividend-owner-summary .section-head { flex-wrap: wrap; gap: 6px 16px; padding-bottom: 8px; }
#dividendView .dividend-owner-summary h4 { margin: 0; font-size: 13px; }
#dividendView .dividend-owner-summary .section-head > .muted { font-size: 12px; }
#dividendView .dividend-owner-grid { grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 8px; }
#dividendView .dividend-owner-grid article { min-width: 0; padding: 10px 12px; border-color: #e0e8f5; border-radius: 10px; background: #f8faff; }
#dividendView .dividend-owner-grid strong { color: #243b64; }
#dividendView .dividend-owner-grid span { font-variant-numeric: tabular-nums; white-space: nowrap; }
#dividendView .dividend-table-wrap { width: 100%; overflow: auto; border-color: #dbe5f4; border-radius: 10px; }
#dividendView .dividend-table { min-width: 2200px; border: 0; border-radius: 0; overflow: visible; }
#dividendView .dividend-table th { padding: 10px 8px; border-bottom: 1px solid #dbe5f4; background: #f3f6fc; color: #243b64; box-shadow: none; white-space: nowrap; font-size: 12px; }
#dividendView .dividend-table td { padding: 10px 8px; line-height: 1.5; font-size: 12px; border-bottom: 1px solid #e9eef6; }
#dividendView .dividend-table tbody tr { --store-row-bg: #fff; --store-input-bg: #fff; --store-input-border: #cbd8ef; --store-accent: #3a7bf4; --store-focus: rgba(37, 99, 235, .12); }
#dividendView .dividend-table tbody tr:nth-child(even) { --store-row-bg: #f8faff; }
#dividendView .dividend-table tbody tr:hover { --store-row-bg: #eff5ff; }
#dividendView .dividend-owner-group-start td { border-top: 2px solid #dbe5f4; }
#dividendView .dividend-owner-name { box-shadow: none; }
#dividendView .dividend-fixed-shop { max-height: none; overflow: visible; line-height: 1.5; }
#dividendView .dividend-table input { height: 32px; min-height: 32px; border-radius: 8px; font-size: 12px; font-variant-numeric: tabular-nums; }
#dividendView .dividend-table .result-money, #dividendView .dividend-table .result-percent { white-space: nowrap; font-variant-numeric: tabular-nums; }
#dividendView .dividend-table td small { font-weight: 600; line-height: 1.5; }
#dividendView .dividend-rules { gap: 6px; }
#dividendView .dividend-rules span { padding: 6px 10px; border-radius: 8px; background: #f7faff; font-size: 12px; font-weight: 600; }
@media (max-width: 600px) {
  #dividendView .dividend-panel { padding: 12px; gap: 12px; }
  #dividendView .dividend-toolbar { width: 100%; }
  #dividendView .dividend-month-picker { width: 100%; min-width: 0; }
  #dividendView .dividend-month-list { width: 100%; }
  #dividendView .dividend-month-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  #dividendView .dividend-metric-grid { grid-template-columns: minmax(0, 1fr); }
  #dividendView .dividend-owner-grid { grid-template-columns: minmax(0, 1fr); }
}

/* 分红规则直接在店铺行选择和编辑。 */
#dividendView .dividend-settings-source { margin: 0; font-size: 12px; line-height: 1.6; }
#dividendView .dividend-table { min-width: 2500px; }
#dividendView .dividend-table col:nth-child(12) { width: 7%; }
#dividendView .dividend-table .dividend-bonus-value select { margin-top: 5px; font-size: 12px; }
#dividendView .dividend-bonus-value button { margin-top: 4px; height: 26px; min-height: 26px; padding: 2px 8px; font-size: 11px; color: #1767ed; }
#dividendView .dividend-inline-share { display: flex; align-items: center; gap: 4px; font-size: 11px; margin-top: 6px; white-space: nowrap; }
#dividendView .dividend-inline-share input { width: 14px; height: 14px; min-height: 14px; padding: 0; }
#dividendView .dividend-row-remove { height: auto; min-height: 24px; padding: 3px 0; border: 0; background: transparent; color: #b42318; font-size: 11px; }
#dividendView .dividend-inline-name { font-weight: 700; }
#dividendRuleForm { display: grid; gap: 14px; min-width: 0; }
#dividendRuleForm > label, #dividendRuleForm section > label { display: grid; gap: 6px; margin-top: 8px; }
#dividendRuleForm .dividend-rule-help, #dividendAddShopForm .dividend-rule-help { margin: 0; padding: 10px; background: #eff6ff; color: #243b64; border-radius: 10px; font-size: 12px; line-height: 1.7; grid-column: 1 / -1; }
#dividendTierRows { display: grid; gap: 10px; margin-bottom: 10px; }
#dividendRuleForm .dividend-tier-editor-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto; align-items: end; gap: 10px; }
#dividendRuleForm .dividend-tier-editor-row label { display: grid; gap: 5px; font-size: 12px; min-width: 0; }
#dividendRuleForm input { width: 100%; min-width: 0; }
#dividendRuleForm [hidden] { display: none; }
@media (max-width: 600px) {
  #dividendRuleForm .dividend-tier-editor-row { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  #dividendRuleForm .dividend-tier-editor-row button { grid-column: 1 / -1; justify-self: end; }
}

/* 每个店铺独立成卡，便于整卡截图核对。 */
#dividendView .dividend-shop-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr)); gap: 14px; align-items: start; }
#dividendView .dividend-shop-card { min-width: 0; overflow: visible; border: 1px solid #cbd8ef; border-radius: 14px; background: #fff; color: #243b64; box-shadow: 0 1px 3px rgba(20,45,90,.04); break-inside: avoid; }
#dividendView .dividend-card-head { display: flex; justify-content: space-between; align-items: start; gap: 12px; padding: 14px 16px; border-bottom: 1px solid #dce6f5; background: #f4f8ff; }
#dividendView .dividend-card-head strong { display: block; font-size: 17px; line-height: 1.5; overflow-wrap: anywhere; }
#dividendView .dividend-card-eyebrow { display: block; font-size: 11px; color: #64748b; margin-bottom: 3px; }
#dividendView .dividend-card-month { flex-shrink: 0; text-align: right; font-size: 12px; }
#dividendView .dividend-card-month span { display: block; margin-top: 4px; color: #64748b; font-size: 11px; }
#dividendView .dividend-card-identity, #dividendView .dividend-card-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 12px; padding: 12px 16px; }
#dividendView .dividend-card-identity > label { grid-column: 1 / -1; }
#dividendView .dividend-card-identity label, #dividendView .dividend-card-field, #dividendView .dividend-card-foot label { display: grid; align-content: start; min-width: 0; gap: 5px; font-size: 12px; }
#dividendView .dividend-card-shop { grid-column: 1 / -1; }
#dividendView .dividend-shop-card input:not([type=checkbox]), #dividendView .dividend-shop-card select { width: 100%; min-width: 0; height: 32px; min-height: 32px; padding: 5px 8px; border-radius: 8px; font-size: 12px; font-variant-numeric: tabular-nums; }
#dividendView .dividend-shop-card small { color: #667085; font-size: 11px; line-height: 1.5; overflow-wrap: anywhere; }
#dividendView .dividend-card-highlight { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 0 16px; padding: 12px; border: 1px solid #dbe5f4; border-left: 3px solid #3478f6; border-radius: 10px; background: #f8faff; }
#dividendView .dividend-card-highlight > div:first-child > span, #dividendView .dividend-card-highlight > div:first-child > small { display: block; font-size: 12px; }
#dividendView .dividend-card-highlight strong { display: block; font-size: 23px; color: #dc2626; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
#dividendView .dividend-card-rule { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: center; gap: 8px; margin: 0 16px 12px; }
#dividendView .dividend-card-rule button { color: #1767ed; height: 28px; min-height: 28px; font-size: 12px; }
#dividendView .dividend-card-result strong { color: #dc2626; line-height: 32px; font-size: 16px; font-variant-numeric: tabular-nums; }
#dividendView .dividend-card-profit { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin: 0 16px; padding: 10px 0; border-top: 1px solid #e5ebf5; border-bottom: 1px solid #e5ebf5; }
#dividendView .dividend-card-profit span, #dividendView .dividend-card-partners span { display: block; font-size: 11px; color: #667085; }
#dividendView .dividend-card-profit strong { color: #dc2626; display: block; margin-top: 3px; font-size: 16px; font-variant-numeric: tabular-nums; }
#dividendView .dividend-card-partners { padding: 12px 16px; }
#dividendView .dividend-card-partners > label { display: flex; align-items: center; gap: 6px; font-size: 12px; }
#dividendView .dividend-card-partners input[type=checkbox] { width: 14px; height: 14px; min-height: 14px; margin: 0; }
#dividendView .dividend-card-partners > div { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-top: 8px; }
#dividendView .dividend-card-partners strong { display: block; margin-top: 3px; font-size: 13px; color: #243b64; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
#dividendView .dividend-card-foot { display: flex; align-items: end; gap: 10px; padding: 12px 16px; border-top: 1px solid #e5ebf5; background: #fafcff; }
#dividendView .dividend-card-foot label { flex: 1; }
#dividendView .dividend-card-foot button { flex-shrink: 0; color: #b42318; font-size: 11px; padding: 4px 8px; }
@media (max-width: 500px) {
  #dividendView .dividend-card-head, #dividendView .dividend-card-identity, #dividendView .dividend-card-fields, #dividendView .dividend-card-partners, #dividendView .dividend-card-foot { padding: 12px; }
  #dividendView .dividend-card-highlight, #dividendView .dividend-card-profit { margin-left: 12px; margin-right: 12px; }
  #dividendView .dividend-card-highlight strong { font-size: 20px; }
  #dividendView .dividend-card-rule { margin-left: 12px; margin-right: 12px; }
}

#dividendView .dividend-card-head { border-radius: 13px 13px 0 0; }
#dividendView .dividend-card-foot { border-radius: 0 0 13px 13px; }

/* 店铺卡只保留运营分红；三人分红在汇总中统一查看和设置。 */
#dividendView .dividend-shop-card > .dividend-card-highlight { margin-top: 12px; margin-bottom: 12px; }
#dividendView .dividend-card-foot { border-radius: 0; }
#dividendView .dividend-card-rule button { height: auto; min-height: 32px; line-height: 1.4; padding: 5px 8px; }
#dividendView .dividend-partner-stores { display: grid; width: 100%; min-width: 0; gap: 8px; }
#dividendView .dividend-partner-stores > p { margin: 0; font-size: 12px; }
#dividendView .dividend-partner-store { display: grid; grid-template-columns: minmax(180px, 1fr) minmax(300px, 1fr); align-items: center; gap: 16px; padding: 12px; border: 1px solid #dbe5f4; border-radius: 10px; background: #fff; }
#dividendView .dividend-partner-store > label { display: flex; align-items: center; gap: 8px; min-width: 0; }
#dividendView .dividend-partner-store input[type=checkbox] { width: 16px; height: 16px; min-height: 16px; margin: 0; flex-shrink: 0; }
#dividendView .dividend-partner-store label strong, #dividendView .dividend-partner-store label small { display: block; overflow-wrap: anywhere; }
#dividendView .dividend-partner-store label strong { font-size: 13px; color: #243b64; }
#dividendView .dividend-partner-store label small { color: #667085; font-size: 11px; margin-top: 3px; }
#dividendView .dividend-partner-amounts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
#dividendView .dividend-partner-amounts span { display: block; font-size: 11px; color: #667085; }
#dividendView .dividend-partner-amounts strong { display: block; font-size: 13px; margin-top: 3px; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
@media (max-width: 700px) { #dividendView .dividend-partner-store { grid-template-columns: minmax(0, 1fr); gap: 10px; } }

/* 打包分红和移出操作集中到三人分红汇总。 */
#dividendView .dividend-partner-actions { grid-column: 1 / -1; display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; }
#dividendView .dividend-partner-actions button { min-height: 32px; height: auto; padding: 5px 10px; font-size: 12px; }
#dividendView .dividend-partner-actions .dividend-remove-store { color: #b42318; }
#dividendView .dividend-card-packing strong { line-height: 32px; font-size: 16px; color: #dc2626; }
#dividendPackingForm { display: grid; gap: 12px; }
#dividendPackingForm label { display: grid; gap: 6px; }
#dividendPackingForm [hidden] { display: none; }

#dividendView .dividend-evidence { border: 1px solid #dbe5f4; border-radius: 12px; padding: 14px; margin-bottom: 14px; background: #fff; }
#dividendView .dividend-evidence-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 12px; }
#dividendView .dividend-evidence h4 { margin: 0 0 5px; }
#dividendView .dividend-evidence-head span, #dividendView .dividend-evidence p { font-size: 12px; color: #667085; }
#dividendView .dividend-evidence-actions { display: flex; flex-wrap: wrap; gap: 8px; }
#dividendView .dividend-evidence-upload { position: relative; display: inline-flex; align-items: center; overflow: hidden; padding: 7px 10px; border: 1px solid #bcd1f6; border-radius: 8px; color: #1767ed; font-size: 12px; cursor: pointer; }
#dividendView .dividend-evidence-upload input { position: absolute; inset: 0; opacity: 0; width: 100%; height: 100%; cursor: pointer; }
#dividendView .dividend-evidence-grid { display: grid; grid-template-columns: repeat(auto-fill,minmax(150px,1fr)); gap: 12px; }
#dividendView .dividend-evidence-grid article { min-width: 0; padding: 8px; border: 1px solid #e1e8f2; border-radius: 9px; }
#dividendView .dividend-evidence-grid button { display: block; padding: 0; width: 100%; height: 120px; border: 0; border-radius: 6px; background: #f6f8fc; }
#dividendView .dividend-evidence-grid img { width: 100%; height: 100%; object-fit: contain; }
#dividendView .dividend-evidence-grid strong, #dividendView .dividend-evidence-grid span, #dividendView .dividend-evidence-grid small { display: block; margin-top: 5px; font-size: 12px; overflow-wrap: anywhere; }
#dividendView .dividend-evidence-grid small { color: #667085; font-size: 11px; }

#dividendView .dividend-card-field input::placeholder { color: #98a2b3; opacity: 1; }
#dividendView .dividend-card-field input:focus::placeholder { color: transparent; }
#dividendView .dividend-person-fold > .dividend-owner-summary { width: 100%; min-width: 0; }

#dividendView .dividend-partner-fold { width: 100%; min-width: 0; }
#dividendView .dividend-partner-fold > summary { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border: 1px solid #dbe5f4; border-radius: 9px; background: #f7faff; color: #243b64; cursor: pointer; list-style: none; }
#dividendView .dividend-partner-fold > summary::-webkit-details-marker { display: none; }
#dividendView .dividend-partner-fold > summary::before { content: "▸"; }
#dividendView .dividend-partner-fold[open] > summary::before { content: "▾"; }
#dividendView .dividend-partner-fold > summary > span { margin-left: auto; color: #1767ed; font-size: 12px; }
#dividendView .dividend-partner-fold:not([open]) .dividend-partner-collapse,
#dividendView .dividend-partner-fold[open] .dividend-partner-expand { display: none; }
#dividendView .dividend-partner-fold > .dividend-partner-stores { margin-top: 8px; }

#dividendView .dividend-card-head.dividend-data-ready{background:#eaf8ef;border-bottom-color:#bde5ca;}
