:root {
  color-scheme: light;
  font-family: Inter, "Microsoft YaHei", system-ui, sans-serif;
  background: #f5f7fb;
  color: #0f172a;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: #f5f7fb;
}

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

button {
  cursor: pointer;
  transition: transform 140ms ease, filter 140ms ease, box-shadow 140ms ease, background-color 140ms ease;
  touch-action: manipulation;
}

button:hover:not(:disabled) {
  filter: brightness(0.97);
}

button:active:not(:disabled),
button.button-clicked:not(:disabled) {
  transform: translateY(1px) scale(0.97);
  filter: brightness(0.92);
}

button:focus-visible {
  outline: 3px solid rgba(22, 119, 255, 0.22);
  outline-offset: 2px;
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

.schedule-list,
.account-list {
  display: grid;
  gap: 12px;
  margin-top: 18px;
}

.schedule-row {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) auto auto;
  gap: 18px;
  align-items: center;
  padding: 14px 16px;
  border: 1px solid #e5eaf3;
  border-radius: 10px;
  background: #f9fbfd;
}

.account-row {
  display: grid;
  grid-template-columns: repeat(5, minmax(130px, 1fr)) auto;
  gap: 12px;
  align-items: end;
  padding: 16px;
  border: 1px solid #e5eaf3;
  border-radius: 10px;
  background: #f9fbfd;
}

.account-row.protected {
  grid-template-columns: minmax(240px, 1fr) auto minmax(260px, auto);
  align-items: center;
}

.field small {
  display: block;
  margin-top: 6px;
  line-height: 1.5;
}

@media (max-width: 1100px) {
  .account-row {
    grid-template-columns: repeat(2, minmax(180px, 1fr));
  }

  .account-row.protected,
  .schedule-row {
    grid-template-columns: 1fr;
  }
}

.login-wrap {
  min-height: 100vh;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, #eef6ff, #f8fafc);
}

.login-card {
  width: 420px;
  background: #fff;
  border: 1px solid #e5eaf3;
  border-radius: 14px;
  padding: 34px;
  box-shadow: 0 24px 60px rgba(15, 23, 42, 0.08);
}

.login-mark {
  width: 52px;
  height: 52px;
  border-radius: 12px;
  background: #1677ff;
  color: #fff;
  display: grid;
  place-items: center;
  font-size: 24px;
  font-weight: 800;
}

.login-card h1 {
  margin: 18px 0 8px;
}

.login-card p,
.hint,
.muted {
  color: #697586;
}

.test-accounts {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin: 18px 0;
}

.test-accounts button {
  display: grid;
  gap: 4px;
  text-align: left;
  padding: 12px;
  border: 1px solid #d8e0ea;
  border-radius: 8px;
  background: #f8fbff;
  color: #1f2a37;
}

.test-accounts button:hover {
  border-color: #1677ff;
  background: #eef6ff;
}

.test-accounts span {
  color: #697586;
  font-size: 12px;
}

#loginForm {
  display: grid;
  gap: 12px;
}

.login-error {
  border: 1px solid #fecaca;
  border-radius: 6px;
  background: #fef2f2;
  color: #b42318;
  padding: 10px 12px;
  font-size: 14px;
  line-height: 1.5;
}

.lk-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 184px 1fr;
}

.lk-sidebar {
  background: #f3f8fb;
  border-right: 1px solid #e6edf5;
  padding: 16px 10px;
}

.lk-logo {
  height: 44px;
  display: flex;
  align-items: center;
  padding: 0 12px;
  font-weight: 800;
  color: #1f2a37;
  line-height: 1.3;
}

.lk-nav {
  display: grid;
  gap: 4px;
}

.nav-item,
.nav-parent,
.nav-child {
  width: 100%;
  min-height: 40px;
  border: 0;
  background: transparent;
  color: #536071;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 12px;
  border-radius: 6px;
  text-align: left;
}

.nav-item.active,
.nav-child.active {
  color: #1677ff;
  background: #fff;
  box-shadow: 0 4px 16px rgba(22, 119, 255, 0.08);
  font-weight: 700;
}

.nav-item.disabled,
.nav-child.disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.nav-icon {
  width: 18px;
  text-align: center;
}

.nav-group {
  display: grid;
  gap: 2px;
}

.nav-parent {
  font-weight: 700;
}

.nav-children {
  display: grid;
  gap: 2px;
  padding-left: 28px;
}

.nav-child {
  min-height: 34px;
  font-size: 13px;
}

.lk-main {
  min-width: 0;
  padding: 18px 24px 88px;
}

.lk-header {
  height: 62px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.page-title {
  font-size: 22px;
  font-weight: 800;
}

.page-subtitle {
  color: #697586;
  font-size: 13px;
  margin-top: 4px;
}

.header-actions {
  display: flex;
  gap: 10px;
  align-items: center;
}

.background-status {
  display: none;
  color: #b54708;
  background: #fffaeb;
  border: 1px solid #fedf89;
  border-radius: 999px;
  padding: 7px 11px;
  font-size: 12px;
  white-space: nowrap;
}

.background-status.visible {
  display: inline-flex;
}

.user-menu-wrap {
  position: relative;
}

.user-trigger {
  border: 1px solid #d8e0ea;
  background: #fff;
  border-radius: 999px;
  min-width: 108px;
  height: 36px;
  padding: 0 14px;
  color: #1f2a37;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.role-chip {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  border-radius: 999px;
  padding: 2px 8px;
  font-size: 11px;
  font-weight: 800;
  white-space: nowrap;
}

.role-chip.super {
  background: #fff1d6;
  color: #9a5b00;
}

.role-chip.admin {
  background: #e8f2ff;
  color: #0958d9;
}

.role-chip.staff {
  background: #eef1f5;
  color: #536071;
}

.user-dropdown {
  position: absolute;
  right: 0;
  top: 44px;
  z-index: 20;
  width: 238px;
  background: #fff;
  border: 1px solid #e6edf5;
  border-radius: 10px;
  padding: 14px;
  box-shadow: 0 16px 40px rgba(15, 23, 42, 0.12);
}

.dropdown-name {
  font-weight: 800;
  margin-bottom: 10px;
}

.dropdown-role {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding-bottom: 8px;
  border-bottom: 1px solid #edf1f6;
  color: #697586;
  font-size: 12px;
}

.dropdown-btn.primary-soft {
  border-color: #a7ccff;
  background: #eef6ff;
  color: #0958d9;
  font-weight: 700;
}

.dropdown-line {
  display: flex;
  justify-content: space-between;
  padding: 8px 0;
  color: #536071;
}

.dropdown-btn {
  width: 100%;
  border: 1px solid #d8e0ea;
  background: #fff;
  border-radius: 6px;
  padding: 8px 10px;
  margin-top: 8px;
  text-align: left;
}

.danger-text {
  color: #d92d20;
}

.white-card {
  background: #fff;
  border: 1px solid #e6edf5;
  border-radius: 8px;
  padding: 16px;
  margin-bottom: 14px;
}

.toast-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  border-left: 3px solid #1677ff;
  background: #eef6ff;
  color: #1d4ed8;
  padding: 10px 12px;
  margin-bottom: 12px;
}

