:root {
  --sidebar: #111827;
  --sidebar-soft: #1f2937;
  --page: #f3f5f7;
  --panel: #ffffff;
  --border: #d7dde5;
  --text: #172033;
  --muted: #667085;
  --primary: #2563eb;
  --primary-dark: #1d4ed8;
  --danger: #dc2626;
  --warning-bg: #fff7ed;
  --warning: #b45309;
  --blue-bg: #eff6ff;
  --blue: #1d4ed8;
  --purple-bg: #f3e8ff;
  --purple: #7e22ce;
  --green-bg: #ecfdf3;
  --green: #047857;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-width: 0;
  background: var(--page);
  color: var(--text);
  font-family: Inter, "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
}

button,
input,
select {
  font: inherit;
}

.app-shell {
  display: grid;
  grid-template-columns: 236px minmax(0, 1fr);
  min-height: 100vh;
}

.sidebar {
  background: var(--sidebar);
  color: #fff;
  padding: 24px 18px;
}

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

.brand-mark {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border-radius: 8px;
  background: var(--primary);
  font-size: 18px;
  font-weight: 800;
}

.brand small {
  display: block;
  margin-top: 4px;
  color: #94a3b8;
}

.sidebar nav {
  display: grid;
  gap: 8px;
}

.sidebar a {
  color: #cbd5e1;
  text-decoration: none;
  padding: 11px 12px;
  border-radius: 8px;
}

.sidebar a.active,
.sidebar a:hover {
  background: var(--sidebar-soft);
  color: #fff;
}

.content {
  min-width: 0;
  padding: 26px 28px;
}

.hidden-view {
  display: none;
}

[data-view].hidden-view {
  display: none !important;
}

.topbar,
.topbar-actions,
.toolbar,
.panel-header,
.status-flow {
  display: flex;
  align-items: center;
  gap: 14px;
}

.operator-select {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
}

.operator-select select {
  min-width: 110px;
}

.topbar,
.panel-header {
  justify-content: space-between;
}

.panel-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.visible-summary {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.visible-summary span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-height: 32px;
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 0 10px;
  background: #f8fafc;
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
}

.visible-summary strong {
  color: #101828;
  font-size: 14px;
}

.topbar {
  margin-bottom: 18px;
}

.eyebrow,
h1,
h2,
p {
  margin: 0;
}

.eyebrow {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1 {
  margin-top: 5px;
  font-size: 28px;
  line-height: 1.2;
}

h2 {
  font-size: 18px;
}

.panel-header p {
  margin-top: 6px;
  color: var(--muted);
  font-size: 14px;
}

button,
.primary-upload {
  height: 38px;
  border: 0;
  border-radius: 6px;
  padding: 0 14px;
  background: var(--primary);
  color: #fff;
  cursor: pointer;
  font-weight: 750;
}

button:hover,
.primary-upload:hover {
  background: var(--primary-dark);
}

.primary-upload {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.primary-upload input {
  display: none;
}

.secondary-button {
  background: #e5e7eb;
  color: #111827;
}

.secondary-button:hover {
  background: #d1d5db;
}

.ghost-button {
  background: #fff;
  color: #344054;
  border: 1px solid var(--border);
}

.ghost-button:hover {
  background: #f9fafb;
}

.danger-button {
  background: #fee2e2;
  color: var(--danger);
}

.danger-button:hover {
  background: #fecaca;
}

.status-flow {
  margin-bottom: 16px;
  padding: 14px 16px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #fff;
}

.flow-step {
  border: 0;
  min-width: 104px;
  height: auto;
  border-radius: 999px;
  padding: 7px 13px;
  background: #f2f4f7;
  color: #344054;
  text-align: center;
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
}

.flow-step.active {
  background: var(--warning-bg);
  color: var(--warning);
}

.flow-step.all {
  background: #eef2ff;
  color: #3730a3;
}

.flow-step.success {
  background: var(--green-bg);
  color: var(--green);
}

.flow-step.selected {
  outline: 2px solid var(--primary);
  outline-offset: 3px;
  box-shadow: 0 8px 18px rgba(37, 99, 235, 0.16);
}

.flow-line {
  height: 1px;
  flex: 1;
  background: var(--border);
}

.stat-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(140px, 1fr));
  gap: 14px;
  margin-bottom: 16px;
}

.stat-card,
.panel {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 8px;
}

.stat-card {
  padding: 15px;
}

.stat-card span {
  display: block;
  color: var(--muted);
  font-size: 13px;
}

.stat-card strong {
  display: block;
  margin-top: 8px;
  font-size: 26px;
  line-height: 1.1;
}

.toolbar {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) 200px 200px;
  align-items: end;
  margin-bottom: 16px;
  padding: 14px 16px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #fff;
}

label {
  display: grid;
  gap: 7px;
  color: #344054;
  font-size: 13px;
  font-weight: 750;
}

input,
select {
  height: 36px;
  min-width: 160px;
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 0 10px;
  background: #fff;
  color: var(--text);
}

.search-box input {
  width: 100%;
}

.panel {
  padding: 16px;
}

.table-panel {
  min-height: 520px;
}

.audit-panel {
  margin-top: 16px;
}

.audit-wrap {
  max-height: 320px;
  overflow: auto;
  border: 1px solid var(--border);
  border-radius: 8px;
}

.audit-toolbar {
  grid-template-columns: minmax(280px, 1fr) minmax(150px, 220px) minmax(150px, 220px);
}

.audit-toolbar label {
  display: grid;
  gap: 8px;
  color: #334155;
  font-size: 13px;
  font-weight: 850;
}

.audit-toolbar select {
  min-height: 38px;
  border: 1px solid #cfd8e6;
  border-radius: 8px;
  padding: 0 12px;
  background: #fff;
  color: #172033;
  font-size: 14px;
  font-weight: 800;
}

.audit-table {
  width: 100%;
  min-width: 1080px;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 13px;
}

.audit-table th,
.audit-table td {
  border-right: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: 10px 12px;
  background: #fff;
  text-align: left;
}

.audit-table th {
  position: sticky;
  top: 0;
  z-index: 2;
  background: #f8fafc;
  color: #475467;
  font-size: 12px;
  font-weight: 850;
}

.audit-table th:nth-child(6),
.audit-table td:nth-child(6) {
  min-width: 360px;
}

.table-wrap {
  max-height: calc(100vh - 340px);
  overflow: auto;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #fff;
}

.order-table {
  width: 100%;
  min-width: 100%;
  table-layout: fixed;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 13px;
}

th,
td {
  border-right: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: 10px 12px;
  background: #fff;
  text-align: left;
  vertical-align: middle;
}

th {
  position: sticky;
  top: 0;
  z-index: 5;
  height: 46px;
  background: #f8fafc;
  color: #475467;
  font-size: 12px;
  font-weight: 850;
  white-space: nowrap;
}

tr:hover td {
  background: #fbfdff;
}

.order-table th:nth-child(1),
.order-table td:nth-child(1) {
  width: 120px;
}

.order-table th:nth-child(2),
.order-table td:nth-child(2) {
  width: 32%;
}

.order-table th:nth-child(3),
.order-table td:nth-child(3) {
  width: 18%;
}

.order-table th:nth-child(4),
.order-table td:nth-child(4) {
  width: 14%;
}

.order-table th:nth-child(5),
.order-table td:nth-child(5) {
  width: 120px;
}

.order-table th:nth-child(6),
.order-table td:nth-child(6) {
  width: 16%;
}

.order-table th:nth-child(7),
.order-table td:nth-child(7) {
  width: 118px;
}

.image-cell {
  display: grid;
  width: 70px;
  height: 70px;
  place-items: center;
  border: 1px dashed var(--border);
  border-radius: 6px;
  color: var(--muted);
  background: #f9fafb;
  font-size: 12px;
}

.image-cell img {
  width: 100%;
  height: 100%;
  border-radius: 6px;
  object-fit: cover;
}

.cell-input,
.cell-select {
  min-width: 0;
  width: 100%;
  height: 32px;
  border-color: #cfd7e2;
  font-size: 13px;
}

.product-col .cell-input + .cell-input,
td .cell-input + .cell-input {
  margin-top: 7px;
}

.cell-input.wide {
  min-width: 0;
}

.cell-input.sku {
  min-width: 0;
}

.cell-input.small {
  min-width: 0;
}

.cell-input.number,
.readonly-number {
  min-width: 0;
  text-align: right;
}

.readonly-number {
  color: #101828;
  font-weight: 750;
}

.cell-select.status.purchasing {
  background: var(--warning-bg);
  color: var(--warning);
  border-color: #fed7aa;
}

.cell-select.status.domestic_warehouse {
  background: var(--blue-bg);
  color: var(--blue);
  border-color: #bfdbfe;
}

.cell-select.status.sea_shipping {
  background: var(--purple-bg);
  color: var(--purple);
  border-color: #e9d5ff;
}

.cell-select.status.overseas_warehouse {
  background: var(--green-bg);
  color: var(--green);
  border-color: #bbf7d0;
}

.empty-row {
  padding: 28px;
  color: var(--muted);
  text-align: center;
}

.product-name {
  font-weight: 750;
  font-size: 14px;
}

.meta-line,
.sub-line {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 10px;
  margin-top: 6px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.meta-line span,
.sub-line span {
  overflow: hidden;
  max-width: 100%;
  text-overflow: ellipsis;
}

.strong-line {
  overflow: hidden;
  color: #101828;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.row-actions {
  display: grid;
  gap: 6px;
}

.compact-button {
  width: 100%;
  height: 32px;
  padding: 0 10px;
}

.active-filter-strip {
  display: flex;
  min-height: 0;
  align-items: center;
  gap: 8px;
  margin: -6px 0 14px;
  color: #64748b;
  font-size: 12px;
  font-weight: 850;
}

.active-filter-strip.empty {
  display: none;
}

.filter-chip {
  display: inline-flex;
  min-height: 34px;
  align-items: center;
  gap: 8px;
  border: 1px solid #dbe6f3;
  border-radius: 999px;
  padding: 0 12px;
  background: #ffffff;
  color: #334155;
  font: inherit;
}

button.filter-chip {
  cursor: pointer;
}

.filter-chip strong {
  color: #2563eb;
  font-size: 12px;
}

.static-chip {
  background: #f8fafc;
}

.purchaser-input,
.remark-input {
  min-width: 100%;
}

.detail-row td {
  background: #f8fafc;
  padding: 0;
}

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

.detail-section {
  display: grid;
  align-content: start;
  gap: 10px;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 14px;
  background: #fff;
}

.detail-section h3 {
  margin: 0;
  color: #101828;
  font-size: 14px;
}

.detail-subtitle {
  margin-top: 4px;
  border-top: 1px solid #e2e8f0;
  padding-top: 10px;
  color: #475569;
  font-size: 12px;
  font-weight: 900;
}

.readonly-pair {
  display: grid;
  gap: 5px;
}

.readonly-pair span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
}

.readonly-pair strong {
  color: #101828;
  font-size: 15px;
}

.calculation-note {
  display: grid;
  gap: 6px;
  padding: 10px 12px;
  border: 1px solid #bfdbfe;
  border-radius: 8px;
  background: #eff6ff;
}

.calculation-note span {
  color: #1d4ed8;
  font-size: 12px;
  font-weight: 850;
}

.calculation-note strong {
  color: #172033;
  font-size: 15px;
  font-weight: 850;
}

.sku-total-line {
  margin-top: 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
  white-space: nowrap;
}

.sku-total-line strong {
  margin-left: 6px;
  color: #101828;
  font-size: 14px;
}

.spec-cell {
  display: grid;
  gap: 6px;
}

.spec-cell span {
  overflow: hidden;
  color: var(--muted);
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sku-total-number {
  color: #101828;
  font-size: 18px;
  font-weight: 800;
  text-align: right;
}

.status-time-cell {
  display: grid;
  gap: 4px;
}

.status-time-cell strong {
  color: #101828;
  font-size: 13px;
}

.status-time-cell span {
  color: var(--muted);
  font-size: 12px;
}

.timeline-row td {
  background: #f8fafc;
}

.timeline-panel {
  display: grid;
  grid-column: 1 / -1;
  gap: 10px;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 14px;
  background: #fff;
}

.timeline-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.timeline-item {
  display: inline-grid;
  gap: 3px;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 8px 10px;
  background: #fff;
}

.timeline-item b {
  color: #101828;
}

.timeline-item em {
  color: var(--muted);
  font-style: normal;
  font-size: 12px;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(15, 23, 42, 0.42);
}

.confirm-modal {
  width: min(560px, 100%);
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: 14px;
  padding: 22px;
  background: #fff;
  box-shadow: 0 24px 80px rgba(15, 23, 42, 0.28);
}

.confirm-modal header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 16px;
}

.confirm-modal h2 {
  margin-top: 4px;
  font-size: 22px;
}

.confirm-summary {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 12px 14px;
  background: #f8fafc;
}

.confirm-summary div {
  display: grid;
  gap: 5px;
  min-width: 0;
}

