html,
body,
#root {
  min-height: 100%;
}

:root {
  --mac-bg: #eef2f7;
  --mac-surface: rgba(255, 255, 255, 0.74);
  --mac-surface-strong: rgba(255, 255, 255, 0.92);
  --mac-border: rgba(148, 163, 184, 0.28);
  --mac-border-soft: rgba(203, 213, 225, 0.42);
  --mac-text: #172033;
  --mac-muted: #667085;
  --mac-blue: #2563eb;
  --mac-blue-soft: #e8f1ff;
  --mac-green: #059669;
  --mac-red: #dc2626;
  --mac-amber: #d97706;
  --mac-shadow: 0 18px 45px rgba(15, 23, 42, 0.08);
  --mac-shadow-soft: 0 8px 24px rgba(15, 23, 42, 0.06);
}

body {
  margin: 0;
  background:
    linear-gradient(180deg, #f8fafc 0%, #eef2f7 44%, #e7edf5 100%);
  color: var(--mac-text);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Inter, Arial, sans-serif;
  letter-spacing: 0;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

.erp-shell {
  min-height: 100vh;
  background: transparent;
}

.erp-sider {
  background: rgba(255, 255, 255, 0.72) !important;
  border-right: 1px solid var(--mac-border);
  box-shadow: 10px 0 28px rgba(15, 23, 42, 0.04);
  backdrop-filter: blur(24px) saturate(1.35);
}

.erp-sider .ant-layout-sider-trigger {
  background: rgba(255, 255, 255, 0.78);
  color: var(--mac-muted);
  border-top: 1px solid var(--mac-border);
  backdrop-filter: blur(18px);
}

.erp-sider.ant-layout-sider-zero-width .ant-layout-sider-zero-width-trigger {
  top: 14px;
  right: -42px;
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.92);
  color: var(--mac-text);
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.14);
  backdrop-filter: blur(18px);
}

.erp-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 64px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--mac-border);
}

.erp-brand-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: linear-gradient(145deg, #0f172a, #334155);
  color: #fff;
  font-weight: 800;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.18), 0 8px 18px rgba(15, 23, 42, 0.16);
}

.erp-brand strong,
.erp-brand span {
  display: block;
  line-height: 1.25;
  white-space: nowrap;
}

.erp-brand span {
  margin-top: 3px;
  color: #667085;
  font-size: 12px;
}

.erp-header {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px 16px;
  min-height: 72px;
  height: auto;
  padding: 14px 24px;
  background: rgba(255, 255, 255, 0.78);
  border-bottom: 1px solid var(--mac-border);
  line-height: 1.35;
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.04);
  backdrop-filter: blur(22px) saturate(1.28);
}

.erp-header-title {
  flex: 1 1 260px;
  min-width: 220px;
  max-width: 520px;
  padding-top: 2px;
}

.erp-header-title .ant-typography-secondary {
  display: block;
  margin-bottom: 3px;
  font-size: 12px;
  line-height: 1.35;
}

.erp-header-title h1,
.erp-header-title h2,
.erp-header-title h3,
.erp-header-title h4 {
  line-height: 1.18;
  overflow-wrap: anywhere;
}

.erp-header-actions {
  flex: 1 1 520px;
  min-width: 0;
  justify-content: flex-end;
  row-gap: 8px;
}

.erp-header-actions > .ant-space-item,
.date-toolbar > .ant-space-item {
  min-width: 0;
}

.date-toolbar {
  max-width: 100%;
  justify-content: flex-end;
}

.date-toolbar .ant-picker {
  width: 240px;
  max-width: 100%;
}

.sync-actions {
  align-items: center;
}

.erp-content {
  padding: 18px;
}

.page-card {
  width: min(1480px, 100%);
  margin: 0 auto;
  min-width: 0;
}

.full {
  width: 100%;
}

.metric-card .ant-statistic-title {
  min-height: 22px;
  color: var(--mac-muted);
  white-space: normal;
}

.metric-card .ant-statistic-content {
  font-size: 24px;
  line-height: 1.2;
  word-break: break-word;
}

.metric-card,
.metric-card .ant-card-body {
  height: 100%;
}