.toast-line button {
  width: 28px;
  height: 28px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: #1d4ed8;
  font-size: 22px;
  line-height: 1;
}

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

.metric-card {
  background: #fff;
  border: 1px solid #e6edf5;
  border-radius: 8px;
  padding: 16px;
}

.metric-card.clickable {
  cursor: pointer;
  transition: transform 160ms ease, border-color 160ms ease, box-shadow 160ms ease;
}

.metric-card.clickable:hover {
  transform: translateY(-2px);
  border-color: #9bc5ff;
  box-shadow: 0 10px 24px rgba(22, 119, 255, 0.1);
}

.home-stock-values {
  display: flex;
  gap: 10px;
}

.home-stock-values span {
  min-width: 70px;
  padding: 8px 10px;
  border-radius: 8px;
  background: #f2f7ff;
  text-align: center;
}

.home-stock-values small,
.home-stock-values strong {
  display: block;
}

.home-stock-values small {
  color: #697586;
  margin-bottom: 3px;
}

.metric-label {
  color: #697586;
}

.metric-value {
  font-size: 30px;
  font-weight: 800;
  margin: 8px 0;
}

.metric-desc {
  color: #99a3b3;
  font-size: 12px;
}

.section-title {
  font-size: 16px;
  font-weight: 800;
  margin-bottom: 14px;
}

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

.section-title-actions button {
  flex: 0 0 auto;
}

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

.section-bar .section-title {
  margin-bottom: 4px;
}

.section-bar select {
  width: 190px;
}

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

.product-batch-actions .file-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  user-select: none;
}

.product-export-select-all {
  min-height: 36px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 0 10px;
  border: 1px solid #d8e0ea;
  border-radius: 6px;
  background: #fff;
  color: #344054;
  cursor: pointer;
  user-select: none;
}

.product-export-select-all input,
.product-export-choice input {
  width: 16px;
  height: 16px;
  margin: 0;
  accent-color: #1677ff;
}

.product-import-tip {
  margin: 0 0 14px;
}

.product-image-error-notice {
  display: grid;
  gap: 4px;
  margin: 0 0 14px;
  padding: 12px 14px;
  border: 1px solid #fda29b;
  border-radius: 8px;
  color: #b42318;
  background: #fff1f0;
  line-height: 1.5;
}

.product-image-error-notice[hidden] {
  display: none;
}

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

.tabs {
  display: flex;
  gap: 28px;
  border-bottom: 1px solid #e6edf5;
  margin: -4px -4px 16px;
  padding: 0 4px;
}

.tab {
  position: relative;
  border: 0;
  background: transparent;
  padding: 0 0 12px;
  color: #1f2a37;
}

.tab.active {
  color: #1677ff;
  font-weight: 800;
}

.tab.active::after {
  content: "";
  position: absolute;
  height: 2px;
  left: 0;
  right: 0;
  bottom: -1px;
  background: #1677ff;
}

.tab em {
  min-width: 18px;
  height: 18px;
  margin-left: 4px;
  padding: 0 5px;
  border-radius: 999px;
  background: #ff7a1a;
  color: #fff;
  font-style: normal;
  font-size: 12px;
}

.filter-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 86px 86px;
  gap: 12px;
  align-items: start;
}

.appointment-filter {
  grid-template-columns: minmax(360px, 1fr) 86px 86px;
  max-width: 780px;
}

.stock-control-card {
  margin-bottom: 18px;
}

.stock-section-bar {
  margin-bottom: 18px;
}

.stock-control-grid {
  display: grid;
  grid-template-columns: minmax(320px, 1.6fr) minmax(160px, 0.8fr) minmax(160px, 0.8fr) 170px;
  gap: 16px;
  align-items: end;
}

.bulk-stock-grid {
  grid-template-columns: 150px minmax(160px, 1fr) minmax(160px, 1fr) 170px;
}

.schedule-stock-grid {
  grid-template-columns: 150px minmax(180px, 1fr) minmax(170px, 1fr) 170px;
}

.select-all-products {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
  font-weight: 700;
}

.stock-product-checks {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 18px;
}

.stock-product-checks label {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 10px 12px;
  border: 1px solid #e6edf5;
  border-radius: 8px;
  background: #f8fafc;
}

.stock-close-button {
  min-height: 39px;
}

.stock-overview-card .section-title {
  margin-bottom: 18px;
}

.trade-filter {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: stretch;
  margin: 14px 0;
}

.trade-filter > input {
  flex: 2 1 280px;
}

.trade-filter > select {
  flex: 1 1 180px;
}

.trade-filter > button {
  flex: 0 0 86px;
  min-height: 39px;
}

.trade-calendar-controls {
  position: relative;
  z-index: 12;
  display: grid;
  grid-template-columns: repeat(2, minmax(280px, 1fr));
  gap: 12px;
  margin-bottom: 10px;
}

.trade-date-picker {
  position: relative;
  min-width: 0;
}

.trade-date-picker.open {
  z-index: 2;
}

.trade-date-trigger {
  width: 100%;
  min-height: 46px;
  border: 1px solid #d8e0ea;
  border-radius: 8px;
  background: #fff;
  color: #344054;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 14px;
  text-align: left;
}

.trade-date-picker.open .trade-date-trigger {
  border-color: #1677ff;
  box-shadow: 0 0 0 2px rgba(22, 119, 255, 0.1);
}

.trade-date-trigger strong {
  flex: 0 0 auto;
}

.trade-date-trigger > span:not(.calendar-icon) {
  min-width: 0;
  flex: 1;
  color: #98a2b3;
  overflow-wrap: anywhere;
}

.trade-date-trigger > span.has-value {
  color: #1677ff;
}

.calendar-icon {
  color: #8a94a3;
}

.trade-calendar-popover {
  position: absolute;
  z-index: 3;
  top: calc(100% + 8px);
  left: 0;
  width: min(760px, calc(100vw - 260px));
  min-width: 620px;
  display: grid;
  grid-template-columns: 132px minmax(0, 1fr);
  border: 1px solid #e5eaf3;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 18px 48px rgba(15, 23, 42, 0.16);
  overflow: hidden;
}

.trade-date-picker:last-child .trade-calendar-popover {
  left: auto;
  right: 0;
}