.confirm-summary span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.confirm-summary strong {
  overflow: hidden;
  color: #101828;
  font-size: 18px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.confirm-change-list {
  display: grid;
  gap: 10px;
  margin-top: 14px;
  max-height: 300px;
  overflow: auto;
}

.confirm-change-item {
  display: grid;
  gap: 8px;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 12px 14px;
  background: #fff;
}

.confirm-change-item span {
  color: #344054;
  font-size: 13px;
  font-weight: 850;
}

.confirm-change-item div {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.confirm-change-item em,
.confirm-change-item strong {
  overflow: hidden;
  border-radius: 8px;
  padding: 7px 9px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.confirm-change-item em {
  background: #f2f4f7;
  color: #667085;
  font-style: normal;
}

.confirm-change-item b {
  color: var(--muted);
}

.confirm-change-item strong {
  background: #eff6ff;
  color: #1d4ed8;
}

.danger-confirm-item {
  border-color: #fecaca;
  background: #fff7f7;
}

.danger-confirm-item span,
.danger-confirm-item b {
  color: #b42318;
}

.danger-confirm-item strong {
  background: #fee2e2;
  color: #b42318;
}

.confirm-modal footer {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 18px;
}

.app-toast {
  position: fixed;
  top: 22px;
  right: 24px;
  z-index: 160;
  max-width: min(380px, calc(100vw - 48px));
  border: 1px solid #b7d4ff;
  border-radius: 8px;
  padding: 12px 14px;
  background: #eff6ff;
  color: #1d4ed8;
  box-shadow: 0 16px 50px rgba(15, 23, 42, 0.16);
  font-size: 14px;
  font-weight: 800;
}

@media (max-width: 1400px) {
  .detail-panel {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* 21st.dev-inspired visual refresh for the local HTML app */
:root {
  --sidebar: #0b1220;
  --sidebar-soft: #172033;
  --page: #f6f7fb;
  --panel: #ffffff;
  --border: #e3e8ef;
  --text: #111827;
  --muted: #64748b;
  --primary: #315fdc;
  --primary-dark: #244bb8;
  --danger: #dc2626;
  --warning-bg: #fff5e8;
  --warning: #b45309;
  --blue-bg: #edf5ff;
  --blue: #1d4ed8;
  --purple-bg: #f6efff;
  --purple: #7e22ce;
  --green-bg: #ecfdf5;
  --green: #047857;
  --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.06);
  --shadow-md: 0 14px 34px rgba(15, 23, 42, 0.08);
}

body {
  background:
    linear-gradient(180deg, #f9fbff 0%, #f4f6fb 280px, #f6f7fb 100%);
}

.app-shell {
  grid-template-columns: 252px minmax(0, 1fr);
}

.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  padding: 22px 16px;
  border-right: 1px solid rgba(255, 255, 255, 0.08);
  background:
    linear-gradient(180deg, rgba(49, 95, 220, 0.18), rgba(49, 95, 220, 0) 220px),
    var(--sidebar);
}

.brand {
  margin-bottom: 28px;
  padding: 4px 8px 18px;
  border-bottom: 1px solid rgba(148, 163, 184, 0.16);
}

.brand-mark {
  border-radius: 8px;
  background: linear-gradient(135deg, #3b82f6, #315fdc);
  box-shadow: 0 10px 24px rgba(49, 95, 220, 0.32);
}

.brand strong {
  font-size: 17px;
}

.sidebar nav {
  gap: 6px;
}

.sidebar a {
  display: flex;
  align-items: center;
  min-height: 42px;
  border: 1px solid transparent;
  border-radius: 8px;
  color: #bac7d8;
  font-weight: 750;
}

.sidebar a.active {
  border-color: rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  box-shadow: inset 3px 0 0 #60a5fa;
}

.sidebar a:hover {
  background: rgba(255, 255, 255, 0.06);
}

.content {
  padding: 28px 32px 42px;
}

.topbar {
  margin-bottom: 20px;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 18px 18px;
  background: rgba(255, 255, 255, 0.86);
  box-shadow: var(--shadow-sm);
  backdrop-filter: blur(10px);
}

.eyebrow {
  color: #526174;
  font-size: 12px;
}

h1 {
  font-size: 30px;
  letter-spacing: 0;
}

h2 {
  letter-spacing: 0;
}

.topbar-actions {
  flex-wrap: wrap;
  justify-content: flex-end;
}

button,
.primary-upload,
input,
select {
  border-radius: 7px;
}

button,
.primary-upload {
  box-shadow: none;
}

.primary-upload,
button:not(.ghost-button):not(.secondary-button):not(.danger-button):not(.flow-step):not(.dashboard-status-card):not(.dashboard-payment-card):not(.alert-item):not(.health-item):not(.login-submit):not(.google-login):not(.link-button):not(.password-toggle) {
  background: var(--primary);
}

.primary-upload:hover,
button:not(.ghost-button):not(.secondary-button):not(.danger-button):not(.flow-step):not(.dashboard-status-card):not(.dashboard-payment-card):not(.alert-item):not(.health-item):not(.login-submit):not(.google-login):not(.link-button):not(.password-toggle):hover {
  background: var(--primary-dark);
}

.ghost-button,
.secondary-button {
  border: 1px solid var(--border);
  background: #fff;
  color: #344054;
}

.operator-select {
  min-height: 38px;
  border: 1px solid var(--border);
  border-radius: 7px;
  padding: 0 8px 0 10px;
  background: #fff;
  color: #475467;
}

.operator-select select {
  height: 30px;
  border: 0;
  padding: 0 8px;
}

.status-flow,
.stat-card,
.toolbar,
.panel {
  border-color: var(--border);
  border-radius: 8px;
  box-shadow: var(--shadow-sm);
}

.status-flow {
  padding: 12px;
  background: rgba(255, 255, 255, 0.9);
}

.flow-step {
  min-width: 112px;
  min-height: 38px;
  border: 1px solid transparent;
  border-radius: 8px;
  transition: transform 0.14s ease, box-shadow 0.14s ease, border-color 0.14s ease;
}

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

.flow-step.selected {
  outline: 0;
  border-color: rgba(49, 95, 220, 0.42);
  box-shadow: 0 10px 22px rgba(49, 95, 220, 0.14);
}

.flow-line {
  opacity: 0.8;
}

.stat-grid {
  gap: 12px;
}

.stat-card {
  position: relative;
  overflow: hidden;
  padding: 16px;
}

.stat-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 3px;
  background: linear-gradient(90deg, #315fdc, #22c55e);
  opacity: 0.82;
}

.stat-card span {
  color: #64748b;
  font-weight: 750;
}

.stat-card strong {
  font-size: 27px;
  letter-spacing: 0;
}

.toolbar {
  gap: 12px;
  padding: 14px;
}

label {
  color: #344054;
}

input,
select {
  border-color: #d7e0ea;
  background: #fff;
  transition: border-color 0.14s ease, box-shadow 0.14s ease;
}

input:focus,
select:focus {
  outline: 0;
  border-color: rgba(49, 95, 220, 0.72);
  box-shadow: 0 0 0 3px rgba(49, 95, 220, 0.12);
}

.panel {
  padding: 18px;
  background: rgba(255, 255, 255, 0.94);
}

.panel-header {
  align-items: flex-start;
  gap: 18px;
}

.panel-header p {
  color: #64748b;
}

.visible-summary span {
  border-color: #e6ecf4;
  background: #f8fafc;
}

.table-wrap,
.audit-wrap {
  border-color: #dce4ee;
  border-radius: 8px;
  background: #fff;
}

.order-table,
.audit-table {
  font-size: 13px;
}

th {
  height: 48px;
  background: #f8fafc;
  color: #526174;
}

td {
  padding: 12px;
}

tr:hover td {
  background: #f8fbff;
}

.image-cell {
  width: 74px;
  height: 74px;
  border-radius: 8px;
  border-color: #cfd8e3;
  background: #f8fafc;
}

.cell-input,
.cell-select {
  height: 34px;
}

.product-name {
  font-size: 14px;
}

.spec-cell span {
  color: #667085;
}

.sku-total-number {
  font-size: 18px;
  color: #172033;
}

.row-actions {
  gap: 8px;
}

.compact-button {
  height: 34px;
}

.detail-panel {
  gap: 12px;
  padding: 14px;
}

.detail-section,
.timeline-panel {
  border-color: #e2e8f0;
  border-radius: 8px;
  box-shadow: none;
}

.detail-section h3 {
  font-size: 13px;
  color: #172033;
}

.audit-panel {
  margin-top: 0;
}

.modal-backdrop {
  z-index: 140;
  background: rgba(15, 23, 42, 0.48);
  backdrop-filter: blur(6px);
}

.confirm-modal {
  border-radius: 8px;
  padding: 22px;
  box-shadow: var(--shadow-md);
}

.confirm-summary,
.confirm-change-item {
  border-radius: 8px;
}

/* Compact in-app confirmation modal override */
.modal-backdrop {
  align-items: center;
  justify-items: center;
  padding: 18px;
}

.confirm-modal {
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr) auto;
  width: min(460px, calc(100vw - 36px));
  max-height: min(620px, calc(100vh - 36px));
  border-radius: 8px;
  padding: 18px;
}

.confirm-modal header {
  margin-bottom: 12px;
}

.confirm-modal .eyebrow {
  font-size: 11px;
}

.confirm-modal h2 {
  font-size: 20px;
}

.confirm-summary {
  grid-template-columns: 1fr;
  padding: 10px 12px;
}

.confirm-summary strong {
  font-size: 16px;
}

.confirm-change-list {
  max-height: none;
  overflow: auto;
  margin-top: 12px;
  padding-right: 2px;
}

.confirm-change-item {
  gap: 7px;
  padding: 10px 12px;
}

.confirm-change-item div {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
}

.confirm-change-item em,
.confirm-change-item strong {
  padding: 7px 8px;
  font-size: 13px;
}

.confirm-modal footer {
  position: sticky;
  bottom: 0;
  margin: 14px -18px -18px;
  border-top: 1px solid var(--border);
  padding: 12px 18px;
  background: #fff;
}

.confirm-modal footer button {
  min-width: 104px;
}

.modal-backdrop.hidden-view,
.app-toast.hidden-view,
.dashboard-view.hidden-view {
  display: none;
}

.dashboard-view {
  display: grid;
  gap: 16px;
}

.dashboard-total-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(150px, 1fr));
  gap: 14px;
}

.dashboard-status-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(180px, 1fr));
  gap: 14px;
}

.dashboard-payment-section {
  display: grid;
  gap: 10px;
  border: 1px solid #dfe7f1;
  border-radius: 10px;
  padding: 14px;
  background: #fff;
  box-shadow: var(--shadow-sm);
}

.dashboard-section-header {
  margin-bottom: 0;
}

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

.dashboard-payment-card {
  display: grid;
  height: auto;
  min-height: 108px;
  align-content: start;
  gap: 8px;
  border: 1px solid #dfe7f1;
  border-radius: 10px;
  padding: 14px;
  background: #fff;
  color: #0f172a;
  text-align: left;
}

button.dashboard-payment-card {
  background: #fff;
  color: #0f172a;
}

.dashboard-payment-card:hover {
  border-color: #b9c9dd;
  background: #f8fbff;
}

button.dashboard-payment-card:hover {
  background: #f8fbff;
}

.dashboard-payment-card span {
  color: #475569;
  font-size: 14px;
  font-weight: 850;
}

.dashboard-payment-card strong {
  color: #0f172a;
  font-size: 28px;
  line-height: 1;
}

.dashboard-payment-card em {
  color: #64748b;
  font-style: normal;
  font-size: 13px;
}

.dashboard-payment-card.unpaid {
  border-left: 5px solid #ef4444;
}

.dashboard-payment-card.partial {
  border-left: 5px solid #f59e0b;
}

.dashboard-payment-card.paid {
  border-left: 5px solid #059669;
}

.dashboard-status-card {
  display: grid;
  height: auto;
  min-height: 132px;
  align-content: start;
  gap: 8px;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 16px;
  background: #fff;
  color: var(--text);
  text-align: left;
}

.dashboard-status-card:hover {
  border-color: #b8c8dc;
  background: #f8fbff;
}

.dashboard-status-card span {
  color: #475467;
  font-weight: 850;
}

.dashboard-status-card strong {
  color: #101828;
  font-size: 30px;
  line-height: 1;
}

.dashboard-status-card em,
.dashboard-status-card small {
  color: var(--muted);
  font-style: normal;
  font-size: 13px;
}

.dashboard-status-card.purchasing {
  border-left: 4px solid #f97316;
}

.dashboard-status-card.domestic_warehouse {
  border-left: 4px solid #64748b;
}

.dashboard-status-card.sea_shipping {
  border-left: 4px solid #2563eb;
}

.dashboard-status-card.overseas_warehouse {
  border-left: 4px solid #059669;
}

.dashboard-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.8fr) minmax(320px, 0.8fr);
  gap: 16px;
}

.dashboard-panel {
  margin-top: 0;
}

.dashboard-table-wrap {
  max-height: 500px;
}

.dashboard-table td,
.dashboard-table th {
  white-space: nowrap;
}

.clickable-row {
  cursor: pointer;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  border-radius: 999px;
  padding: 0 10px;
  background: #eef2ff;
  color: #1d4ed8;
  font-size: 12px;
  font-weight: 850;
}

.alert-list {
  display: grid;
  max-height: 500px;
  gap: 10px;
  overflow: auto;
}

.alert-item {
  display: grid;
  height: auto;
  gap: 5px;
  border: 1px solid #fed7aa;
  border-radius: 8px;
  padding: 12px;
  background: #fff7ed;
  color: #9a3412;
  text-align: left;
}

.alert-item:hover {
  background: #ffedd5;
}

.alert-item span {
  font-size: 13px;
  font-weight: 850;
}

.alert-item strong {
  color: #101828;
  font-size: 15px;
}

.alert-item em,
.alert-item small {
  overflow: hidden;
  color: #667085;
  font-style: normal;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.empty-alert {
  border: 1px dashed var(--border);
  border-radius: 8px;
  padding: 24px;
  color: var(--muted);
  text-align: center;
}

/* UI polish pass: restrained desktop SaaS layout */
:root {
  --sidebar: #0f172a;
  --sidebar-soft: #1e293b;
  --page: #f5f7fb;
  --panel: #ffffff;
  --border: #d9e2ec;
  --text: #111827;
  --muted: #64748b;
  --primary: #2563eb;
  --primary-dark: #1d4ed8;
  --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.05);
  --shadow-md: 0 18px 48px rgba(15, 23, 42, 0.14);
}

body {
  background: var(--page);
}

.app-shell {
  grid-template-columns: 248px minmax(0, 1fr);
}

.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  padding: 22px 18px;
  border-right: 1px solid rgba(255, 255, 255, 0.08);
  background:
    linear-gradient(180deg, rgba(37, 99, 235, 0.12), rgba(37, 99, 235, 0) 230px),
    var(--sidebar);
}

.brand {
  min-height: 58px;
  margin-bottom: 26px;
}

.brand-mark {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  box-shadow: 0 10px 24px rgba(37, 99, 235, 0.28);
}

.brand strong {
  font-size: 17px;
}

.brand small {
  color: #94a3b8;
  font-size: 12px;
}

.sidebar nav {
  gap: 6px;
}

.sidebar a {
  display: flex;
  align-items: center;
  min-height: 42px;
  border: 1px solid transparent;
  border-radius: 8px;
  padding: 0 12px;
  color: #cbd5e1;
  font-size: 14px;
  font-weight: 750;
}

.sidebar a.active {
  border-color: rgba(255, 255, 255, 0.08);
  background: #243044;
}

.sidebar a:hover {
  background: #1b2638;
}

.content {
  padding: 24px 28px 34px;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  margin: -24px -28px 18px;
  border-bottom: 1px solid rgba(217, 226, 236, 0.9);
  padding: 18px 28px;
  background: rgba(245, 247, 251, 0.92);
  backdrop-filter: blur(12px);
}

h1 {
  font-size: 26px;
}

.eyebrow {
  color: #64748b;
  font-size: 12px;
}

button,
.primary-upload {
  min-height: 38px;
  border-radius: 8px;
  font-size: 14px;
}

.primary-upload,
button:not(.ghost-button):not(.secondary-button):not(.danger-button):not(.flow-step):not(.dashboard-status-card):not(.dashboard-payment-card):not(.alert-item):not(.health-item):not(.login-submit):not(.google-login):not(.link-button):not(.password-toggle) {
  background: #2563eb;
}

.ghost-button,
.secondary-button {
  border: 1px solid #d9e2ec;
  background: #fff;
  color: #334155;
}

.danger-button {
  border: 1px solid #fecaca;
  background: #fff1f2;
  color: #b42318;
}

.status-flow {
  min-height: 76px;
  margin-bottom: 14px;
  border: 1px solid #dfe7f1;
  border-radius: 10px;
  padding: 14px 18px;
  background: #fff;
  box-shadow: var(--shadow-sm);
}

.flow-step {
  min-width: 118px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 850;
  background: #f2f4f7;
  color: #344054;
  border-color: transparent;
  box-shadow: none;
}

.flow-step.selected {
  background: #eef2ff;
  color: #1e40af;
  border-color: #bfdbfe;
  box-shadow: 0 10px 22px rgba(37, 99, 235, 0.16);
}

.flow-step.active.selected {
  background: #f3e8ff;
  color: #7e22ce;
  border-color: #d8b4fe;
  box-shadow: 0 10px 22px rgba(126, 34, 206, 0.16);
}

.flow-step[data-status-tab='domestic_warehouse'].selected {
  background: var(--blue-bg);
  color: var(--blue);
  border-color: #bfdbfe;
  box-shadow: 0 10px 22px rgba(37, 99, 235, 0.16);
}

.flow-step[data-status-tab='sea_shipping'].selected {
  background: var(--purple-bg);
  color: var(--purple);
  border-color: #e9d5ff;
  box-shadow: 0 10px 22px rgba(124, 58, 237, 0.16);
}

.flow-step.success.selected {
  background: #ecfdf3;
  color: #047857;
  border-color: #bbf7d0;
  box-shadow: 0 10px 22px rgba(4, 120, 87, 0.16);
}

.flow-line {
  background: #d8e1ec;
}

.stat-grid,
.dashboard-total-grid {
  gap: 12px;
}

.stat-card {
  min-height: 104px;
  border: 1px solid #dfe7f1;
  border-radius: 10px;
  padding: 16px 16px 14px;
  background: #fff;
  box-shadow: var(--shadow-sm);
}

.stat-card::before {
  height: 0;
}

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

.stat-card strong {
  margin-top: 12px;
  color: #0f172a;
  font-size: 28px;
  line-height: 1;
}

.toolbar {
  grid-template-columns: minmax(360px, 1fr) 210px 210px;
  gap: 14px;
  margin-bottom: 16px;
  border: 1px solid #dfe7f1;
  border-radius: 10px;
  padding: 14px 16px;
  background: #fff;
  box-shadow: var(--shadow-sm);
}

label {
  gap: 8px;
  color: #334155;
  font-size: 13px;
  font-weight: 800;
}

input,
select {
  height: 38px;
  border-color: #d7e0ea;
  border-radius: 8px;
  color: #111827;
}

.panel {
  border: 1px solid #dfe7f1;
  border-radius: 10px;
  padding: 18px;
  background: #fff;
  box-shadow: var(--shadow-sm);
}

.panel-header {
  align-items: center;
  margin-bottom: 14px;
}

.panel-header h2 {
  color: #0f172a;
  font-size: 18px;
}

.panel-header p {
  max-width: 780px;
  color: #64748b;
  font-size: 13px;
}

.visible-summary span {
  min-height: 30px;
  border-radius: 8px;
  background: #f8fafc;
}

.table-wrap,
.audit-wrap,
.dashboard-table-wrap {
  border: 1px solid #dfe7f1;
  border-radius: 10px;
  overflow: auto;
}

table {
  border-collapse: separate;
  border-spacing: 0;
}

th {
  position: sticky;
  top: 0;
  z-index: 4;
  height: 44px;
  border-bottom: 1px solid #dfe7f1;
  background: #f8fafc;
  color: #475569;
  font-size: 13px;
  font-weight: 850;
}

td {
  border-bottom: 1px solid #eef2f7;
  padding: 11px 12px;
  vertical-align: middle;
}

tr:hover td {
  background: #f8fbff;
}

.image-cell {
  width: 68px;
  height: 68px;
  border-radius: 8px;
  background: #f8fafc;
  font-size: 12px;
}

.cell-input,
.cell-select {
  height: 36px;
  border-radius: 8px;
}

.product-name {
  font-weight: 800;
}

.spec-cell {
  min-width: 290px;
}

.spec-cell span {
  margin-top: 7px;
  color: #64748b;
  font-size: 12px;
}

.sku-total-number {
  min-width: 112px;
  color: #0f172a;
  font-size: 18px;
  font-weight: 850;
}

.compact-button {
  height: 34px;
  border-radius: 8px;
}

.dashboard-view {
  gap: 16px;
}

.dashboard-header {
  min-height: 56px;
}

.dashboard-total-grid {
  grid-template-columns: repeat(6, minmax(140px, 1fr));
}

.dashboard-total-grid .stat-card {
  min-height: 96px;
}

.dashboard-total-grid .stat-card strong {
  font-size: 25px;
}

.dashboard-status-grid {
  gap: 12px;
}