.metric-card {
  overflow: hidden;
}

.metric-card::before {
  position: absolute;
  inset: 0;
  pointer-events: none;
  content: "";
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.62), rgba(255, 255, 255, 0));
}

.metric-card .ant-card-body {
  position: relative;
  z-index: 1;
}

.empty-chart {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 220px;
  color: #98a2b3;
  background: rgba(248, 250, 252, 0.72);
  border: 1px dashed rgba(148, 163, 184, 0.44);
  border-radius: 8px;
}

.trend-bars {
  display: grid;
  grid-template-columns: repeat(30, minmax(12px, 1fr));
  align-items: end;
  gap: 7px;
  min-height: 240px;
  padding: 16px 4px 0;
  overflow-x: auto;
  scrollbar-width: thin;
}

.trend-bar-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  min-width: 18px;
  height: 218px;
  gap: 8px;
}

.trend-bar {
  width: 100%;
  min-width: 10px;
  max-width: 24px;
  border-radius: 8px 8px 3px 3px;
  box-shadow: 0 8px 16px rgba(37, 99, 235, 0.12);
  transition: height 220ms ease, transform 180ms ease, filter 180ms ease;
}

.trend-bar-item:hover .trend-bar {
  transform: translateY(-2px);
  filter: saturate(1.12);
}

.trend-bar-item span {
  color: #667085;
  font-size: 11px;
  white-space: nowrap;
  writing-mode: vertical-rl;
}

.table-filter-menu {
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: 220px;
  padding: 10px;
  border-radius: 8px;
  background: var(--mac-surface-strong);
  box-shadow: var(--mac-shadow-soft);
  backdrop-filter: blur(18px);
}

.table-filter-menu .ant-space {
  justify-content: flex-end;
}

.range-filter-menu {
  width: 260px;
}

.range-filter-row {
  width: 100%;
}

.range-filter-row .ant-input {
  width: 100%;
}

.order-products {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

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

.product-thumb {
  width: 52px;
  height: 52px;
  object-fit: cover;
  border: 1px solid var(--mac-border);
  border-radius: 8px;
  background: #f8fafc;
  box-shadow: 0 6px 14px rgba(15, 23, 42, 0.06);
}

.product-thumb-empty {
  display: flex;
  align-items: center;
  justify-content: center;
  color: #98a2b3;
  font-size: 11px;
  font-weight: 700;
}

.media-title {
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.media-thumb {
  width: 58px;
  height: 58px;
  object-fit: cover;
  border: 1px solid var(--mac-border);
  border-radius: 8px;
  background: #f8fafc;
  box-shadow: 0 6px 14px rgba(15, 23, 42, 0.07);
  transition: transform 180ms ease, box-shadow 180ms ease;
}

.media-title:hover .media-thumb {
  transform: scale(1.035);
  box-shadow: 0 12px 24px rgba(15, 23, 42, 0.12);
}

.video-thumb {
  background: #101828;
}

.inline-link-button {
  height: auto;
  padding: 0;
  line-height: 1.2;
}

.inventory-filter-card .ant-card-body {
  padding: 12px;
}

.inventory-subtabs {
  padding: 0 12px;
  background: var(--mac-surface-strong);
  border: 1px solid var(--mac-border);
  border-radius: 8px;
  box-shadow: var(--mac-shadow-soft);
  backdrop-filter: blur(18px);
}

.inventory-subtabs .ant-tabs-nav {
  margin: 0;
}

.inventory-subtabs .ant-tabs-tab {
  min-height: 44px;
  font-weight: 700;
}

.inventory-note {
  margin-bottom: 10px;
  color: #4e5969;
  font-size: 12px;
}

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

.inventory-filter-grid label {
  display: flex;
  flex-direction: column;
  gap: 5px;
  min-width: 0;
  color: #1f2329;
  font-size: 12px;
  font-weight: 700;
}

.inventory-filter-grid .ant-select,
.inventory-filter-grid .ant-input {
  width: 100%;
}

.inventory-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px solid var(--mac-border-soft);
}

.inventory-audit-card .ant-card-body {
  padding: 12px;
}

.audit-stat-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(120px, 1fr));
  gap: 8px;
}