.calendar-shortcuts {
  display: grid;
  align-content: start;
  border-right: 1px solid #edf1f6;
  background: #f8fafc;
  padding: 10px 0;
}

.calendar-shortcuts button {
  min-height: 42px;
  border: 0;
  background: transparent;
  color: #344054;
  padding: 0 16px;
  text-align: left;
}

.calendar-shortcuts button:hover {
  background: #eef6ff;
  color: #1677ff;
}

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

.calendar-navigation {
  min-height: 48px;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  border-bottom: 1px solid #edf1f6;
  padding: 0 12px;
  color: #536071;
  font-size: 12px;
}

.calendar-navigation > div {
  display: flex;
}

.calendar-navigation > div:last-child {
  justify-content: flex-end;
}

.calendar-navigation button {
  width: 30px;
  height: 30px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: #697586;
  padding: 0;
}

.dual-month-calendar {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.calendar-month {
  min-width: 0;
  padding: 14px 16px;
}

.calendar-month + .calendar-month {
  border-left: 1px solid #edf1f6;
}

.calendar-month h4 {
  margin: 0 0 14px;
  text-align: center;
}

.calendar-weekdays,
.calendar-days {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
}

.calendar-weekdays span {
  display: grid;
  place-items: center;
  height: 28px;
  color: #697586;
  font-size: 12px;
}

.calendar-day {
  position: relative;
  z-index: 1;
  height: 34px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: #344054;
  padding: 0;
}

.calendar-day.outside {
  color: #c0c6cf;
}

.calendar-day.in-range {
  border-radius: 0;
  background: #e8f2ff;
  color: #0958d9;
}

.calendar-day.selected {
  background: #1677ff;
  color: #fff;
  font-weight: 800;
}

.calendar-footer {
  min-height: 48px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border-top: 1px solid #edf1f6;
  padding: 8px 14px;
  color: #8a94a3;
  font-size: 12px;
}

.trade-filter-tip {
  margin-bottom: 14px;
  color: #8a94a3;
  font-size: 12px;
  overflow-wrap: anywhere;
}

.table-head > *,
.table-row > * {
  min-width: 0;
  white-space: normal;
  overflow-wrap: anywhere;
  word-break: break-word;
}

input,
select,
textarea {
  min-width: 0;
  border: 1px solid #d8e0ea;
  border-radius: 6px;
  padding: 9px 10px;
  background: #fff;
  color: #1f2a37;
}

textarea {
  min-height: 90px;
  resize: vertical;
}

.field {
  display: grid;
  gap: 6px;
}

.field span {
  color: #697586;
  font-size: 13px;
}

.primary,
.outline,
.danger {
  border-radius: 6px;
  padding: 9px 14px;
  border: 1px solid transparent;
}

.primary {
  background: #1677ff;
  color: #fff;
}

.outline {
  background: #fff;
  color: #344054;
  border-color: #d8e0ea;
}

.danger {
  background: #fff;
  color: #d92d20;
  border-color: #f2b8b5;
}

.danger.solid {
  background: #d92d20;
  color: #fff;
  border-color: #d92d20;
}

.wide {
  width: 100%;
}

.big {
  min-width: 168px;
  height: 44px;
}

.list-count {
  margin: 14px 0;
  color: #344054;
  font-size: 13px;
}

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

.table-head,
.table-row {
  display: grid;
  grid-template-columns: 90px minmax(300px, 2.2fr) 90px 145px 80px 135px 100px minmax(180px, 1.2fr) 135px;
  gap: 16px;
  min-width: 1450px;
  align-items: center;
}

.order-primary-action .link-btn {
  min-height: 36px;
  padding: 7px 10px;
  border-radius: 8px;
  color: #fff;
  background: #247cf0;
  font-weight: 800;
}

.trade-head,
.trade-row {
  grid-template-columns: 0.7fr minmax(300px, 2.2fr) minmax(160px, 1.1fr) 0.8fr 1.1fr 1fr 0.8fr;
}

.table-head {
  min-height: 42px;
  padding: 0 14px;
  background: #f5f7fb;
  color: #344054;
  font-size: 13px;
  font-weight: 700;
}

.table-row {
  padding: 18px 14px;
  border-bottom: 1px solid #edf1f6;
  color: #1f2a37;
}

.product-info {
  display: grid;
  grid-template-columns: 58px 1fr;
  gap: 12px;
  min-width: 0;
}

.product-info img,
.detail-product img {
  width: 58px;
  height: 58px;
  border-radius: 6px;
  object-fit: cover;
  background: #f5f7fb;
}

.product-info strong,
.detail-product h3 {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.trade-product-info strong {
  overflow: visible;
  text-overflow: clip;
  white-space: normal;
  overflow-wrap: anywhere;
  line-height: 1.5;
}

.trade-contact {
  min-width: 0;
  overflow-wrap: anywhere;
  line-height: 1.6;
}

.table-row.claimed-order {
  color: #7b8491;
  background: #f5f6f8;
}

.table-row.claimed-order img {
  filter: grayscale(0.8);
  opacity: 0.7;
}

.merchant-note-preview {
  display: inline-block;
  max-width: 180px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.order-note-cell {
  display: grid;
  gap: 5px;
  min-width: 0;
}

.order-note-cell small {
  color: #8a94a3;
  overflow-wrap: anywhere;
}

.order-note-cell .link-btn {
  justify-self: start;
}

.tag-line {
  display: flex;
  gap: 6px;
  margin-top: 6px;
}

.tag-line span {
  background: #f2f4f7;
  color: #697586;
  border-radius: 4px;
  padding: 2px 6px;
  font-size: 12px;
}

a,
.link-btn {
  border: 0;
  background: transparent;
  color: #1677ff;
  padding: 0;
}

.empty-row,
.no-access {
  padding: 40px;
  color: #697586;
  text-align: center;
}

.detail-top {
  display: flex;
  gap: 18px;
  align-items: flex-start;
  margin-bottom: 28px;
}

.detail-top h1 {
  margin: 0 0 8px;
  font-size: 28px;
}

.detail-top p {
  margin: 0;
  color: #697586;
}

.orange {
  color: #ff7a1a;
}

.back-btn {
  width: 38px;
  height: 38px;
  border-radius: 8px;
  border: 1px solid #d8e0ea;
  background: #fff;
  font-size: 28px;
}

.detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 44px;
}

.detail-layout h2 {
  margin: 20px 0 14px;
}

.detail-product {
  display: grid;
  grid-template-columns: 72px 1fr 120px;
  gap: 16px;
  align-items: center;
  background: #f5f7fb;
  border-radius: 8px;
  padding: 18px;
}

.detail-product img {
  width: 72px;
  height: 72px;
}

.detail-price {
  text-align: right;
  font-weight: 800;
}

.detail-price span {
  color: #697586;
  font-weight: 400;
}

.detail-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(240px, 1fr));
  gap: 18px 60px;
  margin-top: 24px;
}

