:root {
  font-family: "Segoe UI", "Microsoft YaHei", system-ui, sans-serif;
  color: #202033;
  background: #f7f5fb;
  --ink: #211c3b;
  --muted: #746f87;
  --purple: #6652d9;
  --purple-dark: #4833b5;
  --coral: #ff765f;
  --mint: #28b79a;
  --line: #e8e3f1;
  --panel: #ffffff;
}
html,
body,
#app {
  height: 100%;
  overflow: hidden;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  min-height: 100%;
  background:
    radial-gradient(circle at 8% 0, #eee9ff 0, transparent 27%),
    radial-gradient(circle at 93% 8%, #ffe8df 0, transparent 23%), #f7f5fb;
}
.shell {
  max-width: 1540px;
  margin: auto;
  padding: 28px 34px 72px;
}
header {
  position: relative;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  min-height: 150px;
  padding: 30px 34px;
  border-radius: 28px;
  color: #fff;
  background: linear-gradient(125deg, #211c3b 0%, #4c38ae 60%, #745be5 100%);
  box-shadow: 0 18px 45px rgba(56, 39, 132, 0.22);
  overflow: hidden;
}
header:after {
  content: "";
  position: absolute;
  width: 260px;
  height: 260px;
  right: 23%;
  top: -145px;
  border: 48px solid rgba(255, 255, 255, 0.08);
  border-radius: 50%;
}
header > div {
  position: relative;
  z-index: 1;
}
h1 {
  font-size: 36px;
  line-height: 1.1;
  margin: 5px 0 8px;
  letter-spacing: -0.04em;
}
.eyebrow {
  font-size: 11px;
  letter-spacing: 0.24em;
  color: #d8d1ff;
  margin: 0;
  text-transform: uppercase;
}
.status {
  color: #e9e5ff;
  margin: 0;
  font-size: 14px;
}
.header-actions,
.tools,
.tabs {
  display: flex;
  gap: 10px;
  align-items: center;
}
header .secondary {
  color: #fff;
  border-color: rgba(255, 255, 255, 0.28);
  background: rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(10px);
}
header .secondary:hover {
  background: rgba(255, 255, 255, 0.2);
}
.card,
.metrics article,
.table-wrap {
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid rgba(226, 220, 238, 0.9);
  box-shadow: 0 8px 26px rgba(48, 36, 82, 0.06);
}
.search-card {
  position: relative;
  display: grid;
  grid-template-columns: 1.5fr 1.15fr 1.05fr 1.05fr 0.9fr auto;
  gap: 13px;
  align-items: end;
  padding: 22px;
  margin-top: -20px;
  margin-left: 22px;
  margin-right: 22px;
  border-radius: 20px;
  z-index: 2;
}
.search-card .wide {
  min-width: 190px;
}
label {
  font-size: 12px;
  font-weight: 650;
  color: #5b5570;
  display: grid;
  gap: 7px;
}
input,
select,
button:not(.n-button) {
  font: inherit;
  border-radius: 11px;
  border: 1px solid #d8d1e7;
  padding: 10px 12px;
  background: #fff;
  transition:
    border-color 0.18s,
    box-shadow 0.18s,
    transform 0.18s,
    background 0.18s;
}
input,
select {
  width: 100%;
  height: 43px;
  color: var(--ink);
  outline: none;
}
input:focus,
select:focus {
  border-color: #8a79e8;
  box-shadow: 0 0 0 4px rgba(102, 82, 217, 0.11);
}
button:not(.n-button) {
  cursor: pointer;
  font-weight: 700;
  color: #3b3458;
  white-space: nowrap;
}
button:not(.n-button):hover {
  transform: translateY(-1px);
  border-color: #aa9ee2;
}
button:not(.n-button):disabled {
  opacity: 0.46;
  cursor: not-allowed;
  transform: none;
}
.primary {
  background: linear-gradient(135deg, var(--purple), var(--purple-dark));
  color: #fff;
  border-color: transparent;
  box-shadow: 0 7px 16px rgba(86, 65, 199, 0.21);
}
.danger {
  background: #e95967;
  color: #fff;
  border-color: #e95967;
}
.secondary {
  background: #fff;
}
.hint {
  grid-column: 1/-1;
  font-size: 12px;
  color: #837d94;
  margin: 1px 0 0;
}
.metrics {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin: 22px 0;
}
.metrics article {
  position: relative;
  padding: 19px 20px;
  border-radius: 18px;
  overflow: hidden;
}
.metrics article:before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 5px;
  background: var(--purple);
}
.metrics article:nth-child(2):before {
  background: var(--coral);
}
.metrics article:nth-child(3):before {
  background: var(--mint);
}
.metrics article:nth-child(4):before {
  background: #f2ae3e;
}
.metrics span {
  font-size: 12px;
  color: var(--muted);
  display: block;
}
.metrics strong {
  font-size: 30px;
  line-height: 1;
  margin-top: 7px;
  display: block;
  color: var(--ink);
  letter-spacing: -0.04em;
}
.tools {
  padding: 13px 15px;
  border-radius: 17px;
  flex-wrap: wrap;
}
.tools input {
  max-width: 290px;
  background: #faf9fd;
}
.tabs {
  padding: 4px;
  background: #f0edf7;
  border-radius: 12px;
}
.tab {
  border: 0;
  background: transparent;
  padding: 9px 14px;
}
.tab.active {
  background: #fff;
  color: var(--purple-dark);
  box-shadow: 0 3px 10px rgba(45, 32, 91, 0.11);
}
.notice {
  min-height: 20px;
  margin: 13px 4px;
  color: #69617d;
  font-size: 13px;
}
.notice.error {
  color: #c73f50;
}
.table-wrap {
  overflow: auto;
  border-radius: 20px;
}
table {
  border-collapse: separate;
  border-spacing: 0;
  width: 100%;
  min-width: 1040px;
}
th,
td {
  border-bottom: 1px solid #eeeaf4;
  text-align: left;
  padding: 13px 12px;
  font-size: 13px;
  vertical-align: middle;
}
th {
  background: #2a2445;
  color: #f4f1ff;
  position: sticky;
  top: 0;
  z-index: 1;
  font-size: 12px;
  font-weight: 650;
  letter-spacing: 0.02em;
}
th:first-child {
  border-radius: 18px 0 0 0;
}
th:last-child {
  border-radius: 0 18px 0 0;
}
tbody tr {
  transition:
    background 0.15s,
    transform 0.15s;
}
tbody tr:hover {
  background: #f2effd;
}
.thumb {
  width: 62px;
  height: 62px;
  object-fit: cover;
  border-radius: 13px;
  background: #eeeaf4;
  box-shadow: 0 4px 12px rgba(37, 27, 69, 0.13);
}
.fallback {
  display: inline-grid;
  place-items: center;
  color: #817b91;
  font-size: 11px;
}
.title {
  max-width: 450px;
  color: #292344;
  font-weight: 700;
  line-height: 1.35;
}
.sub {
  font-size: 12px;
  color: #827b96;
  margin-top: 5px;
  font-weight: 500;
}
.sold {
  font-size: 20px;
  font-weight: 800;
  color: var(--coral);
}
.check {
  width: 17px;
  height: 17px;
  accent-color: var(--purple);
}
.empty {
  text-align: center;
  padding: 52px;
  color: #8a8498;
}
a {
  color: #5845c4;
  text-decoration: none;
  font-weight: 650;
}
a:hover {
  text-decoration: underline;
}
dialog {
  border: 0;
  border-radius: 20px;
  box-shadow: 0 20px 60px rgba(26, 18, 58, 0.25);
  min-width: min(520px, 90vw);
  padding: 22px;
}
dialog::backdrop {
  background: rgba(27, 22, 48, 0.45);
  backdrop-filter: blur(3px);
}
.dialog-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.dialog-head h2 {
  margin: 0;
}
.history-row {
  padding: 13px 0;
  border-bottom: 1px solid #eeeaf4;
  display: flex;
  justify-content: space-between;
  gap: 14px;
}
.history-row p {
  margin: 0;
  color: #7b748d;
  font-size: 12px;
}
.sale-times summary {
  cursor: pointer;
  color: #5c48c8;
  font-weight: 700;
  white-space: nowrap;
  list-style: none;
}
.sale-times summary:before {
  content: "＋";
  display: inline-grid;
  place-items: center;
  width: 19px;
  height: 19px;
  margin-right: 6px;
  border-radius: 6px;
  background: #eeeaff;
  color: #5b46ca;
}
.sale-times[open] summary:before {
  content: "−";
}
.sale-times a,
.sale-times span {
  display: block;
  margin: 7px 0 0 25px;
  white-space: nowrap;
}
.sale-times a {
  color: #6552c6;
}
@media (max-width: 1100px) {
  .search-card {
    grid-template-columns: repeat(3, 1fr);
    margin-left: 10px;
    margin-right: 10px;
  }
  .shell {
    padding: 20px 18px 60px;
  }
}
@media (max-width: 680px) {
  header {
    display: block;
    padding: 25px;
    min-height: 175px;
  }
  .header-actions {
    margin-top: 20px;
    flex-wrap: wrap;
  }
  .search-card {
    grid-template-columns: 1fr 1fr;
    margin-top: -14px;
  }
  .search-card .wide {
    grid-column: 1/-1;
  }
  .metrics {
    grid-template-columns: 1fr 1fr;
  }
  .shell {
    padding: 12px 10px 45px;
  }
  .tools {
    align-items: stretch;
  }
  .tools input {
    max-width: none;
    width: 100%;
  }
  h1 {
    font-size: 31px;
  }
}

[hidden] {
  display: none !important;
}

.naive-shell {
  max-width: none;
  height: 100vh;
  padding: 20px 28px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  overflow: hidden;
}
.top-panel {
  position: relative;
  display: grid;
  grid-template-columns: minmax(260px, 1fr) auto;
  gap: 24px;
  align-items: center;
  min-height: 112px;
  padding: 18px 34px;
  border-radius: 18px;
  border: 1px solid #253d59;
  background: linear-gradient(120deg, #10192a, #172a42);
  color: #fff;
  overflow: hidden;
  flex: 0 0 auto;
}
.top-panel:after {
  content: "";
  position: absolute;
  width: 260px;
  height: 260px;
  right: 23%;
  top: -140px;
  border: 48px solid #41e6b71a;
  border-radius: 50%;
}
.top-title,
.top-actions,
.top-search {
  position: relative;
  z-index: 1;
}
.top-title h1 {
  margin: 5px 0 8px;
}
.top-actions {
  grid-column: 2;
  justify-content: flex-end;
  flex-wrap: wrap;
}
.query-summary-row {
  display: grid;
  grid-template-columns: minmax(820px, 1.35fr) minmax(520px, 0.9fr);
  gap: 10px;
  align-items: stretch;
  flex: 0 0 auto;
}
.naive-search {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) 150px 120px 120px 120px 116px;
  align-items: end;
  column-gap: 10px;
  row-gap: 0;
}
.naive-field {
  display: grid;
  gap: 7px;
  min-width: 0;
  color: #9fb7d8;
  font-size: 12px;
  font-weight: 700;
}
.keyword-field {
  min-width: 240px;
}
.naive-field .n-input,
.naive-field .n-input-number,
.naive-field .n-select,
.naive-tools .n-input,
.naive-tools .n-select {
  width: 100%;
}
.naive-tools {
  gap: 10px;
  flex: 0 0 auto;
  padding: 12px 14px;
}
.naive-tools .n-input {
  width: 250px;
}
.naive-tools .n-select {
  width: 140px;
}
.naive-table-wrap {
  padding: 0;
  overflow: hidden;
  flex: 1 1 auto;
  min-height: 240px;
}
.naive-table-wrap .n-data-table {
  height: 100%;
  --n-td-color: #0f1828 !important;
  --n-td-color-hover: #17263b !important;
  --n-th-color: #1b3049 !important;
  --n-th-text-color: #88f5dd !important;
  --n-td-text-color: #dbeafe !important;
  --n-border-color: #263a56 !important;
  --n-merged-border-color: #263a56 !important;
}
.naive-table-wrap .n-data-table-tr--checked td {
  background: #102f44 !important;
}
.naive-table-wrap .n-data-table-tr--striped td {
  background: #0f1828 !important;
}
.naive-table-wrap .n-data-table-base-table {
  min-height: 100%;
}
button.title-link,
.title-link {
  max-width: 100%;
  min-height: auto;
  height: auto;
  padding: 0;
  border: 0 !important;
  background: transparent !important;
  white-space: normal;
  text-align: left;
  color: #70aaff !important;
  font-weight: 800;
}
button.link-button,
.link-button {
  min-height: auto;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  color: #70aaff !important;
  box-shadow: none !important;
  font-weight: 700;
}
button.link-button:hover,
.link-button:hover {
  color: #66e3c0;
  transform: none;
  text-decoration: underline;
}
.n-button {
  font-weight: 700;
}
.n-button:hover {
  transform: none;
}
.naive-shell .n-input input,
.naive-shell .n-input-number input {
  height: auto;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}
.naive-shell .n-button {
  padding: 0 16px;
  border-radius: 6px;
}
.naive-search .n-input,
.naive-search .n-input-number,
.naive-search .n-select {
  --n-height: 34px !important;
  --n-color: #0b1320 !important;
  --n-color-focus: #0b1320 !important;
  --n-border: 1px solid #30445f !important;
  --n-border-hover: 1px solid #4b6383 !important;
  --n-border-focus: 1px solid #52e4bb !important;
  --n-box-shadow-focus: 0 0 0 2px #52e4bb22 !important;
}
.naive-tools .n-input,
.naive-tools .n-select {
  --n-height: 34px !important;
  --n-color: #0b1320 !important;
  --n-color-focus: #0b1320 !important;
  --n-border: 1px solid #30445f !important;
  --n-border-hover: 1px solid #4b6383 !important;
  --n-border-focus: 1px solid #52e4bb !important;
  --n-box-shadow-focus: 0 0 0 2px #52e4bb22 !important;
}
.naive-search .n-button,
.naive-tools .n-button {
  --n-height: 34px !important;
}
.naive-search .search-submit {
  width: 116px;
  padding: 0 14px !important;
}
.naive-search .search-submit .n-button__content {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 56px;
}
.naive-search .search-submit .n-button__icon {
  margin-right: 6px;
}
.metrics {
  flex: 0 0 auto;
  margin: 0;
  gap: 10px;
  height: 100%;
}
.query-summary-row .metrics article {
  height: 100%;
  min-height: 0;
  padding: 15px 16px;
}
.query-summary-row .search-card {
  height: 100%;
  margin: 0;
  padding: 15px 18px;
  border-radius: 14px;
}
.query-summary-row .hint {
  display: none;
}
.notice {
  flex: 0 0 auto;
  min-height: 18px;
  margin: 0 4px;
}
.sales-modal,
.detail-modal,
.history-modal {
  max-height: 86vh;
  overflow: hidden;
  background: #101827 !important;
  border: 1px solid #30445f !important;
}
.detail-modal .n-card__content,
.sales-modal .n-card__content,
.history-modal .n-card__content {
  max-height: calc(86vh - 72px);
  overflow-y: auto;
  overflow-x: hidden;
  min-width: 0;
}
.sales-modal .n-data-table,
.history-modal .n-data-table {
  width: 100%;
  max-width: 100%;
  min-width: 0;
}
.sales-modal .n-data-table-base-table,
.history-modal .n-data-table-base-table {
  overflow-x: hidden;
}
.sales-modal .n-data-table-table,
.history-modal .n-data-table-table {
  width: 100% !important;
  min-width: 0 !important;
  table-layout: fixed;
}
.history-modal .n-data-table-th,
.history-modal .n-data-table-td,
.sales-modal .n-data-table-th,
.sales-modal .n-data-table-td {
  overflow: hidden;
}
.dialog-product-title {
  margin: -6px 0 14px;
  color: #eaf2fb;
  font-size: 16px;
  font-weight: 800;
  line-height: 1.45;
}
.detail-content {
  display: grid;
  gap: 18px;
  width: 100%;
  min-width: 0;
  overflow: hidden;
}
.detail-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(96px, 1fr));
  gap: 10px;
  max-height: 238px;
  overflow: auto;
  padding-right: 4px;
  width: 100%;
  min-width: 0;
}
.detail-image {
  width: 100%;
  height: 112px;
  border-radius: 8px;
  overflow: hidden;
  background: #0b1220;
}
.detail-description {
  margin: 0;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  word-break: break-word;
  max-width: 100%;
  max-height: 220px;
  overflow: auto;
  line-height: 1.7;
  color: #cbd5e1;
}
.detail-modal .n-descriptions,
.detail-modal .n-descriptions-table-wrapper,
.detail-modal .n-data-table {
  width: 100%;
  max-width: 100%;
  min-width: 0;
}
.detail-modal .n-descriptions-table {
  table-layout: fixed;
  width: 100%;
}
.detail-modal .n-descriptions-table-content__content {
  overflow-wrap: anywhere;
  word-break: break-word;
}
@media (max-width: 1100px) {
  .naive-shell {
    padding: 14px;
    gap: 10px;
  }
  .top-panel {
    grid-template-columns: minmax(220px, 1fr) auto;
    min-height: 104px;
    padding: 16px 18px;
    gap: 14px;
  }
  .top-panel:after {
    right: 12%;
  }
  .top-actions {
    gap: 8px;
  }
  .profile-card {
    min-width: 176px;
  }
  .query-summary-row {
    grid-template-columns: minmax(0, 1fr) 310px;
    align-items: stretch;
  }
  .naive-search {
    grid-template-columns: minmax(220px, 1fr) 150px minmax(110px, 1fr);
    row-gap: 10px;
  }
  .keyword-field {
    min-width: 0;
  }
  .naive-search .search-submit {
    width: 100%;
  }
  .query-summary-row .metrics {
    grid-template-columns: 1fr 1fr;
  }
  .query-summary-row .metrics article {
    min-height: 0;
    padding: 11px 14px;
  }
  .query-summary-row .metrics strong {
    font-size: 26px;
  }
  .naive-tools {
    display: grid;
    grid-template-columns: 176px minmax(220px, 1fr) 140px 130px;
    align-items: center;
  }
  .naive-tools .n-input,
  .naive-tools .n-select {
    width: 100%;
  }
  .naive-table-wrap .n-data-table {
    min-width: 0;
  }
}

@media (max-width: 900px) {
  .naive-shell {
    height: 100dvh;
    padding: 10px;
  }
  .top-panel {
    grid-template-columns: 1fr;
    min-height: 0;
  }
  .top-actions {
    grid-column: 1;
    justify-content: flex-start;
  }
  .query-summary-row {
    grid-template-columns: 1fr;
  }
  .naive-search {
    grid-template-columns: 1fr 1fr;
  }
  .naive-search .search-submit {
    grid-column: 1 / -1;
  }
  .query-summary-row .metrics {
    grid-template-columns: repeat(4, minmax(110px, 1fr));
    overflow-x: auto;
  }
  .naive-tools {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .naive-tools .n-button-group,
  .naive-tools .n-input {
    grid-column: span 2;
  }
  .naive-tools .n-button,
  .naive-tools .n-select {
    width: 100%;
  }
}