.dashboard-status-card {
  min-height: 138px;
  border: 1px solid #dfe7f1;
  border-radius: 10px;
  padding: 16px;
  background: #fff;
  box-shadow: var(--shadow-sm);
  transition: transform 0.14s ease, box-shadow 0.14s ease, border-color 0.14s ease;
}

button.dashboard-status-card {
  background: #fff;
  color: #0f172a;
}

.dashboard-status-card:hover {
  transform: translateY(-1px);
  border-color: #b9c9dd;
  background: #fff;
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.09);
}

button.dashboard-status-card:hover {
  background: #f8fbff;
}

.dashboard-status-card span {
  color: #334155;
  font-size: 14px;
}

.dashboard-status-card strong {
  margin-top: 2px;
  font-size: 32px;
}

.dashboard-status-card em {
  color: #475569;
  font-size: 13px;
}

.dashboard-status-card small {
  margin-top: auto;
  color: #94a3b8;
}

.dashboard-status-card.purchasing {
  border-left: 5px solid #f97316;
}

.dashboard-status-card.domestic_warehouse {
  border-left: 5px solid #64748b;
}

.dashboard-status-card.sea_shipping {
  border-left: 5px solid #2563eb;
}

.dashboard-status-card.overseas_warehouse {
  border-left: 5px solid #059669;
}

.dashboard-health-panel {
  border: 1px solid #dfe7f1;
  border-radius: 12px;
  padding: 16px;
  background: #ffffff;
  box-shadow: var(--shadow-sm);
}

.dashboard-section-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 12px;
}

.dashboard-section-title h3 {
  margin: 0;
  color: #0f172a;
  font-size: 17px;
  font-weight: 950;
}

.dashboard-section-title p {
  margin: 4px 0 0;
  color: #64748b;
  font-size: 13px;
  font-weight: 700;
}

.health-summary {
  display: flex;
  gap: 10px;
}

.health-summary span {
  display: inline-grid;
  min-width: 86px;
  padding: 9px 11px;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  background: #f8fafc;
}

.health-summary b {
  color: #0f172a;
  font-size: 20px;
  line-height: 1;
}

.health-summary em {
  margin-top: 4px;
  color: #64748b;
  font-size: 12px;
  font-style: normal;
  font-weight: 850;
}

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

.health-item {
  display: grid;
  gap: 5px;
  min-height: 88px;
  padding: 12px;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  background: #f8fafc;
  color: #0f172a;
  text-align: left;
  box-shadow: none;
}

.health-item:hover {
  transform: translateY(-1px);
  border-color: #bfdbfe;
  background: #ffffff;
}

.health-item span {
  color: #334155;
  font-size: 13px;
  font-weight: 900;
}

.health-item strong {
  color: #0f172a;
  font-size: 18px;
  font-weight: 950;
}

.health-item small {
  color: #64748b;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.35;
}

.health-item em {
  justify-self: start;
  margin-top: 2px;
  padding: 4px 8px;
  border-radius: 999px;
  background: #eef2ff;
  color: #1d4ed8;
  font-size: 11px;
  font-style: normal;
  font-weight: 900;
}

.health-item.critical {
  border-left: 4px solid #ef4444;
}

.health-item.warning {
  border-left: 4px solid #f59e0b;
}

.empty-health {
  grid-column: 1 / -1;
  padding: 16px;
  border: 1px solid #dbeafe;
  border-radius: 10px;
  background: #f8fbff;
  color: #1d4ed8;
  font-weight: 900;
  text-align: center;
}

.dashboard-layout {
  grid-template-columns: minmax(0, 1.65fr) minmax(340px, 0.85fr);
  gap: 16px;
  align-items: start;
}

.dashboard-panel {
  min-height: 0;
}

.dashboard-table-wrap {
  max-height: 520px;
}

.dashboard-table td:first-child strong {
  color: #0f172a;
  font-size: 13px;
}

.dashboard-table td:nth-child(3),
.dashboard-table td:nth-child(4),
.dashboard-table td:nth-child(5),
.dashboard-table td:nth-child(6),
.dashboard-table td:nth-child(7) {
  color: #111827;
  font-weight: 800;
  text-align: right;
}

.status-pill {
  border-radius: 8px;
  background: #eef2ff;
}

.status-pill.purchasing {
  background: #fff5eb;
  color: #c2410c;
}

.status-pill.domestic_warehouse {
  background: #eff6ff;
  color: #1d4ed8;
}

.status-pill.sea_shipping {
  background: #ecfeff;
  color: #0e7490;
}

.status-pill.overseas_warehouse {
  background: #ecfdf5;
  color: #047857;
}

.history-detail-body .order-detail-summary {
  grid-column: span 4;
}

.history-batch-section {
  grid-column: span 8;
}

.history-batch-wrap {
  grid-column: 1 / -1;
  overflow: auto;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
}

.mini-detail-table {
  width: 100%;
  min-width: 920px;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 12px;
}

.mini-detail-table th,
.mini-detail-table td {
  border-right: 1px solid #e2e8f0;
  border-bottom: 1px solid #e2e8f0;
  padding: 8px 10px;
  background: #fff;
  text-align: left;
  white-space: nowrap;
}

.mini-detail-table th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: #f8fafc;
  color: #475569;
  font-size: 11px;
  font-weight: 900;
}

.alert-list {
  max-height: 520px;
}

.alert-item {
  border: 1px solid #fed7aa;
  border-radius: 10px;
  padding: 12px 13px;
  background: #fffaf5;
  box-shadow: none;
}

.alert-item:hover {
  background: #fff7ed;
}

.alert-item span {
  color: #c2410c;
}

.alert-item strong {
  color: #0f172a;
}

.empty-alert {
  border-radius: 10px;
  background: #f8fafc;
}

.modal-backdrop {
  z-index: 140;
  background: rgba(15, 23, 42, 0.5);
  backdrop-filter: blur(8px);
}

.confirm-modal {
  width: min(500px, calc(100vw - 36px));
  border: 1px solid rgba(255, 255, 255, 0.84);
  border-radius: 12px;
  padding: 20px;
  box-shadow: var(--shadow-md);
}

.confirm-modal header {
  margin-bottom: 14px;
}

.confirm-modal .eyebrow {
  color: #64748b;
  font-size: 11px;
  letter-spacing: 0.02em;
}

.confirm-modal h2 {
  margin-top: 4px;
  font-size: 22px;
}

.confirm-summary {
  gap: 10px;
  border-color: #dfe7f1;
  border-radius: 10px;
  background: #f8fafc;
}

.confirm-summary span {
  color: #64748b;
}

.confirm-summary strong {
  color: #0f172a;
}

.confirm-change-item {
  border-color: #dfe7f1;
  border-radius: 10px;
  background: #fff;
}

.confirm-change-item span {
  color: #334155;
}

.confirm-modal footer {
  gap: 10px;
  border-top-color: #dfe7f1;
}

.confirm-modal footer button {
  min-width: 112px;
  border-radius: 8px;
}

.order-detail-backdrop {
  z-index: 132;
  align-items: center;
  justify-content: center;
  padding: 12px;
}

#confirmModal {
  z-index: 160;
}

.order-detail-modal {
  display: flex;
  flex-direction: column;
  width: min(1680px, calc(100vw - 24px));
  max-height: calc(100vh - 24px);
  overflow: hidden;
  border: 1px solid rgba(226, 232, 240, 0.95);
  border-radius: 14px;
  background: #f8fafc;
  box-shadow: 0 28px 80px rgba(15, 23, 42, 0.24);
}

#orderDetailContent {
  display: flex;
  min-height: 0;
  flex: 1;
  flex-direction: column;
}

.order-detail-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  border-bottom: 1px solid #e2e8f0;
  padding: 12px 16px;
  background: #ffffff;
}

.order-detail-product {
  display: grid;
  grid-template-columns: 60px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
}

.order-detail-image {
  display: grid;
  width: 60px;
  height: 60px;
  place-items: center;
  overflow: hidden;
  border: 1px dashed #cbd5e1;
  border-radius: 12px;
  background: #eef6ff;
  color: #64748b;
  font-weight: 850;
}

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

.order-detail-product h2 {
  margin-top: 3px;
  color: #0f172a;
  font-size: 20px;
  line-height: 1.2;
}

.order-detail-product span {
  display: inline-block;
  margin-top: 4px;
  color: #64748b;
  font-size: 12px;
  font-weight: 850;
}

.order-detail-head-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(112px, 1fr));
  gap: 10px;
}

.order-detail-head-metrics div {
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 8px 10px;
  background: #f8fafc;
}

.order-detail-head-metrics span,
.order-detail-head-metrics strong {
  display: block;
}

.order-detail-head-metrics span {
  color: #64748b;
  font-size: 12px;
  font-weight: 800;
}

.order-detail-head-metrics strong {
  margin-top: 3px;
  color: #0f172a;
  font-size: 17px;
  font-weight: 950;
}

.order-detail-body {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  align-content: start;
  gap: 10px;
  min-height: 0;
  max-height: none;
  flex: 1;
  overflow: auto;
  padding: 10px;
}

.order-detail-body .detail-section,
.order-detail-body .timeline-panel {
  gap: 8px;
  border-color: #e2e8f0;
  padding: 10px;
  box-shadow: none;
}

.order-detail-body .detail-section h3,
.order-detail-body .timeline-panel > strong {
  grid-column: 1 / -1;
  color: #0f172a;
  font-size: 14px;
}

.order-detail-body .detail-section label {
  display: grid;
  gap: 4px;
  color: #475569;
  font-size: 12px;
  font-weight: 850;
}

.order-detail-body .cell-input,
.order-detail-body .cell-select {
  height: 32px;
  min-height: 32px;
  padding: 0 10px;
  font-size: 13px;
}