.detail-item {
  display: grid;
  grid-template-columns: 96px 1fr;
  gap: 16px;
}

.detail-item span {
  color: #697586;
}

.travel-info {
  display: grid;
  gap: 16px;
}

.traveler-table {
  max-width: 520px;
}

.traveler-head,
.traveler-row {
  display: grid;
  grid-template-columns: 1fr 1.6fr 1.2fr;
  gap: 12px;
  padding: 12px 16px;
}

.traveler-head {
  background: #f5f7fb;
  color: #697586;
}

.document-type {
  display: block;
  margin-bottom: 3px;
  color: #697586;
  font-size: 11px;
}

.config-image-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 10px;
}

.config-image-gallery .config-image-preview {
  width: 100%;
  height: 92px;
  object-fit: cover;
}

.refund-queue-tip {
  margin-top: -6px;
  padding: 10px 12px;
  border-radius: 8px;
  color: #875a00;
  background: #fff7e6;
}

.refund-request-list {
  display: grid;
  gap: 14px;
  margin-top: 14px;
}

.refund-request-card {
  padding: 18px;
  border: 1px solid #dfe6ef;
  border-left: 4px solid #f0a429;
  border-radius: 10px;
  background: #fff;
}

.refund-request-card.processing {
  border-left-color: #1677ff;
}

.refund-request-card.completed {
  border-left-color: #16a36a;
}

.refund-request-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.refund-request-head span {
  color: #7a8594;
  font-size: 12px;
}

.refund-request-reason {
  margin-top: 14px;
}

.refund-request-reason > span {
  color: #697586;
  font-size: 12px;
}

.refund-request-reason p {
  margin: 6px 0 0;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.refund-evidence-link {
  display: inline-flex;
  margin-top: 14px;
  align-items: center;
  gap: 12px;
  color: #1677ff;
  text-decoration: none;
}

.refund-evidence-link img {
  width: 96px;
  height: 72px;
  border-radius: 8px;
  object-fit: cover;
  background: #eef2f7;
}

.merchant-note {
  border: 1px solid #edf1f6;
  border-radius: 18px;
  padding: 28px;
  align-self: start;
  box-shadow: 0 18px 46px rgba(15, 23, 42, 0.06);
}

.note-title {
  display: flex;
  justify-content: space-between;
  font-size: 20px;
  font-weight: 800;
  margin-bottom: 24px;
}

.merchant-note-editor {
  display: grid;
  gap: 10px;
  margin-top: 22px;
}

.timeline {
  display: grid;
  gap: 22px;
  color: #697586;
}

.timeline > div {
  display: grid;
  grid-template-columns: 12px 1fr;
  gap: 14px;
}

.timeline .note-entry > div {
  display: grid;
  gap: 6px;
}

.note-entry small {
  color: #8a94a3;
}

.note-entry strong {
  color: #1f2a37;
  line-height: 1.55;
  overflow-wrap: anywhere;
}

.empty-note {
  color: #8a94a3;
  text-align: center;
  padding: 18px 0;
}

.timeline span {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #cbd5e1;
  margin-top: 6px;
}

.detail-actions {
  position: fixed;
  left: 184px;
  right: 0;
  bottom: 0;
  height: 76px;
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 0 24px;
  background: #fff;
  border-top: 1px solid #e6edf5;
}

.modal-mask {
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: rgba(15, 23, 42, 0.32);
  display: grid;
  place-items: center;
}

.notice-dialog-card {
  width: min(420px, calc(100vw - 32px));
}

.notice-dialog-card .confirm-body {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.notice-icon {
  font-family: Georgia, serif;
  text-transform: lowercase;
}

.confirm-card {
  width: 360px;
  background: #fff;
  border-radius: 12px;
  padding: 26px;
  box-shadow: 0 24px 72px rgba(15, 23, 42, 0.24);
  text-align: center;
}

.note-dialog-card {
  width: min(520px, calc(100vw - 32px));
  padding: 24px;
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 24px 72px rgba(15, 23, 42, 0.24);
}

.refund-dialog-card {
  width: min(620px, calc(100vw - 32px));
  max-height: calc(100vh - 40px);
  overflow-y: auto;
  padding: 24px;
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 24px 72px rgba(15, 23, 42, 0.24);
}

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

.refund-preview {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin: 18px 0 12px;
}

.refund-preview span {
  display: grid;
  gap: 5px;
  border-radius: 8px;
  background: #f8fafc;
  padding: 12px;
  color: #697586;
  font-size: 12px;
}

.refund-preview strong {
  color: #1f2a37;
  font-size: 18px;
}

.refund-warning {
  margin: 12px 0 18px;
  color: #b54708;
  font-size: 12px;
  line-height: 1.6;
}

.note-dialog-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

.note-dialog-head strong {
  font-size: 19px;
}

.modal-close {
  width: 32px;
  height: 32px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: #f2f4f7;
  color: #667085;
  font-size: 22px;
}

.note-dialog-card textarea {
  width: 100%;
  min-height: 120px;
}

.note-dialog-tip {
  margin: 8px 0 20px;
  color: #8a94a3;
  font-size: 12px;
}

.confirm-icon {
  width: 42px;
  height: 42px;
  margin: 0 auto 14px;
  border-radius: 50%;
  background: #eef6ff;
  color: #1677ff;
  display: grid;
  place-items: center;
  font-weight: 900;
}

.confirm-title {
  font-size: 18px;
  font-weight: 800;
}

.confirm-body {
  color: #697586;
  line-height: 1.7;
  margin: 10px 0 20px;
}

.confirm-actions {
  display: flex;
  justify-content: center;
  gap: 12px;
}

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

.config-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 18px;
  padding-bottom: 12px;
  border-bottom: 1px solid #edf1f6;
}

.config-tabs button {
  padding: 9px 16px;
  border: 1px solid #d8e0ea;
  border-radius: 8px;
  background: #fff;
  color: #536071;
}

.config-tabs button.active {
  border-color: #1677ff;
  background: #eef6ff;
  color: #1677ff;
  font-weight: 800;
}

.config-subsection-title {
  margin-top: 8px;
  padding-top: 16px;
  border-top: 1px solid #edf1f6;
  font-weight: 800;
}

.home-entry-toggle-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.home-entry-toggle {
  min-height: 46px;
  padding: 10px 12px;
  display: flex;
  align-items: center;
  gap: 9px;
  border: 1px solid #dce5f0;
  border-radius: 10px;
  background: #f8fafc;
  font-weight: 700;
}

.home-entry-toggle input {
  width: 18px;
  height: 18px;
  accent-color: #1677ff;
}

.color-picker-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.color-picker-row input[type="color"] {
  width: 74px;
  height: 42px;
  padding: 3px;
  border: 1px solid #d5dfeb;
  border-radius: 9px;
  background: #fff;
  cursor: pointer;
}

.color-picker-row code {
  color: #475467;
  font-size: 13px;
}

.location-paste-field textarea {
  min-height: 112px;
  font-family: inherit;
  line-height: 1.6;
}

.location-parse-actions {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 14px;
  border: 1px dashed #cfd8e6;
  border-radius: 10px;
  background: #f8fafc;
}

.location-parse-status {
  color: #667085;
  font-size: 13px;
}

.location-parse-status.success {
  color: #027a48;
  font-weight: 700;
}

.location-parse-status.error {
  color: #b42318;
  font-weight: 700;
}

.entrance-config-preview {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 16px 0;
  padding: 16px;
  border: 1px solid #dce8f8;
  border-radius: 10px;
  background: #f5f9ff;
}

.entrance-config-icon {
  width: 42px;
  height: 42px;
  border-radius: 10px;
  background: #247cf0;
  color: #fff;
  display: grid;
  place-items: center;
  font-size: 16px;
  font-weight: 800;
}

.contact-config-preview {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 16px 0;
  padding: 16px;
  border: 1px solid #dfe8e3;
  border-radius: 10px;
  background: #f4fbf7;
}

.contact-config-icon {
  width: 42px;
  height: 42px;
  border-radius: 10px;
  background: #19b86b;
  color: #fff;
  display: grid;
  place-items: center;
  font-size: 20px;
}

.contact-channel-card {
  min-width: 0;
  padding: 16px;
  border: 1px solid #e1e7ef;
  border-radius: 10px;
  background: #fbfcfe;
}

.contact-channel-head {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-bottom: 12px;
}

.channel-icon {
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border-radius: 7px;
  background: #4b83f5;
  color: #fff;
  font-size: 13px;
  font-weight: 800;
}

.channel-icon.wechat {
  background: #38b521;
}

.contact-item-list {
  display: grid;
  gap: 9px;
}

.contact-item-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
}