.audit-stat {
  min-width: 0;
  padding: 8px 10px;
  border: 1px solid var(--mac-border-soft);
  border-radius: 8px;
  background: rgba(248, 250, 252, 0.78);
  transition: transform 160ms ease, box-shadow 160ms ease;
}

.audit-stat:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.07);
}

.audit-stat span {
  display: block;
  color: #667085;
  font-size: 12px;
}

.audit-stat strong {
  display: block;
  margin-top: 3px;
  color: #101828;
  font-size: 18px;
}

.audit-toolbar {
  margin-bottom: 10px;
}

.audit-search-input {
  width: 260px;
}

.audit-status-select {
  width: 210px;
}

.compact-alert {
  margin-bottom: 10px;
}

.platform-sku-editor {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}

.platform-sku-editor .ant-input {
  width: 100%;
  font-family: Consolas, "SFMono-Regular", monospace;
}

.platform-sku-current {
  max-width: 170px;
  overflow: hidden;
  font-size: 12px;
  line-height: 1.4;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.product-catalog-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.batch-price-input {
  width: 130px;
}

.catalog-search-input {
  width: 280px;
  max-width: 100%;
}

.catalog-edit-cell {
  width: 100%;
}

.catalog-edit-cell .ant-input {
  min-width: 0;
  width: 100%;
}

.catalog-title-edit .ant-input {
  min-width: 260px;
}

.catalog-sku-stack {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.catalog-sku-line {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 74px;
  padding: 8px 0;
  border-bottom: 1px dashed #e5e9f0;
}

.catalog-sku-line:last-child {
  border-bottom: 0;
}

.catalog-sku-identity {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

.catalog-sku-identity .ant-space {
  row-gap: 4px;
}

.catalog-bundle-reason {
  max-width: 150px;
  overflow: hidden;
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.store-sku-stack {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.store-sku-line {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 66px;
  padding: 8px 0;
  border-bottom: 1px dashed #e5e9f0;
}

.store-sku-line:last-child {
  border-bottom: 0;
}

.store-sku-edit-line {
  display: flex;
  flex-direction: column;
  gap: 5px;
  min-width: 0;
}

.store-sku-title {
  color: #1f2329;
  font-size: 12px;
  font-weight: 600;
}

.inventory-audit-card input[type="file"] {
  max-width: 260px;
  font-size: 12px;
}

.inventory-product-cell {
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
}

.inventory-thumb {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 46px;
  height: 46px;
  border: 1px solid var(--mac-border);
  border-radius: 8px;
  background: #f2f7f9;
  color: #0f766e;
  font-size: 18px;
  font-weight: 800;
}

.inventory-thumb-img {
  display: block;
  object-fit: cover;
  color: transparent;
  font-size: 0;
}

.inventory-thumb-hover {
  display: inline-flex;
  width: 46px;
  height: 46px;
}

.inventory-thumb-preview {
  position: absolute;
  left: 54px;
  top: -12px;
  z-index: 50;
  display: none;
  width: 220px;
  height: 220px;
  padding: 6px;
  border: 1px solid #d9e2ec;
  border-radius: 6px;
  background: #fff;
  box-shadow: 0 12px 32px rgba(15, 23, 42, 0.22);
}

.inventory-thumb-preview img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.inventory-thumb-hover:hover .inventory-thumb-preview {
  display: block;
}

.inventory-image-popover {
  z-index: 1300;
}

.inventory-image-popover .ant-popover-inner {
  padding: 0;
  overflow: hidden;
  border-radius: 8px;
  box-shadow: 0 24px 64px rgba(15, 23, 42, 0.22);
}

.inventory-image-preview {
  display: flex;
  align-items: center;
  justify-content: center;
  width: min(420px, 70vw);
  height: min(320px, 62vh);
  padding: 8px;
  background: #fff;
}

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

.video-preview-shell {
  display: grid;
  grid-template-columns: minmax(220px, 280px) minmax(0, 1fr);
  align-items: start;
  gap: 16px;
  width: 100%;
}

.video-player-panel {
  min-width: 0;
}

.video-preview-player {
  display: block;
  width: 100%;
  aspect-ratio: 9 / 16;
  object-fit: cover;
  border: 1px solid var(--mac-border);
  border-radius: 8px;
  background: #101828;
  box-shadow: 0 18px 44px rgba(15, 23, 42, 0.18);
}

.tiktok-player-frame {
  overflow: hidden;
  border: 1px solid var(--mac-border);
}

.video-player-note {
  display: block;
  margin-top: 8px;
  font-size: 12px;
  line-height: 1.45;
}

.video-preview-detail {
  min-width: 0;
}

.flash-sale-page {
  width: min(1628px, 100%);
  margin: 0 auto;
}

.flash-manage-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.flash-help-note {
  margin-top: 8px;
  color: #4e5969;
  font-size: 12px;
  line-height: 1.5;
}

.flash-manage-filter-card {
  margin-bottom: 10px;
}

.flash-manage-filter-card .ant-card-body {
  padding: 12px;
}

.flash-manage-filter {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) minmax(260px, 1fr);
  gap: 12px 22px;
}

.flash-manage-filter label {
  display: grid;
  grid-template-columns: 78px minmax(0, 1fr);
  align-items: center;
  gap: 8px;
  margin: 0;
  color: #4e5969;
  font-size: 13px;
}

.flash-manage-filter .ant-select,
.flash-manage-filter .ant-input {
  width: 100%;
}

.flash-manage-search-actions {
  grid-column: 2;
}

.flash-status-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 10px 0;
}

.flash-operation-cell {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  gap: 6px;
  min-height: 54px;
}

.flash-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 48px;
  margin-bottom: 12px;
}

.flash-publish-btn,
.flash-publish-btn:hover {
  background: #00a870;
  border-color: #00a870;
}

.flash-status {
  margin-bottom: 12px;
}

.flash-basic-card {
  margin-bottom: 12px;
}

.flash-basic-card .ant-card-head {
  min-height: 46px;
}

.flash-form {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
  max-width: 720px;
  padding: 10px 0 8px 26px;
}

.flash-form label {
  display: grid;
  grid-template-columns: 110px minmax(0, 1fr);
  align-items: center;
  gap: 8px;
  margin: 0;
}

.flash-form label > span:first-child {
  justify-self: end;
  color: #4e5969;
}

.flash-form label > span:first-child::first-letter {
  color: #ff4d4f;
}

.flash-form .ant-select,
.flash-form .ant-picker,
.flash-name-input {
  width: 300px;
}

.flash-searchbar {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 10px 0;
}

.flash-search-type {
  width: 120px;
}

.flash-search-input {
  width: min(360px, 100%);
}

.flash-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
}

.flash-add-btn,
.flash-add-btn:hover {
  color: #fff;
  background: #ff7a45;
  border-color: #ff7a45;
}

.flash-batch-input {
  width: 118px;
}

.flash-limit-select {
  width: 132px;
}

.flash-product-image {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 66px;
  height: 66px;
  border: 1px solid var(--mac-border);
  border-radius: 8px;
  background: #f8fafc;
  box-shadow: 0 6px 14px rgba(15, 23, 42, 0.06);
}

.flash-product-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 8px;
}