.order-detail-body .order-detail-product-section,
.order-detail-body .order-detail-purchase,
.order-detail-body .order-detail-carton {
  grid-column: span 3;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.order-detail-body .order-detail-warehouse {
  grid-column: span 3;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.order-detail-body .order-detail-summary {
  grid-column: span 4;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.order-detail-body .timeline-panel {
  grid-column: span 8;
}

.order-detail-body .detail-subtitle,
.order-detail-body .calculation-note,
.order-detail-body .split-action-panel,
.order-detail-body .status-time-cell {
  grid-column: 1 / -1;
}

.sku-detail-body .sku-detail-identity {
  grid-column: span 5;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.sku-detail-body .sku-detail-carton {
  grid-column: span 3;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.carton-size-grid {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.carton-size-title {
  grid-column: 1 / -1;
  color: #64748b;
  font-size: 12px;
  font-weight: 800;
  margin-top: 2px;
}

.carton-size-stack {
  display: grid;
  gap: 4px;
  color: #334155;
  font-size: 12px;
  line-height: 1.25;
}

.carton-size-stack span {
  display: flex;
  gap: 6px;
  align-items: center;
  white-space: nowrap;
}

.carton-size-stack b {
  color: #64748b;
  font-size: 11px;
  min-width: 28px;
}

.carton-size-stack em {
  color: #2563eb;
  font-style: normal;
  font-weight: 800;
}

.sku-detail-body .sku-detail-purchase {
  grid-column: span 4;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.profit-detail-body .sku-detail-identity {
  grid-column: span 4;
}

.profit-detail-body .sku-detail-carton,
.profit-detail-body .sku-detail-purchase,
.profit-detail-body .sku-detail-cost-params,
.profit-detail-body .sku-detail-profit-result {
  grid-column: span 4;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.sku-modal-image-editor {
  grid-column: 1 / -1;
}

.order-detail-body .sku-modal-image-editor {
  grid-template-columns: 72px minmax(96px, auto) minmax(0, 1fr);
  gap: 6px 10px;
  align-items: center;
  border: 1px solid #edf2f7;
  border-radius: 10px;
  padding: 8px;
  background: #fbfdff;
}

.order-detail-body .sku-modal-image-editor > span {
  grid-column: 2;
  grid-row: 1;
}

.order-detail-body .sku-modal-image-editor .catalog-image-preview {
  grid-column: 1;
  grid-row: 1 / span 2;
}

.order-detail-body .sku-modal-image-editor .upload-image-button {
  grid-column: 2;
  grid-row: 2;
}

.order-detail-body .sku-modal-image-editor small {
  grid-column: 3;
  grid-row: 1 / span 2;
}

.order-detail-footer {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  border-top: 1px solid #e2e8f0;
  padding: 10px 16px;
  background: #ffffff;
}

.order-detail-footer button {
  min-width: 118px;
  height: 36px;
  border-radius: 8px;
}

.app-toast {
  top: 20px;
  right: 22px;
  border-color: #bfdbfe;
  border-radius: 10px;
  background: #eff6ff;
  box-shadow: 0 12px 32px rgba(15, 23, 42, 0.14);
}

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

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

/* Login and role UI */
.login-screen {
  display: grid;
  grid-template-columns: minmax(420px, 0.95fr) minmax(380px, 0.7fr);
  min-height: 100vh;
  background: #f5f7fb;
}

.login-screen.hidden-view {
  display: none;
}

.login-hero {
  display: grid;
  align-content: center;
  gap: 18px;
  padding: 64px;
  background:
    linear-gradient(180deg, rgba(37, 99, 235, 0.12), rgba(37, 99, 235, 0) 240px),
    #0f172a;
  color: #fff;
}

.login-brand-mark {
  display: grid;
  width: 54px;
  height: 54px;
  place-items: center;
  border-radius: 12px;
  background: #2563eb;
  font-size: 22px;
  font-weight: 900;
}

.login-hero .eyebrow {
  color: #93c5fd;
}

.login-hero h1 {
  max-width: 520px;
  color: #fff;
  font-size: 42px;
}

.login-hero p {
  max-width: 520px;
  color: #cbd5e1;
  font-size: 16px;
  line-height: 1.8;
}

.login-preview {
  display: grid;
  max-width: 420px;
  gap: 8px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 12px;
  padding: 18px;
  background: rgba(255, 255, 255, 0.06);
}

.login-preview span {
  color: #93c5fd;
  font-size: 13px;
  font-weight: 850;
}

.login-preview strong {
  color: #fff;
  font-size: 20px;
}

.login-preview em {
  color: #cbd5e1;
  font-style: normal;
}

.login-card {
  display: grid;
  align-self: center;
  justify-self: center;
  width: min(420px, calc(100% - 48px));
  gap: 18px;
  border: 1px solid #dfe7f1;
  border-radius: 14px;
  padding: 28px;
  background: #fff;
  box-shadow: 0 24px 80px rgba(15, 23, 42, 0.12);
}

.login-card h2 {
  margin-top: 4px;
  font-size: 28px;
}

.login-card p:not(.eyebrow) {
  margin-top: 8px;
  color: #64748b;
}

.login-card input {
  width: 100%;
  height: 42px;
}

.login-card button {
  height: 42px;
}

.login-error {
  border: 1px solid #fecaca;
  border-radius: 8px;
  padding: 10px 12px;
  background: #fff1f2;
  color: #b42318;
  font-size: 13px;
  font-weight: 800;
}

.account-apply-link {
  justify-self: center;
  height: auto;
  padding: 0;
  color: #2563eb;
  font-size: 13px;
  font-weight: 850;
}

.account-register-modal {
  width: min(560px, calc(100vw - 40px));
}

.modal-help {
  border: 1px solid #dbeafe;
  border-radius: 8px;
  padding: 10px 12px;
  background: #eff6ff;
  color: #475467;
  font-size: 13px;
  font-weight: 750;
}

.readonly-operator {
  min-width: 190px;
  justify-content: space-between;
}

.readonly-operator span,
.current-user span {
  color: #64748b;
  font-size: 12px;
  font-weight: 850;
}

.readonly-operator strong,
.current-user strong {
  color: #0f172a;
  font-size: 14px;
}

.current-user {
  display: grid;
  gap: 2px;
  min-width: 130px;
  border: 1px solid #dfe7f1;
  border-radius: 8px;
  padding: 7px 10px;
  background: #fff;
}

/* Animated character login screen */
.login-screen {
  grid-template-columns: minmax(560px, 1.35fr) minmax(430px, 0.85fr);
  overflow: hidden;
  background: #ececec;
}

.login-hero {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 100vh;
  padding: 48px;
  background: #ececec;
  color: #1d1d22;
}

.character-stage {
  position: relative;
  width: min(620px, 82%);
  height: 520px;
}

.character {
  position: absolute;
  overflow: hidden;
  box-shadow: 0 3px 0 rgba(0, 0, 0, 0.08);
  transition: transform 0.24s ease, border-radius 0.24s ease;
}

.character::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.18), transparent 42%);
  opacity: 0.45;
  pointer-events: none;
}

.purple-block {
  left: 205px;
  bottom: 170px;
  width: 190px;
  height: 280px;
  background: #6d28ff;
}

.black-block {
  left: 342px;
  bottom: 82px;
  width: 128px;
  height: 270px;
  background: #1d1e23;
  transform: rotate(0deg);
}

.yellow-pill {
  right: 56px;
  bottom: 78px;
  width: 142px;
  height: 228px;
  border-radius: 72px 72px 0 0;
  background: #f0d400;
}

.orange-dome {
  left: 42px;
  bottom: 76px;
  width: 360px;
  height: 180px;
  border-radius: 190px 190px 0 0;
  background: #ff812c;
}

.eye {
  position: absolute;
  width: 14px;
  height: 14px;
  border: 3px solid #fff;
  border-radius: 50%;
  background: #1d1e23;
  transform: translate(var(--eye-x, 0), var(--eye-y, 0));
  transition: transform 0.08s linear, height 0.18s ease, border-color 0.18s ease;
}

.purple-block .eye.left {
  left: 52px;
  top: 72px;
}

.purple-block .eye.right {
  right: 52px;
  top: 72px;
}

.black-block .eye.left {
  left: 28px;
  top: 95px;
}

.black-block .eye.right {
  right: 28px;
  top: 95px;
}

.yellow-pill .eye {
  width: 10px;
  height: 10px;
  border: 0;
}

.yellow-pill .eye.left {
  left: 42px;
  top: 70px;
}

.yellow-pill .eye.right {
  right: 38px;
  top: 70px;
}

.orange-dome .eye {
  width: 17px;
  height: 17px;
  border: 0;
}

.orange-dome .eye.left {
  left: 116px;
  top: 86px;
}

.orange-dome .eye.right {
  right: 116px;
  top: 86px;
}

.mouth {
  position: absolute;
  left: 50%;
  width: 42px;
  height: 12px;
  border-radius: 0 0 24px 24px;
  border-bottom: 7px solid #1d1e23;
  transform: translateX(-50%);
  transition: transform 0.2s ease, border-radius 0.2s ease, border-color 0.2s ease;
}

.purple-block .mouth {
  top: 108px;
  border-radius: 24px 24px 0 0;
  border-bottom: 0;
  border-top: 8px solid #1d1e23;
}

.black-block .mouth {
  display: none;
}

.yellow-pill .mouth {
  top: 106px;
  width: 76px;
  height: 0;
  border-radius: 0;
  border-bottom: 7px solid #1d1e23;
}

.orange-dome .mouth {
  top: 95px;
  width: 38px;
  border-bottom-width: 7px;
}

.focus-account .purple-block,
.focus-account .yellow-pill,
.focus-account .black-block {
  transform: translateY(-8px);
}

.focus-password .black-block {
  transform: translateY(-12px) rotate(-4deg);
}

.focus-password .purple-block .mouth {
  transform: translateX(-50%) scaleX(0.72);
}

.password-visible .orange-dome .mouth,
.login-success .orange-dome .mouth {
  border-radius: 0 0 24px 24px;
  border-bottom-width: 8px;
  transform: translateX(-50%) scaleX(1.15);
}

.login-failed .character {
  animation: characterShake 0.36s ease;
}

.login-success .character {
  animation: characterHop 0.5s ease;
}

.login-card {
  align-self: stretch;
  width: 100%;
  max-width: none;
  min-height: 100vh;
  justify-self: stretch;
  align-content: center;
  gap: 22px;
  border: 0;
  border-radius: 28px 0 0 28px;
  padding: 70px min(72px, 8vw);
  box-shadow: -18px 0 44px rgba(15, 23, 42, 0.08);
}

.login-logo-mark {
  justify-self: center;
  margin-bottom: 22px;
  color: #1d1e23;
  font-size: 24px;
  font-weight: 950;
  letter-spacing: 0.08em;
}

.language-toggle {
  border: 1px solid #d7deea;
  background: #ffffff;
  color: #111827;
  min-height: 42px;
  padding: 0 16px;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 800;
  cursor: pointer;
  white-space: nowrap;
}

.language-toggle:hover {
  border-color: #2f65df;
  color: #2f65df;
}

.login-language-toggle {
  justify-self: end;
  margin-bottom: 10px;
}

.sku-catalog-panel {
  margin-top: 18px;
}

.sku-catalog-toolbar {
  margin: 12px 0;
}

.empty-state {
  display: grid;
  gap: 8px;
  min-height: 220px;
  place-content: center;
  text-align: center;
  color: #64748b;
  border: 1px dashed #cbd5e1;
  border-radius: 14px;
  background: #f8fafc;
}

.empty-state strong {
  color: #172033;
  font-size: 22px;
}

.sku-catalog-wrap {
  overflow-x: hidden;
}

.sku-catalog-table th,
.sku-catalog-table td {
  vertical-align: middle;
  padding: 8px 10px;
}

.sku-catalog-table {
  width: 100%;
  min-width: 0;
  table-layout: fixed;
}

.sku-catalog-table th {
  height: 42px;
  font-size: 12px;
}

.sku-catalog-table td {
  height: 84px;
}

.sku-catalog-table th:nth-child(1),
.sku-catalog-table td:nth-child(1) {
  width: 8%;
}

.sku-catalog-table th:nth-child(2),
.sku-catalog-table td:nth-child(2) {
  width: 14%;
}

.sku-catalog-table th:nth-child(3),
.sku-catalog-table td:nth-child(3) {
  width: 25%;
}

.sku-catalog-table th:nth-child(4),
.sku-catalog-table td:nth-child(4) {
  width: 13%;
}

.sku-catalog-table th:nth-child(5),
.sku-catalog-table td:nth-child(5) {
  width: 13%;
  text-align: right;
}

.sku-catalog-table th:nth-child(6),
.sku-catalog-table td:nth-child(6) {
  width: 13%;
  text-align: right;
}

.sku-catalog-table th:nth-child(7),
.sku-catalog-table td:nth-child(7) {
  width: 14%;
}

.sku-catalog-table .row-actions {
  display: flex;
  align-items: center;
  gap: 5px;
  justify-content: flex-start;
  flex-wrap: nowrap;
}

.sku-catalog-table .compact-button {
  width: auto;
  min-width: 50px;
  height: 32px;
  padding: 0 8px;
  white-space: nowrap;
}

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

.profit-rate-actions {
  align-items: flex-end;
}

.exchange-rate-control {
  display: grid;
  gap: 6px;
  color: #64748b;
  font-size: 12px;
  font-weight: 800;
  min-width: 180px;
}

.exchange-rate-control input {
  height: 38px;
  text-align: right;
}

.profit-wrap {
  overflow-x: hidden;
}

.profit-table {
  width: 100%;
  min-width: 0;
  table-layout: fixed;
  font-size: 12px;
}

.profit-table th,
.profit-table td {
  padding: 8px 8px;
  vertical-align: middle;
  white-space: normal;
  line-height: 1.25;
}

.profit-table td:nth-child(n + 4):nth-child(-n + 10),
.profit-table th:nth-child(n + 4):nth-child(-n + 10) {
  text-align: right;
}

.profit-table th:nth-child(1),
.profit-table td:nth-child(1) {
  width: 7%;
}

.profit-table th:nth-child(2),
.profit-table td:nth-child(2) {
  width: 8%;
}

.profit-table th:nth-child(3),
.profit-table td:nth-child(3) {
  width: 17%;
}

.profit-table th:nth-child(4),
.profit-table td:nth-child(4) {
  width: 10%;
}

.profit-table th:nth-child(5),
.profit-table td:nth-child(5) {
  width: 8%;
}

.profit-table th:nth-child(6),
.profit-table td:nth-child(6) {
  width: 8%;
}

.profit-table th:nth-child(7),
.profit-table td:nth-child(7) {
  width: 9%;
}

.profit-table th:nth-child(8),
.profit-table td:nth-child(8) {
  width: 9%;
}

.profit-table th:nth-child(9),
.profit-table td:nth-child(9) {
  width: 10%;
}

.profit-table th:nth-child(10),
.profit-table td:nth-child(10) {
  width: 7%;
}

.profit-table th:nth-child(11),
.profit-table td:nth-child(11) {
  width: 7%;
}

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

.history-wrap {
  overflow-x: hidden;
}

.history-table {
  width: 100%;
  min-width: 0;
  table-layout: fixed;
  font-size: 12px;
}

.history-table th,
.history-table td {
  padding: 8px 8px;
  vertical-align: middle;
  white-space: normal;
  line-height: 1.25;
}

.history-table th:nth-child(1),
.history-table td:nth-child(1) {
  width: 7%;
}

.history-table th:nth-child(2),
.history-table td:nth-child(2) {
  width: 9%;
}

.history-table th:nth-child(3),
.history-table td:nth-child(3) {
  width: 20%;
}

.history-table th:nth-child(n + 4):nth-child(-n + 10),
.history-table td:nth-child(n + 4):nth-child(-n + 10) {
  width: 7%;
  text-align: right;
}

.history-table th:nth-child(11),
.history-table td:nth-child(11) {
  width: 8%;
}

.muted-line {
  display: block;
  margin-top: 5px;
  color: #64748b;
  font-size: 11px;
  font-weight: 750;
  line-height: 1.2;
}

.stock-spec-cell strong,
.stock-sku-cell strong,
.stock-quantity-cell strong {
  display: block;
  color: #0f172a;
  font-weight: 900;
  line-height: 1.2;
}

.stock-spec-cell span,
.stock-quantity-cell span {
  display: block;
  margin-top: 4px;
  color: #64748b;
  font-size: 12px;
  font-weight: 800;
}

.stock-quantity-cell {
  text-align: right;
}

.stock-quantity-cell strong {
  font-variant-numeric: tabular-nums;
  font-size: 18px;
}

.catalog-image-field {
  display: grid;
  grid-template-columns: 88px minmax(160px, 1fr);
  gap: 10px;
  align-items: center;
  min-width: 280px;
}

.small-image-cell {
  width: 62px;
  height: 62px;
  min-width: 62px;
  font-size: 13px;
}

.catalog-image-editor {
  display: grid;
  grid-template-columns: 74px 1fr;
  gap: 8px 10px;
  align-items: center;
}

.catalog-image-editor > span {
  color: #64748b;
  font-size: 12px;
  font-weight: 800;
}

.catalog-image-preview {
  width: 72px;
  height: 72px;
  min-width: 72px;
  justify-self: start;
  background: #fff;
}

.upload-image-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: fit-content;
  min-height: 32px;
  padding: 0 12px;
  border: 1px solid #bfdbfe;
  border-radius: 8px;
  background: #eff6ff;
  color: #1d4ed8;
  font-size: 13px;
  font-weight: 900;
  cursor: pointer;
}

.upload-image-button input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.catalog-image-editor small {
  color: #94a3b8;
  font-size: 12px;
  font-weight: 700;
}

.sku-catalog-table .cell-input {
  height: 32px;
  padding: 0 8px;
}

.sku-catalog-detail-panel {
  grid-template-columns: repeat(5, minmax(180px, 1fr));
}

.sku-cost-section {
  background: #f8fafc;
}

.positive-profit {
  color: #047857;
}

.negative-profit {
  color: #dc2626;
}

.login-card h2 {
  text-align: center;
  color: #1d1e23;
  font-size: 38px;
  line-height: 1.1;
}

.topbar {
  align-items: center;
  gap: 24px;
  margin-bottom: 18px;
  padding: 18px 20px;
  border: 1px solid #dbe4ee;
  border-radius: 14px;
  background:
    linear-gradient(135deg, rgba(37, 99, 235, 0.06), rgba(255, 255, 255, 0) 38%),
    #ffffff;
  box-shadow: 0 16px 34px rgba(15, 23, 42, 0.06);
}

.topbar > div:first-child {
  position: relative;
  min-width: 340px;
  padding-left: 16px;
}

.topbar > div:first-child::before {
  content: "";
  position: absolute;
  left: 0;
  top: 4px;
  width: 4px;
  height: calc(100% - 8px);
  border-radius: 999px;
  background: #2563eb;
}

.topbar .eyebrow {
  color: #667085;
  font-size: 12px;
}

.topbar h1 {
  margin-top: 3px;
  font-size: 27px;
  font-weight: 850;
}

.topbar-actions {
  display: grid;
  justify-items: end;
  gap: 8px;
  flex: 1;
}

.topbar-group {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  width: 100%;
  flex-wrap: wrap;
}

.identity-group {
  padding: 6px;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  background: #f8fafc;
  color: #475467;
}

.file-actions {
  border: 0;
  padding-top: 0;
}

.topbar .language-toggle,
.topbar .current-user,
.topbar .sync-status,
.topbar .operator-select,
.topbar .primary-upload,
.topbar .secondary-upload,
.topbar .secondary-button,
.topbar .ghost-button {
  min-height: 38px;
  border-radius: 9px;
  font-size: 14px;
  font-weight: 800;
  transition: transform 160ms ease, box-shadow 160ms ease, background 160ms ease, border-color 160ms ease;
}

.topbar .language-toggle {
  min-width: 96px;
  background: #ffffff;
  color: #1d4ed8;
  border: 1px solid #d7e2f2;
  box-shadow: none;
}

.topbar .language-toggle:hover,
.topbar .secondary-button:hover,
.topbar .ghost-button:hover,
.topbar .primary-upload:hover,
.topbar .secondary-upload:hover {
  transform: translateY(-1px);
}

.sync-status {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-width: 92px;
  height: 38px;
  border: 1px solid #d9e2ee;
  border-radius: 9px;
  padding: 0 12px;
  background: #ffffff;
  color: #667085;
  font-size: 12px;
  font-weight: 900;
  white-space: nowrap;
}

.sync-status::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: currentColor;
}

.sync-status.local {
  color: #667085;
}

.sync-status.syncing {
  border-color: #bfdbfe;
  background: #eff6ff;
  color: #2563eb;
}

.sync-status.synced {
  border-color: #bbf7d0;
  background: #f0fdf4;
  color: #15803d;
}

.sync-status.error {
  border-color: #fecaca;
  background: #fff1f2;
  color: #b42318;
}

.current-user,
.operator-select {
  display: flex;
  align-items: center;
  gap: 9px;
  min-width: 136px;
  padding: 0 12px;
  border: 1px solid transparent;
  background: transparent;
  color: #64748b;
}

.current-user span,
.operator-select span {
  font-size: 12px;
  font-weight: 850;
}

.current-user strong,
.operator-select strong {
  color: #101828;
  font-size: 15px;
  font-variant-numeric: tabular-nums;
}

.topbar .primary-upload {
  min-width: 126px;
  justify-content: center;
  background: #2563eb;
  border-color: #2563eb;
  box-shadow: 0 10px 18px rgba(37, 99, 235, 0.18);
}

.topbar .secondary-button {
  min-width: 92px;
  padding: 0 14px;
  background: #eef2f7;
  color: #263445;
}

.topbar .secondary-upload {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 92px;
  padding: 0 14px;
  border: 1px solid #d7e2f2;
  background: #ffffff;
  color: #263445;
  cursor: pointer;
}

.backup-status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 38px;
  padding: 0 12px;
  border: 1px solid #d7e2f2;
  border-radius: 9px;
  background: #ffffff;
  color: #64748b;
  white-space: nowrap;
}

.backup-status span {
  font-size: 12px;
  font-weight: 850;
}

.backup-status strong {
  color: #0f172a;
  font-size: 14px;
  font-weight: 900;
}

.topbar .secondary-upload input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.disabled-control {
  opacity: 0.48;
  pointer-events: none;
}

.account-panel {
  display: grid;
  gap: 18px;
}

.account-refresh-button {
  height: 38px;
  min-width: 104px;
}

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

.account-summary-card {
  display: grid;
  gap: 8px;
  min-height: 76px;
  border: 1px solid #e3eaf3;
  border-radius: 8px;
  padding: 14px 16px;
  background: #fff;
}

.account-summary-card span {
  color: #64748b;
  font-size: 13px;
  font-weight: 850;
}

.account-summary-card strong {
  color: #0f172a;
  font-size: 26px;
  line-height: 1;
}

.account-management-layout {
  display: block;
}

.account-card {
  border: 1px solid #e3eaf3;
  border-radius: 8px;
  background: #fff;
  overflow: hidden;
}

.account-card > header {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  border-bottom: 1px solid #edf2f7;
  padding: 18px 20px;
}

.account-card h3 {
  margin: 0;
  color: #0f172a;
  font-size: 18px;
  line-height: 1.2;
}

.account-card p {
  margin: 6px 0 0;
  color: #64748b;
  font-size: 13px;
  font-weight: 750;
}

.account-create-form {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
  padding: 16px 18px 18px;
  background: #fff;
}

.account-create-form label {
  display: grid;
  gap: 6px;
  min-width: 0;
  color: #475467;
  font-size: 12px;
  font-weight: 850;
}

.account-create-form input,
.account-create-form select,
.account-inline-input,
.account-inline-select {
  width: 100%;
  height: 38px;
  border: 1px solid #d3ddea;
  border-radius: 8px;
  padding: 0 10px;
  background: #fff;
  color: #0f172a;
  font-size: 14px;
  font-weight: 750;
}

.account-create-form button {
  height: 42px;
  white-space: nowrap;
}

.account-create-permissions {
  display: none;
}

.account-permission-field {
  display: grid;
  gap: 8px;
  border-top: 1px solid #edf2f7;
  padding-top: 14px;
  color: #475467;
  font-size: 12px;
  font-weight: 850;
}

.account-permission-grid,
.account-permission-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.permission-check {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 30px;
  border: 1px solid #d9e3f0;
  border-radius: 999px;
  padding: 5px 10px;
  background: #fff;
  color: #334155;
  font-size: 12px;
  font-weight: 850;
  white-space: nowrap;
}

.permission-check input {
  width: 14px;
  height: 14px;
  accent-color: #2563eb;
}

.account-permission-list {
  max-width: 520px;
}

.account-wrap {
  border: 0;
  border-radius: 0;
  box-shadow: none;
}

.account-wrap table {
  border: 0;
}

.account-table th,
.account-table td {
  vertical-align: middle;
  border-color: #edf2f7;
}

.account-table td {
  height: 62px;
  background: #fff;
}

.account-row-pending td {
  background: #fffaf0;
}

.account-identity {
  display: grid;
  gap: 4px;
}

.account-identity strong {
  color: #0f172a;
  font-size: 15px;
  line-height: 1.2;
}

.account-identity span {
  color: #64748b;
  font-size: 12px;
  font-weight: 750;
}

.account-chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}

.role-chip {
  display: inline-flex;
  align-items: center;
  height: 22px;
  border-radius: 999px;
  padding: 0 8px;
  background: #eff6ff;
  color: #2563eb;
  font-size: 11px;
  font-weight: 850;
}

.role-chip.super {
  background: #fff7ed;
  color: #c2410c;
}

.role-chip.pending {
  background: #fef3c7;
  color: #92400e;
}

.account-note {
  display: block;
  margin-top: 5px;
  color: #64748b;
  font-size: 11px;
  font-weight: 750;
}

.server-mode-notice {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0 0 18px;
  padding: 14px 16px;
  border: 1px solid #bfdbfe;
  border-radius: 8px;
  background: #eff6ff;
  color: #334155;
  font-size: 14px;
  font-weight: 750;
}

.server-mode-notice.hidden-view {
  display: none;
}

.server-mode-notice strong {
  color: #1d4ed8;
  font-size: 15px;
}

.server-mode-notice a {
  margin-left: auto;
  color: #2563eb;
  font-weight: 900;
  text-decoration: none;
}

.status-toggle {
  min-width: 78px;
  height: 32px;
  border-radius: 999px;
  border: 1px solid #d3ddea;
  background: #f8fafc;
  color: #475467;
  font-size: 13px;
}

.status-toggle.enabled {
  border-color: #bbf7d0;
  background: #f0fdf4;
  color: #15803d;
}

.status-toggle.disabled {
  border-color: #fecaca;
  background: #fff1f2;
  color: #b42318;
}

.status-toggle.pending {
  border-color: #fde68a;
  background: #fffbeb;
  color: #92400e;
}

.account-actions {
  display: flex;
  flex-direction: row;
  gap: 8px;
}

.account-actions .compact {
  min-width: 82px;
  height: 32px;
  border-radius: 8px;
  padding: 0 10px;
  font-size: 12px;
}

.account-permission-button {
  height: 34px;
  border: 1px solid #d3ddea;
  border-radius: 8px;
  padding: 0 12px;
  background: #fff;
  color: #1e40af;
  font-size: 13px;
  font-weight: 850;
}

.account-permission-button:hover {
  border-color: #93c5fd;
  background: #eff6ff;
}

.account-permission-modal {
  width: min(860px, calc(100vw - 48px));
}

.account-permission-dialog {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 260px;
  min-height: 360px;
  border: 1px solid #e3eaf3;
  border-radius: 8px;
  overflow: hidden;
}

.permission-option-panel {
  display: grid;
  gap: 18px;
  align-content: start;
  padding: 20px 22px;
  background: #fff;
}

.permission-group {
  display: grid;
  gap: 10px;
}

.permission-group header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: #475467;
  font-size: 14px;
  font-weight: 850;
}