.contact-remove {
  border: 0;
  background: transparent;
  padding: 7px;
}

.contact-add-button {
  display: block;
  margin: 12px auto;
}

.wide-field {
  grid-column: 1 / -1;
}

.product-edit-list {
  display: grid;
  gap: 14px;
}

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

.product-jump-bar {
  position: sticky;
  top: 18px;
  display: grid;
  gap: 12px;
  max-height: calc(100vh - 36px);
  padding: 14px;
  overflow: hidden;
  border: 1px solid #dce5f2;
  border-radius: 12px;
  background: #f8faff;
  box-shadow: 0 8px 24px rgba(31, 42, 55, 0.08);
}

.product-jump-title {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
}

.product-jump-title span {
  color: #7b8798;
  font-size: 12px;
}

.product-jump-list {
  display: grid;
  gap: 6px;
  overflow-y: auto;
  overscroll-behavior: contain;
}

.product-jump-list button {
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr);
  gap: 8px;
  align-items: center;
  width: 100%;
  min-height: 36px;
  padding: 6px 8px;
  border: 0;
  border-radius: 8px;
  color: #344054;
  background: transparent;
  text-align: left;
  cursor: pointer;
}

.product-jump-list button:hover,
.product-jump-list button:focus-visible {
  color: #0958d9;
  background: #eaf2ff;
  outline: none;
}

.product-jump-list button span {
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  color: #0958d9;
  background: #dceaff;
  font-size: 12px;
  font-weight: 800;
}

.product-jump-list button em {
  overflow: hidden;
  font-style: normal;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.product-jump-top {
  width: 100%;
}

.upload-row {
  display: flex;
  gap: 12px;
  margin-bottom: 14px;
}

.upload-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  padding: 0 14px;
  border: 1px dashed #1677ff;
  border-radius: 6px;
  color: #1677ff;
  background: #f5faff;
  overflow: hidden;
}

.upload-btn input {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}

.product-editor {
  display: grid;
  grid-template-columns: 132px minmax(0, 1fr) 112px;
  gap: 14px;
  align-items: start;
  scroll-margin-top: 86px;
  border: 1px solid #edf1f6;
  border-radius: 8px;
  padding: 14px;
}

.product-editor.selected-for-export {
  border-color: #84adff;
  box-shadow: 0 0 0 2px rgba(22, 119, 255, 0.08);
}

.product-editor.jump-highlight {
  border-color: #1677ff;
  box-shadow: 0 0 0 4px rgba(22, 119, 255, 0.14);
  transition: border-color 160ms ease, box-shadow 160ms ease;
}

.product-export-choice {
  grid-column: 1 / -1;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  width: fit-content;
  color: #344054;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}

.product-editor-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.rich-field {
  min-width: 0;
}

.rich-toolbar {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 7px;
  padding: 9px;
  border: 1px solid #d9e2ef;
  border-bottom: 0;
  border-radius: 10px 10px 0 0;
  background: #f7f9fc;
}

.rich-toolbar button,
.rich-toolbar select,
.rich-palette,
.rich-image-button {
  min-height: 34px;
  margin: 0;
  padding: 6px 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid #d0d9e6;
  border-radius: 7px;
  color: #344054;
  background: #fff;
  font-size: 13px;
  line-height: 1;
  cursor: pointer;
}

.rich-palette {
  gap: 7px;
  padding-right: 7px;
}

.rich-palette > span {
  color: #475467;
  white-space: nowrap;
}

.rich-swatches {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.rich-toolbar .rich-swatch {
  width: 20px;
  min-width: 20px;
  min-height: 20px;
  height: 20px;
  padding: 0;
  border: 1px solid #98a2b3;
  border-radius: 50%;
  background: var(--swatch);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.4);
}

.rich-toolbar .rich-swatch:hover,
.rich-toolbar .rich-swatch:focus-visible {
  transform: scale(1.15);
  outline: 2px solid #84adff;
  outline-offset: 1px;
}

.rich-toolbar .rich-swatch.light {
  border-color: #98a2b3;
}

.rich-table-controls {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px;
  border: 1px solid #d0d9e6;
  border-radius: 8px;
  background: #eef2f6;
}

.rich-toolbar .rich-table-controls select,
.rich-toolbar .rich-table-controls button {
  min-height: 28px;
  padding: 4px 7px;
  border-radius: 5px;
}

.rich-image-button input {
  display: none;
}

.rich-editor {
  min-height: 210px;
  max-height: 620px;
  padding: 18px;
  overflow: auto;
  border: 1px solid #d9e2ef;
  border-radius: 0 0 10px 10px;
  color: #1d2939;
  background: #fff;
  font-size: 15px;
  line-height: 1.75;
  outline: none;
}

.rich-editor:focus {
  border-color: #247cf0;
  box-shadow: 0 0 0 3px rgba(36, 124, 240, 0.1);
}

.rich-editor.format-painter-ready {
  cursor: copy;
  border-color: #7f56d9;
  box-shadow: 0 0 0 3px rgba(127, 86, 217, 0.12);
}

.rich-editor img {
  max-width: 100%;
  height: auto;
  border-radius: 8px;
}

.rich-editor table {
  width: 100%;
  border-collapse: collapse;
}

.rich-editor td,
.rich-editor th {
  min-width: 80px;
  padding: 8px;
  border: 1px solid #d0d5dd;
}

.gathering-image-field {
  align-self: start;
}

.config-image-preview {
  width: 100%;
  max-height: 260px;
  object-fit: contain;
  border: 1px solid #e4e7ec;
  border-radius: 10px;
  background: #f8fafc;
}

.inline-editor-notice {
  position: sticky;
  top: 8px;
  z-index: 40;
  margin: 8px 0;
}

.product-image-manager {
  display: grid;
  gap: 10px;
}

.managed-image {
  border: 1px solid #e6edf5;
  border-radius: 8px;
  overflow: hidden;
  background: #f8fafc;
}

.managed-image > img {
  display: block;
  width: 132px;
  height: 110px;
  object-fit: cover;
}

.product-image-error-placeholder {
  object-fit: contain !important;
  background: #fff1f0;
}

.managed-image-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
}

