:root {
  color-scheme: light;
  --bg: #f8fafc;
  --surface: #ffffff;
  --surface-soft: #f1f5f9;
  --line: #e2e8f0;
  --line-strong: #cbd5e1;
  --text: #0f172a;
  --muted: #64748b;
  --accent: #0f172a;
  --accent-dark: #0f172a;
  --accent-soft: #f1f5f9;
  --ring: #94a3b8;
  --warning-soft: #fef3c7;
  --success-soft: #dcfce7;
  --success-text: #166534;
  --danger: #dc2626;
  --danger-soft: #fef2f2;
  --shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
  --button-height: 34px;
  --button-width-2: 72px;
  --button-width-4: 96px;
  --enterprise-card-width: 400px;
  --enterprise-card-height: 198px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: "Microsoft YaHei", "PingFang SC", Arial, sans-serif;
  font-size: 14px;
}

[hidden] {
  display: none !important;
}

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

button {
  border: 0;
  font: inherit;
}

.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  width: 260px;
  padding: 24px 16px;
  background: #ffffff;
  color: var(--text);
  border-right: 1px solid var(--line);
}

.nav-title {
  min-height: 32px;
  padding: 0 10px 14px;
  border-bottom: 1px solid var(--line);
  color: var(--text);
  font-size: 16px;
  font-weight: 800;
  line-height: 1.35;
}

.module-nav {
  display: grid;
  gap: 4px;
  margin-top: 14px;
}

.module-nav a {
  min-height: 40px;
  padding: 9px 12px;
  border: 1px solid transparent;
  border-radius: 6px;
  color: #475569;
  font-size: 15px;
  font-weight: 600;
  line-height: 1.45;
}

.module-nav a:hover,
.module-nav a.active {
  background: #f8fafc;
  color: var(--text);
}

.module-nav a.active {
  border-color: var(--line);
  background: var(--surface-soft);
  font-weight: 700;
  box-shadow: inset 3px 0 0 var(--accent);
}

.workspace {
  margin-left: 260px;
  min-width: 0;
  padding: 28px;
}

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

.breadcrumb,
.eyebrow {
  margin: 0 0 6px;
  color: var(--accent);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: uppercase;
}

.breadcrumb {
  color: var(--muted);
  text-transform: none;
}

.breadcrumb a {
  color: var(--accent);
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 6px;
  font-size: 30px;
  line-height: 1.2;
}

h2 {
  margin-bottom: 0;
  font-size: 22px;
}

h3 {
  margin-bottom: 6px;
  font-size: 16px;
}

p,
span {
  line-height: 1.6;
}

p {
  color: var(--muted);
}

.lede {
  max-width: 760px;
  margin-bottom: 0;
}

.status-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.action-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.status-strip span,
.section-note,
.panel-title span,
.table-head span {
  display: inline-flex;
  min-height: 30px;
  align-items: center;
  padding: 5px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  color: var(--muted);
  font-size: 13px;
}

.badge {
  display: inline-flex;
  min-height: 24px;
  align-items: center;
  justify-content: center;
  padding: 3px 9px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #f8fafc;
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
  line-height: 1.3;
}

.module-section {
  margin-bottom: 18px;
  min-width: 0;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.section-heading,
.panel-title,
.table-head,
.enterprise-card-header,
.block-title,
.platform-mini-head {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-start;
}

.section-heading {
  margin-bottom: 18px;
}

.module-section h2,
.category-mapping-title-row h2,
.pricing-shop-head h2,
.sale-calc-panel-heading h2 {
  margin: 0;
  font-size: 18px;
  line-height: 1.25;
}

.enterprise-flow {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
  gap: 14px;
}

.flow-panel,
.table-card,
.submodule-grid article,
.entity-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
}

.flow-panel,
.table-card {
  min-width: 0;
  padding: 16px;
}

.flow-panel.wide {
  grid-column: 1 / -1;
}

.btn,
.primary-action,
.secondary-action,
.text-action {
  display: inline-flex;
  min-height: var(--button-height);
  align-items: center;
  justify-content: center;
  gap: 6px;
  border-radius: 6px;
  cursor: default;
  font-size: 14px;
  font-weight: 700;
  line-height: 1;
  transition: background-color 0.16s ease, border-color 0.16s ease, color 0.16s ease;
}

.btn-primary,
.primary-action {
  padding: 0 14px;
  border: 1px solid var(--line-strong);
  background: #f8fafc;
  color: var(--text);
  box-shadow: inset 0 0 0 1px var(--line);
}

.btn-secondary,
.secondary-action {
  padding: 0 14px;
  border: 1px solid var(--line);
  background: #ffffff;
  color: var(--text);
}

.btn-ghost,
.text-action {
  min-height: 28px;
  padding: 4px 8px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--muted);
  font-size: 13px;
}

.btn-outline {
  padding: 0 14px;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--text);
}

.btn-danger {
  padding: 0 14px;
  border: 1px solid #fecaca;
  background: #fff7f7;
  color: var(--danger);
}

.btn:hover,
.primary-action:hover,
.secondary-action:hover,
.text-action:hover {
  background: #f8fafc;
}

.primary-action:hover,
.primary-action:focus-visible {
  border-color: var(--line-strong);
  background: #f1f5f9;
  color: var(--text);
}

.btn-danger:hover,
.btn-danger:focus-visible,
.danger-action:hover,
.danger-action:focus-visible {
  border-color: #fecaca;
  background: #fff7f7;
  color: #b42318;
}

.btn:disabled,
.primary-action:disabled,
.secondary-action:disabled,
.text-action:disabled {
  cursor: default;
  opacity: 0.62;
}

.enterprise-card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, var(--enterprise-card-width));
  gap: 16px;
  align-items: start;
}

.enterprise-card {
  display: flex;
  width: var(--enterprise-card-width);
  height: var(--enterprise-card-height);
  flex-direction: column;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
}

.enterprise-card.highlighted {
  border-color: var(--line-strong);
  box-shadow: inset 0 0 0 1px var(--line-strong);
}

.enterprise-card-empty {
  justify-content: center;
  border-style: dashed;
  background: #fbfcfc;
}

.enterprise-card-header h3 {
  margin-bottom: 2px;
}

.card-click-target {
  margin: -8px -8px 0;
  padding: 8px;
  border-radius: 6px;
}

.card-summary {
  margin: 12px 0 0;
  font-size: 13px;
}

.enterprise-card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.enterprise-card-meta span {
  display: inline-flex;
  min-height: 28px;
  align-items: center;
  padding: 4px 8px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface-soft);
  color: var(--muted);
  font-size: 13px;
}

.platform-card-grid,
.platform-mini-list {
  display: grid;
  gap: 10px;
  margin-top: 8px;
}

.platform-card-grid {
  grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
}

.platform-mini-card {
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface-soft);
}

.platform-mini-card.highlighted {
  border-color: var(--line-strong);
  background: var(--accent-soft);
}

.enterprise-platform-section,
.enterprise-platform-workspace {
  position: relative;
  box-sizing: border-box;
  width: fit-content;
  max-width: 100%;
}

.enterprise-platform-picker {
  box-sizing: border-box;
  width: 1134px;
  max-width: 100%;
  margin-top: 12px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
}

.enterprise-platform-picker[hidden] {
  display: none;
}

.enterprise-platform-picker-head {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  justify-content: space-between;
}

.enterprise-platform-picker-actions {
  display: flex;
  flex-shrink: 0;
  gap: 8px;
  align-items: center;
}

.enterprise-platform-picker-actions .btn {
  min-width: 64px;
  min-height: 34px;
  justify-content: center;
}

.enterprise-platform-save-action {
  border-color: #020617;
  background: #020617;
  color: #ffffff;
}

.enterprise-platform-save-action:hover,
.enterprise-platform-save-action:focus-visible {
  border-color: #111827;
  background: #111827;
  color: #ffffff;
}

.enterprise-platform-picker:not(.is-selecting) [data-enterprise-platform-cancel-action],
.enterprise-platform-picker:not(.is-selecting) [data-enterprise-platform-save-action],
.enterprise-platform-picker.is-selecting [data-enterprise-platform-edit-action] {
  display: none;
}

.enterprise-platform-picker-head strong,
.enterprise-platform-picker-head span {
  display: block;
}

.enterprise-platform-picker-head span {
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
}

.enterprise-platform-picker-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-top: 12px;
}

.enterprise-platform-picker-card {
  position: relative;
  display: flex;
  min-height: 76px;
  flex-direction: column;
  gap: 6px;
  align-items: flex-start;
  justify-content: flex-start;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #ffffff;
  color: var(--text);
  cursor: pointer;
  font: inherit;
  text-align: left;
}

.enterprise-platform-picker-card-head {
  display: flex;
  width: 100%;
  gap: 10px;
  align-items: flex-start;
  justify-content: space-between;
}

.enterprise-platform-picker-card strong {
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
  font-size: 16px;
  line-height: 1.35;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.enterprise-platform-picker-card:hover,
.enterprise-platform-picker-card:focus-visible {
  border-color: var(--line);
  background: var(--surface-soft);
  outline: 0;
}

.enterprise-platform-picker:not(.is-selecting) .enterprise-platform-picker-card.is-selected {
  border-color: var(--line);
  background: #ffffff;
}

.enterprise-platform-picker:not(.is-selecting) .enterprise-platform-picker-card:not(.is-selected):not(.is-empty) {
  border-color: #cbd5e1;
  border-style: dashed;
  background: #ffffff;
  color: #64748b;
}

.enterprise-platform-picker:not(.is-selecting) .enterprise-platform-picker-card:not(.is-selected):not(.is-empty):hover,
.enterprise-platform-picker:not(.is-selecting) .enterprise-platform-picker-card:not(.is-selected):not(.is-empty):focus-visible {
  border-color: #cbd5e1;
  border-style: dashed;
  background: #ffffff;
  color: #64748b;
}

.enterprise-platform-picker:not(.is-selecting) .enterprise-platform-picker-card.is-active {
  border-color: var(--line);
  background: var(--surface-soft);
  box-shadow: inset 3px 0 0 var(--accent);
}

.enterprise-platform-picker:not(.is-selecting) .enterprise-platform-picker-card.is-active:hover,
.enterprise-platform-picker:not(.is-selecting) .enterprise-platform-picker-card.is-active:focus-visible {
  border-color: var(--line);
  background: var(--surface-soft);
}

.enterprise-platform-picker:not(.is-selecting) .enterprise-platform-select-tag {
  display: none;
}

.enterprise-platform-picker.is-selecting .enterprise-platform-picker-card.is-selected {
  border-color: var(--line);
  background: var(--surface-soft);
}

.enterprise-platform-picker.is-selecting .enterprise-platform-picker-card:not(.is-selected):not(.is-empty) {
  border-color: #cbd5e1;
  border-style: dashed;
  background: #ffffff;
  color: #64748b;
}

.enterprise-platform-picker.is-selecting .enterprise-platform-picker-card:not(.is-selected):not(.is-empty):hover,
.enterprise-platform-picker.is-selecting .enterprise-platform-picker-card:not(.is-selected):not(.is-empty):focus-visible {
  border-color: #cbd5e1;
  border-style: dashed;
  background: #ffffff;
  color: #64748b;
}

.enterprise-platform-picker-card.is-empty {
  border-style: dashed;
  background: #f8fafc;
  cursor: default;
  color: #94a3b8;
}

.enterprise-platform-picker-card.is-empty:hover {
  border-color: var(--line);
  background: #f8fafc;
}

.enterprise-platform-picker-card.is-empty strong {
  color: #334155;
  font-size: 15px;
  font-weight: 700;
}

.enterprise-platform-picker-card.is-empty span {
  color: #94a3b8;
  font-weight: 500;
}

.enterprise-platform-picker-card span {
  color: var(--muted);
  font-size: 12px;
}

.enterprise-platform-select-tag {
  display: inline-flex;
  flex-shrink: 0;
  min-height: 22px;
  align-items: center;
  padding: 2px 8px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #ffffff;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  line-height: 1.2;
}

.enterprise-platform-picker.is-selecting .enterprise-platform-picker-card.is-selected .enterprise-platform-select-tag {
  border-color: #93c5fd;
  background: #dbeafe;
  color: #1d4ed8;
}

.enterprise-platform-country-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 4px;
}

.enterprise-platform-workspace {
  margin-top: 16px;
}

.enterprise-platform-workspace > .section-heading {
  margin-bottom: 8px;
}

.enterprise-platform-config-grid {
  display: grid;
  grid-template-columns: minmax(240px, 280px) minmax(720px, 840px);
  gap: 14px;
  align-items: start;
}

.enterprise-country-panel,
.enterprise-rate-panel {
  position: relative;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
}

.enterprise-subpanel-heading {
  display: flex;
  min-height: 54px;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 14px;
  border-bottom: 1px solid var(--line);
}

.enterprise-subpanel-heading strong,
.enterprise-subpanel-heading span {
  display: block;
}

.enterprise-subpanel-heading span {
  color: var(--muted);
  font-size: 12px;
}

.enterprise-country-list {
  display: grid;
  gap: 6px;
  padding: 10px;
}

.enterprise-country-row {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) auto;
  min-height: 42px;
  gap: 8px;
  align-items: center;
  padding: 7px 8px;
  border: 1px solid transparent;
  border-radius: 6px;
  background: transparent;
  color: var(--text);
  cursor: pointer;
  text-align: left;
}

.enterprise-country-row:hover,
.enterprise-country-row:focus-visible,
.enterprise-country-row.is-selected {
  border-color: var(--line);
  background: var(--surface-soft);
  outline: 0;
}

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

.enterprise-country-row > span:last-child {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.enterprise-rate-unsaved-warning {
  width: 100%;
  margin: 0 0 10px;
  padding: 9px 12px;
  border: 1px solid #fed7aa;
  border-radius: 6px;
  background: #fff7ed;
  color: #9a3412;
  font-size: 13px;
  font-weight: 600;
}

.enterprise-rate-unsaved-warning[hidden] {
  display: none;
}

.enterprise-country-empty-state {
  display: grid;
  gap: 4px;
  min-height: 72px;
  align-content: center;
  padding: 10px;
  border: 1px dashed var(--line);
  border-radius: 6px;
  background: #f8fafc;
}

.enterprise-country-empty-state strong {
  color: #334155;
}

.enterprise-country-empty-state span {
  color: #94a3b8;
  font-size: 12px;
}

.enterprise-rate-table-wrap {
  position: relative;
  overflow: hidden;
  border: 0;
  border-radius: 0;
  box-shadow: none;
}

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

.enterprise-rate-actions .btn {
  width: var(--button-width-2);
  min-width: var(--button-width-2);
  height: var(--button-height);
  min-height: var(--button-height);
  justify-content: center;
  padding: 0;
}

.enterprise-rate-actions [hidden] {
  display: none;
}

.enterprise-rate-save-action {
  border-color: #020617;
  background: #020617;
  color: #ffffff;
}

.enterprise-rate-save-action:hover,
.enterprise-rate-save-action:focus-visible {
  border-color: #111827;
  background: #111827;
  color: #ffffff;
}

.enterprise-rate-table {
  table-layout: fixed;
  width: 100%;
  min-width: 0;
}

.enterprise-rate-table th,
.enterprise-rate-table td {
  width: 33.333%;
  height: 52px;
  padding: 10px 14px;
  vertical-align: middle;
}

.enterprise-rate-input-shell {
  position: relative;
  display: inline-flex;
  width: 130px;
  max-width: 130px;
  flex: 0 0 130px;
  align-items: center;
  gap: 0;
}

.enterprise-rate-input-shell.has-unit {
  display: inline-flex;
}

.enterprise-rate-input-shell.has-currency-unit {
  gap: 4px;
}

.enterprise-rate-value-cell {
  white-space: nowrap;
}

.enterprise-rate-value-layout {
  display: flex;
  align-items: center;
  gap: 8px;
}

@keyframes enterprise-content-fade-in {
  from {
    opacity: 0.55;
  }

  to {
    opacity: 1;
  }
}

.enterprise-rate-panel.is-editing .enterprise-rate-input-shell {
  width: 130px;
  max-width: 130px;
}

.enterprise-rate-panel.is-loading .enterprise-rate-table-wrap::after {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.76);
  color: var(--muted);
  content: "正在读取费率";
  font-size: 13px;
  font-weight: 700;
  pointer-events: none;
}