.permission-group header label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #334155;
}

.permission-modal-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(128px, 1fr));
  gap: 10px;
}

.permission-modal-check {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  min-height: 38px;
  border: 1px solid #e5edf7;
  border-radius: 8px;
  padding: 0 10px;
  background: #fff;
  color: #1f2937;
  font-size: 14px;
  font-weight: 800;
  white-space: nowrap;
  writing-mode: horizontal-tb;
  word-break: keep-all;
}

.permission-modal-check span {
  overflow: hidden;
  text-overflow: ellipsis;
}

.permission-modal-check input,
.permission-group header input {
  width: 16px;
  height: 16px;
  accent-color: #2563eb;
}

.permission-selected-panel {
  display: grid;
  grid-template-rows: auto 1fr;
  gap: 10px;
  border-left: 1px solid #e3eaf3;
  padding: 20px 16px;
  background: #fbfdff;
}

.permission-selected-panel h3 {
  margin: 0 0 4px;
  color: #0f172a;
  font-size: 15px;
}

#accountPermissionSelectedList {
  display: grid;
  align-content: start;
  gap: 8px;
}

.permission-selected-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-height: 34px;
  border: 1px solid #e5edf7;
  border-radius: 8px;
  padding: 0 8px 0 10px;
  background: #fff;
  color: #334155;
  font-size: 13px;
  font-weight: 800;
}

.permission-selected-item span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.permission-selected-item .permission-remove-button {
  display: grid !important;
  place-items: center !important;
  width: 24px !important;
  min-width: 24px !important;
  height: 24px !important;
  min-height: 24px !important;
  border: 1px solid #d9e3f0 !important;
  border-radius: 999px !important;
  padding: 0 !important;
  background: #fff !important;
  color: #94a3b8 !important;
  box-shadow: none !important;
  font-size: 18px !important;
  font-weight: 800 !important;
  line-height: 1 !important;
}

.permission-selected-item .permission-remove-button:hover {
  border-color: #fecaca !important;
  background: #fff1f2 !important;
  color: #b42318 !important;
}

.permission-selected-item button {
  width: 22px;
  height: 22px;
  border: 1px solid #d9e3f0;
  border-radius: 999px;
  background: #fff;
  color: #94a3b8;
  font-size: 16px;
  line-height: 1;
}

.permission-selected-empty {
  color: #94a3b8;
  font-size: 13px;
  font-weight: 750;
}

.account-empty {
  height: 88px;
  color: #64748b;
  text-align: center;
  font-weight: 850;
}

@media (max-width: 1200px) {
  .account-management-layout {
    grid-template-columns: 1fr;
  }
}

.topbar .ghost-button {
  min-width: 76px;
  padding: 0 14px;
  border-color: #d7e2f2;
  color: #475467;
}

.topbar .clear-button {
  color: #b42318;
  border-color: #fecdca;
  background: #fffafa;
}

.topbar .clear-button:hover {
  background: #fff1f0;
}

.topbar .subtle-exit {
  min-width: 72px;
  color: #64748b;
}

.topbar {
  padding: 14px 16px;
  border-radius: 12px;
  box-shadow: 0 8px 22px rgba(15, 23, 42, 0.04);
}

.topbar-actions {
  gap: 6px;
}

.identity-group {
  width: auto;
  padding: 4px;
  border-color: #edf2f7;
  border-radius: 999px;
  background: #f8fafc;
}

.file-actions {
  width: auto;
  gap: 6px;
}

.topbar .language-toggle {
  min-width: 78px;
  min-height: 30px;
  padding: 0 12px;
  border-radius: 999px;
  background: #2563eb;
  color: #ffffff;
  font-size: 12px;
  border-color: #2563eb;
  box-shadow: 0 8px 16px rgba(37, 99, 235, 0.18);
}

.topbar .language-toggle:hover {
  background: #1d4ed8;
  color: #ffffff;
  border-color: #1d4ed8;
}

.current-user,
.operator-select {
  min-width: auto;
  min-height: 30px;
  gap: 6px;
  padding: 0 10px;
  border-left: 1px solid #e2e8f0;
  border-radius: 0;
  background: transparent;
}

.current-user span,
.operator-select span {
  color: #667085;
  font-size: 12px;
}

.current-user strong,
.operator-select strong {
  color: #101828;
  font-size: 14px;
}

.topbar .primary-upload,
.topbar .secondary-upload {
  min-width: 112px;
  min-height: 36px;
  border-radius: 9px;
  box-shadow: 0 8px 16px rgba(37, 99, 235, 0.14);
}

.topbar .secondary-button,
.topbar .secondary-upload,
.topbar .ghost-button {
  min-width: 72px;
  min-height: 36px;
  padding: 0 12px;
  border-radius: 9px;
  font-size: 13px;
}

.topbar .secondary-button {
  background: #f3f6fa;
  color: #334155;
}

.data-management-menu {
  position: relative;
}

.data-management-menu summary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 94px;
  min-height: 36px;
  padding: 0 12px;
  border: 1px solid #d7e2f2;
  border-radius: 9px;
  background: #ffffff;
  color: #334155;
  font-size: 13px;
  font-weight: 850;
  cursor: pointer;
  list-style: none;
  transition: transform 160ms ease, border-color 160ms ease, background 160ms ease;
}

.data-management-menu summary::-webkit-details-marker {
  display: none;
}

.data-management-menu summary::after {
  content: "";
  width: 7px;
  height: 7px;
  margin-left: 9px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: translateY(-2px) rotate(45deg);
}

.data-management-menu[open] summary,
.data-management-menu summary:hover {
  border-color: #bfdbfe;
  background: #eff6ff;
  color: #1d4ed8;
}

.data-management-popover {
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  z-index: 30;
  display: grid;
  gap: 8px;
  min-width: 210px;
  padding: 10px;
  border: 1px solid #dbe4f0;
  border-radius: 12px;
  background: #ffffff;
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.14);
}

.data-management-popover .backup-status,
.data-management-popover .secondary-button,
.data-management-popover .secondary-upload,
.data-management-popover .ghost-button {
  width: 100%;
  justify-content: center;
}

.topbar .clear-button {
  background: #fff;
  color: #b42318;
}

.topbar .subtle-exit {
  min-width: 58px;
}

.sku-catalog-table th:nth-child(1),
.sku-catalog-table td:nth-child(1) {
  width: 7%;
}

.sku-catalog-table th:nth-child(2),
.sku-catalog-table td:nth-child(2) {
  width: 12%;
}

.sku-catalog-table th:nth-child(3),
.sku-catalog-table td:nth-child(3) {
  width: 22%;
}

.sku-catalog-table th:nth-child(4),
.sku-catalog-table td:nth-child(4) {
  width: 15%;
}

.sku-catalog-table th:nth-child(5),
.sku-catalog-table td:nth-child(5) {
  width: 12%;
  text-align: right;
}

.sku-catalog-table th:nth-child(6),
.sku-catalog-table td:nth-child(6) {
  width: 11%;
  text-align: right;
}

.sku-catalog-table th:nth-child(7),
.sku-catalog-table td:nth-child(7) {
  width: 12%;
}

.sku-catalog-table th:nth-child(8),
.sku-catalog-table td:nth-child(8) {
  width: 9%;
}

.completeness-cell {
  display: grid;
  gap: 2px;
  align-content: center;
  min-height: 54px;
  padding: 7px 9px;
  border-radius: 10px;
  background: #f8fafc;
  color: #475569;
}

.completeness-cell strong {
  color: #0f172a;
  font-size: 16px;
  font-variant-numeric: tabular-nums;
}

.completeness-cell span,
.completeness-cell small {
  overflow: hidden;
  font-size: 11px;
  font-weight: 850;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.completeness-cell.complete {
  background: #ecfdf5;
  color: #047857;
}

.completeness-cell.incomplete {
  background: #fff7ed;
  color: #c2410c;
}

.profit-toolbar {
  grid-template-columns: minmax(280px, 1fr) minmax(150px, 180px) minmax(210px, 250px);
}

.low-profit-row {
  background: #fffaf5;
}

.profit-risk-tag {
  display: inline-flex;
  margin-top: 4px;
  padding: 2px 7px;
  border-radius: 999px;
  background: #ffedd5;
  color: #c2410c;
  font-size: 10px;
  font-weight: 900;
}

.alert-item b {
  justify-self: start;
  margin-top: 3px;
  color: #1d4ed8;
  font-size: 12px;
  font-weight: 900;
}

.status-flow .flow-step:not(.selected) {
  background: #f2f4f7;
  color: #344054;
  border-color: transparent;
  box-shadow: none;
}

.status-flow .flow-step.all.selected {
  background: #eef2ff;
  color: #1e40af;
  border-color: #bfdbfe;
}

.status-flow .flow-step.active.selected {
  background: #f3e8ff;
  color: #7e22ce;
  border-color: #d8b4fe;
}

.cell-select.status.purchasing {
  background: #f3e8ff;
  color: #7e22ce;
  border-color: #d8b4fe;
}

.dashboard-status-card.purchasing {
  border-left-color: #7e22ce;
}

.status-flow .flow-step[data-status-tab='domestic_warehouse'].selected {
  background: #edf5ff;
  color: #1d4ed8;
  border-color: #bfdbfe;
}

.status-flow .flow-step[data-status-tab='sea_shipping'].selected {
  background: #f5f3ff;
  color: #6d28d9;
  border-color: #ddd6fe;
}

.status-flow .flow-step.success.selected {
  background: #ecfdf5;
  color: #047857;
  border-color: #bbf7d0;
}

.login-card p:not(.eyebrow) {
  text-align: center;
  color: #74777f;
}

.line-field {
  gap: 8px;
  color: #1d1e23;
  font-size: 13px;
  font-weight: 800;
}

.line-field input {
  min-width: 0;
  border: 0;
  border-bottom: 2px solid #c9c9c9;
  border-radius: 0;
  padding: 0;
  color: #1d1e23;
  font-size: 24px;
  font-weight: 650;
}

.line-field input:focus {
  border-color: #c17857;
  box-shadow: none;
}

.password-field div {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 42px;
  align-items: end;
  gap: 10px;
}

.password-toggle {
  position: relative;
  width: 38px;
  height: 38px;
  border: 0;
  background: transparent;
}

.password-toggle::before {
  content: "";
  position: absolute;
  left: 7px;
  top: 15px;
  width: 24px;
  height: 12px;
  border: 3px solid #1d1e23;
  border-top: 0;
  border-radius: 0 0 24px 24px;
}

.password-toggle::after {
  content: "";
  position: absolute;
  left: 17px;
  top: 18px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #1d1e23;
}

.login-options {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: #74777f;
  font-size: 13px;
}

.remember-option {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-weight: 600;
}

.remember-option input {
  min-width: 0;
  width: 16px;
  height: 16px;
}

.link-button {
  height: auto;
  border: 0;
  padding: 0;
  background: transparent;
  color: #74777f;
  font-weight: 700;
}

.link-button:hover {
  background: transparent;
  color: #1d1e23;
}

.login-submit {
  height: 56px;
  border-radius: 999px;
  background: #1d1e23;
  font-size: 16px;
}

.login-submit:hover {
  background: #000;
}

.google-login {
  height: 54px;
  border-radius: 999px;
  background: #f4f4f4;
  color: #1d1e23;
  font-size: 15px;
}

.google-login span {
  color: #4285f4;
  font-weight: 900;
}

.google-login:hover {
  background: #ececec;
}

.signup-copy {
  align-self: end;
  margin-top: 44px;
  font-size: 13px;
}

button.login-submit {
  background: #1d1e23;
  color: #fff;
}

button.login-submit:hover {
  background: #000;
}

button.google-login {
  background: #f4f4f4;
  color: #1d1e23;
}

button.google-login:hover {
  background: #ececec;
}

button.link-button,
button.password-toggle {
  background: transparent;
}

button.link-button:hover,
button.password-toggle:hover {
  background: transparent;
}

@keyframes characterShake {
  0%,
  100% {
    transform: translateX(0);
  }
  30% {
    transform: translateX(-7px);
  }
  65% {
    transform: translateX(7px);
  }
}

@keyframes characterHop {
  0%,
  100% {
    transform: translateY(0);
  }
  45% {
    transform: translateY(-14px);
  }
}

@media (max-width: 1120px) {
  .app-shell {
    grid-template-columns: 196px minmax(0, 1fr);
  }

  .sidebar {
    padding: 18px 12px;
  }

  .brand {
    gap: 10px;
  }

  .brand-mark {
    width: 38px;
    height: 38px;
  }

  .sidebar a {
    min-height: 38px;
    padding: 9px 10px;
    font-size: 14px;
  }

  .content {
    padding: 18px 16px 34px;
  }

  .topbar {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
    margin: 0 0 18px;
  }

  .topbar > div:first-child {
    min-width: 0;
  }

  .topbar-actions {
    justify-items: stretch;
  }

  .topbar-group {
    justify-content: flex-start;
  }

  .identity-group,
  .file-actions {
    width: 100%;
  }

  .status-flow {
    display: grid;
    grid-template-columns: repeat(5, minmax(74px, 1fr));
    gap: 8px;
    min-height: 0;
  }

  .flow-line {
    display: none;
  }

  .flow-step {
    min-width: 0;
    width: 100%;
    padding: 8px 6px;
    font-size: 13px;
  }

  .stat-grid {
    grid-template-columns: repeat(auto-fit, minmax(118px, 1fr));
  }
}

@media (max-width: 900px) {
  .app-shell {
    grid-template-columns: 172px minmax(0, 1fr);
  }

  .brand small {
    display: none;
  }

  .topbar .primary-upload,
  .topbar .secondary-upload,
  .topbar .secondary-button,
  .topbar .ghost-button {
    flex: 1 1 118px;
  }

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

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

  .panel-header,
  .panel-actions {
    align-items: stretch;
  }

  .sku-catalog-table .row-actions {
    align-items: stretch;
    flex-direction: column;
    gap: 6px;
  }

  .sku-catalog-table .compact-button {
    width: 100%;
    min-width: 0;
    padding: 0 6px;
  }
}

/* Order/SKU workflow refinements */
.status-flow .flow-step {
  background: #ffffff;
  color: #1f2937;
  border: 1px solid #cbd5e1;
  box-shadow: none;
}

.status-flow .flow-step:not(.selected) {
  background: #ffffff;
  color: #1f2937;
  border: 1px solid #cbd5e1;
}

.status-flow .flow-step:not(.selected):hover {
  background: #f8fafc;
  color: #0f172a;
  border-color: #94a3b8;
}

.status-flow .flow-step.all.selected {
  background: #eef2ff;
  color: #1e40af;
  border-color: #c7d2fe;
  box-shadow: 0 8px 18px rgba(37, 99, 235, 0.12);
}

.status-flow .flow-step[data-status-tab='purchasing'].selected {
  background: #f3e8ff;
  color: #7e22ce;
  border-color: #d8b4fe;
  box-shadow: 0 8px 18px rgba(126, 34, 206, 0.13);
}

.status-flow .flow-step[data-status-tab='domestic_warehouse'].selected {
  background: #edf5ff;
  color: #1d4ed8;
  border-color: #bfdbfe;
  box-shadow: 0 8px 18px rgba(37, 99, 235, 0.13);
}

.status-flow .flow-step[data-status-tab='sea_shipping'].selected {
  background: #334155;
  color: #ffffff;
  border: 1px solid #334155;
  box-shadow: 0 8px 18px rgba(51, 65, 85, 0.18);
}

.status-flow .flow-step[data-status-tab='overseas_warehouse'].selected {
  background: #ecfdf5;
  color: #047857;
  border-color: #bbf7d0;
  box-shadow: 0 8px 18px rgba(4, 120, 87, 0.12);
}

.cell-select.status.purchasing {
  background: #f3e8ff;
  color: #7e22ce;
  border-color: #d8b4fe;
}

.cell-select.status.domestic_warehouse {
  background: #edf5ff;
  color: #1d4ed8;
  border-color: #bfdbfe;
}

.cell-select.status.sea_shipping {
  background: #f1f5f9;
  color: #334155;
  border-color: #cbd5e1;
}

.cell-select.status.overseas_warehouse {
  background: #ecfdf5;
  color: #047857;
  border-color: #bbf7d0;
}

.quantity-box-note {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
  margin-top: 7px;
  color: #64748b;
  font-size: 12px;
  line-height: 1.2;
  white-space: nowrap;
}

.quantity-box-note span {
  font-weight: 800;
}

.quantity-box-note strong {
  color: #0f172a;
  font-size: 13px;
}

.quantity-box-note em {
  overflow: hidden;
  max-width: 96px;
  color: #94a3b8;
  font-style: normal;
  text-overflow: ellipsis;
}

.topbar .clear-button {
  min-width: 96px;
  border-color: #fee2e2;
  background: #fffafa;
  color: #991b1b;
  font-size: 12px;
  box-shadow: none;
}

.topbar .clear-button:hover {
  border-color: #fecaca;
  background: #fff1f2;
}

.dashboard-status-card.purchasing {
  border-left-color: #7e22ce;
}

.dashboard-status-card.domestic_warehouse {
  border-left-color: #1d4ed8;
}

.dashboard-status-card.sea_shipping {
  border-left-color: #64748b;
}

.panel-actions .visible-summary {
  display: inline-flex;
  align-items: center;
  gap: 0;
  overflow: hidden;
  border: 1px solid #d7e2f2;
  border-radius: 10px;
  background: #f8fafc;
}

.panel-actions .visible-summary .summary-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 34px;
  border: 0;
  border-right: 1px solid #e2e8f0;
  border-radius: 0;
  padding: 0 12px;
  background: transparent;
  color: #64748b;
  font-size: 13px;
  font-weight: 800;
}