.flash-rate-input {
  width: 72px;
}

.flash-price-input {
  width: 92px;
}

.order-product-main {
  min-width: 0;
}

.order-product-name,
.order-product-sku {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.order-product-name {
  color: #1f2329;
  font-weight: 600;
}

.order-product-sku {
  margin-top: 2px;
  color: #667085;
  font-size: 12px;
}

.order-product-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 10px;
  margin-top: 4px;
  color: #667085;
  font-size: 12px;
}

.sample-note {
  margin-top: 2px;
  color: #98a2b3;
  font-size: 11px;
  white-space: nowrap;
}

.record-materials {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 360px;
}

.record-material {
  padding-bottom: 8px;
  border-bottom: 1px solid #f0f2f5;
}

.record-material:last-child {
  padding-bottom: 0;
  border-bottom: 0;
}

.record-material-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  color: #475467;
  font-size: 12px;
}

.record-note {
  margin-top: 4px;
  color: #1f2329;
  font-size: 12px;
  line-height: 1.45;
}

.record-images {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 6px;
}

.record-image {
  width: 48px;
  height: 48px;
  object-fit: cover;
  border: 1px solid var(--mac-border);
  border-radius: 8px;
  background: #f8fafc;
}

.ant-card {
  border: 1px solid var(--mac-border);
  border-radius: 8px;
  background: var(--mac-surface-strong);
  box-shadow: var(--mac-shadow-soft);
  backdrop-filter: blur(18px) saturate(1.2);
  transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease, background 180ms ease;
}