.enterprise-rate-panel.is-editing .enterprise-rate-input-shell.has-unit .enterprise-rate-input {
  padding-right: 58px;
}

.enterprise-rate-unit {
  max-width: none;
  overflow: hidden;
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
  line-height: 1;
  pointer-events: none;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.enterprise-rate-panel.is-editing .enterprise-rate-unit {
  position: absolute;
  top: 50%;
  right: 12px;
  transform: translateY(-50%);
}

.enterprise-rate-input {
  box-sizing: border-box;
  width: 100%;
  min-width: 0;
}

.enterprise-rate-input::-webkit-outer-spin-button,
.enterprise-rate-input::-webkit-inner-spin-button {
  margin: 0;
  appearance: none;
  -webkit-appearance: none;
}

.enterprise-rate-input[type="number"] {
  -moz-appearance: textfield;
}

.enterprise-rate-input.is-transparent {
  border-color: transparent;
  background: transparent;
  box-shadow: none;
  outline: 0;
  pointer-events: none;
}

.enterprise-rate-input.is-transparent:focus {
  border-color: transparent;
  box-shadow: none;
  outline: 0;
}

.enterprise-rate-panel.is-editing .enterprise-rate-input[readonly] {
  background: #f8fafc;
  cursor: default;
  pointer-events: none;
  user-select: none;
}

.enterprise-rate-panel.is-editing .enterprise-rate-input[readonly]:focus {
  border-color: var(--line);
  box-shadow: none;
  outline: 0;
}

.enterprise-rate-panel.is-editing .enterprise-rate-input.is-shop-input {
  border-color: var(--line);
  background: #ffffff;
}

.enterprise-rate-panel.is-editing .enterprise-rate-input.is-shop-input:focus {
  border-color: var(--ring);
  outline: 2px solid rgba(148, 163, 184, 0.28);
  outline-offset: 1px;
}

.enterprise-rate-join-toggle {
  display: inline-flex;
  width: 52px;
  min-width: 52px;
  min-height: 26px;
  align-items: center;
  justify-content: center;
  padding: 0 8px;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
  line-height: 1;
  white-space: nowrap;
}

.enterprise-rate-join-toggle.is-unjoined {
  background: #f8fafc;
  color: var(--muted);
}

.enterprise-rate-join-toggle.is-joined {
  border-color: #facc15;
  background: #fef9c3;
  color: #854d0e;
}

.enterprise-rate-table tr.is-rate-excluded td {
  color: #94a3b8;
  text-decoration: line-through;
}

.enterprise-rate-table tr.is-rate-excluded .enterprise-rate-input {
  color: #94a3b8;
  text-decoration: line-through;
}

.enterprise-rate-empty-row td {
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
  text-align: left;
}

.enterprise-shop-mock-page .enterprise-platform-picker-card {
  cursor: default;
}

.enterprise-shop-mock-section {
  width: fit-content;
  max-width: 100%;
}

.enterprise-shop-workbench-grid {
  display: grid;
  grid-template-columns: minmax(260px, 280px) minmax(0, 1fr);
  gap: 14px;
  align-items: start;
}

.enterprise-shop-config-section {
  min-width: 0;
}

.enterprise-shop-config-section + .enterprise-shop-config-section {
  margin-top: 22px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}

.enterprise-shop-config-heading {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-start;
  margin-bottom: 12px;
}

.enterprise-shop-config-heading h3 {
  margin-bottom: 3px;
  font-size: 16px;
}

.enterprise-shop-config-heading span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.enterprise-shop-panel {
  position: relative;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
}

.enterprise-site-shop-panel {
  border-color: transparent;
  background: transparent;
}

.enterprise-global-shop-panel {
  box-sizing: border-box;
  width: 1134px;
  max-width: 100%;
  position: relative;
  min-width: 0;
  margin-top: 0;
  margin-bottom: 0;
}

.enterprise-global-shop-panel > .enterprise-subpanel-heading {
  min-height: 64px;
  align-items: center;
  padding: 10px 14px;
}

.enterprise-global-shop-edit-action {
  min-width: 64px;
  min-height: 34px;
  flex-shrink: 0;
  border-color: #020617;
  background: #020617;
  color: #ffffff;
}

.enterprise-global-shop-body {
  display: grid;
  gap: 6px;
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
}

.enterprise-global-shop-body strong {
  min-width: 0;
  overflow: hidden;
  font-size: 16px;
  line-height: 1.35;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.enterprise-global-shop-body span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.enterprise-global-shop-current {
  margin-bottom: 10px;
}

.enterprise-global-shop-list {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-top: 0;
}

.enterprise-global-shop-card {
  position: relative;
  display: flex;
  min-height: 76px;
  flex-direction: column;
  gap: 6px;
  align-items: flex-start;
  justify-content: flex-start;
  padding: 14px 12px 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fbfdff;
  color: var(--text);
  cursor: pointer;
  font: inherit;
  text-align: left;
}

.enterprise-global-shop-card .enterprise-global-shop-platform-tag,
.enterprise-current-global-shop-card .enterprise-global-shop-platform-tag {
  position: absolute;
  top: 10px;
  right: 10px;
  max-width: 96px;
  overflow: hidden;
  padding: 3px 8px;
  border: 1px solid #bfdbfe;
  border-color: #bfdbfe;
  border-radius: 999px;
  background: #eff6ff;
  color: #1d4ed8;
  font-size: 11px;
  font-weight: 900;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.enterprise-global-shop-card:hover,
.enterprise-global-shop-card:focus-visible,
.enterprise-global-shop-card.is-selected {
  border-color: var(--line);
  background: var(--surface-soft);
  outline: 0;
}

.enterprise-global-shop-card.is-empty {
  cursor: default;
}

.enterprise-global-shop-card.is-empty:hover,
.enterprise-global-shop-card.is-empty:focus-visible {
  border-color: var(--line);
  background: #fbfdff;
}

.enterprise-global-shop-create-card {
  border-style: dashed;
  border-color: #cbd5e1;
  background: #ffffff;
  color: var(--muted);
  box-shadow: none;
}

.enterprise-global-shop-create-card:hover,
.enterprise-global-shop-create-card:focus-visible {
  background: #f1f5f9;
}

.enterprise-global-shop-create-card strong {
  max-width: 100%;
  color: #64748b;
  font-weight: 600;
}

.enterprise-global-shop-card strong {
  overflow: hidden;
  max-width: calc(100% - 86px);
  font-size: 16px;
  line-height: 1.35;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.enterprise-global-shop-card span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
}

.enterprise-global-shop-card .enterprise-global-shop-erp-id,
.enterprise-current-global-shop-card .enterprise-global-shop-erp-id {
  font-weight: 400;
}

.enterprise-derived-site-shop-panel {
  padding: 10px;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  background: #f8fafc;
}

.enterprise-current-global-shop-card {
  position: relative;
  display: flex;
  min-height: 76px;
  flex-direction: column;
  gap: 6px;
  align-items: flex-start;
  justify-content: flex-start;
  padding: 14px 12px 12px;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  background: #e8edf3;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  animation: enterprise-content-fade-in 140ms ease-out;
}

.enterprise-current-global-shop-card.is-selected {
  background: #e8edf3;
}

.enterprise-current-global-shop-card strong {
  overflow: hidden;
  max-width: calc(100% - 86px);
  color: var(--text);
  font-size: 16px;
  line-height: 1.35;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.enterprise-current-global-shop-card span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
}

.enterprise-site-shop-list {
  display: grid;
  gap: 8px;
  padding: 0;
  animation: enterprise-content-fade-in 140ms ease-out;
}

.enterprise-shop-panel > .enterprise-subpanel-heading {
  height: 64px;
  min-height: 64px;
  align-items: center;
  padding: 10px 14px;
}

.enterprise-shop-add-action {
  min-width: 84px;
  min-height: 34px;
  flex-shrink: 0;
  border-color: #020617;
  background: #020617;
  color: #ffffff;
}

.enterprise-shop-list {
  display: grid;
  gap: 8px;
  padding: 10px;
}

.enterprise-shop-list.enterprise-site-shop-list {
  gap: 8px;
  padding: 0;
}

.enterprise-shop-row {
  display: grid;
  min-height: 46px;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  padding: 8px 10px;
  border: 1px solid transparent;
  border-radius: 6px;
  background: transparent;
  color: var(--text);
  cursor: pointer;
  text-align: left;
  transition: background-color 120ms ease;
}

.enterprise-shop-row:hover,
.enterprise-shop-row:focus-visible,
.enterprise-shop-row.is-selected {
  border-color: transparent;
  background: #e8edf3;
  outline: 0;
}

.enterprise-shop-row.is-selected {
  border-color: #cbd5e1;
}

.enterprise-shop-row.is-disabled {
  background: transparent;
  color: #94a3b8;
  cursor: default;
}

.enterprise-shop-row.is-disabled:hover,
.enterprise-shop-row.is-disabled:focus-visible {
  border-color: transparent;
  background: transparent;
}

.enterprise-shop-row.is-disabled .enterprise-shop-row-title,
.enterprise-shop-row.is-disabled .enterprise-shop-country-tag {
  color: #94a3b8;
}

.enterprise-disabled-shop-toggle {
  display: inline-flex;
  min-height: 34px;
  align-items: center;
  justify-content: center;
  justify-self: center;
  padding: 5px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #ffffff;
  color: var(--muted);
  cursor: pointer;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.2;
}

.enterprise-disabled-shop-toggle:hover,
.enterprise-disabled-shop-toggle:focus-visible {
  border-color: #cbd5e1;
  background: #f8fafc;
  color: var(--text);
  outline: 0;
}

.enterprise-shop-country {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 8px;
}

.enterprise-shop-country-tag {
  display: inline-flex;
  width: 34px;
  min-width: 34px;
  height: 22px;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #ffffff;
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  line-height: 1;
}

.enterprise-shop-row-title {
  min-width: 0;
  overflow: hidden;
  font-size: 14px;
  line-height: 1.4;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.enterprise-shop-row:not(.is-selected):not(.is-disabled) .enterprise-shop-row-title {
  color: #475569;
}

.enterprise-shop-row.is-selected .enterprise-shop-row-title {
  color: var(--text);
}

.enterprise-shop-status {
  display: inline-flex;
  flex-shrink: 0;
  min-height: 22px;
  align-items: center;
  padding: 2px 8px;
  border: 1px solid #bbf7d0;
  border-radius: 999px;
  background: #f0fdf4;
  color: #166534;
  cursor: pointer;
  font-size: 12px;
  font-weight: 800;
  line-height: 1.2;
  opacity: 0;
  pointer-events: none;
  transition: opacity 120ms ease, visibility 120ms ease;
  visibility: hidden;
}

.enterprise-shop-row:hover .enterprise-shop-status,
.enterprise-shop-row:focus-visible .enterprise-shop-status,
.enterprise-shop-row:focus-within .enterprise-shop-status {
  opacity: 1;
  pointer-events: auto;
  visibility: visible;
}

.enterprise-shop-status.is-muted {
  border-color: var(--line);
  background: #f8fafc;
  color: var(--muted);
}

.enterprise-shop-parameter-panel {
  overflow: hidden;
}

.enterprise-shop-parameter-table {
  table-layout: fixed;
  width: 100%;
  min-width: 0;
}

.enterprise-shop-parameter-table th,
.enterprise-shop-parameter-table td {
  width: 33.333%;
  height: 52px;
  padding: 10px 14px;
  vertical-align: middle;
}

.enterprise-shop-parameter-table thead th {
  height: 64px;
}

.enterprise-shop-rate-actions {
  align-self: flex-start;
  padding: 0;
  justify-content: flex-end;
}

.enterprise-shop-value {
  display: inline-flex;
  max-width: 100%;
  gap: 6px;
  align-items: baseline;
  font-variant-numeric: tabular-nums;
}

.enterprise-shop-value.is-editable {
  font-weight: 700;
}

.enterprise-shop-unit {
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
}

.enterprise-shop-drawer {
  position: fixed;
  z-index: 20;
  display: grid;
  box-sizing: border-box;
  overflow: auto;
  grid-template-rows: auto auto auto;
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 16px 36px rgb(15 23 42 / 14%);
}

.enterprise-shop-drawer[hidden] {
  display: none;
}

.enterprise-shop-drawer-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
}

.enterprise-shop-drawer-head h2 {
  font-size: 18px;
}

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

.enterprise-shop-form-grid label {
  display: grid;
  gap: 6px;
}

.enterprise-shop-form-grid label > span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.enterprise-global-shop-platform-picker {
  z-index: 1;
}

.enterprise-global-shop-platform-picker .category-platform-select {
  cursor: pointer;
}

.enterprise-global-shop-platform-trigger .enterprise-global-shop-platform-tag,
.enterprise-global-shop-platform-picker .category-platform-option .enterprise-global-shop-platform-tag {
  display: inline-flex;
  max-width: 100%;
  align-items: center;
  overflow: hidden;
  padding: 3px 8px;
  border: 1px solid #bfdbfe;
  border-radius: 999px;
  background: #eff6ff;
  color: #1d4ed8;
  font-size: 11px;
  font-weight: 900;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.enterprise-global-shop-platform-picker .category-platform-select:disabled {
  cursor: default;
  opacity: 1;
}

.enterprise-global-shop-platform-picker .category-platform-menu {
  z-index: 30;
}

.enterprise-shop-discount-shell {
  position: relative;
  display: block;
}

.enterprise-shop-discount-shell input {
  padding-right: 34px;
}

.enterprise-shop-discount-shell span {
  position: absolute;
  top: 50%;
  right: 12px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
  pointer-events: none;
  transform: translateY(-50%);
}

.enterprise-country-combobox {
  position: relative;
}

.enterprise-country-combobox-trigger {
  display: grid;
  width: 100%;
  min-height: 36px;
  grid-template-columns: 42px minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
  padding: 7px 9px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #ffffff;
  color: var(--text);
  text-align: left;
}

.enterprise-country-combobox-trigger strong,
.enterprise-country-option strong {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.enterprise-country-combobox-trigger.is-placeholder strong {
  color: #94a3b8;
}

.enterprise-shop-form-grid .form-control.is-invalid,
.enterprise-country-combobox.is-invalid .enterprise-country-combobox-trigger {
  border-color: var(--danger);
  background: var(--danger-soft);
  color: var(--danger);
}

.enterprise-shop-form-grid .form-control.is-invalid::placeholder,
.enterprise-country-combobox.is-invalid .enterprise-country-combobox-trigger.is-placeholder strong {
  color: var(--danger);
  opacity: 1;
}

.enterprise-shop-form-grid .form-control.is-invalid:focus,
.enterprise-country-combobox.is-invalid .enterprise-country-combobox-trigger:focus-visible {
  border-color: var(--danger);
  outline: 2px solid rgba(220, 38, 38, 0.18);
  outline-offset: 1px;
}

.enterprise-country-combobox-arrow {
  display: inline-flex;
  width: 14px;
  height: 14px;
  align-items: center;
  justify-content: center;
}

.enterprise-country-combobox-arrow::before {
  content: "";
  width: 6px;
  height: 6px;
  border-right: 2px solid var(--muted);
  border-bottom: 2px solid var(--muted);
  transform: translateY(-2px) rotate(45deg);
}

.enterprise-country-option-list {
  position: absolute;
  top: calc(100% + 4px);
  right: 0;
  left: 0;
  z-index: 22;
  display: grid;
  gap: 4px;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #ffffff;
  box-shadow: 0 12px 28px rgb(15 23 42 / 12%);
}

.enterprise-country-option-list[hidden] {
  display: none;
}

.enterprise-country-option {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  min-height: 34px;
  gap: 8px;
  align-items: center;
  padding: 6px 7px;
  border: 1px solid transparent;
  border-radius: 6px;
  background: transparent;
  color: var(--text);
  text-align: left;
}

.enterprise-country-option:hover,
.enterprise-country-option:focus-visible,
.enterprise-country-option.is-selected {
  border-color: var(--line);
  background: var(--surface-soft);
  outline: 0;
}

.enterprise-shop-drawer-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

.platform-mini-head {
  align-items: center;
}

.platform-mini-head span {
  color: var(--muted);
  font-size: 12px;
}

.platform-config-compact {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-top: 10px;
}

.platform-config-compact div {
  min-height: 58px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #ffffff;
}

.platform-config-compact span {
  display: block;
  color: var(--muted);
  font-size: 12px;
}

.platform-config-compact strong {
  display: block;
  margin-top: 2px;
  font-size: 13px;
}

.status-badge {
  display: inline-flex;
  min-height: 24px;
  align-items: center;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
}

.status-badge.active {
  background: var(--success-soft);
  color: var(--success-text);
}

.status-badge.inactive {
  background: #e6eaed;
  color: #53616a;
}

.card-grid {
  display: grid;
  gap: 12px;
  margin-top: 12px;
}

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

.enterprise-cards {
  grid-template-columns: repeat(auto-fill, var(--enterprise-card-width));
}

.platform-cards {
  grid-template-columns: repeat(auto-fit, minmax(280px, 320px));
}

.platform-titlebar {
  align-items: center;
}

.platform-titlebar h1 {
  margin-bottom: 0;
}

.platform-title-module {
  margin-bottom: 14px;
}

.platform-title-module h1 {
  margin: 0;
}

.platform-list-module,
.country-list-module,
.enterprise-list-module {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 16px 20px;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.platform-list-module,
.country-list-module {
  display: grid;
}

.country-list-module {
  width: fit-content;
  max-width: 100%;
  padding: 16px 18px 18px;
}

.platform-list-header,
.country-list-header,
.enterprise-list-header {
  display: flex;
  min-width: 0;
  align-items: center;
}

.platform-list-header,
.country-list-header {
  min-width: 0;
}

.platform-list-header {
  gap: 12px;
}

.enterprise-list-header {
  gap: 12px;
}

.country-list-header {
  gap: 10px;
}

.country-list-header .country-save-message {
  display: inline-flex;
  min-height: 28px;
  align-items: center;
  padding: 4px 10px;
  border: 1px solid rgba(220, 38, 38, 0.16);
  border-radius: 999px;
  background: var(--danger-soft);
  color: var(--danger);
  font-size: 12px;
  font-weight: 800;
  line-height: 1.35;
}

.country-list-header .country-save-message[hidden] {
  display: none;
}

.enterprise-list-status {
  display: flex;
  min-width: 280px;
  min-height: 24px;
  align-items: center;
}

.enterprise-list-status .enterprise-save-error,
.enterprise-list-status .enterprise-save-status {
  display: inline-flex;
  min-height: 24px;
  align-items: center;
  margin: 0;
  padding: 2px 8px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.35;
}

.platform-card-panel,
.enterprise-card-panel {
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: flex-end;
  justify-content: flex-end;
  margin-bottom: 0;
}

.platform-save-error {
  margin: 0;
  color: var(--danger);
  font-size: 13px;
  font-weight: 700;
  line-height: 1.4;
}

.enterprise-save-error {
  margin: 0;
  color: var(--danger);
  font-size: 13px;
  font-weight: 700;
  line-height: 1.4;
}

.enterprise-save-status {
  margin: 0;
  color: var(--success-text);
  font-size: 13px;
  font-weight: 700;
  line-height: 1.4;
}

.platform-save-error[hidden],
.enterprise-save-error[hidden],
.enterprise-save-status[hidden] {
  display: none;
}

.platform-detail-status {
  margin: 6px 0 0;
  color: var(--danger);
  font-size: 13px;
  font-weight: 700;
  line-height: 1.4;
}

.platform-detail-status[hidden] {
  display: none;
}

.category-empty-state {
  display: flex;
  min-height: 72px;
  align-items: center;
  padding: 14px 16px;
  border: 1px dashed var(--line-strong);
  border-radius: 6px;
  background: #f8fafc;
  color: var(--muted);
  font-weight: 700;
}

.platform-category-table-wrap {
  width: fit-content;
  max-width: 100%;
}

.platform-category-table {
  width: 720px;
  min-width: 720px;
}

.final-category-panel {
  width: min(1728px, 100%);
}

.final-category-panel .rate-panel-heading,
.final-category-panel .final-category-table-wrap,
.final-category-preview-note {
  width: 1682px;
  max-width: 100%;
}

.final-category-preview-note {
  margin: 0 0 10px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.final-category-table {
  table-layout: fixed;
  width: 1680px;
  min-width: 1680px;
}

.final-category-table th,
.final-category-table td {
  height: 46px;
  padding: 6px 10px;
  overflow: hidden;
  font-size: 13px;
  line-height: 18px;
  text-overflow: ellipsis;
  vertical-align: middle;
  white-space: nowrap;
}

.final-category-table th:nth-child(1),
.final-category-table td:nth-child(1) {
  width: 116px;
}

.final-category-table th:nth-child(2),
.final-category-table td:nth-child(2) {
  width: 340px;
}

.final-category-table th:nth-child(3),
.final-category-table td:nth-child(3) {
  width: 500px;
}

.final-category-table th:nth-child(4),
.final-category-table td:nth-child(4) {
  width: 420px;
}

.final-category-table th:nth-child(5),
.final-category-table td:nth-child(5) {
  width: 240px;
}

.final-category-table th:nth-child(6),
.final-category-table td:nth-child(6) {
  width: 60px;
}

.final-category-code {
  display: inline-flex;
  min-height: 24px;
  align-items: center;
  padding: 0 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fafc;
  color: var(--text);
  font-size: 12px;
  font-weight: 800;
}

.final-category-message.is-success {
  border-color: #bbf7d0;
  background: #f0fdf4;
  color: #15803d;
}

.final-category-empty-row td:first-child {
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
  text-align: left;
}

.category-mapping-module {
  width: fit-content;
  max-width: 100%;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.category-mapping-header {
  display: flex;
  width: 100%;
  max-width: 100%;
  gap: 16px;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 14px;
}

.category-mapping-title-row {
  display: flex;
  min-width: 0;
  flex-wrap: wrap;
  gap: 10px;
  align-items: baseline;
}

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

.category-mapping-actions [hidden] {
  display: none;
}

.category-save-message {
  display: inline;
  min-height: 0;
  max-width: 520px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--danger);
  font-size: 13px;
  font-weight: 800;
  line-height: 1.35;
}

.category-save-message.is-success {
  color: #15803d;
}

.category-save-message.is-error {
  color: var(--danger);
}

.category-save-message[hidden] {
  display: none;
}

.category-mapping-table-wrap {
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
  overflow-y: visible;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
}

.category-mapping-table.fixed-table {
  width: 100%;
  min-width: 0;
}

.category-mapping-table th,
.category-mapping-table td {
  height: 56px;
  padding: 8px 14px;
  vertical-align: middle;
}

.category-mapping-table th:nth-child(1),
.category-mapping-table td:nth-child(1) {
  width: 14%;
}

.category-mapping-table th:nth-child(2),
.category-mapping-table td:nth-child(2) {
  width: 26%;
}

.category-mapping-table th:nth-child(3),
.category-mapping-table td:nth-child(3) {
  width: 10%;
}

.category-mapping-table th:nth-child(4),
.category-mapping-table td:nth-child(4) {
  width: 50%;
}

.category-mapping-table th:nth-child(5),
.category-mapping-table td:nth-child(5) {
  width: 0;
  min-width: 0;
  padding-right: 0;
  padding-left: 0;
  text-align: right;
}

.category-mapping-module.is-editing .category-mapping-table th:nth-child(4),
.category-mapping-module.is-editing .category-mapping-table td:nth-child(4) {
  width: calc(50% - 72px);
}

.category-mapping-module.is-editing .category-mapping-table th:nth-child(5),
.category-mapping-module.is-editing .category-mapping-table td:nth-child(5) {
  width: 72px;
  min-width: 72px;
  padding-right: 14px;
  padding-left: 8px;
}

.category-header-control {
  box-sizing: border-box;
  display: flex;
  width: 100%;
  height: 36px;
  min-height: 36px;
  align-items: center;
  padding: 7px 10px;
  overflow: hidden;
  border: 1px solid transparent;
  border-radius: 6px;
  background: transparent;
  color: inherit;
  font: inherit;
  line-height: 20px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.category-platform-name {
  overflow: hidden;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.category-mapping-code {
  display: inline-flex;
  min-height: 28px;
  align-items: center;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fafc;
  color: var(--text);
  font-size: 12px;
  font-weight: 800;
}

.category-mapping-control {
  box-sizing: border-box;
  display: block;
  width: 100%;
  height: 36px;
  min-height: 36px;
  padding: 7px 10px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #ffffff;
  color: var(--text);
  font: inherit;
  font-size: 14px;
  line-height: 20px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.category-platform-picker {
  position: relative;
  display: block;
  min-width: 0;
}

.category-platform-select {
  display: inline-flex;
  width: 100%;
  align-items: center;
  justify-content: flex-start;
  padding-right: 28px;
  text-align: left;
  cursor: default;
  font-weight: 600;
}

.category-platform-select span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.category-platform-menu {
  position: absolute;
  z-index: 1002;
  top: calc(100% + 6px);
  left: 0;
  display: grid;
  width: 100%;
  min-width: 100%;
  max-height: var(--category-platform-menu-max-height, calc(100vh - 48px));
  padding: 8px 0;
  overflow: hidden;
  overflow-y: auto;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #ffffff;
  box-shadow: 0 14px 30px rgb(15 23 42 / 14%);
}

.category-platform-menu.opens-up {
  box-shadow: 0 -14px 30px rgb(15 23 42 / 14%);
}

.category-mapping-table .category-platform-menu {
  position: fixed;
  top: var(--category-platform-menu-top, 0);
  left: var(--category-platform-menu-left, 0);
  width: var(--category-platform-menu-width, 100%);
  min-width: var(--category-platform-menu-width, 100%);
}

.category-platform-option {
  display: flex;
  width: 100%;
  min-height: 32px;
  align-items: center;
  padding: 6px 12px;
  border: 0;
  background: transparent;
  color: var(--text);
  cursor: pointer;
  font: inherit;
  font-weight: 700;
  line-height: 20px;
  text-align: left;
}

.category-platform-option .sale-calc-platform-tag,
.category-platform-select .sale-calc-platform-tag {
  flex-shrink: 0;
}

.category-platform-option:hover,
.category-platform-option:focus-visible,
.category-platform-option.is-selected {
  background: #f1f5f9;
  outline: 0;
}

.category-platform-select.is-placeholder,
.category-picker-trigger.is-placeholder {
  color: #94a3b8;
}

.category-mapping-control::placeholder {
  color: #94a3b8;
  opacity: 1;
}

.category-cascade-display,
.category-cascade-picker {
  position: relative;
  display: grid;
  gap: 4px;
  min-width: 0;
}

.category-cascade-path {
  overflow: hidden;
  color: var(--text);
  font-size: 13px;
  font-weight: 800;
  line-height: 1.35;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.category-cascade-path.is-en,
.category-cascade-id,
.category-picker-trigger small {
  overflow: hidden;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.35;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.category-picker-trigger {
  display: flex;
  width: 100%;
  min-width: 0;
  height: 36px;
  min-height: 36px;
  align-items: center;
  padding: 7px 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #ffffff;
  color: var(--text);
  cursor: pointer;
  font: inherit;
  text-align: left;
}

.category-picker-trigger:disabled {
  border-color: transparent;
  background: transparent;
  color: var(--text);
  opacity: 1;
  pointer-events: none;
  -webkit-text-fill-color: var(--text);
}

.category-picker-trigger span {
  overflow: hidden;
  color: var(--text);
  font-size: 14px;
  font-weight: 800;
  line-height: 20px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.category-picker-popover {
  position: absolute;
  z-index: 1000;
  top: calc(100% + 6px);
  left: 0;
  display: grid;
  width: 782px;
  max-width: min(782px, calc(100vw - 48px));
  max-height: var(--category-picker-popover-max-height, calc(100vh - 48px));
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 18px 40px rgb(15 23 42 / 14%);
}

.category-mapping-table .category-picker-popover,
.category-picker-popover[data-category-picker-portal="true"] {
  position: fixed;
  top: var(--category-picker-popover-top, 0);
  left: var(--category-picker-popover-left, 0);
  width: var(--category-picker-popover-width, 782px);
}

.category-picker-popover.opens-up {
  box-shadow: 0 -18px 40px rgb(15 23 42 / 14%);
}

.category-picker-toolbar {
  position: relative;
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
  padding: 10px;
  border-bottom: 1px solid var(--line);
  background: #f8fafc;
}

.category-picker-search-form {
  display: flex;
  min-width: 0;
  flex: 1 1 auto;
  gap: 8px;
  align-items: center;
}

.category-picker-search-input {
  box-sizing: border-box;
  width: 260px;
  min-height: 34px;
  padding: 6px 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #ffffff;
  color: var(--text);
  font: inherit;
  font-size: 13px;
  outline: 0;
}

.category-picker-search-input:focus {
  border-color: var(--ring);
  outline: 2px solid rgba(148, 163, 184, 0.28);
  outline-offset: 1px;
}

.category-picker-search-message {
  color: var(--danger);
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.category-picker-toolbar-actions {
  display: flex;
  flex: 0 0 auto;
  gap: 8px;
  align-items: center;
}

.category-picker-toolbar .btn {
  min-width: 58px;
  min-height: 34px;
  justify-content: center;
}

.category-picker-candidates {
  position: absolute;
  z-index: 2;
  top: calc(100% + 6px);
  left: 10px;
  display: grid;
  width: 260px;
  gap: 8px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 14px 30px rgb(15 23 42 / 14%);
}

.category-picker-candidate-summary {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  line-height: 1.35;
}

.category-picker-candidate-list {
  display: grid;
  max-height: 180px;
  gap: 6px;
  overflow-y: auto;
  scrollbar-width: thin;
}

.category-picker-candidate-option {
  display: grid;
  min-height: 52px;
  gap: 2px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #ffffff;
  color: var(--text);
  cursor: pointer;
  font: inherit;
  text-align: left;
}

.category-picker-candidate-option:hover,
.category-picker-candidate-option:focus-visible {
  background: var(--surface-soft);
  outline: 0;
}

.category-picker-candidate-option span,
.category-picker-candidate-option small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.category-picker-candidate-option span {
  font-size: 13px;
  font-weight: 800;
}

.category-picker-candidate-option small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.category-picker-columns {
  display: grid;
  width: 780px;
  max-width: 780px;
  grid-template-columns: repeat(3, 260px);
  grid-auto-columns: 260px;
  grid-auto-flow: column;
  align-items: stretch;
  max-height: min(292px, calc(var(--category-picker-popover-max-height, 420px) - 56px));
  overflow-x: scroll;
  overflow-y: hidden;
  scroll-padding-right: 10px;
  scrollbar-width: thin;
  scrollbar-color: transparent transparent;
}

.category-picker-columns.is-scrolling,
.category-picker-columns.has-horizontal-overflow {
  scrollbar-color: #94a3b8 transparent;
}

.category-picker-columns::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

.category-picker-columns::-webkit-scrollbar-track {
  background: transparent;
}

.category-picker-columns::-webkit-scrollbar-thumb {
  border: 2px solid transparent;
  border-radius: 999px;
  background: transparent;
  background-clip: content-box;
}

.category-picker-columns.is-scrolling::-webkit-scrollbar-thumb,
.category-picker-columns.has-horizontal-overflow::-webkit-scrollbar-thumb {
  background-color: #94a3b8;
}

.category-picker-columns::-webkit-scrollbar-thumb:hover {
  background-color: #64748b;
}

.category-picker-columns::-webkit-scrollbar-button {
  display: none;
  width: 0;
  height: 0;
}

.category-picker-columns::-webkit-scrollbar-button:horizontal:start:decrement,
.category-picker-columns::-webkit-scrollbar-button:horizontal:end:increment,
.category-picker-columns::-webkit-scrollbar-corner {
  background: transparent;
}

.category-picker-column {
  display: grid;
  width: 260px;
  min-width: 260px;
  align-content: start;
  overflow-y: auto;
  padding: 6px;
  border-right: 1px solid var(--line);
  scrollbar-width: thin;
  scrollbar-gutter: stable;
  scrollbar-color: transparent transparent;
}

.category-picker-column:hover,
.category-picker-column:focus-within,
.category-picker-column.is-scrolling {
  scrollbar-width: thin;
  scrollbar-color: #cbd5e1 transparent;
}

.category-picker-column::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

.category-picker-column:hover::-webkit-scrollbar,
.category-picker-column:focus-within::-webkit-scrollbar,
.category-picker-column.is-scrolling::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

.category-picker-column::-webkit-scrollbar-track {
  background: transparent;
}

.category-picker-column::-webkit-scrollbar-thumb {
  border: 2px solid transparent;
  border-radius: 999px;
  background: transparent;
  background-clip: content-box;
}

.category-picker-column:hover::-webkit-scrollbar-thumb,
.category-picker-column:focus-within::-webkit-scrollbar-thumb,
.category-picker-column.is-scrolling::-webkit-scrollbar-thumb {
  background-color: #cbd5e1;
}

.category-picker-column::-webkit-scrollbar-button {
  display: none;
  width: 0;
  height: 0;
}

.category-picker-column:last-child {
  border-right: 0;
}

.category-picker-column.is-placeholder {
  align-content: center;
  background: #fbfdff;
}

.category-picker-placeholder {
  padding: 14px 10px;
  color: #94a3b8;
  font-size: 13px;
  font-weight: 800;
  line-height: 1.35;
  text-align: center;
}

.category-picker-option {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 2px 10px;
  align-items: center;
  min-height: 46px;
  margin-right: 4px;
  padding: 8px 10px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--text);
  cursor: pointer;
  font: inherit;
  text-align: left;
}

.category-picker-option:hover,
.category-picker-option:focus-visible,
.category-picker-option.is-selected {
  background: var(--surface-soft);
  outline: 0;
}

.category-picker-option.is-selected {
  box-shadow: inset 3px 0 0 var(--accent);
}

.category-picker-option span,
.category-picker-option small {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.category-picker-option span {
  font-size: 13px;
  font-weight: 800;
}

.category-picker-option small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.category-picker-option strong {
  grid-row: 1 / span 2;
  grid-column: 2;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  opacity: 0;
  transition: opacity 0.14s ease;
  white-space: nowrap;
}

.category-picker-option.has-children strong {
  color: var(--text);
  font-size: 18px;
  opacity: 1;
}

.category-picker-option:hover strong,
.category-picker-option:focus-visible strong,
.category-picker-option.is-selected strong {
  opacity: 1;
}

.category-cascade-empty,
.category-cascade-warning {
  color: var(--danger);
  font-size: 12px;
  font-weight: 800;
  line-height: 1.35;
}

.category-mapping-module.is-readonly .category-mapping-control {
  border-color: transparent;
  background: transparent;
  color: var(--text);
  opacity: 1;
  pointer-events: none;
  -webkit-text-fill-color: var(--text);
}

.category-mapping-module.is-readonly .category-platform-select.rate-select-control::after {
  border-top-color: transparent;
}

.category-mapping-module.is-editing .category-platform-select.is-locked-field.rate-select-control::after {
  border-top-color: transparent;
}

.category-mapping-module.is-editing .category-picker-trigger.is-locked-field:disabled span {
  color: var(--text);
}

.category-mapping-module.is-editing .category-mapping-control:disabled {
  border-color: var(--line);
  background: #f8fafc;
  color: #94a3b8;
  opacity: 1;
  cursor: default;
  pointer-events: none;
  -webkit-text-fill-color: #94a3b8;
}

.category-mapping-module.is-editing .category-picker-trigger:disabled {
  border-color: var(--line);
  background: #f8fafc;
  color: #94a3b8;
  -webkit-text-fill-color: #94a3b8;
}

.category-mapping-module.is-editing .category-picker-trigger:disabled span {
  color: #94a3b8;
}

.category-mapping-module.is-editing .category-mapping-control.is-locked-field:disabled {
  border-color: transparent;
  background: transparent;
  color: var(--text);
  opacity: 1;
  cursor: default;
  pointer-events: none;
  -webkit-text-fill-color: var(--text);
}

.category-mapping-module.is-editing .category-picker-trigger.is-locked-field:disabled span {
  color: var(--text);
}

.category-mapping-module.is-editing .category-mapping-control:focus {
  border-color: var(--ring);
  outline: 2px solid rgba(148, 163, 184, 0.28);
  outline-offset: 1px;
}

.erp-directory-editor {
  position: relative;
  min-width: 0;
}

.erp-directory-tags {
  display: flex;
  min-height: 36px;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.erp-directory-tag {
  display: inline-flex;
  max-width: 100%;
  min-height: 26px;
  align-items: center;
  gap: 5px;
  padding: 3px 8px;
  border: 1px solid var(--line);
  border-color: var(--line);
  border-radius: 999px;
  background: #ffffff;
  color: var(--text);
  font-size: 12px;
  font-weight: 800;
  line-height: 18px;
}

.erp-directory-tag span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.erp-directory-remove {
  display: inline-flex;
  width: 16px;
  height: 16px;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: #64748b;
  cursor: pointer;
  font: inherit;
  font-size: 14px;
  font-weight: 800;
  line-height: 16px;
}

.erp-directory-remove:hover,
.erp-directory-remove:focus-visible {
  background: #fee2e2;
  color: var(--danger);
  outline: 0;
}

.category-mapping-module.is-readonly .erp-directory-remove {
  display: none;
}

.erp-directory-add {
  display: inline-flex;
  min-height: 26px;
  align-items: center;
  padding: 3px 4px;
  border: 0;
  background: transparent;
  color: var(--accent);
  cursor: pointer;
  font: inherit;
  font-size: 12px;
  font-weight: 800;
  line-height: 18px;
}

.erp-directory-add:hover,
.erp-directory-add:focus-visible {
  color: var(--text);
  outline: 0;
}

.erp-directory-add:disabled,
.erp-directory-editor.is-disabled .erp-directory-add {
  color: #94a3b8;
  cursor: default;
}

.erp-directory-empty {
  color: #94a3b8;
  font-size: 13px;
  font-weight: 700;
}

.erp-directory-popover {
  position: fixed;
  z-index: 1001;
  top: var(--erp-directory-popover-top);
  left: var(--erp-directory-popover-left);
  display: grid;
  width: var(--erp-directory-popover-width);
  max-height: var(--erp-directory-popover-max-height, calc(100vh - 48px));
  gap: 10px;
  padding: 10px;
  overflow-y: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 14px 30px rgb(15 23 42 / 12%);
}

.erp-directory-popover.opens-up {
  box-shadow: 0 -14px 30px rgb(15 23 42 / 12%);
}

.erp-directory-input {
  box-sizing: border-box;
  width: 100%;
  min-height: 34px;
  padding: 6px 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #ffffff;
  color: var(--text);
  font: inherit;
  font-size: 13px;
  outline: 0;
}

.erp-directory-input:focus {
  border-color: var(--ring);
  outline: 2px solid rgba(148, 163, 184, 0.28);
  outline-offset: 1px;
}

.erp-directory-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

.erp-directory-actions .btn {
  min-width: 58px;
  min-height: 32px;
  justify-content: center;
}

.category-mapping-control.is-readonly-name {
  border-color: transparent;
  background: transparent;
  color: var(--text);
  pointer-events: none;
}

.category-mapping-module.is-editing .category-mapping-control.is-readonly-name:focus {
  border-color: transparent;
  outline: 0;
}

.category-id-display {
  display: inline-block;
  padding-left: 10px;
  color: var(--text);
  font-size: 12px;
  font-weight: 800;
  line-height: 20px;
}

.category-row-action-cell {
  white-space: nowrap;
}

.category-row-delete-action {
  display: none;
  width: 56px;
  min-width: 56px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.14s ease;
}

.category-mapping-module.is-editing .category-row-delete-action {
  display: inline-flex;
}

.category-mapping-module.is-editing tr:hover .category-row-delete-action,
.category-mapping-module.is-editing tr:focus-within .category-row-delete-action {
  opacity: 1;
  pointer-events: auto;
}

.category-mapping-module.is-readonly .category-row-delete-action {
  display: none;
}

.category-mapping-loading-row td,
.category-mapping-empty-row td {
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.category-mapping-empty-row td {
  text-align: left;
}

.platform-title-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.platform-title-actions .btn {
  width: var(--button-width-2);
  height: var(--button-height);
  min-height: var(--button-height);
  padding: 0;
}

.platform-title-actions .enterprise-add-action {
  width: var(--button-width-4);
}

.platform-add-action,
.platform-cancel-action,
.enterprise-add-action,
.enterprise-cancel-action {
  display: none;
}

.platform-card-panel.is-editing .platform-add-action,
.platform-card-panel.is-editing .platform-cancel-action,
.enterprise-card-panel.is-editing .enterprise-add-action,
.enterprise-card-panel.is-editing .enterprise-cancel-action {
  display: inline-flex;
}

.platform-card-panel.is-readonly .platform-add-action,
.platform-card-panel.is-readonly .platform-cancel-action,
.enterprise-card-panel.is-readonly .enterprise-add-action,
.enterprise-card-panel.is-readonly .enterprise-cancel-action {
  display: none;
}

.enterprise-card-panel.is-saving .enterprise-add-action,
.enterprise-card-panel.is-saving .enterprise-cancel-action {
  pointer-events: none;
}

.enterprise-card-panel.is-readonly .enterprise-add-action {
  display: inline-flex;
}

.platform-card-list,
.enterprise-card-list {
  grid-column: 1 / -1;
  margin-top: 0;
}

.entity-card.platform-card,
.entity-card.enterprise-card {
  position: relative;
  display: grid;
  width: auto;
  height: auto;
  min-height: 190px;
  padding-right: 16px;
  border-color: var(--line-strong);
  background: #ffffff;
  transition:
    border-color 0.16s ease,
    background-color 0.16s ease,
    box-shadow 0.16s ease,
    transform 0.16s ease;
}

.entity-card.enterprise-card {
  width: var(--enterprise-card-width);
  height: var(--enterprise-card-height);
  min-height: var(--enterprise-card-height);
}

.entity-card.enterprise-card.is-draft {
  border-style: dashed;
}

.entity-card.enterprise-card.enterprise-card-empty {
  display: flex;
  justify-content: center;
  border-style: dashed;
  background: #fbfcfc;
}

.entity-card.platform-card.platform-card-empty {
  display: flex;
  justify-content: center;
  border-style: dashed;
  background: #fbfcfc;
}

.platform-card-empty-title {
  color: var(--text);
  font-size: 16px;
  font-weight: 800;
  line-height: 1.35;
}

.platform-card-empty-description {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.45;
}

.enterprise-card-empty strong {
  color: var(--text);
  font-size: 16px;
  line-height: 1.35;
}

.enterprise-card-empty span {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.enterprise-card-panel.is-readonly ~ .enterprise-card-list .enterprise-card[data-detail-href] {
  cursor: pointer;
}

.enterprise-card-panel.is-editing ~ .enterprise-card-list .enterprise-card,
.enterprise-card.is-editing {
  cursor: default;
}

.entity-card.platform-card:hover,
.entity-card.platform-card:focus-within,
.entity-card.enterprise-card:hover,
.entity-card.enterprise-card:focus-within {
  border-color: var(--line-strong);
  background: #f8fafc;
  box-shadow: 0 10px 24px rgb(15 23 42 / 8%);
  transform: translateY(-2px);
}

.platform-card-main,
.enterprise-card-main {
  display: grid;
  gap: 8px;
}

.platform-copy-basis-field {
  display: flex;
  min-height: 30px;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
}

.platform-erp-id-field {
  display: grid;
  gap: 5px;
}

.platform-erp-id-label {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  line-height: 1.25;
}

.platform-erp-id-input {
  width: min(100%, 180px);
  min-height: 30px;
  padding: 4px 8px;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 700;
}

.platform-erp-id-input[readonly] {
  border-color: transparent;
  background: transparent;
  color: var(--muted);
  pointer-events: none;
}

.platform-copy-basis-label {
  flex: 0 0 auto;
}

.platform-copy-basis-value {
  flex: 0 0 auto;
  min-width: 44px;
  padding: 4px 9px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #f8fafc;
  color: var(--text);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.2;
  text-align: center;
}

.platform-copy-basis-select {
  width: 96px;
  min-height: 30px;
  padding: 4px 28px 4px 10px;
  font-size: 13px;
  font-weight: 700;
}

.enterprise-card-title-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 116px;
  min-height: 36px;
  gap: 12px;
  align-items: start;
}

.enterprise-title-stack {
  display: grid;
  min-width: 0;
  gap: 4px;
  align-items: start;
  padding-top: 2px;
}

.enterprise-edit-stack {
  display: grid;
  min-width: 0;
  max-width: 250px;
  gap: 10px;
}

.enterprise-card-title {
  min-width: 0;
  overflow: hidden;
  color: var(--text);
  font-size: 21px;
  font-weight: 800;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.enterprise-erp-enterprise-code {
  min-width: 0;
  overflow: hidden;
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
  line-height: 1.35;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.enterprise-field {
  display: grid;
  gap: 5px;
}

.enterprise-field span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  line-height: 1.25;
}

.platform-name-input,
.enterprise-name-input,
.enterprise-erp-enterprise-input {
  box-sizing: border-box;
  display: block;
  width: min(100%, 250px);
  min-height: 32px;
  padding: 4px 0;
  border: 0;
  border-bottom: 1px solid var(--line-strong);
  background: transparent;
  color: var(--text);
  font: inherit;
  font-size: 17px;
  font-weight: 700;
}

.platform-name-input[readonly],
.enterprise-name-input[readonly],
.enterprise-erp-enterprise-input[readonly] {
  border-bottom-color: transparent;
  cursor: default;
  user-select: none;
}

.platform-name-input.is-invalid,
.enterprise-name-input.is-invalid,
.enterprise-erp-enterprise-input.is-invalid {
  border-color: var(--line-strong);
  color: var(--danger);
  box-shadow: none;
  outline: 0;
}

.platform-name-input[readonly]:focus,
.enterprise-name-input[readonly]:focus,
.enterprise-erp-enterprise-input[readonly]:focus {
  border-bottom-color: transparent;
  box-shadow: none;
  outline: 0;
}

.platform-name-input.is-name-editable:focus,
.enterprise-card-panel.is-editing ~ .enterprise-card-list .enterprise-name-input:focus,
.enterprise-card-panel.is-editing ~ .enterprise-card-list .enterprise-erp-enterprise-input:focus {
  border-bottom-color: var(--ring);
  box-shadow: none;
  outline: 0;
}

.platform-name-input.is-invalid:focus,
.enterprise-name-input.is-invalid:focus,
.enterprise-erp-enterprise-input.is-invalid:focus {
  border-color: var(--ring);
  color: var(--text);
}

.platform-name-input.is-invalid::placeholder,
.enterprise-name-input.is-invalid::placeholder,
.enterprise-erp-enterprise-input.is-invalid::placeholder {
  color: var(--danger);
  opacity: 1;
}

.enterprise-platform-list {
  display: grid;
  gap: 6px;
  margin-top: 18px;
}

.enterprise-platform-row {
  display: grid;
  grid-template-columns: 30px minmax(64px, 1fr) 52px minmax(28px, auto);
  min-height: 24px;
  align-items: center;
  gap: 6px;
  padding: 2px 0;
  border: 0;
  border-radius: 6px;
  background: transparent;
}

.enterprise-platform-row span {
  min-width: 0;
  overflow: hidden;
  color: var(--muted);
  font-size: 10px;
  font-weight: 500;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.enterprise-platform-more {
  grid-template-columns: minmax(0, 1fr);
}

.enterprise-platform-more span {
  color: var(--muted);
}

.enterprise-platform-empty {
  color: var(--muted);
  font-size: 11px;
  font-weight: 600;
}

.enterprise-card.is-editing .enterprise-platform-list {
  visibility: hidden;
  pointer-events: none;
}

.platform-module-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  width: 100%;
  gap: 6px 12px;
  margin-top: 14px;
}

.platform-module-link {
  box-sizing: border-box;
  display: flex;
  min-width: 0;
  min-height: 34px;
  align-items: center;
  justify-content: flex-start;
  gap: 7px;
  padding: 7px 8px;
  border: 0;
  border-radius: 5px;
  background: transparent;
  color: var(--muted);
  font-size: 14px;
  font-weight: 600;
  line-height: 1.25;
  text-align: left;
  text-decoration: none;
  transition:
    background-color 0.16s ease,
    color 0.16s ease;
}

.platform-module-link::before {
  content: "";
  flex: 0 0 auto;
  width: 5px;
  height: 5px;
  border-radius: 999px;
  background: var(--line-strong);
}

.platform-module-link:hover,
.platform-module-link:focus-visible {
  background: var(--accent-soft);
  color: var(--accent);
  outline: 0;
}

.platform-module-link:hover::before,
.platform-module-link:focus-visible::before {
  background: var(--accent);
}

.platform-card-panel.is-editing .platform-module-link {
  cursor: default;
  opacity: 0.62;
}

.platform-country-list {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 8px;
}

.platform-country-row {
  display: grid;
  grid-template-columns: 42px minmax(76px, 1fr) minmax(70px, auto);
  min-width: 0;
  min-height: 34px;
  align-items: center;
  gap: 10px;
  padding: 4px 2px;
  border: 1px solid transparent;
  border-radius: 6px;
  background: transparent;
}

.platform-country-row.empty {
  grid-template-columns: 42px minmax(76px, 1fr) minmax(70px, auto);
}

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

.platform-country-row strong {
  overflow: hidden;
  color: var(--muted);
  font-size: 12px;
  font-weight: 500;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.entity-card.platform-card .platform-country-row strong {
  font-size: 12px;
}

.card-delete-action {
  position: absolute;
  top: 12px;
  right: 12px;
  display: none;
  min-height: 30px;
  padding: 5px 10px;
  border: 1px solid transparent;
  border-radius: 6px;
  background: var(--danger-soft);
  color: var(--danger);
  cursor: default;
  font-size: 13px;
  font-weight: 700;
}

.entity-card .card-delete-action {
  color: var(--danger);
}

.platform-card-panel.is-editing .platform-card:hover .platform-delete-action,
.platform-card-panel.is-editing .platform-card:focus-within .platform-delete-action,
.platform-card-panel.is-editing ~ .platform-card-list .platform-card:hover .platform-delete-action,
.platform-card-panel.is-editing ~ .platform-card-list .platform-card:focus-within .platform-delete-action {
  display: inline-flex;
  align-items: center;
}

.platform-card-panel.is-readonly .platform-delete-action,
.platform-card-panel.is-readonly ~ .platform-card-list .platform-delete-action {
  display: none;
}

.entity-card.enterprise-card .enterprise-delete-action {
  position: static;
  display: inline-flex;
}

.enterprise-card-actions {
  display: flex;
  width: 116px;
  min-width: 116px;
  gap: 8px;
  align-items: center;
  justify-content: flex-end;
}

.enterprise-card-actions .btn {
  width: 54px;
  min-width: 54px;
  height: 32px;
  min-height: 32px;
  justify-content: center;
  padding-inline: 0;
}

.enterprise-card-edit-action {
  opacity: 0;
  transition:
    opacity 0.16s ease;
}

.enterprise-card:not(.is-editing) .enterprise-delete-action {
  opacity: 0;
  transition:
    opacity 0.16s ease;
}

.enterprise-card:hover .enterprise-card-edit-action,
.enterprise-card:focus .enterprise-card-edit-action,
.enterprise-card:focus-within .enterprise-card-edit-action,
.enterprise-card:hover .enterprise-delete-action,
.enterprise-card:focus .enterprise-delete-action,
.enterprise-card:focus-within .enterprise-delete-action {
  opacity: 1;
}

.enterprise-card.is-editing .enterprise-card-save-action,
.enterprise-card.is-editing .enterprise-card-cancel-action,
.enterprise-card.is-editing .enterprise-card-actions .btn {
  visibility: visible;
  opacity: 1;
}

.rate-country-cards {
  grid-template-columns: repeat(auto-fit, minmax(160px, 220px));
}

.rate-country-panel,
.rate-detail-panel {
  min-width: 0;
  margin-bottom: 18px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.rate-country-panel:not(.logistics-country-panel) {
  width: fit-content;
  max-width: 100%;
}

.rate-country-panel:not(.logistics-country-panel) .rate-panel-heading,
.rate-country-panel:not(.logistics-country-panel) .rate-country-cards {
  width: 916px;
  max-width: 100%;
}

.logistics-country-panel {
  width: fit-content;
  max-width: 100%;
}

.logistics-country-panel .rate-panel-heading,
.logistics-country-panel .rate-country-cards {
  width: 916px;
  max-width: 100%;
}

.rate-detail-panel {
  width: fit-content;
  max-width: 100%;
}

.rate-panel-heading {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
  margin-bottom: 14px;
}

.rate-panel-heading h2 {
  display: flex;
  min-width: 0;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  font-size: 20px;
}

.rate-unsaved-tag {
  display: inline-flex;
  min-height: 24px;
  align-items: center;
  padding: 2px 8px;
  border: 1px solid #fecaca;
  border-radius: 999px;
  background: #fef2f2;
  color: #b91c1c;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.4;
  white-space: nowrap;
}

.rate-unsaved-tag[hidden] {
  display: none;
}

.rate-panel-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.rate-country-panel.is-readonly .rate-edit-action,
.rate-country-panel.is-readonly .country-add-card-action,
.rate-detail-panel.is-readonly .rate-edit-action,
.rate-detail-panel.is-readonly .rate-edit-value,
.rate-detail-panel.is-readonly .rate-add-row {
  display: none;
}

.rate-country-panel.is-editing .rate-edit-action,
.rate-country-panel.is-editing .country-add-card-action,
.rate-detail-panel.is-editing .rate-edit-action {
  display: inline-flex;
}

.rate-country-panel.is-editing .country-edit-toggle {
  border-color: var(--accent);
  background: var(--accent);
  color: #ffffff;
}

.rate-detail-panel.is-editing .rate-detail-edit-toggle {
  border-color: var(--accent);
  background: var(--accent);
  color: #ffffff;
}

.rate-detail-panel.is-editing .rate-add-row {
  display: table-row;
}

.entity-card.country-rate-card {
  position: relative;
  min-height: 86px;
  grid-template-columns: auto minmax(0, 1fr);
  align-content: center;
  align-items: center;
  gap: 10px;
}

.country-rate-card .country-code-tag {
  grid-row: 1;
}

.country-rate-card .country-name {
  overflow: hidden;
  font-size: 16px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.entity-card.country-rate-card .country-exchange-rate {
  grid-column: 2;
  overflow: hidden;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.4;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.country-rate-card .country-card-delete {
  color: var(--danger);
}

.rate-country-panel.is-editing .country-rate-card:hover .country-card-delete,
.rate-country-panel.is-editing .country-rate-card:focus-within .country-card-delete {
  display: inline-flex;
}

.rate-country-panel.is-readonly .country-card-delete {
  display: none;
}

.entity-card.country-draft-card {
  height: 86px;
  min-height: 86px;
  align-content: center;
  grid-template-columns: minmax(0, 1fr);
  gap: 10px;
  border-style: dashed;
  background: #ffffff;
}

.country-draft-card .country-picker {
  position: relative;
  grid-column: 1 / -1;
  width: 100%;
  height: 38px;
}

.country-draft-card .country-picker summary {
  display: flex;
  width: 100%;
  height: auto;
  min-height: 38px;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 6px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  color: var(--muted);
  cursor: default;
  list-style: none;
}

.country-draft-card .country-picker summary::-webkit-details-marker {
  display: none;
}

.country-picker-menu {
  position: absolute;
  z-index: 5;
  top: calc(100% + 6px);
  right: 0;
  left: 0;
  display: grid;
  gap: 4px;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 12px 24px rgba(15, 23, 42, 0.08);
}

.country-draft-card .country-picker-menu {
  position: absolute;
  margin-top: 0;
}

.country-draft-card .country-picker:not([open]) .country-picker-menu {
  display: none;
}

.country-option-row {
  display: flex;
  width: 100%;
  min-height: 34px;
  align-items: center;
  gap: 8px;
  padding: 4px 6px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--text);
  cursor: default;
  text-align: left;
}

.country-option-row:hover,
.country-option-row:focus-visible {
  background: #f8fafc;
  outline: 0;
}

main:has(#rates-sg:target) .country-rate-card[href="#rates-sg"],
main:has(#rates-my:target) .country-rate-card[href="#rates-my"],
main:has(#rates-th:target) .country-rate-card[href="#rates-th"],
main:has(#rates-vn:target) .country-rate-card[href="#rates-vn"],
.country-rate-card.is-selected {
  border-color: var(--line-strong);
  background: #f8fafc;
}

.rate-detail-table-wrap {
  border: 1px solid var(--line);
  width: fit-content;
  max-width: 100%;
  overflow: visible;
}

.rate-country-detail {
  display: none;
}

.rate-country-detail:target,
.rate-default-detail {
  display: block;
}

main:has(.rate-country-detail:target) .rate-default-detail:not(:target) {
  display: none;
}

.rate-detail-table {
  table-layout: fixed;
  width: 914px;
  min-width: 914px;
}

.rate-detail-table th {
  height: 42px;
  padding: 6px 14px;
  vertical-align: middle;
}

.rate-detail-table td {
  height: 56px;
  padding: 8px 14px;
  vertical-align: middle;
}

.rate-empty-row td {
  color: var(--muted);
  text-align: left;
}

.rate-detail-table th:nth-child(1),
.rate-detail-table td:nth-child(1) {
  width: 178px;
}

.rate-detail-table th:nth-child(2),
.rate-detail-table td:nth-child(2) {
  width: 178px;
}

.rate-detail-table th:nth-child(3),
.rate-detail-table td:nth-child(3) {
  width: 178px;
}

.rate-detail-table th:nth-child(4),
.rate-detail-table td:nth-child(4) {
  width: 380px;
}

.rate-fee-type-cell,
.rate-scope-cell {
  color: var(--muted);
  white-space: nowrap;
}

.rate-value-cell {
  min-width: 0;
  vertical-align: middle;
}

.rate-current-value {
  color: var(--text);
}

.rate-default-note,
.rate-before-note {
  flex: 0 0 auto;
  color: var(--muted);
  font-size: 12px;
  white-space: nowrap;
}

.rate-adjust-editor {
  --rate-value-width: 110px;
  display: grid;
  grid-template-columns: var(--rate-value-width) 84px var(--rate-value-width);
  height: 36px;
  width: 100%;
  align-items: center;
  gap: 10px;
}

.rate-detail-panel.is-readonly .rate-adjust-editor {
  display: grid;
}

.rate-detail-panel.is-readonly .rate-adjust-editor:has(.rate-temporary-control:not([hidden])) > .rate-input-shell {
  visibility: hidden;
}

.rate-detail-panel.is-readonly .rate-adjust-editor:has(.rate-temporary-control:not([hidden])) .rate-temporary-control {
  grid-row: 1;
  grid-column: 1;
  visibility: visible;
}

.rate-detail-panel.is-editing .rate-adjust-editor {
  display: grid;
}

.rate-input-shell {
  --rate-value-width: 110px;
  display: inline-flex;
  position: relative;
  width: var(--rate-value-width);
  height: 36px;
  align-items: center;
  color: var(--text);
  font: inherit;
  font-size: 14px;
  font-weight: 400;
  line-height: 1.4;
}

.rate-input-shell {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #ffffff;
}

.rate-input-shell.has-unit {
  display: inline-flex;
}

.rate-input-shell.is-empty-rate-value {
  color: #94a3b8;
}

.rate-input-shell.is-empty-rate-value .rate-standard-input {
  color: #94a3b8;
  -webkit-text-fill-color: #94a3b8;
}

.rate-shop-maintenance-shell {
  border-color: transparent;
  background: transparent;
}

.rate-shop-maintenance-input {
  width: 100%;
  height: 34px;
  min-height: 34px;
  padding: 7px 0 7px 10px;
  border: 0;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 14px;
  font-weight: 400;
  line-height: 1.4;
  pointer-events: none;
  -webkit-text-fill-color: var(--muted);
}

.rate-detail-panel.is-readonly .rate-input-shell {
  border-color: transparent;
  background: transparent;
}

.rate-standard-input,
.rate-adjust-input {
  width: 100%;
  height: 34px;
  min-height: 34px;
  padding: 7px 0 7px 10px;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--text);
  font: inherit;
  font-size: 14px;
  font-weight: 400;
  line-height: 1.4;
}

.rate-standard-input[readonly] {
  cursor: default;
}

.rate-adjust-input:disabled {
  opacity: 1;
  -webkit-text-fill-color: var(--text);
}

.rate-standard-input:focus,
.rate-adjust-input:focus {
  outline: 0;
}

.rate-input-shell:focus-within {
  border-color: var(--ring);
  outline: 2px solid rgba(148, 163, 184, 0.28);
  outline-offset: 1px;
}

.rate-detail-panel.is-readonly .rate-input-shell:focus-within {
  border-color: transparent;
  outline: 0;
}

.rate-standard-input[type="number"],
.rate-adjust-input[type="number"] {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: textfield;
}

.rate-standard-input[type="number"]::-webkit-outer-spin-button,
.rate-standard-input[type="number"]::-webkit-inner-spin-button,
.rate-adjust-input[type="number"]::-webkit-outer-spin-button,
.rate-adjust-input[type="number"]::-webkit-inner-spin-button {
  margin: 0;
  -webkit-appearance: none;
}

.rate-adjust-toggle {
  width: 84px;
  height: 36px;
  min-width: 84px;
  min-height: 36px;
  padding: 0;
  border: 1px solid transparent;
  box-sizing: border-box;
  justify-self: start;
  color: var(--accent);
  font-size: 13px;
  line-height: 1;
  white-space: nowrap;
}

.rate-detail-panel.is-readonly .rate-adjust-toggle {
  display: none;
}

.rate-adjust-toggle[aria-pressed="true"] {
  color: var(--muted);
}

.rate-temporary-control {
  display: grid;
  grid-template-columns: var(--rate-value-width);
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.rate-temporary-control[hidden] {
  display: none;
}

.rate-adjust-before-note {
  display: inline-flex;
  height: 36px;
  align-items: center;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.4;
  white-space: nowrap;
}

.rate-detail-panel.is-readonly .rate-adjust-before-note {
  grid-row: 1;
  grid-column: 2 / 4;
  transform: translateX(-30px);
}

.rate-adjust-before-note[hidden],
.rate-detail-panel.is-editing .rate-adjust-before-note {
  display: none;
}

.logistics-panel {
  width: fit-content;
  max-width: 100%;
  min-width: 0;
  margin-bottom: 18px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.logistics-panel .rate-panel-heading,
.logistics-panel .logistics-table-wrap {
  width: 916px;
  max-width: 100%;
}

.logistics-panel.final-category-panel .rate-panel-heading,
.logistics-panel.final-category-panel .final-category-table-wrap,
.logistics-panel.final-category-panel .final-category-preview-note {
  width: 1682px;
  max-width: 100%;
}

.logistics-panel.final-category-panel .rate-panel-heading {
  align-items: flex-start;
}

.logistics-panel.final-category-panel .rate-panel-actions {
  margin-left: auto;
  flex-wrap: nowrap;
}

.logistics-title-group {
  display: grid;
  min-width: 0;
  gap: 4px;
}

.logistics-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.logistics-upload-error {
  display: inline-flex;
  min-height: 24px;
  align-items: center;
  color: var(--danger);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.4;
  white-space: pre-wrap;
}

.logistics-upload-error[hidden] {
  display: none;
}

.logistics-uploaded-at {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.4;
}

.logistics-row-count {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.4;
}

.logistics-rate-detail {
  display: none;
}

.logistics-rate-detail.is-active {
  display: block;
}

.logistics-table {
  table-layout: fixed;
  width: 914px;
  min-width: 914px;
}

.logistics-table th,
.logistics-table td {
  height: 56px;
  padding: 8px 14px;
  vertical-align: middle;
}

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

.logistics-table th:nth-child(2),
.logistics-table td:nth-child(2) {
  width: 307px;
}

.logistics-table th:nth-child(3),
.logistics-table td:nth-child(3) {
  width: 307px;
}

.logistics-display-value {
  display: inline-flex;
  min-height: 36px;
  align-items: center;
  color: var(--text);
  font-weight: 600;
}

.logistics-empty-value {
  display: inline-flex;
  min-height: 36px;
  align-items: center;
  color: #94a3b8;
  font-weight: 400;
}

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

.platform-entry-cards .entity-card {
  min-height: 150px;
  background: #ffffff;
  transition: background-color 0.16s ease;
}

.platform-entry-cards .entity-card:hover,
.platform-entry-cards .entity-card:focus-visible {
  background: #f8fafc;
}

.platform-subpage .table-placeholder {
  margin-top: 14px;
}

.platform-fields span {
  display: grid;
  align-content: center;
}

.field-table-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 14px;
}

.field-table-grid > *,
.card-grid > *,
.submodule-grid > * {
  min-width: 0;
}

.field-table-grid.single {
  grid-template-columns: 1fr;
}

.rate-field-panel {
  min-width: 0;
  width: fit-content;
  max-width: none;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.rate-field-card-heading {
  display: flex;
  width: 1050px;
  max-width: none;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 14px;
}

.rate-field-card-heading h2 {
  margin: 0;
  font-size: 20px;
}

.rate-field-toolbar {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

.rate-field-panel.is-editing [data-platform-back-link] {
  order: 1;
}

.rate-field-panel.is-editing [data-action="cancel"] {
  order: 2;
}

.rate-field-panel.is-editing [data-action="toggle-edit"] {
  order: 3;
}

.rate-field-groups {
  display: grid;
  width: 1050px;
  max-width: none;
  gap: 18px;
}

.rate-field-group-heading {
  margin-bottom: 10px;
}

.rate-field-group-heading h3 {
  margin: 0;
  font-size: 16px;
  line-height: 1.25;
}

.rate-field-group-actions {
  display: flex;
  width: 1050px;
  max-width: none;
  justify-content: flex-end;
  margin-top: 8px;
}

.rate-field-panel.is-readonly .field-edit-action,
.rate-field-panel.is-readonly .field-add-row,
.rate-field-panel.is-readonly .country-add-action,
.row-delete-action {
  display: none;
}

.rate-field-panel.is-readonly .rate-field-group-actions .field-edit-action {
  display: inline-flex;
  visibility: hidden;
  pointer-events: none;
}

.rate-field-table-wrap {
  max-width: 100%;
  overflow-x: auto;
}

.rate-field-table {
  table-layout: fixed;
  width: 1050px;
  min-width: 1050px;
  max-width: 1050px;
}

.rate-field-table th,
.rate-field-table td {
  height: 56px;
  padding: 8px 14px;
  vertical-align: middle;
}

.rate-field-table th:nth-child(1),
.rate-field-table td:nth-child(1) {
  width: 175px;
}

.rate-field-table th:nth-child(2),
.rate-field-table td:nth-child(2) {
  width: 175px;
}

.rate-field-table th:nth-child(3),
.rate-field-table td:nth-child(3) {
  width: 150px;
}

.rate-field-table th:nth-child(4),
.rate-field-table td:nth-child(4) {
  width: 550px;
}

.rate-field-table th:nth-child(2),
.rate-field-table td:nth-child(2),
.rate-field-table th:nth-child(3),
.rate-field-table td:nth-child(3) {
  text-align: center;
}

.rate-field-loading-row td {
  height: 56px;
  color: #94a3b8;
  font-size: 13px;
  font-weight: 600;
}

.rate-field-empty-row td {
  height: 56px;
}

.rate-field-empty-row td:first-child {
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
  text-align: left;
}

.rate-field-header-label {
  display: block;
  box-sizing: border-box;
}

.rate-field-table th:nth-child(-n + 3) .rate-field-header-label {
  padding-left: 10px;
}

.rate-field-table th:nth-child(2) .rate-field-header-label,
.rate-field-table th:nth-child(3) .rate-field-header-label {
  width: 104px;
  margin: 0 auto;
  padding-left: 10px;
  text-align: left;
}

.rate-field-control {
  box-sizing: border-box;
  width: 100%;
  height: 36px;
  min-height: 36px;
}

.rate-field-control[data-field="value_type"] {
  width: 104px;
  min-width: 104px;
}

.rate-field-control[data-field="effective_scope"] {
  width: 104px;
  min-width: 104px;
}

select.rate-field-control {
  padding-right: 10px;
  appearance: none;
  -webkit-appearance: none;
}

.rate-select-control {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  padding: 7px 28px 7px 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #ffffff;
  color: var(--text);
  cursor: default;
  font: inherit;
  font-weight: 600;
  line-height: 20px;
  text-align: left;
}

.rate-field-table td:nth-child(2) .rate-select-control,
.rate-field-table td:nth-child(3) .rate-select-control {
  justify-content: flex-start;
  padding-left: 10px;
  text-align: left;
}

.rate-select-control.is-placeholder {
  color: #94a3b8;
}

.rate-select-control::after {
  content: "";
  position: absolute;
  top: 50%;
  right: 10px;
  width: 0;
  height: 0;
  border-right: 4px solid transparent;
  border-left: 4px solid transparent;
  border-top: 5px solid var(--muted);
  transform: translateY(-50%);
}

.rate-field-panel.is-readonly .rate-field-control {
  border-color: transparent;
  background: transparent;
  color: var(--text);
  opacity: 1;
  pointer-events: none;
  -webkit-text-fill-color: var(--text);
}

.rate-field-control.is-locked-field {
  border-color: transparent;
  background: transparent;
  color: var(--text);
  pointer-events: none;
  -webkit-text-fill-color: var(--text);
}

.rate-field-control.is-invalid {
  border-color: var(--danger);
  background: var(--danger-soft);
}

.country-range-error {
  color: #f87171;
  font-size: 13px;
  font-weight: 600;
}

.country-range-cell {
  display: flex;
  min-width: 0;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.country-range-cell .country-tag-list {
  flex: 1 1 auto;
}

.country-range-cell .country-add-action {
  display: inline-flex;
  min-width: 38px;
  min-height: 28px;
  align-items: center;
  justify-content: center;
  margin-left: 0;
  flex: 0 0 auto;
  padding: 0 9px;
  border: 1px dashed var(--line-strong);
  border-radius: 999px;
  background: #f8fafc;
  color: var(--muted);
  font-size: 15px;
  font-weight: 800;
  line-height: 1;
}

.country-range-cell .country-add-action:hover {
  border-color: var(--accent);
  background: var(--accent-soft);
  color: var(--accent);
}

.row-delete-action {
  min-height: 28px;
  flex: 0 0 auto;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--danger);
  font-size: 13px;
  font-weight: 700;
}

.rate-field-panel.is-editing .rate-field-table tbody tr:is(:hover, :focus-within) .row-delete-action {
  display: inline-flex;
  align-items: center;
}

.rate-field-panel.is-readonly .rate-select-control::after,
.rate-field-control.is-locked-field.rate-select-control::after {
  border-top-color: transparent;
}

.rate-select-popover {
  position: fixed;
  z-index: 55;
  display: grid;
  gap: 4px;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 14px 28px rgba(15, 23, 42, 0.12);
}

.rate-select-option {
  display: flex;
  width: 100%;
  min-height: 30px;
  align-items: center;
  padding: 4px 8px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--text);
  cursor: default;
  font: inherit;
  font-size: 13px;
  font-weight: 700;
  text-align: left;
}

.rate-select-option:hover,
.rate-select-option.is-selected {
  background: var(--surface-soft);
}

.field-display-value {
  display: inline-flex;
  max-width: 100%;
  min-height: 36px;
  align-items: center;
  overflow: hidden;
  color: var(--text);
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.custom-select {
  position: relative;
  width: 100%;
}

.custom-select-trigger {
  display: flex;
  width: 100%;
  height: 36px;
  align-items: center;
  justify-content: space-between;
  padding: 7px 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #ffffff;
  color: var(--text);
  cursor: default;
}

.custom-select-trigger::after {
  content: "";
  width: 0;
  height: 0;
  border-right: 4px solid transparent;
  border-left: 4px solid transparent;
  border-top: 5px solid var(--muted);
}

.custom-options {
  position: absolute;
  z-index: 2;
  right: 0;
  left: 0;
  display: none;
  margin-top: 4px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #ffffff;
  box-shadow: var(--shadow);
}

.custom-options span {
  display: block;
  padding: 8px 10px;
  color: var(--text);
}

.custom-options span:hover {
  background: var(--surface-soft);
}

.custom-select:hover .custom-options,
.custom-select:focus-within .custom-options {
  display: block;
}

.entity-card {
  display: grid;
  min-height: 118px;
  align-content: start;
  gap: 8px;
  padding: 14px;
  background: #ffffff;
}

.entity-card.highlighted {
  border-color: var(--line-strong);
  background: #f8fafc;
}

.entity-card.muted {
  background: #f8fafb;
}

.entity-card strong {
  font-size: 18px;
}

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

.entity-card .card-kicker {
  color: var(--accent);
  font-size: 12px;
  font-weight: 700;
}

.config-placeholder {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-top: 12px;
}

.config-placeholder span {
  min-height: 72px;
  padding: 12px;
  border: 1px dashed var(--line-strong);
  border-radius: 8px;
  background: #ffffff;
  color: var(--muted);
  font-size: 13px;
}

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

.submodule-grid article {
  min-height: 118px;
  padding: 14px;
}

.submodule-grid p {
  margin-bottom: 0;
  font-size: 14px;
}

.table-card {
  background: #ffffff;
}

.table-wrap {
  overflow-x: auto;
  max-width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
}

.table-wrap.rate-detail-table-wrap {
  overflow: visible;
}

.table-wrap.enterprise-rate-table-wrap {
  border: 0;
  border-radius: 0;
  box-shadow: none;
}

.table-wrap.category-mapping-table-wrap {
  overflow-x: hidden;
  overflow-y: visible;
}

.platform-detail-panel .table-wrap:has(.enterprise-param-table) {
  overflow: visible;
}

.data-table,
table {
  width: 100%;
  min-width: 1120px;
  border-collapse: collapse;
  font-size: 14px;
}

.form-control,
.form-select,
td input,
td select {
  width: 100%;
  min-width: 96px;
  min-height: 36px;
  padding: 7px 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #ffffff;
  color: var(--text);
  font: inherit;
}

.form-control:focus,
.form-select:focus,
td input:focus,
td select:focus {
  border-color: var(--ring);
  outline: 2px solid rgba(148, 163, 184, 0.28);
  outline-offset: 1px;
}

.rate-detail-table td .rate-standard-input,
.rate-detail-table td .rate-adjust-input {
  width: 100%;
  min-width: 0;
  height: 34px;
  min-height: 34px;
  padding: 7px 0 7px 10px;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--text);
  font: inherit;
  font-size: 14px;
  font-weight: 400;
  line-height: 1.4;
}

.rate-detail-table td .rate-standard-input:focus,
.rate-detail-table td .rate-adjust-input:focus {
  border: 0;
  outline: 0;
}

.activity-select {
  min-height: 72px;
  padding: 6px;
}

.activity-select option {
  padding: 3px 4px;
}

.table-state-actions,
.table-state-actions .read-mode-actions,
.table-state-actions .edit-mode-actions {
  display: flex;
  gap: 8px;
  align-items: center;
}

.enterprise-param-table {
  table-layout: fixed;
  min-width: 1220px;
}

.enterprise-param-table th,
.enterprise-param-table td {
  height: 64px;
  padding: 10px 12px;
  vertical-align: middle;
}

.enterprise-param-table th:nth-child(1),
.enterprise-param-table td:nth-child(1) {
  width: 160px;
}

.enterprise-param-table th:nth-child(2),
.enterprise-param-table td:nth-child(2) {
  width: 240px;
}

.enterprise-param-table th:nth-child(3),
.enterprise-param-table td:nth-child(3),
.enterprise-param-table th:nth-child(4),
.enterprise-param-table td:nth-child(4),
.enterprise-param-table th:nth-child(5),
.enterprise-param-table td:nth-child(5),
.enterprise-param-table th:nth-child(6),
.enterprise-param-table td:nth-child(6),
.enterprise-param-table th:nth-child(7),
.enterprise-param-table td:nth-child(7),
.enterprise-param-table th:nth-child(8),
.enterprise-param-table td:nth-child(8) {
  width: 150px;
}

.enterprise-param-table th:nth-child(8),
.enterprise-param-table td:nth-child(8) {
  width: 72px;
}

.enterprise-param-table .country-cell {
  height: 36px;
}

.status-cell {
  text-align: left;
}

.status-toggle {
  width: auto;
  min-width: 46px;
  height: 26px;
  min-height: 26px;
  padding: 0 8px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--success-soft);
  color: var(--success-text);
  font-size: 12px;
  font-weight: 800;
}

.status-toggle.is-disabled {
  background: #e2e8f0;
  color: #64748b;
}

.enterprise-param-table tr.is-disabled td {
  background: #f8fafc;
  color: #94a3b8;
}

.enterprise-param-table tr.is-disabled .country-code-tag,
.enterprise-param-table tr.is-disabled .activity-tag,
.enterprise-param-table tr.is-disabled .activity-option-pill {
  border-color: #e2e8f0;
  background: #f1f5f9;
  color: #94a3b8;
}

.enterprise-param-table tr.is-disabled input,
.enterprise-param-table tr.is-disabled .country-select-field summary {
  background: #f8fafc;
  color: #94a3b8;
}

.enterprise-param-table tr.is-disabled .activity-picker,
.enterprise-param-table tr.is-disabled .country-picker,
.enterprise-param-table tr.is-disabled .param-edit-value {
  pointer-events: none;
}

.enterprise-param-table tr.is-disabled .activity-picker summary,
.enterprise-param-table tr.is-disabled .country-picker summary {
  color: #94a3b8;
}

.country-select-field {
  position: relative;
  display: block;
  height: 36px;
}

.country-select-field summary {
  display: flex;
  width: 100%;
  height: 36px;
  align-items: center;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #ffffff;
  cursor: default;
  list-style: none;
}

.country-select-field summary::-webkit-details-marker {
  display: none;
}

.country-placeholder-text {
  overflow: hidden;
  color: #94a3b8;
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.enterprise-param-table .country-code-tag,
.enterprise-param-table .country-name,
.param-display-value,
.param-edit-value {
  flex-shrink: 0;
}

.activity-cell,
.param-value-cell {
  position: relative;
}

.activity-field {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 36px;
  gap: 8px;
  align-items: center;
  height: 36px;
}

.activity-field:not(:has(.activity-picker)) {
  grid-template-columns: 1fr;
}

.activity-tag-list {
  display: flex;
  min-width: 0;
  height: 36px;
  align-items: center;
  gap: 6px;
  overflow: hidden;
}

.activity-tag {
  display: inline-flex;
  max-width: 96px;
  height: 26px;
  align-items: center;
  padding: 0 8px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface-soft);
  color: var(--text);
  font-size: 12px;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.activity-muted-text,
.placeholder-value {
  color: #94a3b8;
}

.activity-muted-text {
  overflow: hidden;
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.activity-picker,
.country-picker {
  position: relative;
  height: 36px;
}

.activity-picker summary,
.country-picker summary {
  display: inline-flex;
  width: 36px;
  height: 36px;
  align-items: center;
  justify-content: flex-end;
  color: var(--accent);
  cursor: default;
  font-size: 13px;
  font-weight: 700;
  list-style: none;
  white-space: nowrap;
}

.country-select-field.country-picker summary {
  display: flex;
  width: 100%;
  justify-content: flex-start;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #ffffff;
}

.activity-picker summary::-webkit-details-marker,
.country-picker summary::-webkit-details-marker {
  display: none;
}

.activity-popover,
.country-popover {
  position: absolute;
  z-index: 10;
  top: 40px;
  right: 0;
  display: grid;
  min-width: 176px;
  gap: 4px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  box-shadow: var(--shadow);
}

.activity-picker:not([open]) .activity-popover,
.country-picker:not([open]) .country-popover {
  display: none;
}

.country-option-row {
  display: flex;
  min-height: 34px;
  align-items: center;
  gap: 8px;
  padding: 4px 8px;
  border-radius: 8px;
  cursor: default;
}

.country-option-row:hover,
.country-option-row:has(.country-radio:checked) {
  background: var(--surface-soft);
}

.country-option-row:has(.country-radio:checked) .country-code-tag {
  border-color: var(--line-strong);
  box-shadow: inset 0 0 0 1px var(--line-strong);
}

.country-radio {
  position: absolute;
  width: 1px;
  min-width: 1px;
  height: 1px;
  min-height: 1px;
  margin: 0;
  padding: 0;
  opacity: 0;
  pointer-events: none;
}

.country-option-row .country-code-tag {
  flex: none;
}

.country-option-row .country-name {
  min-width: 0;
}

.activity-option-row {
  display: flex;
  min-height: 30px;
  align-items: center;
  gap: 8px;
}

.activity-option-pill {
  display: inline-flex;
  min-height: 30px;
  align-items: center;
  padding: 4px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface-soft);
  color: var(--text);
  font-size: 13px;
  font-weight: 700;
}

.activity-option-row:hover .activity-option-pill {
  border-color: var(--line-strong);
}

.activity-option-status {
  flex: none;
  color: #94a3b8;
  font-size: 12px;
  font-weight: 700;
}

.activity-all-added {
  padding: 4px 2px;
  color: #94a3b8;
  font-size: 13px;
}

.param-value-cell {
  height: 64px;
}

.param-display-value,
.param-edit-value {
  width: 100%;
  height: 36px;
}

.param-display-value {
  display: inline-flex;
  align-items: center;
  color: var(--text);
  font-variant-numeric: tabular-nums;
}

.param-edit-value::placeholder {
  color: #cbd5e1;
}

.param-edit-value:focus::placeholder {
  color: transparent;
}

.platform-detail-panel.is-readonly .edit-mode-actions,
.platform-detail-panel.is-editing .read-mode-actions,
.platform-detail-panel.is-readonly .param-edit-value,
.platform-detail-panel.is-readonly .activity-picker,
.platform-detail-panel.is-readonly .country-picker,
.platform-detail-panel.is-editing .param-display-value {
  display: none;
}

.platform-detail-panel.is-editing .activity-field,
.platform-detail-panel.is-readonly .activity-tag-list {
  width: 100%;
}

.platform-detail-panel.is-editing .activity-tag-list {
  min-width: 0;
}

.platform-detail-panel.is-editing .country-cell {
  pointer-events: none;
}

.country-tag-list {
  display: flex;
  min-width: 180px;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}

.site-tag-list {
  min-width: 0;
  flex-wrap: nowrap;
  overflow: hidden;
}

.country-range-tag {
  display: inline-flex;
  min-height: 28px;
  align-items: center;
  padding: 3px 8px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--text);
  font-size: 13px;
  font-weight: 700;
}

.country-add-action {
  margin-left: auto;
  min-height: 28px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--accent);
  font-size: 13px;
  font-weight: 700;
}

.country-range-popover {
  position: fixed;
  z-index: 50;
  display: flex;
  width: 304px;
  max-width: 304px;
  flex-wrap: wrap;
  gap: 8px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 14px 28px rgba(15, 23, 42, 0.12);
}

.country-option-tag {
  display: inline-flex;
  min-width: 38px;
  min-height: 28px;
  align-items: center;
  justify-content: center;
  padding: 3px 9px;
  border: 1px solid var(--line);
  border-style: dashed;
  border-radius: 999px;
  background: #ffffff;
  color: #94a3b8;
  cursor: default;
  font-size: 12px;
  font-weight: 600;
}

.country-option-tag:hover {
  border-color: var(--line-strong);
  color: var(--muted);
}

.country-option-tag.is-selected {
  border-color: var(--line-strong);
  border-style: solid;
  background: var(--accent-soft);
  color: var(--accent);
  font-weight: 800;
  box-shadow: inset 0 0 0 1px var(--line-strong);
}

.country-more-tag {
  display: inline-flex;
  min-width: 38px;
  min-height: 28px;
  align-items: center;
  justify-content: center;
  padding: 3px 9px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 12px;
  font-weight: 800;
  line-height: 1.3;
}

th,
td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

th {
  background: #f8fafc;
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
}

tbody tr:hover {
  background: #f8fafc;
}

tr:last-child td {
  border-bottom: 0;
}

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

.field-control.compact {
  min-width: 0;
}

.field-control span {
  color: var(--muted);
  font-size: 12px;
}

.field-control input {
  width: 100%;
  min-height: 34px;
  padding: 7px 9px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #ffffff;
  color: var(--text);
  font: inherit;
  font-size: 14px;
}

.field-control input:focus {
  border-color: var(--ring);
  outline: 2px solid rgba(148, 163, 184, 0.28);
  outline-offset: 1px;
}

.field-hint {
  margin: 6px 0 0;
  font-size: 12px;
}

.readonly-value {
  display: inline-flex;
  min-height: 34px;
  align-items: center;
  padding: 6px 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #f8fafc;
  color: var(--text);
  font-weight: 700;
}

.rate-action {
  white-space: nowrap;
}

.country-workspace {
  padding-top: 28px;
}

.country-title-module {
  margin-bottom: 14px;
}

.country-title-module h1 {
  margin: 0;
}

.title-kicker {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0;
}

.country-parameter-panel {
  grid-column: 1 / -1;
  min-width: 0;
}

.country-table-toolbar {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 0;
}

.country-table-toolbar .edit-mode-actions,
.country-table-toolbar .read-mode-actions {
  display: flex;
  gap: 8px;
}

.country-list-module.is-editing .read-mode-actions,
.country-list-module:not(.is-editing) .edit-mode-actions,
.country-table-toolbar.is-editing .read-mode-actions,
.country-table-toolbar:not(.is-editing) .edit-mode-actions {
  display: none;
}

.country-parameter-panel .display-value {
  display: none;
}

.fixed-action {
  width: var(--button-width-2);
  height: var(--button-height);
  min-height: var(--button-height);
  padding: 0;
}

.fixed-action[data-action="export-template"],
.fixed-action[data-action="upload-overwrite"] {
  width: var(--button-width-4);
}

.country-table-wrap {
  width: fit-content;
  max-width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
}

.fixed-table {
  table-layout: fixed;
  min-width: 900px;
}

.country-table.fixed-table {
  width: 1082px;
  min-width: 1082px;
}

.rate-detail-table.fixed-table,
.rate-detail-table.data-table {
  width: 914px;
  min-width: 914px;
  max-width: 914px;
}

.rate-detail-table th:nth-child(1),
.rate-detail-table td:nth-child(1) {
  width: 178px;
}

.rate-detail-table th:nth-child(2),
.rate-detail-table td:nth-child(2) {
  width: 178px;
}

.rate-detail-table th:nth-child(3),
.rate-detail-table td:nth-child(3) {
  width: 178px;
}

.rate-detail-table th:nth-child(4),
.rate-detail-table td:nth-child(4) {
  width: 380px;
}

.country-table th {
  height: 44px;
  padding: 8px 16px;
  text-align: left;
  vertical-align: middle;
}

.country-table td {
  height: 56px;
  padding: 8px 16px;
  text-align: left;
  vertical-align: middle;
}

.country-loading-row td {
  color: var(--muted);
  font-weight: 700;
}

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

.country-table th:nth-child(2),
.country-table td:nth-child(2) {
  width: 100px;
}

.country-table th:nth-child(3),
.country-table td:nth-child(3) {
  width: 311px;
}

.country-table th:nth-child(4),
.country-table td:nth-child(4) {
  width: 190px;
}

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

.country-table th:nth-child(5) {
  padding-left: 27px;
}

.country-table th:nth-child(6),
.country-table td:nth-child(6) {
  width: 140px;
  text-align: center;
}

.country-table td:nth-child(5),
.country-table td:nth-child(6) {
  line-height: 0;
}

.country-cell {
  position: relative;
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 10px;
  padding-right: 48px;
}

.country-code-tag {
  display: inline-flex;
  min-width: 38px;
  min-height: 28px;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 12px;
  font-weight: 800;
}

.country-name {
  overflow: hidden;
  color: var(--text);
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.country-delete-action {
  position: absolute;
  right: 0;
  display: inline-flex;
  width: 40px;
  height: 28px;
  align-items: center;
  justify-content: center;
  border: 1px solid transparent;
  border-radius: 6px;
  background: var(--danger-soft);
  color: var(--danger);
  cursor: default;
  font-size: 12px;
  font-weight: 700;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.12s ease;
}

.country-parameter-panel.is-editing .country-cell:hover .country-delete-action,
.country-parameter-panel.is-editing .country-cell:focus-within .country-delete-action {
  opacity: 1;
  pointer-events: auto;
}

.country-parameter-panel:not(.is-editing) .country-delete-action {
  display: none;
}

.country-parameter-panel:not(.is-editing) .country-cell {
  padding-right: 0;
}

.new-country-cell {
  padding-right: 0;
}

.country-table .country-name-input {
  flex: 1 1 140px;
  min-width: 140px;
}

.country-table .field-control input,
.country-table .table-input,
.country-table .number-stepper,
.country-table .country-name-input,
.country-table .integer-stepper,
.country-table .readonly-value,
.country-table .rate-hover-action {
  display: inline-flex;
  width: 100%;
  height: 36px;
}

.country-table .readonly-value {
  display: inline-flex;
  width: 100%;
  height: 36px;
  align-items: center;
  justify-content: flex-start;
  padding: 0;
  border: 0;
  background: transparent;
  font-variant-numeric: tabular-nums;
}

.country-table .table-input,
.country-table .integer-stepper,
.country-table .display-value {
  line-height: 20px;
  vertical-align: middle;
}

.country-table .table-input,
.country-table .number-stepper,
.country-table .country-name-input {
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #ffffff;
  font: inherit;
}

.country-table .table-input,
.country-table .country-name-input {
  padding: 7px 10px;
}

.country-table .number-stepper {
  padding: 7px 8px 7px 10px;
}

.country-table input[data-field="currencyLossRate"] {
  width: 95px;
}

.country-table .integer-stepper {
  display: inline-grid;
  width: 116px;
  height: 36px;
}

.country-table .last-fetch-time {
  color: var(--muted);
}

.integer-stepper {
  display: inline-grid;
  grid-template-columns: 36px minmax(0, 1fr) 36px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #ffffff;
}

.stepper-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #ffffff;
  color: var(--text);
  font-weight: 700;
}

.stepper-action:first-child {
  border-right: 1px solid var(--line);
}

.stepper-action:last-child {
  border-left: 1px solid var(--line);
}

.stepper-value {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-variant-numeric: tabular-nums;
  cursor: default;
  user-select: none;
}

.country-table input::placeholder {
  color: #cbd5e1;
}

.country-parameter-panel.is-readonly .table-input,
.country-parameter-panel.is-readonly .integer-stepper {
  border-color: transparent;
  background: transparent;
  pointer-events: none;
}

.country-parameter-panel.is-readonly .stepper-action {
  visibility: hidden;
}

.exchange-rate-cell {
  white-space: nowrap;
}

.exchange-rate-cell .exchange-rate-display {
  display: inline-grid;
  width: 191px;
  grid-template-columns: 12px 40px 14px minmax(0, 1fr);
  column-gap: 4px;
  align-items: center;
  overflow: hidden;
  justify-content: start;
  padding: 0;
  font-variant-numeric: tabular-nums;
  line-height: 20px;
  vertical-align: middle;
  white-space: nowrap;
}

.exchange-rate-currency,
.exchange-rate-amount {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.exchange-rate-equals {
  text-align: center;
}

.exchange-rate-empty {
  grid-column: 1 / -1;
}

.exchange-rate-cell .rate-hover-action {
  position: static;
  width: 78px;
  flex: 0 0 78px;
  margin-left: 10px;
}

.rate-hover-action {
  width: 84px;
  flex: 0 0 84px;
  white-space: nowrap;
}

.rate-hover-action:focus-visible {
  background: var(--accent-soft);
  border-color: var(--ring);
  box-shadow: 0 0 0 2px rgba(148, 163, 184, 0.28);
  outline: 0;
}

.rate-hover-action:active {
  background: var(--accent-soft);
  border-color: var(--line-strong);
}

.module-section.platform-detail-panel {
  display: none;
  scroll-margin-top: 24px;
}

.module-section.platform-detail-panel:target {
  display: block;
}

.table-placeholder {
  display: grid;
  gap: 0;
  margin-top: 12px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.table-placeholder::before,
.table-placeholder div {
  content: "";
  display: block;
  height: 44px;
  border-bottom: 1px solid var(--line);
  background: linear-gradient(
    90deg,
    #eef3f4 0 18%,
    #ffffff 18% 38%,
    #eef3f4 38% 56%,
    #ffffff 56% 74%,
    #eef3f4 74% 100%
  );
}

.table-placeholder::before {
  background: var(--surface-soft);
}

.table-placeholder div:last-child {
  border-bottom: 0;
}

.table-placeholder.dense::before,
.table-placeholder.dense div {
  background: linear-gradient(
    90deg,
    #eef3f4 0 14%,
    #ffffff 14% 30%,
    #eef3f4 30% 48%,
    #ffffff 48% 66%,
    #eef3f4 66% 82%,
    #ffffff 82% 100%
  );
}

/* Pricing management */
.pricing-tag-section {
  width: 1260px;
  max-width: 100%;
}

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

.pricing-tag-actions .btn {
  width: var(--button-width-2);
  height: var(--button-height);
  min-height: var(--button-height);
  padding: 0;
}

.pricing-tag-actions .btn[hidden] {
  display: none;
}

.pricing-tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.pricing-tag-card {
  position: relative;
  display: inline-flex;
  width: auto;
  max-width: 220px;
  min-height: 34px;
  align-items: center;
  gap: 8px;
  padding: 0 10px;
  border: 1px solid #dbeafe;
  border-radius: 999px;
  appearance: none;
  background: #f8fbff;
  color: inherit;
  font: inherit;
  text-align: left;
}

.pricing-tag-card:hover,
.pricing-tag-card:focus-visible {
  border-color: #bfdbfe;
  background: #f1f7ff;
  outline: 0;
}

.pricing-tag-card.highlighted {
  border-color: #bfdbfe;
  background: #eff6ff;
  box-shadow: none;
}

.pricing-tag-title-text {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--text);
  font-size: 13px;
  font-weight: 700;
}

.pricing-tag-delete-action {
  display: inline-flex;
  flex: 0 0 auto;
}

.pricing-tag-delete-button {
  display: inline-flex;
  width: 20px;
  min-height: 20px;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: 1px solid transparent;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  line-height: 1;
}

.pricing-tag-delete-button:hover,
.pricing-tag-delete-button:focus-visible {
  background: #fee2e2;
  color: var(--danger);
  outline: 0;
}

.pricing-tag-delete-button.is-confirming {
  width: auto;
  padding: 0 7px;
  border-color: transparent;
  background: var(--danger-soft);
  color: var(--danger);
}

.pricing-tag-edit-card {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  padding: 0 6px;
}

.pricing-tag-name-input {
  width: 160px;
  height: 28px;
  border-radius: 999px;
}

.pricing-workbench {
  width: 1260px;
  max-width: 100%;
}

.pricing-workbench-grid {
  display: grid;
  grid-template-columns: minmax(260px, 292px) minmax(900px, 952px);
  gap: 16px;
  align-items: start;
}

.pricing-enterprise-panel,
.pricing-shop-panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
}

.pricing-enterprise-panel {
  padding: 0;
  border: 0;
  background: transparent;
}

.pricing-enterprise-list {
  display: grid;
  gap: 12px;
}

.pricing-enterprise-row {
  width: 100%;
  height: auto;
  min-height: 118px;
  appearance: none;
  background: #ffffff;
  color: inherit;
  font: inherit;
  text-align: left;
}

.pricing-enterprise-row:hover,
.pricing-enterprise-row:focus-visible {
  background: #ffffff;
  outline: 0;
}

.pricing-enterprise-title {
  display: grid;
  gap: 2px;
}

.pricing-enterprise-row.highlighted {
  border-color: var(--line);
  background: #f8fafc;
  box-shadow: none;
}

.pricing-shop-panel {
  padding: 14px;
}

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

.pricing-shop-toolbar {
  display: flex;
  align-items: center;
  margin-bottom: 14px;
}

.pricing-shop-scope-picker {
  width: fit-content;
}

.pricing-shop-scope-picker .sale-calc-picker-trigger {
  width: 260px;
}

.pricing-shop-scope-picker .sale-calc-picker-menu {
  right: auto;
  left: 0;
  min-width: 260px;
}

.pricing-shop-scope-option {
  width: 100%;
}

.pricing-shop-scope-option.is-selected .sale-calc-platform-tag {
  border-color: #bfdbfe;
  background: #eff6ff;
  color: #1d4ed8;
}

.pricing-shop-table-wrap {
  max-width: 100%;
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.pricing-shop-price-table {
  width: 100%;
  min-width: 0;
  table-layout: fixed;
}

.pricing-shop-price-table th,
.pricing-shop-price-table td {
  width: 50%;
  white-space: nowrap;
}

.pricing-price-input {
  width: 132px;
}

.pricing-price-input-shell {
  position: relative;
  display: inline-flex;
  width: 128px;
  align-items: center;
}

.pricing-price-input-shell .pricing-price-input {
  width: 100%;
  padding-right: 48px;
}

.pricing-price-input-shell .pricing-price-input[readonly] {
  padding-right: 0;
}

.pricing-table-display-input {
  width: 100%;
  min-width: 0;
  border-color: transparent;
  background: transparent;
  color: var(--text);
  pointer-events: none;
}

.pricing-table-heading-label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 700;
  color: var(--muted);
}

.pricing-country-cell {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 8px;
}

.pricing-country-cell .country-code-tag {
  flex: 0 0 auto;
}

.pricing-country-name {
  flex: 1 1 auto;
  height: 34px;
  padding: 0;
}

.pricing-price-currency {
  position: absolute;
  right: 10px;
  color: var(--muted);
  font-size: 12px;
  pointer-events: none;
}

.pricing-price-currency.is-readonly {
  visibility: hidden;
}

.pricing-shop-price-table .pricing-price-input[readonly] {
  border-color: transparent;
  background: transparent;
  pointer-events: none;
}

.pricing-price-input.is-invalid {
  border-color: var(--danger);
  color: var(--danger);
}

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

.pricing-price-actions .btn[hidden] {
  display: none;
}

.pricing-price-actions .btn {
  width: var(--button-width-2);
  height: var(--button-height);
  min-height: var(--button-height);
  padding: 0;
}

.pricing-save-error {
  margin: 10px 0 0;
  color: var(--danger);
  font-size: 13px;
}

.pricing-empty-state,
.pricing-empty-row td {
  color: var(--muted);
  text-align: center;
}

.sale-calc-page {
  min-width: 980px;
}

.sale-calc-workbench {
  display: grid;
  grid-template-columns: 300px minmax(620px, 1fr);
  gap: 16px;
  align-items: start;
}

.sale-calc-input-panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
}

.sale-calc-input-panel {
  padding: 14px;
}

.sale-calc-result-panel {
  position: relative;
  min-width: 0;
  border: 0;
  background: transparent;
  padding: 0;
}

.sale-calc-result-panel.is-loading::after {
  position: absolute;
  top: 12px;
  right: 12px;
  display: inline-flex;
  min-height: 26px;
  align-items: center;
  padding: 4px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #ffffff;
  color: var(--muted);
  content: "计算中";
  font-size: 12px;
  font-weight: 700;
  box-shadow: var(--shadow);
}

.sale-calc-panel-heading {
  margin-bottom: 12px;
}

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

.sale-calc-form-grid label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 12px;
}

.sale-calc-picker {
  position: relative;
  min-width: 0;
}

.sale-calc-picker-trigger {
  min-height: 38px;
  gap: 8px;
  cursor: pointer;
}

.sale-calc-picker-trigger:disabled {
  cursor: default;
}

.sale-calc-picker-trigger > span:last-child {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sale-calc-picker-menu {
  z-index: 40;
  max-height: 260px;
  overflow-y: auto;
}

.sale-calc-picker-option {
  gap: 8px;
}

.sale-calc-picker-option > span:last-child {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sale-calc-platform-tag {
  display: inline-flex;
  flex: 0 0 auto;
  max-width: 92px;
  align-items: center;
  overflow: hidden;
  padding: 3px 8px;
  border: 1px solid #bfdbfe;
  border-radius: 999px;
  background: #eff6ff;
  color: #1d4ed8;
  font-size: 11px;
  font-weight: 900;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sale-calc-input-shell {
  position: relative;
  display: flex;
  min-height: 38px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #ffffff;
}

.sale-calc-input-shell:focus-within {
  border-color: var(--ring);
  box-shadow: 0 0 0 3px rgba(148, 163, 184, 0.18);
}

.sale-calc-input-shell:has(.is-invalid) {
  border-color: var(--danger);
}

.sale-calc-input-shell .form-control {
  height: 36px;
  min-width: 0;
  border-color: transparent;
  border: 0;
  background: transparent;
  box-shadow: none;
}

.sale-calc-input-shell .form-control:focus {
  border-color: transparent;
  outline: 0;
  box-shadow: none;
}

.sale-calc-input-clear {
  display: inline-flex;
  width: auto;
  height: 24px;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  min-height: 24px;
  margin-right: 7px;
  padding: 0 2px;
  border-radius: 0;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-size: 12px;
  font-weight: 700;
  line-height: 1;
  opacity: 0;
  pointer-events: none;
}

.sale-calc-input-shell:focus-within .sale-calc-input-clear {
  opacity: 1;
  pointer-events: auto;
}

.sale-calc-input-clear:hover,
.sale-calc-input-clear:focus-visible {
  background: transparent;
  color: var(--text);
  outline: 0;
}

.sale-calc-result-grid {
  --sale-calc-result-column-width: 176px;
  --sale-calc-discount-column-width: 92px;
  display: grid;
  grid-template-columns: calc(var(--sale-calc-result-column-width) * 5 + var(--sale-calc-discount-column-width)) calc(var(--sale-calc-result-column-width) * 2 + var(--sale-calc-discount-column-width));
  gap: 12px;
  align-items: start;
}

.sale-calc-table-wrap,
.sale-calc-copy-wrap {
  min-width: 0;
  overflow-x: hidden;
}

.sale-calc-result-table,
.sale-calc-copy-table {
  table-layout: fixed;
}

.sale-calc-result-table tr.is-row-active td,
.sale-calc-copy-table tr.is-row-active td {
  background: #f8fafc;
}

.sale-calc-result-table tr.is-profit-warning td,
.sale-calc-copy-table tr.is-profit-warning td {
  background: #fff7ed;
}

.sale-calc-result-table tr.is-profit-danger td,
.sale-calc-copy-table tr.is-profit-danger td {
  background: #fef2f2;
}

.sale-calc-result-table tr.is-profit-warning.is-row-active td,
.sale-calc-copy-table tr.is-profit-warning.is-row-active td {
  background: #ffedd5;
}

.sale-calc-result-table tr.is-profit-danger.is-row-active td,
.sale-calc-copy-table tr.is-profit-danger.is-row-active td {
  background: #fee2e2;
}

.sale-calc-result-table {
  width: calc(var(--sale-calc-result-column-width) * 5 + var(--sale-calc-discount-column-width));
  min-width: calc(var(--sale-calc-result-column-width) * 5 + var(--sale-calc-discount-column-width));
  table-layout: fixed;
}

.sale-calc-data-col {
  width: var(--sale-calc-result-column-width);
}

.sale-calc-discount-col {
  width: var(--sale-calc-discount-column-width);
}

.sale-calc-result-table th,
.sale-calc-result-table td,
.sale-calc-copy-table th,
.sale-calc-copy-table td {
  white-space: nowrap;
}

.sale-calc-copy-panel {
  min-width: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
}

.sale-calc-copy-panel[hidden] {
  display: none;
}

.sale-calc-copy-table {
  width: calc(var(--sale-calc-result-column-width) * 2 + var(--sale-calc-discount-column-width));
  min-width: calc(var(--sale-calc-result-column-width) * 2 + var(--sale-calc-discount-column-width));
}

.sale-calc-heading-tag {
  display: inline-flex;
  min-height: 22px;
  align-items: center;
  margin-left: 4px;
  padding: 1px 7px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #f8fafc;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.sale-calc-heading-tag.is-tax-included {
  border-color: #bfdbfe;
  background: #eff6ff;
  color: #2563eb;
}

.sale-calc-heading-tag.is-tax-excluded {
  border-color: #fed7aa;
  background: #fff7ed;
  color: #ea580c;
}

.sale-calc-country {
  display: inline-flex;
  width: 100%;
  min-width: 0;
  align-items: center;
  gap: 8px;
}

.sale-calc-country .country-code-tag {
  flex: 0 0 auto;
}

.sale-calc-country-name {
  min-width: 0;
  overflow: hidden;
  color: var(--text);
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sale-calc-discount-heading {
  padding-right: 0;
  padding-left: 0;
}

.sale-calc-discount-cell {
  overflow: visible;
  padding-right: 0;
  padding-left: 0;
}

.sale-calc-discount-line {
  display: block;
  height: 1px;
  flex: 1 1 auto;
  min-width: 8px;
  background: var(--line);
}

.sale-calc-discount-tag {
  display: inline-flex;
  flex: 0 0 auto;
  min-height: 24px;
  align-items: center;
  justify-content: center;
  padding: 2px 8px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #f8fafc;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  line-height: 1.2;
}

.sale-calc-copy-table .sale-calc-table-input-shell {
  border-color: #dbe4ef;
  background: #f8fafc;
  cursor: pointer;
}

.sale-calc-copy-table .sale-calc-table-input {
  color: #334155;
  cursor: pointer;
}

.sale-calc-copyable-cell .sale-calc-table-input-shell {
  position: relative;
  overflow: hidden;
}

.sale-calc-copyable-cell.is-copied .sale-calc-table-input-shell::after {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  background: rgba(248, 250, 252, 0.94);
  color: var(--accent);
  content: attr(data-copy-status);
  font-size: 12px;
  font-weight: 800;
  pointer-events: none;
}

.sale-calc-table-input-shell {
  display: inline-flex;
  width: 100%;
  min-width: 0;
  align-items: center;
  gap: 4px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #ffffff;
}

.sale-calc-table-input-shell.sale-calc-discount-shell {
  height: 38px;
  justify-content: center;
  gap: 6px;
  padding: 0 8px;
  border-color: transparent;
  background: transparent;
}

.sale-calc-table-input {
  width: 100%;
  min-width: 0;
  height: 32px;
  padding: 5px 8px;
  border: 0;
  background: transparent;
  box-shadow: none;
}

.sale-calc-table-input:focus {
  outline: 0;
  box-shadow: none;
}

.sale-calc-table-input[readonly] {
  border-color: transparent;
  background: transparent;
  pointer-events: none;
}

.sale-calc-table-input-unit {
  flex: 0 0 auto;
  padding-right: 8px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
}

.sale-calc-empty-row td {
  color: var(--muted);
  text-align: center;
}

.sale-calc-input-error {
  margin: 10px 0 0;
  color: var(--danger);
  font-size: 13px;
}

.sale-calc-form-grid .is-invalid {
  border-color: var(--danger);
}

@media (max-width: 1460px) {
  .pricing-tag-section {
    width: 100%;
  }

  .sale-calc-result-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .sale-calc-workbench {
    grid-template-columns: 1fr;
  }

  .pricing-workbench-grid {
    grid-template-columns: 1fr;
  }

  .pricing-workbench {
    width: 100%;
  }
}

@media (max-width: 760px) {
  .pricing-shop-toolbar {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 1180px) {
  .enterprise-flow,
  .enterprise-card-grid,
  .enterprise-cards,
  .platform-cards,
  .submodule-grid,
  .config-placeholder {
    grid-template-columns: 1fr;
  }

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

  .field-table-grid {
    grid-template-columns: 1fr;
  }

  .enterprise-platform-config-grid,
  .enterprise-shop-workbench-grid,
  .sale-calc-workbench,
  .enterprise-platform-picker-grid,
  .enterprise-global-shop-current,
  .enterprise-global-shop-list {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  .sidebar {
    position: static;
    width: auto;
  }

  .workspace {
    margin-left: 0;
    padding: 18px;
  }

  .topbar,
  .section-heading,
  .panel-title,
  .table-head {
    display: block;
  }

  .status-strip,
  .section-note,
  .panel-title span,
  .table-head span {
    margin-top: 10px;
  }

  .platform-entry-cards {
    grid-template-columns: 1fr;
  }
}

.login-page {
  min-height: 100vh;
  display: grid;
  place-items: center;
  background: #f3f4f6;
}

.login-shell {
  width: min(440px, calc(100vw - 32px));
}

.login-panel {
  background: #ffffff;
  border: 1px solid #d9dee7;
  border-radius: 8px;
  padding: 28px;
  box-shadow: 0 18px 42px rgba(15, 23, 42, 0.12);
}

.login-form {
  display: grid;
  gap: 18px;
}

.login-field {
  display: grid;
  gap: 8px;
  color: #334155;
  font-size: 14px;
  font-weight: 700;
}

.login-error {
  margin: 0;
  color: #b42318;
  font-size: 14px;
}

.login-submit {
  width: 100%;
}