.panel-actions .visible-summary .summary-item:last-child {
  border-right: 0;
}

.panel-actions .visible-summary em {
  color: #64748b;
  font-style: normal;
  white-space: nowrap;
}

.panel-actions .visible-summary strong {
  min-width: 18px;
  color: #0f172a;
  font-size: 18px;
  font-weight: 950;
  line-height: 1;
  text-align: center;
}

/* Final status color lock: top flow, row select, and dashboard use one palette. */
.status-flow .flow-step[data-status-tab='purchasing'].selected,
.cell-select.status.purchasing,
.dashboard-status-card.purchasing {
  --status-bg: #f3e8ff;
  --status-text: #7e22ce;
  --status-border: #d8b4fe;
}

.status-flow .flow-step[data-status-tab='domestic_warehouse'].selected,
.cell-select.status.domestic_warehouse,
.dashboard-status-card.domestic_warehouse {
  --status-bg: #eff6ff;
  --status-text: #1d4ed8;
  --status-border: #bfdbfe;
}

.status-flow .flow-step[data-status-tab='sea_shipping'].selected,
.cell-select.status.sea_shipping,
.dashboard-status-card.sea_shipping {
  --status-bg: #334155;
  --status-text: #ffffff;
  --status-border: #334155;
}

.status-flow .flow-step[data-status-tab='overseas_warehouse'].selected,
.cell-select.status.overseas_warehouse,
.dashboard-status-card.overseas_warehouse {
  --status-bg: #ecfdf5;
  --status-text: #047857;
  --status-border: #bbf7d0;
}

.status-flow .flow-step[data-status-tab].selected {
  background: var(--status-bg);
  color: var(--status-text);
  border-color: var(--status-border);
}

.cell-select.status {
  background: var(--status-bg);
  color: var(--status-text);
  border-color: var(--status-border);
  font-weight: 850;
}

.cell-select.status.sea_shipping {
  background: var(--status-bg);
  color: var(--status-text);
  border-color: var(--status-border);
}

.dashboard-status-card.purchasing,
.dashboard-status-card.domestic_warehouse,
.dashboard-status-card.sea_shipping,
.dashboard-status-card.overseas_warehouse {
  border-left-color: var(--status-border);
}

.status-flow .flow-step[data-status-tab='purchasing'].selected,
.cell-select.status.purchasing {
  background: #f3e8ff !important;
  color: #7e22ce !important;
  border-color: #d8b4fe !important;
}

.status-flow .flow-step[data-status-tab='domestic_warehouse'].selected,
.cell-select.status.domestic_warehouse {
  background: #eff6ff !important;
  color: #1d4ed8 !important;
  border-color: #bfdbfe !important;
}

.status-flow .flow-step[data-status-tab='sea_shipping'].selected,
.cell-select.status.sea_shipping {
  background: #334155 !important;
  color: #ffffff !important;
  border-color: #334155 !important;
}

.status-flow .flow-step[data-status-tab='overseas_warehouse'].selected,
.cell-select.status.overseas_warehouse {
  background: #ecfdf5 !important;
  color: #047857 !important;
  border-color: #bbf7d0 !important;
}

/* Balanced process filter palette: equal weight, status color only marks the active step. */
.status-flow .flow-step {
  min-height: 46px;
  border-width: 1px !important;
  border-radius: 999px;
  background: #f8fafc !important;
  color: #64748b !important;
  box-shadow: none !important;
  font-weight: 900;
}

.status-flow .flow-step:not(.selected):hover {
  background: #f1f5f9 !important;
  color: #334155 !important;
  border-color: #cbd5e1 !important;
}

.status-flow .flow-step.all.selected {
  background: #eef2ff !important;
  color: #315fdc !important;
  border-color: #c7d2fe !important;
  box-shadow: 0 8px 18px rgba(49, 95, 220, 0.08) !important;
}

.status-flow .flow-step[data-status-tab='purchasing'].selected,
.cell-select.status.purchasing {
  background: #fff7ed !important;
  color: #c2410c !important;
  border-color: #fed7aa !important;
}

.status-flow .flow-step[data-status-tab='domestic_warehouse'].selected,
.cell-select.status.domestic_warehouse {
  background: #eff6ff !important;
  color: #1d4ed8 !important;
  border-color: #bfdbfe !important;
}

.status-flow .flow-step[data-status-tab='sea_shipping'].selected,
.cell-select.status.sea_shipping {
  background: #ecfeff !important;
  color: #0e7490 !important;
  border-color: #67e8f9 !important;
}

.status-flow .flow-step[data-status-tab='overseas_warehouse'].selected,
.cell-select.status.overseas_warehouse {
  background: #f0fdf4 !important;
  color: #15803d !important;
  border-color: #bbf7d0 !important;
}

.status-flow .flow-step[data-status-tab].selected {
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.07) !important;
}

.cell-select.status {
  border-width: 1px !important;
  box-shadow: none !important;
}

/* Main order row alignment: center the row visually while keeping inputs aligned. */
.order-table > tbody > tr:not(.detail-row) > td {
  vertical-align: middle;
}

.spec-cell,
.sku-cell,
.quantity-cell,
.sku-total-cell,
.status-cell {
  display: grid;
  align-content: center;
  gap: 7px;
  min-height: 65px;
}

.spec-cell {
  justify-content: stretch;
}

.sku-cell {
  justify-content: stretch;
}

.quantity-cell {
  justify-content: stretch;
}

.status-cell {
  justify-content: stretch;
}

.sku-total-cell {
  justify-content: end;
}

.sku-total-cell strong {
  color: #0f172a;
  font-size: 18px;
  font-weight: 950;
  line-height: 34px;
}

.sku-total-cell span {
  color: #64748b;
  font-size: 11px;
  font-weight: 800;
  line-height: 1.1;
  white-space: nowrap;
}

.sku-total-cell em {
  color: #64748b;
  font-size: 11px;
  font-style: normal;
  font-weight: 800;
  line-height: 1.1;
  white-space: nowrap;
}

.order-table > tbody > tr:not(.detail-row) .cell-input {
  height: 34px;
}

.order-table > tbody > tr:not(.detail-row) .cell-select.status {
  height: 34px;
}

.quantity-box-note {
  justify-content: flex-end;
  gap: 5px;
  margin-top: 0;
  font-size: 12px;
}

.quantity-box-note strong {
  font-size: 13px;
}

.quantity-box-note em {
  max-width: none;
}

/* Compact main order table: keep alignment, reduce grid weight and row height. */
.order-table:not(.sku-catalog-table) {
  --order-grid-line: #edf2f7;
}

.order-table:not(.sku-catalog-table) th,
.order-table:not(.sku-catalog-table) td {
  border-right-color: var(--order-grid-line);
  border-bottom-color: var(--order-grid-line);
}

.order-table:not(.sku-catalog-table) th {
  height: 40px;
  background: #fbfdff;
}

.order-table:not(.sku-catalog-table) > tbody > tr:not(.detail-row) > td {
  padding: 5px 10px;
}

.order-table:not(.sku-catalog-table) .image-cell {
  width: 54px;
  height: 54px;
}

.order-table:not(.sku-catalog-table) .spec-cell,
.order-table:not(.sku-catalog-table) .sku-cell,
.order-table:not(.sku-catalog-table) .quantity-cell,
.order-table:not(.sku-catalog-table) .sku-total-cell,
.order-table:not(.sku-catalog-table) .status-cell {
  min-height: 52px;
  gap: 5px;
}

.order-table:not(.sku-catalog-table) > tbody > tr:not(.detail-row) .cell-input,
.order-table:not(.sku-catalog-table) > tbody > tr:not(.detail-row) .cell-select.status {
  height: 32px;
  line-height: 32px;
}

.order-table:not(.sku-catalog-table) .spec-cell span,
.order-table:not(.sku-catalog-table) .quantity-box-note {
  font-size: 11px;
  line-height: 1.15;
}

.order-table:not(.sku-catalog-table) .sku-total-cell strong {
  line-height: 32px;
}

.order-table:not(.sku-catalog-table) .row-actions {
  gap: 5px;
}

.order-table:not(.sku-catalog-table) .compact-button {
  height: 30px;
  padding: 0 8px;
  font-size: 12px;
}

/* Import preview and purchase modal */
.purchase-modal {
  width: min(680px, calc(100vw - 42px));
}

.purchase-form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  padding: 0 36px 18px;
}

.purchase-form-grid label {
  display: grid;
  gap: 8px;
  color: #344054;
  font-size: 13px;
  font-weight: 800;
}

.purchase-preview {
  margin: 0 36px 24px;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  background: #f8fafc;
  overflow: hidden;
}

.purchase-preview-empty,
.purchase-preview-warning {
  padding: 16px;
  color: #667085;
  font-size: 14px;
  font-weight: 800;
}

.purchase-preview-warning {
  color: #b42318;
  background: #fff7f7;
}

.purchase-preview-card {
  display: grid;
  grid-template-columns: 60px minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  border-bottom: 1px solid #e2e8f0;
  background: #ffffff;
}

.purchase-preview-card strong,
.purchase-preview-card span {
  display: block;
}

.purchase-preview-card strong {
  color: #101828;
  font-size: 15px;
}

.purchase-preview-card span {
  margin-top: 4px;
  color: #667085;
  font-size: 13px;
  font-weight: 800;
}

.purchase-preview-metrics {
  display: grid;
  grid-template-columns: 1fr auto auto;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  color: #475467;
  font-size: 13px;
  font-weight: 800;
}

.purchase-preview-metrics + .purchase-preview-metrics {
  border-top: 1px solid #e2e8f0;
}

.purchase-preview-metrics strong {
  color: #101828;
  font-size: 16px;
}

.purchase-preview-metrics em {
  color: #98a2b3;
  font-style: normal;
}

.import-sample-item strong {
  line-height: 1.7;
  text-align: right;
}

.import-mapping-item div {
  align-items: stretch;
}

.mapping-chip-list {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 7px;
}

.mapping-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  max-width: 100%;
  border: 1px solid #dbeafe;
  border-radius: 999px;
  padding: 6px 9px;
  background: #f8fbff;
  color: #0f172a;
}

.mapping-chip b,
.mapping-chip em {
  padding: 0;
  background: transparent;
  font-size: 12px;
  font-style: normal;
  font-weight: 900;
}

.mapping-chip em {
  color: #475569;
}

.mapping-chip.missing {
  border-color: #fed7aa;
  background: #fff7ed;
}

.mapping-chip.missing em {
  color: #c2410c;
}

.split-action-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 12px;
  border: 1px solid #dbeafe;
  border-radius: 10px;
  background: #eff6ff;
}

.split-action-panel strong,
.split-action-panel span {
  display: block;
}

.split-action-panel strong {
  color: #1e3a8a;
  font-size: 13px;
}

.split-action-panel span {
  margin-top: 3px;
  color: #475569;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.35;
}

/* Order detail expansion: show the full row as one compact desktop panel. */
.order-table:not(.sku-catalog-table) .detail-row td {
  background: #f8fafc;
  padding: 0;
}

.order-table:not(.sku-catalog-table) .detail-panel {
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 10px;
  padding: 10px;
}

.order-table:not(.sku-catalog-table) .detail-section,
.order-table:not(.sku-catalog-table) .timeline-panel {
  gap: 8px;
  border-color: #e5edf6;
  border-radius: 8px;
  padding: 12px;
}

.order-table:not(.sku-catalog-table) .detail-section h3,
.order-table:not(.sku-catalog-table) .timeline-panel > strong {
  grid-column: 1 / -1;
  color: #172033;
  font-size: 13px;
  line-height: 1.2;
}

.order-table:not(.sku-catalog-table) .detail-section label {
  display: grid;
  gap: 5px;
  color: #475569;
  font-size: 12px;
  font-weight: 850;
  line-height: 1.2;
}

.order-table:not(.sku-catalog-table) .detail-section .cell-input,
.order-table:not(.sku-catalog-table) .detail-section .cell-select {
  height: 34px;
  min-height: 34px;
  padding: 0 10px;
  font-size: 13px;
}