.image-action,
.image-add {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 32px;
  border: 0;
  background: #fff;
  color: #1677ff;
  font-size: 12px;
  cursor: pointer;
  overflow: hidden;
}

.image-action + .image-action {
  border-left: 1px solid #e6edf5;
}

.image-action input,
.image-add input {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}

.image-add {
  min-height: 38px;
  border: 1px dashed #1677ff;
  border-radius: 8px;
  background: #f5faff;
}

.new-product-image-upload {
  align-items: stretch;
}

.new-product-image-upload .image-add {
  width: min(220px, 100%);
}

.new-product-image-list {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  min-height: 28px;
}

.new-product-image {
  width: 132px;
}

.new-product-image > img {
  width: 100%;
}

.new-product-image > button {
  width: 100%;
  min-height: 34px;
  border: 0;
  border-top: 1px solid #e6edf5;
  background: #fff;
  cursor: pointer;
}

.home-hero-image-field {
  align-items: stretch;
}

.home-hero-image-field .image-add {
  width: min(260px, 100%);
}

.home-hero-image-preview {
  min-height: 92px;
  display: flex;
  align-items: center;
}

.home-hero-managed-image {
  width: min(520px, 100%);
}

.home-hero-managed-image > img {
  width: 100%;
  height: auto;
  max-height: 280px;
  object-fit: contain;
}

.home-hero-managed-image > button {
  width: 100%;
  min-height: 36px;
  border: 0;
  border-top: 1px solid #e6edf5;
  background: #fff;
  cursor: pointer;
}

.home-background-image-field {
  align-items: stretch;
}

.home-background-image-field .image-add {
  width: min(260px, 100%);
}

.home-background-image-preview {
  min-height: 92px;
  display: flex;
  align-items: center;
}

.home-background-managed-image {
  width: min(360px, 100%);
}

.home-background-managed-image > img {
  width: 100%;
  height: 220px;
  object-fit: cover;
  object-position: top center;
}

.home-background-managed-image > button {
  width: 100%;
  min-height: 36px;
  border: 0;
  border-top: 1px solid #e6edf5;
  background: #fff;
  cursor: pointer;
}

@media (max-width: 720px) {
  .home-entry-toggle-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.error-text {
  color: #d4380d;
}

.product-thumb {
  width: 132px;
  aspect-ratio: 1 / 1;
  border-radius: 8px;
  overflow: hidden;
  background: #f2f4f7;
}

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

.product-switch-list,
.workload-list {
  display: grid;
  gap: 12px;
}

.data-export-controls {
  display: grid;
  grid-template-columns: minmax(180px, 0.7fr) repeat(2, minmax(260px, 1fr));
  gap: 16px;
  align-items: end;
  margin-top: 18px;
}

.data-export-group {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  padding: 14px;
  border: 1px solid #e4eaf2;
  border-radius: 10px;
  background: #f8fafc;
}

.data-export-group strong {
  grid-column: 1 / -1;
  color: #344054;
}

.sku-product-select {
  min-width: 320px;
}

.sku-help,
.automation-flow {
  margin: 16px 0;
  padding: 14px 16px;
  border: 1px solid #cfe0ff;
  border-radius: 10px;
  color: #1849a9;
  background: #f5f8ff;
}

.sku-section {
  margin-top: 22px;
  padding-top: 18px;
  border-top: 1px solid #edf1f6;
}

.sku-table,
.sms-template-list {
  display: grid;
  gap: 8px;
}

.sku-row {
  display: grid;
  grid-template-columns: 78px minmax(140px, .8fr) 130px minmax(220px, 1.4fr) 70px;
  gap: 10px;
  align-items: center;
  padding: 10px;
  border: 1px solid #e4eaf2;
  border-radius: 9px;
  background: #fbfcfe;
}

.sku-row.with-addon {
  grid-template-columns: 78px minmax(130px, .8fr) 120px minmax(180px, 1.2fr) 180px 60px;
}

.sku-row.sku-head {
  border: 0;
  color: #667085;
  background: #f2f4f7;
  font-size: 12px;
  font-weight: 800;
}

.sku-enabled,
.toggle-label,
.template-default {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  white-space: nowrap;
}

.sku-addon-fields {
  display: grid;
  grid-template-columns: 1fr 64px;
  gap: 7px;
}

.sku-save-bar,
.automation-save-bar,
.automation-test-row,
.auto-acceptance-batch {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 18px;
}

.auto-acceptance-batch {
  padding: 14px;
  border: 1px solid #d8e6fb;
  border-radius: 10px;
  background: #f7faff;
}

.auto-acceptance-batch > div {
  display: grid;
  flex: 1;
  gap: 5px;
}

.inventory-auto-status {
  display: flex;
  justify-content: space-between;
  margin-bottom: 12px;
  padding: 9px 11px;
  border-radius: 8px;
  color: #475467;
  background: #f8fafc;
}

.automation-flow {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  font-weight: 800;
}

.automation-flow b {
  color: #84adff;
}

.automation-card,
.dashboard-filter-card {
  margin-top: 16px;
}

.automation-template-title {
  margin-top: 20px;
}

.sms-template-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(150px, 1fr)) minmax(220px, 1.2fr) minmax(180px, 1fr) auto auto;
  gap: 10px;
  align-items: end;
  padding: 14px;
  border: 1px solid #e4eaf2;
  border-radius: 10px;
  background: #fbfcfe;
}