.ant-card:hover {
  border-color: rgba(37, 99, 235, 0.18);
  box-shadow: var(--mac-shadow);
}

.ant-card-body {
  min-width: 0;
}

.ant-card-head {
  min-height: 46px;
  border-bottom-color: var(--mac-border-soft);
}

.ant-card-head-title {
  color: var(--mac-text);
  font-weight: 700;
}

.ant-table-wrapper .ant-table {
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.78);
  scrollbar-width: thin;
}

.ant-table-wrapper {
  max-width: 100%;
}

.ant-table-wrapper .ant-table-container {
  border-radius: 8px;
}

.ant-table-wrapper .ant-table-thead > tr > th,
.ant-table-wrapper .ant-table-thead > tr > td {
  color: #475467;
  font-size: 12px;
  font-weight: 700;
  background: rgba(248, 250, 252, 0.9) !important;
  border-bottom-color: var(--mac-border-soft);
}

.ant-table-wrapper .ant-table-tbody > tr > td {
  border-bottom-color: rgba(226, 232, 240, 0.82);
  transition: background 160ms ease;
}

.ant-table-wrapper .ant-table-tbody > tr:hover > td {
  background: rgba(232, 241, 255, 0.48) !important;
}

.ant-table-wrapper .ant-table-cell-fix-left,
.ant-table-wrapper .ant-table-cell-fix-right {
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(12px);
}

.ant-menu-light {
  border-inline-end: 0 !important;
}

.ant-menu {
  background: transparent !important;
}

.ant-menu .ant-menu-item {
  width: calc(100% - 14px);
  height: 40px;
  margin: 4px 7px;
  border-radius: 8px;
  color: #344054;
  transition: background 160ms ease, color 160ms ease, transform 160ms ease;
}

.ant-menu .ant-menu-item:hover {
  background: rgba(37, 99, 235, 0.08) !important;
  color: var(--mac-blue) !important;
}

.ant-menu .ant-menu-item-selected {
  color: var(--mac-blue) !important;
  background: linear-gradient(180deg, rgba(232, 241, 255, 0.98), rgba(219, 234, 254, 0.92)) !important;
  box-shadow: inset 0 0 0 1px rgba(37, 99, 235, 0.12), 0 8px 18px rgba(37, 99, 235, 0.08);
}

.ant-menu .ant-menu-item-selected::after {
  display: none;
}

.ant-btn,
.ant-input,
.ant-select-selector,
.ant-picker,
.ant-input-number,
.ant-radio-button-wrapper {
  border-radius: 8px !important;
}

.ant-btn {
  font-weight: 600;
  box-shadow: none;
  transition: transform 150ms ease, box-shadow 150ms ease, background 150ms ease, border-color 150ms ease;
}

.ant-btn:hover {
  transform: translateY(-1px);
}

.ant-btn-primary {
  box-shadow: 0 8px 18px rgba(37, 99, 235, 0.18);
}

.ant-input,
.ant-picker,
.ant-select-selector {
  background: rgba(255, 255, 255, 0.86) !important;
  border-color: var(--mac-border) !important;
  transition: border-color 150ms ease, box-shadow 150ms ease, background 150ms ease;
}

.ant-input:hover,
.ant-picker:hover,
.ant-select-selector:hover {
  border-color: rgba(37, 99, 235, 0.36) !important;
}

.ant-input:focus,
.ant-picker-focused,
.ant-select-focused .ant-select-selector {
  border-color: rgba(37, 99, 235, 0.6) !important;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12) !important;
}

.ant-tag {
  border-radius: 7px;
  font-weight: 600;
}

.ant-tabs .ant-tabs-tab {
  transition: color 160ms ease;
}