.order-detail-purchase {
  grid-column: span 6;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.order-detail-carton {
  grid-column: span 6;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.order-detail-warehouse {
  grid-column: span 4;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.order-detail-summary {
  grid-column: span 3;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.order-table:not(.sku-catalog-table) .timeline-panel {
  grid-column: span 5;
}

.order-table:not(.sku-catalog-table) .detail-subtitle,
.order-table:not(.sku-catalog-table) .calculation-note,
.order-table:not(.sku-catalog-table) .split-action-panel,
.order-table:not(.sku-catalog-table) .status-time-cell {
  grid-column: 1 / -1;
}

.order-table:not(.sku-catalog-table) .detail-subtitle {
  margin-top: 2px;
  padding-top: 8px;
  font-size: 12px;
}

.order-table:not(.sku-catalog-table) .readonly-pair {
  gap: 3px;
  border: 1px solid #edf2f7;
  border-radius: 8px;
  padding: 7px 9px;
  background: #fbfdff;
}

.order-table:not(.sku-catalog-table) .readonly-pair span {
  font-size: 11px;
}

.order-table:not(.sku-catalog-table) .readonly-pair strong {
  font-size: 13px;
}

.order-table:not(.sku-catalog-table) .calculation-note {
  gap: 3px;
  padding: 8px 10px;
}

.order-table:not(.sku-catalog-table) .split-action-panel {
  padding: 9px 10px;
}

.order-table:not(.sku-catalog-table) .timeline-list {
  gap: 7px;
}

.order-table:not(.sku-catalog-table) .timeline-item {
  gap: 2px;
  padding: 6px 9px;
}

@media (max-width: 1280px) {
  .health-list {
    grid-template-columns: repeat(2, minmax(180px, 1fr));
  }

  .order-detail-purchase,
  .order-detail-carton,
  .order-detail-warehouse,
  .order-detail-summary,
  .order-table:not(.sku-catalog-table) .timeline-panel {
    grid-column: span 6;
  }
}

@media (max-width: 760px) {
  .dashboard-section-title {
    align-items: stretch;
    flex-direction: column;
  }

  .health-summary {
    flex-direction: column;
  }

  .health-list {
    grid-template-columns: 1fr;
  }

  .order-table:not(.sku-catalog-table) .detail-panel {
    grid-template-columns: 1fr;
  }

  .order-detail-purchase,
  .order-detail-carton,
  .order-detail-warehouse,
  .order-detail-summary,
  .order-table:not(.sku-catalog-table) .timeline-panel {
    grid-column: 1 / -1;
  }
}

@media (max-width: 720px) {
  .purchase-form-grid {
    grid-template-columns: 1fr;
    padding: 0 22px 16px;
  }

  .purchase-preview {
    margin: 0 22px 20px;
  }

  .purchase-preview-metrics {
    grid-template-columns: 1fr;
    gap: 4px;
  }
}

/* Human-centered clarity pass: final visual layer for daily purchasing work. */
:root {
  --page: #f5f7fb;
  --panel: #ffffff;
  --border: #dfe7f1;
  --border-soft: #edf2f7;
  --text: #0f172a;
  --muted: #667085;
  --primary: #2563eb;
  --primary-dark: #1e40af;
  --surface-soft: #f8fafc;
  --focus-ring: 0 0 0 3px rgba(37, 99, 235, 0.14);
  --shadow-card: 0 1px 2px rgba(15, 23, 42, 0.04), 0 8px 24px rgba(15, 23, 42, 0.04);
  --shadow-float: 0 24px 70px rgba(15, 23, 42, 0.22);
  --status-all-bg: #eef2ff;
  --status-all-text: #315fdc;
  --status-purchasing-bg: #fff7ed;
  --status-purchasing-text: #c2410c;
  --status-purchasing-border: #fed7aa;
  --status-domestic-bg: #eff6ff;
  --status-domestic-text: #1d4ed8;
  --status-domestic-border: #bfdbfe;
  --status-sea-bg: #ecfeff;
  --status-sea-text: #0e7490;
  --status-sea-border: #67e8f9;
  --status-overseas-bg: #f0fdf4;
  --status-overseas-text: #15803d;
  --status-overseas-border: #bbf7d0;
}

html {
  scroll-behavior: smooth;
}

body {
  background:
    radial-gradient(circle at top right, rgba(37, 99, 235, 0.08), transparent 320px),
    var(--page);
  color: var(--text);
  font-family:
    ui-sans-serif,
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    "PingFang SC",
    "Microsoft YaHei",
    Arial,
    sans-serif;
  font-variant-numeric: tabular-nums;
}

button,
a,
summary,
input,
select {
  transition:
    background-color 0.16s ease,
    border-color 0.16s ease,
    color 0.16s ease,
    box-shadow 0.16s ease,
    transform 0.16s ease;
}

button:active,
.primary-upload:active,
.secondary-upload:active,
summary:active {
  transform: translateY(1px);
}

button:focus-visible,
a:focus-visible,
summary:focus-visible,
input:focus-visible,
select:focus-visible {
  outline: 0;
  box-shadow: var(--focus-ring);
}

.app-shell {
  grid-template-columns: 236px minmax(0, 1fr);
}

.sidebar {
  padding: 20px 14px;
  background:
    linear-gradient(180deg, rgba(37, 99, 235, 0.13), rgba(15, 23, 42, 0) 235px),
    #0f172a;
}

.brand {
  margin-bottom: 18px;
  padding: 6px 8px 16px;
}

.brand-mark {
  width: 42px;
  height: 42px;
  border-radius: 10px;
}

.sidebar nav {
  gap: 4px;
}

.sidebar a {
  min-height: 40px;
  border-radius: 10px;
  padding: 0 12px;
  color: #cbd5e1;
  font-size: 14px;
}

.sidebar a.active {
  background: rgba(255, 255, 255, 0.1);
  box-shadow: inset 3px 0 0 #60a5fa;
}

.content {
  padding: 22px 26px 32px;
}

.topbar {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) auto;
  align-items: center;
  gap: 18px;
  margin: -22px -26px 18px;
  padding: 16px 26px;
  background: rgba(245, 247, 251, 0.96);
}

.topbar h1 {
  margin-top: 3px;
  color: #0f172a;
  font-size: 25px;
}

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

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

.identity-group {
  color: #475569;
}

.current-user,
.readonly-operator,
.language-toggle {
  min-height: 36px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: #ffffff;
}

.current-user,
.readonly-operator {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 0 12px;
}

.current-user span,
.readonly-operator span {
  color: #64748b;
  font-size: 12px;
  font-weight: 850;
}

.current-user strong,
.readonly-operator strong {
  color: #0f172a;
  font-size: 14px;
  font-weight: 900;
}

.language-toggle {
  min-width: 110px;
  color: #1d4ed8;
  font-weight: 900;
}

.file-actions {
  gap: 8px;
}

.primary-upload,
.file-actions > button,
.data-management-menu > summary {
  min-height: 38px;
  border-radius: 10px;
  padding: 0 14px;
  font-size: 13px;
}

.data-management-menu summary {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--border);
  background: #ffffff;
  color: #334155;
  font-weight: 850;
}

.data-management-popover {
  top: calc(100% + 8px);
  right: 0;
  width: 260px;
  border-radius: 12px;
  border-color: var(--border);
  box-shadow: var(--shadow-float);
}

.data-management-popover .backup-status {
  border-radius: 10px;
  background: #f8fbff;
}

.status-flow {
  min-height: 64px;
  padding: 12px 16px;
  border-radius: 12px;
  box-shadow: var(--shadow-card);
}

.status-flow .flow-step {
  min-width: 116px;
  min-height: 40px;
  border-radius: 999px;
  background: #ffffff !important;
  color: #64748b !important;
  border-color: #d9e2ec !important;
  font-size: 14px;
}

.status-flow .flow-step:not(.selected):hover {
  background: #f8fafc !important;
  color: #0f172a !important;
}

.status-flow .flow-step.all.selected {
  background: var(--status-all-bg) !important;
  color: var(--status-all-text) !important;
  border-color: #c7d2fe !important;
}

.status-flow .flow-step[data-status-tab="purchasing"].selected,
.cell-select.status.purchasing {
  background: var(--status-purchasing-bg) !important;
  color: var(--status-purchasing-text) !important;
  border-color: var(--status-purchasing-border) !important;
}

.status-flow .flow-step[data-status-tab="domestic_warehouse"].selected,
.cell-select.status.domestic_warehouse {
  background: var(--status-domestic-bg) !important;
  color: var(--status-domestic-text) !important;
  border-color: var(--status-domestic-border) !important;
}

.status-flow .flow-step[data-status-tab="sea_shipping"].selected,
.cell-select.status.sea_shipping {
  background: var(--status-sea-bg) !important;
  color: var(--status-sea-text) !important;
  border-color: var(--status-sea-border) !important;
}

.status-flow .flow-step[data-status-tab="overseas_warehouse"].selected,
.cell-select.status.overseas_warehouse {
  background: var(--status-overseas-bg) !important;
  color: var(--status-overseas-text) !important;
  border-color: var(--status-overseas-border) !important;
}

.flow-line {
  background: #dfe7f1;
}

.stat-grid,
.dashboard-total-grid {
  gap: 10px;
}

.stat-card {
  min-height: 92px;
  border-radius: 12px;
  border-color: var(--border);
  box-shadow: var(--shadow-card);
}

.stat-card span {
  color: #667085;
  font-size: 12px;
}

.stat-card strong {
  margin-top: 10px;
  font-size: 26px;
  letter-spacing: 0;
}

.toolbar {
  border-radius: 12px;
  border-color: var(--border);
  box-shadow: var(--shadow-card);
}

input,
select,
.cell-input,
.cell-select {
  border-radius: 10px;
  border-color: #d7e0ea;
}

.panel,
.dashboard-health-panel,
.dashboard-payment-section {
  border-radius: 12px;
  border-color: var(--border);
  box-shadow: var(--shadow-card);
}

.panel-header {
  margin-bottom: 12px;
}

.panel-header h2 {
  font-size: 19px;
  font-weight: 950;
}

.panel-header p {
  color: #667085;
  line-height: 1.45;
}

.panel-actions {
  gap: 10px;
}

.panel-actions .visible-summary {
  border-radius: 12px;
  border-color: var(--border);
}

.panel-actions .visible-summary .summary-item {
  min-height: 36px;
  padding: 0 12px;
}

.table-wrap,
.audit-wrap,
.dashboard-table-wrap {
  border-radius: 12px;
  border-color: var(--border);
}

.order-table,
.audit-table,
.dashboard-table,
.profit-table,
.history-table,
.sku-catalog-table {
  color: #172033;
}

th,
.audit-table th,
.mini-detail-table th {
  height: 40px;
  background: #f8fafc;
  color: #475569;
  font-size: 12px;
  font-weight: 900;
}

td,
.audit-table td,
.mini-detail-table td {
  border-color: var(--border-soft);
}

tr:hover td {
  background: #f9fbff;
}

.order-table:not(.sku-catalog-table) > tbody > tr:not(.detail-row) > td {
  padding: 6px 10px;
}

.order-table:not(.sku-catalog-table) .spec-cell,
.order-table:not(.sku-catalog-table) .sku-cell,
.order-table:not(.sku-catalog-table) .quantity-cell,
.order-table:not(.sku-catalog-table) .sku-total-cell,
.order-table:not(.sku-catalog-table) .status-cell {
  min-height: 54px;
  align-content: center;
}

.order-table:not(.sku-catalog-table) .cell-input,
.order-table:not(.sku-catalog-table) .cell-select {
  height: 32px;
}

.order-table:not(.sku-catalog-table) .image-cell {
  width: 54px;
  height: 54px;
}

.image-cell {
  border-color: #cfd8e3;
  background: #f8fafc;
}

.row-actions {
  gap: 6px;
}

.compact-button {
  border-radius: 9px;
  font-size: 12px;
}

.ghost-button:hover,
.secondary-button:hover {
  border-color: #bfccdc;
  background: #f8fafc;
}

.danger-button:hover {
  background: #fee2e2;
}

.sku-catalog-table,
.profit-table,
.history-table {
  min-width: 1120px;
}

.sku-catalog-table th,
.sku-catalog-table td,
.profit-table th,
.profit-table td,
.history-table th,
.history-table td {
  padding-top: 9px;
  padding-bottom: 9px;
}

.profit-table td:nth-child(n + 4):nth-child(-n + 10),
.history-table td:nth-child(n + 4):nth-child(-n + 10),
.dashboard-table td:nth-child(n + 3):nth-child(-n + 7) {
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.low-profit-row td {
  background: #fff8f1;
}

.profit-risk-tag,
.status-pill,
.filter-chip,
.health-item em {
  border-radius: 999px;
}

.modal-backdrop {
  background: rgba(15, 23, 42, 0.46);
}

.confirm-modal,
.order-detail-modal,
.purchase-modal {
  border-radius: 16px;
  border: 1px solid rgba(226, 232, 240, 0.92);
  box-shadow: var(--shadow-float);
}

.order-detail-modal {
  width: min(1440px, calc(100vw - 40px));
  max-height: min(840px, calc(100vh - 40px));
}

.order-detail-body,
.sku-detail-body {
  gap: 12px;
}

.detail-section,
.timeline-panel {
  border-radius: 12px;
  border-color: var(--border);
  background: #ffffff;
}

.detail-section h3 {
  color: #0f172a;
  font-weight: 950;
}

.readonly-pair {
  border-radius: 10px;
}

.purchase-modal {
  width: min(700px, calc(100vw - 44px));
}

.purchase-preview {
  border-radius: 12px;
}

.app-toast {
  border-radius: 12px;
  box-shadow: 0 18px 48px rgba(15, 23, 42, 0.18);
}

.dashboard-status-card,
.dashboard-payment-card,
.health-item,
.alert-item {
  border-radius: 12px;
}

.dashboard-status-card.purchasing {
  border-left-color: var(--status-purchasing-border);
}

.dashboard-status-card.domestic_warehouse {
  border-left-color: var(--status-domestic-border);
}

.dashboard-status-card.sea_shipping {
  border-left-color: var(--status-sea-border);
}

.dashboard-status-card.overseas_warehouse {
  border-left-color: var(--status-overseas-border);
}

.empty-state,
.empty-row,
.empty-alert,
.empty-health {
  border-radius: 12px;
  background: #f8fbff;
}

/* Data health cards should read like calm issue cards, not primary action buttons. */
.dashboard-health-panel {
  overflow: hidden;
}

.health-list {
  grid-template-columns: repeat(auto-fit, minmax(238px, 1fr)) !important;
  align-items: stretch;
  gap: 12px;
}

button.health-item,
.health-item {
  display: grid;
  grid-template-rows: auto auto 1fr auto;
  align-content: start;
  min-height: 116px;
  height: auto;
  padding: 14px 15px 13px 16px;
  border: 1px solid #e4eaf2 !important;
  border-left-width: 5px !important;
  border-radius: 12px;
  background: #ffffff !important;
  color: #0f172a !important;
  text-align: left;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
  transform: none;
}

button.health-item:hover,
.health-item:hover {
  border-color: #cfd8e3 !important;
  background: #fbfdff !important;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.08);
  transform: translateY(-1px);
}

button.health-item:focus-visible,
.health-item:focus-visible {
  outline: 3px solid rgba(37, 99, 235, 0.18);
  outline-offset: 2px;
}

button.health-item.critical,
.health-item.critical {
  border-left-color: #ef4444 !important;
  background: linear-gradient(90deg, rgba(254, 242, 242, 0.88), #ffffff 38%) !important;
}

button.health-item.warning,
.health-item.warning {
  border-left-color: #f59e0b !important;
  background: linear-gradient(90deg, rgba(255, 251, 235, 0.95), #ffffff 38%) !important;
}

.health-item span {
  color: #334155 !important;
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0;
}

.health-item strong {
  color: #0f172a !important;
  font-size: 19px;
  font-weight: 950;
  line-height: 1.15;
  letter-spacing: 0;
}

.health-item small {
  color: #667085 !important;
  font-size: 12px;
  font-weight: 750;
  line-height: 1.4;
  white-space: normal;
}

.health-item em {
  justify-self: start;
  align-self: end;
  margin-top: 7px;
  padding: 4px 9px;
  border: 1px solid #dbeafe;
  border-radius: 999px;
  background: #eff6ff !important;
  color: #1d4ed8 !important;
  font-size: 11px;
  font-style: normal;
  font-weight: 900;
  line-height: 1.2;
}

.health-summary span {
  background: #ffffff;
}

/* Main order table optical alignment: primary controls always share one baseline. */
.order-table:not(.sku-catalog-table) .spec-cell,
.order-table:not(.sku-catalog-table) .sku-cell,
.order-table:not(.sku-catalog-table) .quantity-cell,
.order-table:not(.sku-catalog-table) .sku-total-cell,
.order-table:not(.sku-catalog-table) .status-cell {
  display: grid;
  grid-template-rows: 34px 18px;
  align-content: center;
  align-items: center;
  min-height: 62px;
  gap: 5px;
}

.order-table:not(.sku-catalog-table) .spec-cell .cell-input,
.order-table:not(.sku-catalog-table) .sku-cell .cell-input,
.order-table:not(.sku-catalog-table) .quantity-cell .cell-input,
.order-table:not(.sku-catalog-table) .status-cell .cell-select {
  grid-row: 1;
  align-self: center;
}

.order-table:not(.sku-catalog-table) .spec-cell span,
.order-table:not(.sku-catalog-table) .quantity-box-note {
  grid-row: 2;
  align-self: start;
}

.order-table:not(.sku-catalog-table) .sku-cell::after,
.order-table:not(.sku-catalog-table) .status-cell::after {
  content: '';
  grid-row: 2;
  min-height: 18px;
}

.order-table:not(.sku-catalog-table) .sku-total-cell {
  justify-items: end;
  min-width: 0;
}

.order-table:not(.sku-catalog-table) .sku-total-cell strong {
  grid-row: 1;
  align-self: center;
  max-width: 100%;
  line-height: 34px;
  text-align: right;
}

.order-table:not(.sku-catalog-table) .sku-total-cell span {
  display: none;
}

.order-table:not(.sku-catalog-table) .sku-total-cell em {
  grid-row: 2;
  align-self: start;
  justify-self: end;
  overflow: hidden;
  max-width: 100%;
  color: #667085;
  font-size: 11px;
  font-style: normal;
  font-weight: 850;
  line-height: 18px;
  text-align: right;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.order-table:not(.sku-catalog-table) .quantity-box-note {
  min-width: 0;
  width: 100%;
  justify-content: flex-end;
  overflow: hidden;
  white-space: normal;
}

.order-table:not(.sku-catalog-table) .quantity-box-note span,
.order-table:not(.sku-catalog-table) .quantity-box-note strong {
  flex: 0 0 auto;
  white-space: nowrap;
}

.order-table:not(.sku-catalog-table) .quantity-box-note em {
  flex: 0 1 auto;
  overflow: hidden;
  min-width: 0;
  max-width: 58px;
  text-align: right;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* YOOWOO ecommerce brand layer */
:root {
  --sidebar: #12161f;
  --sidebar-soft: #202735;
  --page: #f6f7f9;
  --panel: #ffffff;
  --border: #dce3ec;
  --text: #111827;
  --muted: #667085;
  --primary: #2f6bff;
  --primary-dark: #1f55d6;
  --brand-ink: #15171c;
  --brand-blue: #2f6bff;
  --brand-blue-soft: #eaf1ff;
  --focus-ring: 0 0 0 3px rgba(47, 107, 255, 0.18);
}

body {
  background:
    radial-gradient(circle at top right, rgba(47, 107, 255, 0.07), transparent 340px),
    var(--page);
}

.sidebar {
  background:
    radial-gradient(circle at 22px 28px, rgba(47, 107, 255, 0.22), transparent 118px),
    linear-gradient(180deg, #151a24 0%, #10141d 100%);
}

.brand {
  align-items: center;
  gap: 12px;
  min-height: 64px;
  margin-bottom: 18px;
  padding: 6px 8px 18px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.09);
}

.yoowoo-mark {
  position: relative;
  display: grid;
  flex: 0 0 auto;
  width: 48px;
  height: 48px;
  place-items: center;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 14px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.16), transparent 36%),
    linear-gradient(135deg, #222832 0%, #12161f 58%, #080a0f 100%);
  box-shadow: 0 18px 36px rgba(0, 0, 0, 0.24);
}

.yoowoo-mark::after {
  content: "";
  position: absolute;
  right: -18px;
  bottom: -20px;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: var(--brand-blue);
  opacity: 0.95;
}

.yoowoo-mark span {
  position: relative;
  z-index: 1;
  color: #ffffff;
  font-size: 22px;
  font-weight: 950;
  letter-spacing: -0.04em;
  line-height: 1;
}

.yoowoo-mark em {
  position: absolute;
  z-index: 2;
  right: 8px;
  bottom: 7px;
  color: #ffffff;
  font-size: 17px;
  font-style: normal;
  font-weight: 950;
  line-height: 1;
}

.yoowoo-wordmark {
  display: grid;
  flex: 0 0 auto;
  min-width: 92px;
  height: 42px;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.13);
  border-radius: 14px;
  padding: 0 12px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.16), transparent 42%),
    linear-gradient(135deg, #20242d 0%, #11151d 62%, #080a0f 100%);
  color: #ffffff;
  box-shadow: 0 18px 34px rgba(0, 0, 0, 0.24);
  font-size: 17px;
  font-weight: 950;
  letter-spacing: -0.035em;
  line-height: 1;
}

.yoowoo-wordmark::after {
  content: "";
  position: absolute;
}

.sidebar-logo-mark {
  min-width: 88px;
  height: 40px;
  border-radius: 13px;
  font-size: 16px;
}

.brand strong {
  display: block;
  color: #ffffff;
  font-size: 16px;
  font-weight: 950;
  letter-spacing: 0;
  line-height: 1.15;
}

.brand small {
  display: block;
  margin-top: 4px;
  color: #9aa7b8;
  font-size: 12px;
  font-weight: 750;
}

.sidebar a.active {
  background: rgba(255, 255, 255, 0.09);
  box-shadow: inset 3px 0 0 var(--brand-blue);
}

.sidebar a:hover {
  background: rgba(255, 255, 255, 0.07);
}

.primary-upload,
button:not(.ghost-button):not(.secondary-button):not(.danger-button):not(.flow-step):not(.dashboard-status-card):not(.dashboard-payment-card):not(.alert-item):not(.health-item):not(.login-submit):not(.google-login):not(.link-button):not(.password-toggle) {
  background: var(--primary);
}

.primary-upload:hover,
button:not(.ghost-button):not(.secondary-button):not(.danger-button):not(.flow-step):not(.dashboard-status-card):not(.dashboard-payment-card):not(.alert-item):not(.health-item):not(.login-submit):not(.google-login):not(.link-button):not(.password-toggle):hover {
  background: var(--primary-dark);
}

.login-screen {
  background: #f1f3f6;
}

.login-hero {
  background:
    radial-gradient(circle at 68% 18%, rgba(47, 107, 255, 0.11), transparent 280px),
    #f1f3f6;
}

.login-card {
  background: #ffffff;
  box-shadow: -18px 0 54px rgba(17, 24, 39, 0.10);
}

.login-brand-logo {
  display: flex;
  align-items: center;
  justify-content: center;
  justify-self: center;
  width: 100%;
  margin-bottom: 14px;
  color: var(--brand-ink);
}

.login-brand-logo .yoowoo-mark {
  width: 54px;
  height: 54px;
  border-radius: 16px;
}

.login-brand-logo .yoowoo-mark span {
  font-size: 25px;
}

.login-brand-logo .yoowoo-wordmark {
  min-width: 128px;
  height: 54px;
  border-color: rgba(17, 24, 39, 0.08);
  border-radius: 16px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.2), transparent 42%),
    linear-gradient(135deg, #2a2f39 0%, #15171c 62%, #090a0d 100%);
  box-shadow: 0 18px 40px rgba(17, 24, 39, 0.18);
  font-size: 22px;
}

.yoowoo-logo-image {
  display: block;
  width: auto;
  object-fit: contain;
}

.sidebar-logo-image {
  height: 38px;
  max-width: 116px;
  border-radius: 12px;
  padding: 6px 8px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 16px 34px rgba(0, 0, 0, 0.2);
}

.login-logo-image {
  height: 76px;
  max-width: 265px;
  border-radius: 0;
  padding: 0;
  background: transparent;
  box-shadow: none;
  filter: drop-shadow(0 10px 18px rgba(17, 24, 39, 0.10));
}

.login-brand-logo strong {
  display: block;
  color: var(--brand-ink);
  font-size: 22px;
  font-weight: 950;
  line-height: 1.1;
}

.login-brand-logo small {
  display: block;
  margin-top: 5px;
  color: #667085;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.12em;
}

.login-logo-mark {
  display: none;
}

.login-card h2 {
  color: var(--brand-ink);
}

.login-submit {
  background: var(--brand-ink);
  color: #ffffff;
}

.login-submit:hover {
  background: #080a0f;
}

.google-login {
  background: #f5f6f8;
}

/* Account management: calmer admin-table layout and permission dialog. */
.account-card {
  border-color: #dde6f1;
  box-shadow: 0 16px 38px rgba(15, 23, 42, 0.05);
}

.account-card > header {
  align-items: center;
  background: #fbfcfe;
}

.account-wrap {
  overflow-x: auto;
}

.account-table {
  min-width: 1080px;
}

.account-table th {
  height: 46px;
  background: #f8fafc;
  color: #475569;
  font-size: 12px;
  letter-spacing: 0;
}

.account-table td {
  height: 74px;
  border-color: #edf2f7;
  padding-top: 12px;
  padding-bottom: 12px;
}

.account-table tbody tr:hover td {
  background: #fbfdff;
}

.account-row-pending td {
  background: #fffdf6;
}

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

.account-identity span,
.account-note,
.account-meta-line {
  color: #64748b;
  font-size: 12px;
}

.account-person-card {
  display: grid;
  gap: 7px;
}

.account-meta-line {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  min-height: 18px;
  font-weight: 750;
}

.account-inline-input,
.account-inline-select {
  height: 36px;
  border-color: #dbe5f1;
  background: #fff;
  font-size: 13px;
}

.account-inline-input:focus,
.account-inline-select:focus {
  border-color: #94a3b8;
  box-shadow: 0 0 0 3px rgba(148, 163, 184, 0.16);
  outline: none;
}

.account-permission-cell {
  display: grid;
  gap: 7px;
  max-width: 250px;
}

.account-permission-button {
  width: fit-content;
  height: 34px;
  border-color: #d7e0ea;
  border-radius: 8px;
  background: #f8fafc;
  color: #334155;
  font-size: 12px;
  font-weight: 900;
}

.account-permission-button:hover {
  border-color: #b8c4d3;
  background: #eef2f7;
  color: #0f172a;
}

.account-permission-button:disabled {
  cursor: not-allowed;
  opacity: 0.52;
}

.status-toggle {
  font-weight: 900;
}

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

.account-actions .compact {
  min-width: 72px;
  height: 30px;
  border-radius: 8px;
}

.account-permission-modal {
  width: min(940px, calc(100vw - 48px));
  max-height: calc(100vh - 72px);
  overflow: hidden;
}

.account-permission-modal > header {
  padding-bottom: 16px;
}

.account-permission-dialog {
  grid-template-columns: minmax(0, 1fr) 270px;
  min-height: 340px;
  border-color: #dce6f2;
  background: #fff;
}

.permission-option-panel {
  gap: 14px;
  padding: 20px;
}

.permission-panel-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  padding-bottom: 14px;
  border-bottom: 1px solid #edf2f7;
}

.permission-panel-header div {
  display: grid;
  gap: 4px;
}

.permission-panel-header strong {
  color: #0f172a;
  font-size: 16px;
  line-height: 1.2;
}

.permission-panel-header span {
  color: #64748b;
  font-size: 12px;
  font-weight: 800;
}

.permission-panel-header label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 34px;
  border: 1px solid #d7e0ea;
  border-radius: 999px;
  padding: 0 12px;
  background: #f8fafc;
  color: #334155;
  font-size: 12px;
  font-weight: 900;
  white-space: nowrap;
}

.permission-modal-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.permission-modal-check {
  min-height: 46px;
  border-color: #dfe8f3;
  border-radius: 8px;
  padding: 0 14px;
  background: #fff;
  color: #1f2937;
  font-size: 14px;
  line-height: 1.2;
  writing-mode: horizontal-tb;
}

.permission-modal-check:hover {
  border-color: #bfccda;
  background: #fbfdff;
}

.permission-modal-check input,
.permission-panel-header input {
  accent-color: #111827;
}

.permission-modal-check span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.permission-selected-panel {
  border-left-color: #dce6f2;
  background: #f8fafc;
}

#accountPermissionSelectedList {
  gap: 8px;
}