.automation-save-bar {
  position: sticky;
  bottom: 12px;
  z-index: 30;
  justify-content: flex-end;
  padding: 12px;
  border-radius: 12px;
  background: rgba(255, 255, 255, .92);
  box-shadow: 0 8px 28px rgba(15, 23, 42, .15);
  backdrop-filter: blur(8px);
}

.dashboard-filter,
.audit-filter {
  display: grid;
  grid-template-columns: auto repeat(2, minmax(170px, 1fr)) auto;
  gap: 12px;
  align-items: end;
}

.audit-filter {
  grid-template-columns: repeat(4, minmax(150px, 1fr)) auto;
}

.dashboard-presets {
  display: flex;
  gap: 7px;
  align-self: end;
}

.dashboard-groups {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin-top: 16px;
}

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

.dashboard-metric {
  display: grid;
  gap: 7px;
  padding: 14px;
  border-radius: 10px;
  background: #f2f7ff;
}

.dashboard-metric > span {
  color: #475467;
  font-size: 13px;
}

.dashboard-metric strong {
  font-size: 25px;
}

.dashboard-metric small.up { color: #d92d20; }
.dashboard-metric small.down { color: #027a48; }
.dashboard-metric small.flat { color: #667085; }

.dashboard-trend {
  display: grid;
  gap: 8px;
  margin-top: 16px;
}

.trend-legend {
  display: flex;
  gap: 18px;
  color: #667085;
  font-size: 12px;
}

.trend-legend span::before {
  content: "";
  display: inline-block;
  width: 9px;
  height: 9px;
  margin-right: 5px;
  border-radius: 50%;
  background: currentColor;
}

.trend-legend .order { color: #84adff; }
.trend-legend .payment { color: #12b76a; }
.trend-legend .refund { color: #f04438; }

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

.trend-row time {
  color: #667085;
  font-size: 12px;
}

.trend-bars {
  display: grid;
  gap: 2px;
}

.trend-bars span {
  min-width: 2px;
  height: 5px;
  border-radius: 999px;
}

.trend-bars .order { background: #84adff; }
.trend-bars .payment { background: #12b76a; }
.trend-bars .refund { background: #f04438; }

.audit-table {
  display: grid;
  gap: 7px;
  margin-top: 18px;
}

.audit-row {
  display: grid;
  grid-template-columns: 170px 140px 220px 180px minmax(260px, 1fr);
  gap: 10px;
  align-items: start;
  padding: 11px;
  border: 1px solid #edf1f6;
  border-radius: 8px;
  font-size: 13px;
}

.audit-row.audit-head {
  border: 0;
  background: #f2f4f7;
  font-weight: 800;
}

.audit-row code {
  overflow-wrap: anywhere;
  white-space: pre-wrap;
}

.audit-pagination {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 12px;
  margin-top: 14px;
}

@media (max-width: 1200px) {
  .dashboard-groups { grid-template-columns: 1fr; }
  .sms-template-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .audit-row { grid-template-columns: 150px 120px minmax(170px, 1fr); }
  .audit-row > :nth-child(4), .audit-row > :nth-child(5) { grid-column: span 1; }
}

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

.inventory-product {
  min-width: 0;
  border: 1px solid #e6edf5;
  border-radius: 12px;
  padding: 18px;
  background: #fff;
}

.inventory-product-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  padding-bottom: 16px;
  margin-bottom: 16px;
  border-bottom: 1px solid #edf1f6;
}

.switch-row,
.workload-row,
.inventory-product {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 18px;
  align-items: center;
  padding: 14px;
  border: 1px solid #edf1f6;
  border-radius: 8px;
}

.product-card-row {
  min-width: 0;
}

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

.product-mini img {
  width: 58px;
  height: 58px;
  border-radius: 6px;
  object-fit: cover;
  background: #f5f7fb;
}

.product-mini strong {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.status-pill {
  border-radius: 999px;
  padding: 5px 10px;
  font-size: 12px;
}

.status-pill.green {
  color: #067647;
  background: #ecfdf3;
}

.status-pill.orange {
  color: #b54708;
  background: #fffaeb;
}

.status-pill.red {
  color: #b42318;
  background: #fef3f2;
}

.phone-followup-warning {
  display: inline-block;
  margin-top: 4px;
  color: #b42318;
  font-size: 12px;
  font-weight: 700;
}

.bar {
  width: 260px;
  height: 8px;
  border-radius: 999px;
  background: #eef2f7;
  overflow: hidden;
}

.bar span {
  display: block;
  height: 100%;
  background: #1677ff;
}

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

.stock-slot {
  display: grid;
  gap: 5px;
  min-width: 0;
  padding: 11px 12px;
  border-radius: 8px;
  background: #f2f4f7;
  color: #344054;
  font-size: 12px;
}

.stock-slot strong {
  font-size: 14px;
  color: #1f2a37;
}

.stock-slot-date {
  color: #697586;
}

.stock-slot.closed {
  background: #fff1f0;
  color: #d92d20;
}

.inventory-product {
  display: block;
  padding: 0;
  overflow: hidden;
  background: #fff;
}

.inventory-product.expanded {
  grid-column: 1 / -1;
  border-color: #84adff;
  box-shadow: 0 10px 28px rgba(22, 119, 255, 0.1);
}

.inventory-product-toggle {
  width: 100%;
  display: grid;
  grid-template-columns: minmax(240px, 1fr) auto 22px;
  gap: 16px;
  align-items: center;
  padding: 16px 18px;
  border: 0;
  color: inherit;
  background: transparent;
  text-align: left;
}

.inventory-product-toggle:hover {
  background: #f8fbff;
}

.inventory-summary {
  display: grid;
  justify-items: end;
  gap: 5px;
  color: #667085;
  font-size: 12px;
}

.inventory-expand-icon {
  color: #667085;
  font-size: 22px;
  transform: rotate(0deg);
  transition: transform 160ms ease;
}

.inventory-product.expanded .inventory-expand-icon {
  transform: rotate(180deg);
}

.inventory-product-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 8px;
  padding: 12px 18px;
  border-top: 1px solid #edf1f6;
  background: #fbfcfe;
}

.inventory-sku-details {
  padding: 18px;
  border-top: 1px solid #dce6f3;
  background: #f7faff;
}

.inventory-sku-note {
  margin-bottom: 12px;
  color: #475467;
  font-size: 13px;
}

.inventory-sku-batch-bar {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 14px;
  padding: 10px 12px;
  border: 1px solid #fedf89;
  border-radius: 9px;
  background: #fffcf5;
}

.inventory-sku-batch-bar > span {
  margin-right: auto;
  color: #475467;
}

.inventory-sku-card {
  margin-top: 12px;
  padding: 14px;
  border: 1px solid #dce5f2;
  border-radius: 10px;
  background: #fff;
}

.inventory-sku-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 12px;
}

.inventory-sku-select {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  cursor: pointer;
}

.inventory-sku-select input {
  margin-top: 4px;
}

.inventory-sku-select span,
.inventory-sku-select small {
  display: block;
}

.inventory-sku-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 9px;
}

.inventory-sku-card .slot-list {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

@media (max-width: 1100px) {
  .inventory-product-toggle {
    grid-template-columns: minmax(0, 1fr) 22px;
  }

  .inventory-summary {
    grid-column: 1 / -1;
    grid-row: 2;
    justify-items: start;
  }

  .inventory-expand-icon {
    grid-column: 2;
    grid-row: 1;
  }

  .inventory-sku-card .slot-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

  .trade-head {
    display: none;
  }

  .trade-row {
    min-width: 0;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px 22px;
    margin-top: 12px;
    padding: 16px;
    border: 1px solid #e5eaf3;
    border-radius: 10px;
    background: #fff;
  }

  .trade-row > * {
    display: grid;
    grid-template-columns: 82px minmax(0, 1fr);
    gap: 8px;
    align-items: start;
  }

  .trade-row > *::before {
    content: attr(data-label);
    color: #8a94a3;
    font-size: 12px;
    font-weight: 700;
  }

  .trade-row .trade-product-info {
    grid-column: 1 / -1;
    grid-template-columns: 82px 58px minmax(0, 1fr);
  }

  .trade-row .trade-product-info::before {
    align-self: center;
  }

  .trade-row .trade-contact {
    display: grid;
  }

  .trade-row.claimed-order {
    background: #f5f6f8;
  }
}

@media (max-width: 1000px) {
  .product-manage-layout {
    grid-template-columns: 1fr;
  }

  .product-jump-bar {
    top: 8px;
    z-index: 20;
    grid-row: 1;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    max-height: none;
    padding: 9px 10px;
  }

  .product-jump-title span {
    display: none;
  }

  .product-jump-list {
    display: flex;
    overflow-x: auto;
    overflow-y: hidden;
  }

  .product-jump-list button {
    flex: 0 0 auto;
    width: 180px;
  }

  .product-jump-top {
    width: auto;
    white-space: nowrap;
  }

  .trade-calendar-controls {
    grid-template-columns: 1fr;
  }

  .trade-calendar-popover,
  .trade-date-picker:last-child .trade-calendar-popover {
    position: fixed;
    top: 76px;
    left: 16px;
    right: 16px;
    width: auto;
    min-width: 0;
    max-height: calc(100vh - 96px);
    overflow-y: auto;
  }
}

@media (max-width: 760px) {
  .lk-shell {
    grid-template-columns: 1fr;
  }

  .lk-sidebar {
    position: static;
  }

  .detail-actions {
    left: 0;
  }

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

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

  .stock-control-grid,
  .inventory-table,
  .data-export-controls {
    grid-template-columns: 1fr;
  }

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

  .product-editor {
    grid-template-columns: 1fr;
  }

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

  .managed-image > img {
    width: 100%;
  }

  .product-editor-actions {
    flex-direction: row;
    justify-content: flex-end;
  }

}

@media (max-width: 560px) {
  .login-card {
    width: calc(100% - 28px);
    padding: 24px;
  }

  .test-accounts,
  .slot-list,
  .inventory-sku-card .slot-list,
  .stock-product-checks,
  .trade-calendar-controls,
  .dual-month-calendar,
  .refund-form,
  .refund-preview {
    grid-template-columns: 1fr;
  }

  .trade-calendar-popover {
    grid-template-columns: 92px minmax(0, 1fr);
  }

  .calendar-shortcuts button {
    padding: 0 10px;
    font-size: 12px;
  }

  .calendar-month + .calendar-month {
    border-left: 0;
    border-top: 1px solid #edf1f6;
  }

  .trade-filter > button {
    flex: 1 1 120px;
  }

  .trade-row {
    grid-template-columns: 1fr;
  }

  .trade-row .trade-product-info {
    grid-column: auto;
  }
}
.admin-version-note {
  margin: 16px 4px 0;
  color: #98a2b3;
  font-size: 12px;
  text-align: right;
}

.activation-card.activated {
  border: 1px solid #abefc6;
  background: #f6fef9;
}

.activation-card.locked {
  border: 1px solid #fedf89;
}

.settings-transfer-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin: 18px 0 12px;
}

.settings-transfer-actions .file-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  user-select: none;
}

.network-progress {
  position: fixed;
  z-index: 10000;
  right: 24px;
  bottom: 24px;
  width: min(360px, calc(100vw - 32px));
  padding: 14px 16px;
  border: 1px solid #d0d5dd;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 18px 40px rgba(16, 24, 40, 0.18);
}

.network-progress-label {
  margin-bottom: 10px;
  color: #344054;
  font-size: 14px;
  font-weight: 600;
}

.network-progress-track {
  height: 8px;
  overflow: hidden;
  border-radius: 999px;
  background: #eaecf0;
}

.network-progress-track span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #1570ef, #53b1fd);
  transition: width 0.25s ease;
}

.network-progress-value {
  margin-top: 7px;
  color: #667085;
  font-size: 12px;
  text-align: right;
}

.stable-version-notice{position:fixed;bottom:16px;left:16px;right:16px;z-index:10000;padding:16px;background:#fff4d6;color:#30240c;border:1px solid #c6982d;border-radius:10px;box-shadow:0 4px 20px #0003;line-height:1.6}.stable-version-notice button{padding:8px 12px;margin:4px;border:1px solid #c6982d;border-radius:6px;background:white;color:#30240c}dialog>.stable-version-notice{position:sticky;bottom:0;margin-top:16px}

.draft-recovery{border:1px solid #e5b854;background:#fff8e6;padding:14px;border-radius:10px;margin:12px 0}.draft-recovery p{margin:0 0 10px}.draft-recovery button{padding:8px 12px;margin-right:10px;border:1px solid #d8bd7c;border-radius:6px;background:white}.draft-storage-status{display:block;color:#667085;padding:8px 0}.theme-presets{padding:12px;background:#f8fafc;border-radius:10px;margin-bottom:16px}.theme-presets button{margin:4px}