.ant-tabs .ant-tabs-ink-bar {
  height: 3px;
  border-radius: 999px 999px 0 0;
}

.ant-alert {
  border-radius: 8px;
}

.ant-modal-content {
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 24px 70px rgba(15, 23, 42, 0.22);
  backdrop-filter: blur(24px);
}

.ant-modal-header {
  background: transparent;
}

code {
  display: inline-block;
  max-width: 100%;
  color: #475467;
  font-size: 12px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

* {
  scrollbar-color: rgba(100, 116, 139, 0.42) transparent;
  scrollbar-width: thin;
}

*::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

*::-webkit-scrollbar-track {
  background: transparent;
}

*::-webkit-scrollbar-thumb {
  background: rgba(100, 116, 139, 0.32);
  border: 3px solid transparent;
  border-radius: 999px;
  background-clip: content-box;
}

*::-webkit-scrollbar-thumb:hover {
  background: rgba(100, 116, 139, 0.52);
  border: 3px solid transparent;
  background-clip: content-box;
}

.ant-spin-nested-loading,
.ant-spin-container {
  min-width: 0;
}

.ant-space.full,
.ant-row,
.ant-col {
  min-width: 0;
}

.filter-card,
.inventory-filter-card,
.flash-manage-filter-card,
.flash-basic-card,
.inventory-audit-card,
.inventory-update-result-card {
  background: rgba(255, 255, 255, 0.82);
}

.erp-header-title h1,
.erp-header-title h2,
.erp-header-title h3,
.erp-header-title h4 {
  color: var(--mac-text);
  font-weight: 800;
}

.ant-statistic-content-value {
  font-variant-numeric: tabular-nums;
}

.ant-table,
.ant-statistic,
.ant-descriptions,
.ant-tabs {
  font-variant-numeric: tabular-nums;
}

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

.guide-list {
  margin: 0;
  padding-left: 22px;
}

.guide-list li + li {
  margin-top: 8px;
}

@media (max-width: 1180px) {
  .erp-header {
    align-items: stretch;
  }

  .erp-header-title,
  .erp-header-actions {
    flex-basis: 100%;
    max-width: none;
  }

  .erp-header-actions,
  .date-toolbar {
    justify-content: flex-start;
  }

  .page-card {
    width: 100%;
  }
}

@media (max-width: 768px) {
  .erp-header {
    min-height: 64px;
    flex-direction: column;
    padding: 12px 16px;
  }

  .erp-header-title {
    min-width: 0;
    width: 100%;
  }

  .erp-header-actions,
  .date-toolbar,
  .sync-actions {
    width: 100%;
  }

  .date-toolbar .ant-select,
  .date-toolbar .ant-picker,
  .date-toolbar .ant-btn,
  .sync-actions .ant-btn {
    flex: 1 1 140px;
    min-width: 0;
  }

  .erp-content {
    padding: 10px;
  }

  .metric-card .ant-statistic-content {
    font-size: 20px;
  }

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

  .inventory-filter-grid {
    grid-template-columns: 1fr;
  }

  .inventory-toolbar {
    align-items: flex-start;
    flex-direction: column;
  }

  .product-catalog-toolbar {
    align-items: flex-start;
    flex-direction: column;
  }

  .batch-price-input,
  .catalog-search-input,
  .catalog-title-edit .ant-input {
    width: 100%;
    min-width: 0;
  }

  .flash-topbar,
  .flash-manage-head,
  .flash-actions,
  .flash-searchbar {
    align-items: flex-start;
    flex-direction: column;
  }

  .flash-manage-filter {
    grid-template-columns: 1fr;
  }

  .flash-manage-search-actions {
    grid-column: auto;
  }

  .flash-form {
    padding-left: 0;
  }

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

  .flash-form label > span:first-child {
    justify-self: start;
  }

  .flash-form .ant-select,
  .flash-form .ant-picker,
  .flash-name-input,
  .flash-search-type,
  .flash-search-input {
    width: 100%;
  }

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

  .audit-search-input,
  .audit-status-select {
    width: 100%;
  }

  .media-title {
    grid-template-columns: 48px minmax(0, 1fr);
  }

  .media-thumb {
    width: 48px;
    height: 48px;
  }
}