.permission-selected-item {
  min-height: 36px;
  border-color: #dde6f1;
  background: #fff;
  font-size: 13px;
}

.permission-selected-item .permission-remove-button {
  border-color: #d7e0ea !important;
  background: #f8fafc !important;
  color: #64748b !important;
}

.permission-confirm-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.permission-confirm-grid em {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  border: 1px solid #dfe8f3;
  border-radius: 999px;
  padding: 0 10px;
  background: #f8fafc;
  color: #334155;
  font-size: 12px;
  font-style: normal;
  font-weight: 900;
}

button.account-permission-button {
  border-color: #d7e0ea !important;
  background: #f8fafc !important;
  color: #334155 !important;
  box-shadow: none !important;
}

button.account-permission-button:hover {
  border-color: #b8c4d3 !important;
  background: #eef2f7 !important;
  color: #0f172a !important;
}

.account-panel {
  gap: 12px;
}

.account-panel > .panel-header {
  margin-bottom: 0;
}

.account-summary-grid {
  gap: 8px;
}

.account-summary-card {
  min-height: 54px;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
}

.account-summary-card span {
  font-size: 12px;
}

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

.account-list-card > header {
  padding: 14px 18px;
}

.account-list-card h3 {
  font-size: 17px;
}

.account-list-card p {
  margin-top: 4px;
  font-size: 12px;
}

.account-wrap {
  overflow-x: hidden;
}

.account-table {
  width: 100%;
  min-width: 0;
  table-layout: fixed;
}

.account-table th,
.account-table td {
  padding: 10px 12px;
}

.account-table th:nth-child(1),
.account-table td:nth-child(1) {
  width: 10%;
}

.account-table th:nth-child(2),
.account-table td:nth-child(2) {
  width: 20%;
}

.account-table th:nth-child(3),
.account-table td:nth-child(3) {
  width: 15%;
}

.account-table th:nth-child(4),
.account-table td:nth-child(4) {
  width: 24%;
}

.account-table th:nth-child(5),
.account-table td:nth-child(5) {
  width: 9%;
}

.account-table th:nth-child(6),
.account-table td:nth-child(6) {
  width: 13%;
}

.account-table th:nth-child(7),
.account-table td:nth-child(7) {
  width: 9%;
}

.account-table td {
  overflow: hidden;
}

.account-table td {
  height: 72px;
}

.account-identity {
  gap: 3px;
}

.account-identity strong {
  max-width: 100%;
  overflow: hidden;
  font-size: 14px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.account-chip-row {
  margin-top: 7px;
}

.account-person-card {
  gap: 6px;
}

.account-meta-line {
  gap: 6px;
  overflow: hidden;
  white-space: nowrap;
}

.account-meta-line span {
  overflow: hidden;
  text-overflow: ellipsis;
}

.account-inline-input,
.account-inline-select {
  display: block;
  min-width: 0;
  max-width: 100%;
  height: 34px;
  border-radius: 8px;
}

.account-permission-cell {
  display: grid;
  grid-template-columns: 106px minmax(0, 1fr);
  align-items: center;
  max-width: none;
  gap: 10px;
}

.account-permission-cell .account-note {
  display: -webkit-box;
  margin-top: 0;
  overflow: hidden;
  line-height: 1.35;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.account-table td:nth-child(3) .account-inline-select {
  width: 100%;
  max-width: 172px;
}

.account-table td:nth-child(4) {
  overflow: hidden;
}

.account-table td:nth-child(4) .account-permission-button {
  width: 100%;
  max-width: 106px;
  padding: 0 10px !important;
}

.account-permission-summary {
  display: grid;
  min-width: 0;
  gap: 5px;
}

.account-permission-summary strong {
  overflow: hidden;
  color: #243044;
  font-size: 12px;
  font-weight: 950;
  line-height: 1.15;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.account-permission-preview {
  display: flex;
  align-items: center;
  gap: 4px;
  overflow: hidden;
  min-width: 0;
}

.account-permission-preview span,
.account-permission-preview em {
  display: inline-flex;
  flex: 0 1 auto;
  align-items: center;
  max-width: 72px;
  height: 21px;
  border: 1px solid #dfe7f0;
  border-radius: 999px;
  padding: 0 7px;
  background: #f8fafc;
  color: #526071;
  font-size: 10px;
  font-style: normal;
  font-weight: 850;
  line-height: 1;
  text-overflow: ellipsis;
  white-space: nowrap;
  overflow: hidden;
}

.account-permission-preview em {
  flex: 0 0 auto;
  max-width: none;
  border-color: #cfd8e3;
  background: #eef2f7;
  color: #334155;
}

.account-permission-preview.empty span {
  max-width: 118px;
  color: #98a2b3;
}

button.status-toggle {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 6px !important;
  min-width: 76px !important;
  height: 34px !important;
  border-radius: 999px !important;
  padding: 0 12px !important;
  box-shadow: none !important;
  font-size: 13px !important;
  font-weight: 950 !important;
}

button.status-toggle::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: currentColor;
}

button.status-toggle.enabled {
  border-color: #9fe7c4 !important;
  background: #eafff4 !important;
  color: #047857 !important;
}

button.status-toggle.disabled {
  border-color: #fecaca !important;
  background: #fff1f2 !important;
  color: #b42318 !important;
}

button.status-toggle.pending {
  border-color: #f8d98b !important;
  background: #fffbeb !important;
  color: #92400e !important;
}

.account-actions {
  gap: 4px;
  flex-wrap: wrap;
}

.account-actions .compact {
  min-width: 58px;
  height: 28px;
  padding: 0 7px;
  font-size: 11px;
}

@media (max-width: 1280px) {
  .account-wrap {
    overflow-x: auto;
  }

  .account-table {
    min-width: 980px;
  }
}

@media (max-width: 1360px) {
  .topbar {
    grid-template-columns: 1fr;
    align-items: stretch;
  }

  .topbar-actions,
  .topbar-group {
    justify-content: flex-start;
  }

  .toolbar {
    grid-template-columns: minmax(260px, 1fr) minmax(160px, 200px) minmax(160px, 200px);
  }
}

@media (max-width: 980px) {
  .app-shell {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: relative;
    height: auto;
  }

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

  .content {
    padding: 18px;
  }

  .topbar {
    margin: -18px -18px 16px;
    padding: 16px 18px;
  }

  .status-flow {
    overflow-x: auto;
  }

  .flow-line {
    min-width: 36px;
  }

  .stat-grid,
  .dashboard-total-grid,
  .dashboard-status-grid,
  .dashboard-payment-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .toolbar,
  .audit-toolbar,
  .profit-toolbar,
  .history-toolbar,
  .sku-catalog-toolbar {
    grid-template-columns: 1fr;
  }
}
