﻿.admin-body {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 260px 1fr;
  background: #f4f6f7;
  transition: grid-template-columns .2s ease;
}

.admin-body.sidebar-collapsed {
  grid-template-columns: 76px 1fr;
}

.admin-save-toast {
  position: fixed;
  top: 24px;
  right: 28px;
  z-index: 1000;
  min-width: 150px;
  padding: 14px 18px;
  border: 1px solid #b9dfcb;
  border-radius: 8px;
  background: #ecfff4;
  color: #12643a;
  font-weight: 900;
  box-shadow: 0 18px 42px rgba(16, 24, 32, .16);
  opacity: 0;
  transform: translateY(-8px);
  pointer-events: none;
  transition: opacity .18s ease, transform .18s ease;
}

.admin-save-toast.show {
  opacity: 1;
  transform: translateY(0);
}

.admin-sidebar {
  position: sticky;
  top: 0;
  z-index: 30;
  height: 100vh;
  padding: 28px;
  background: #111820;
  color: white;
  overflow: hidden;
  transition: width .2s ease, padding .2s ease;
}

.admin-sidebar .brand {
  display: block;
  margin-bottom: 44px;
  color: white;
  font-size: 30px;
  letter-spacing: 6px;
  white-space: nowrap;
  transition: font-size .2s ease, letter-spacing .2s ease;
}

.sidebar-toggle {
  position: absolute;
  top: 26px;
  right: 16px;
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border: 1px solid rgba(255, 255, 255, .2);
  border-radius: 6px;
  background: rgba(255, 255, 255, .08);
  cursor: pointer;
}

.sidebar-toggle span,
.sidebar-toggle span::before,
.sidebar-toggle span::after {
  display: block;
  width: 15px;
  height: 2px;
  border-radius: 2px;
  background: white;
}

.sidebar-toggle span::before,
.sidebar-toggle span::after {
  content: "";
  position: relative;
}

.sidebar-toggle span::before {
  top: -6px;
}

.sidebar-toggle span::after {
  top: 4px;
}

.admin-sidebar nav {
  display: grid;
  gap: 10px;
}

.admin-sidebar nav a {
  position: relative;
  display: block;
  padding: 12px 14px;
  border-radius: 4px;
  color: #d9dee3;
  font-weight: 900;
  white-space: nowrap;
}

.admin-sidebar nav a:hover {
  background: rgba(255, 255, 255, .08);
}

.admin-main {
  padding: 34px;
  min-width: 0;
}

.sidebar-collapsed .admin-sidebar {
  width: 76px;
  padding: 24px 12px;
}

.sidebar-collapsed .admin-sidebar:hover {
  width: 260px;
  padding: 28px;
  box-shadow: 18px 0 38px rgba(17, 24, 32, .18);
}

.sidebar-collapsed .admin-sidebar .brand {
  width: 38px;
  overflow: hidden;
  font-size: 26px;
  letter-spacing: 4px;
}

.sidebar-collapsed .admin-sidebar:hover .brand {
  width: auto;
  font-size: 30px;
  letter-spacing: 6px;
}

.sidebar-collapsed .admin-sidebar nav a {
  height: 48px;
  overflow: hidden;
  padding: 12px 0;
  color: transparent;
  text-align: center;
}

.sidebar-collapsed .admin-sidebar nav a::before {
  content: attr(data-short);
  display: grid;
  place-items: center;
  width: 48px;
  height: 24px;
  color: #d9dee3;
  font-size: 16px;
}

.sidebar-collapsed .admin-sidebar:hover nav a {
  padding: 12px 14px;
  color: #d9dee3;
  text-align: left;
}

.sidebar-collapsed .admin-sidebar:hover nav a::before {
  display: none;
}

.sidebar-collapsed .sidebar-toggle {
  right: 20px;
}

.sidebar-collapsed .sidebar-toggle span {
  transform: rotate(90deg);
}

.admin-hero {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  padding: 38px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: linear-gradient(110deg, #ffffff, #dfe5e8);
}

.admin-hero h1 {
  margin-bottom: 10px;
  font-size: clamp(34px, 4vw, 58px);
}

.admin-hero p {
  max-width: 680px;
  color: var(--muted);
}

.admin-metrics {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin: 22px 0;
}

.admin-filters {
  display: flex;
  align-items: end;
  gap: 12px;
  margin: 18px 0 0;
  padding: 16px 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
}

.admin-filters label {
  flex: 1 1 320px;
  max-width: 320px;
}

.apply-admin-country {
  min-width: 96px;
}

.admin-metrics article,
.admin-panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
}

.admin-metrics article {
  padding: 22px;
}

.admin-metrics span {
  display: block;
  color: var(--muted);
  font-weight: 900;
}

.admin-metrics strong {
  display: block;
  margin-top: 12px;
  font-size: 30px;
}

.admin-panel {
  margin-top: 22px;
  padding: 24px;
}

.panel-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  margin-bottom: 18px;
}

.panel-head h2 {
  margin-bottom: 0;
}

.admin-table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
}

.admin-table {
  min-width: 1120px;
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.product-table {
  min-width: 2240px;
}

.user-table {
  min-width: 1180px;
}

.order-table,
.message-table {
  min-width: 980px;
}

.admin-table th,
.admin-table td {
  padding: 10px 8px;
  vertical-align: top;
  border-color: #e7ebef;
}

.admin-table th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: #e8edf1;
  color: #24313d;
  font-size: 12px;
  line-height: 1.2;
  white-space: nowrap;
}

.admin-table input[type="text"],
.admin-table input[type="email"],
.admin-table input[type="number"],
.admin-table input[type="url"],
.admin-table select,
.admin-table textarea {
  width: 100%;
  min-width: 0;
  min-height: 34px;
  padding: 6px 8px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: white;
  font-size: 13px;
}

.admin-table select {
  padding-right: 28px;
}

.admin-table textarea {
  min-height: 42px;
  max-height: 96px;
  resize: vertical;
}

.admin-table input[type="checkbox"] {
  width: 18px;
  min-height: 18px;
}

.admin-table .button {
  min-height: 32px;
  padding: 0 10px;
  font-size: 12px;
}

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

.product-table th:nth-child(2),
.product-table td:nth-child(2),
.product-table th:nth-child(3),
.product-table td:nth-child(3),
.product-table th:nth-child(4),
.product-table td:nth-child(4),
.product-table th:nth-child(5),
.product-table td:nth-child(5) {
  width: 140px;
}

.product-table th:nth-child(6),
.product-table td:nth-child(6) {
  width: 90px;
}

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

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

.product-table th:nth-child(9),
.product-table td:nth-child(9),
.product-table th:nth-child(10),
.product-table td:nth-child(10),
.product-table th:nth-child(11),
.product-table td:nth-child(11),
.product-table th:nth-child(12),
.product-table td:nth-child(12),
.product-table th:nth-child(13),
.product-table td:nth-child(13) {
  width: 76px;
}

.product-table th:nth-child(14),
.product-table td:nth-child(14),
.product-table th:nth-child(15),
.product-table td:nth-child(15) {
  width: 280px;
}

.product-table th:nth-child(16),
.product-table td:nth-child(16) {
  width: 58px;
  text-align: center;
}

.product-table th:nth-child(17),
.product-table td:nth-child(17),
.user-table th:last-child,
.user-table td:last-child {
  width: 84px;
}

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

.user-table th:nth-child(5),
.user-table td:nth-child(5) {
  width: 150px;
  min-width: 150px;
}

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

.user-table .user-language,
.user-table .user-status {
  min-width: 112px;
}

.user-table th:nth-child(7),
.user-table td:nth-child(7),
.user-table th:nth-child(8),
.user-table td:nth-child(8) {
  width: 82px;
  text-align: center;
}

.status-pill {
  display: inline-flex;
  padding: 4px 8px;
  border-radius: 999px;
  background: #eef2f4;
  font-size: 12px;
  font-weight: 900;
}

.status-pill.paid {
  color: #11633b;
  background: #dff4e8;
}

.locked-market-field {
  display: flex;
  min-height: 42px;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #eef2f5;
  color: #18212b;
  font-weight: 900;
}

.locked-market-field span {
  color: #64717e;
  font-size: 12px;
}

.locked-market-field strong {
  font-size: 15px;
}

.locked-market-chip {
  display: inline-flex;
  min-height: 34px;
  align-items: center;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #eef2f5;
  color: #18212b;
  font-weight: 900;
  white-space: nowrap;
}

.product-editor,
.user-editor,
.site-editor {
  display: grid;
  grid-template-columns: repeat(4, minmax(160px, 1fr));
  gap: 12px;
  margin-bottom: 22px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #f6f8f9;
}

.category-editor {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 12px;
  align-items: end;
  margin-bottom: 14px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #f6f8f9;
}

.category-editor input[name="categoryName"] {
  grid-column: span 2;
}

.category-editor input[name="categoryImage"] {
  grid-column: span 3;
}

.category-editor select[name="categoryDisplaySize"] {
  grid-column: span 1;
}

.category-editor .category-size-hint {
  grid-column: span 2;
}

.category-editor .file-field {
  grid-column: span 2;
  min-width: 0;
}

.category-editor .category-active-field {
  grid-column: span 1;
}

.category-editor .button {
  grid-column: span 1;
  width: 100%;
  min-width: 0;
  white-space: nowrap;
}

.category-size-hint {
  align-self: center;
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.category-list {
  display: grid;
  gap: 10px;
  margin-bottom: 28px;
}

.category-item {
  display: grid;
  grid-template-columns: 84px minmax(150px, 1fr) minmax(220px, 1.3fr) 128px minmax(150px, .8fr) 84px 104px 104px;
  gap: 10px;
  align-items: center;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fafb;
}

.category-preview {
  width: 72px;
  height: 48px;
  object-fit: contain;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #eef2f5;
}

.category-preview.empty {
  display: grid;
  place-items: center;
  color: var(--muted);
  font-weight: 900;
  font-size: 12px;
}

.category-file-field {
  margin: 0;
  min-width: 0;
}

.category-active-field,
.category-active-row {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 42px;
  font-weight: 900;
  white-space: nowrap;
}

.category-active-field input,
.category-active-row input {
  width: 22px;
  height: 22px;
}

.category-empty {
  margin: 0 0 6px;
  padding: 14px;
  border: 1px dashed var(--line);
  border-radius: 8px;
  color: var(--muted);
}

.product-editor textarea,
.user-editor textarea {
  grid-column: span 2;
  min-height: 86px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 3px;
}

.media-input-field {
  display: grid;
  grid-column: span 2;
  grid-template-columns: minmax(0, 1fr) 140px;
  align-items: start;
  gap: 14px;
}

.product-spec-editor,
.product-sku-editor {
  display: grid;
  grid-column: 1 / -1;
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
}

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

.product-spec-head .button {
  width: 140px;
  min-width: 140px;
  min-height: 44px;
  white-space: nowrap;
}

.product-spec-head strong {
  font-size: 15px;
}

.spec-rows,
.sku-rows {
  display: grid;
  gap: 8px;
}

.spec-row,
.sku-row {
  display: grid;
  grid-template-columns: minmax(140px, .45fr) minmax(180px, 1fr) 92px;
  gap: 8px;
  align-items: center;
}

.spec-row input,
.sku-row input {
  width: 100%;
  min-height: 38px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 4px;
}

.table-spec-editor,
.table-sku-editor {
  min-width: 300px;
  padding: 8px;
  background: #f8fafb;
}

.table-spec-editor .spec-row,
.table-sku-editor .sku-row {
  grid-template-columns: minmax(90px, .45fr) minmax(120px, 1fr) 82px;
}

.spec-row .button,
.sku-row .button {
  min-width: 82px;
  min-height: 38px;
  padding: 0 12px;
  white-space: nowrap;
}

.table-spec-editor .product-spec-head strong {
  font-size: 12px;
}

.spec-readonly {
  display: grid;
  gap: 6px;
  min-width: 180px;
  max-width: 260px;
}

.spec-readonly span {
  display: grid;
  gap: 2px;
  padding: 6px;
  border: 1px solid #edf0f2;
  border-radius: 5px;
  background: #f8fafb;
  color: var(--muted);
  line-height: 1.35;
}

.spec-readonly strong {
  color: #18212b;
}

.sku-pill {
  display: inline-block;
  margin: 2px;
  padding: 4px 7px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.product-editor > input[name="stock"] + .media-input-field {
  grid-column: 1 / span 2;
}

.product-editor > input[name="stock"] + .media-input-field + .media-input-field {
  grid-column: 3 / span 2;
}

.media-input-field textarea {
  grid-column: auto;
  width: 100%;
  min-height: 44px;
  height: 44px;
  padding: 10px 12px;
  resize: vertical;
}

.upload-button,
.row-upload-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  padding: 0 16px;
  border: 1px solid #1c2630;
  border-radius: 5px;
  color: white;
  background: #1c2630;
  font-weight: 900;
  cursor: pointer;
}

.upload-button input,
.row-upload-button input {
  display: none;
}

.media-input-field .upload-button {
  width: 140px;
  min-height: 44px;
  padding: 0 14px;
}

.editable-media-list {
  grid-column: 1 / -1;
  display: grid;
  gap: 8px;
  max-height: 190px;
  overflow: auto;
}

.editable-media-item {
  display: grid;
  grid-template-columns: 54px minmax(150px, 1fr) 56px;
  align-items: center;
  gap: 8px;
  padding: 7px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: white;
}

.editable-media-item.no-media-sku {
  grid-template-columns: 54px 56px;
}

.media-sku-field {
  display: grid;
  gap: 4px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
}

.editable-media-item .media-sku-select {
  width: 100%;
  min-height: 30px;
  padding: 0 8px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: #fff;
}

.editable-media-item img,
.video-token {
  width: 54px;
  height: 38px;
  border-radius: 5px;
  background: #eef2f4;
}

.editable-media-item img {
  object-fit: contain;
}

.video-token {
  display: grid;
  place-items: center;
  color: #1c2630;
  font-size: 11px;
  font-weight: 900;
}

.editable-media-item a {
  display: none;
}

.delete-media-item {
  min-height: 28px;
  border: 1px solid #d8dee4;
  border-radius: 4px;
  background: #f6f8f9;
  color: #9b1c1c;
  font-weight: 900;
  cursor: pointer;
}

.media-empty {
  margin: 0;
  padding: 9px 10px;
  border: 1px dashed var(--line);
  border-radius: 6px;
  color: var(--muted);
  background: white;
  font-size: 12px;
}

.row-upload-button {
  width: 100%;
  min-height: 30px;
  margin-top: 6px;
  padding: 0 8px;
  font-size: 12px;
}

.product-media-editor {
  min-width: 0;
}

.product-media-editor textarea {
  display: none;
}

.product-media-editor .row-upload-button {
  margin: 0 0 8px;
}

.product-media-editor .editable-media-list {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 6px;
  max-height: 150px;
}

.product-media-editor .editable-media-item {
  position: relative;
  display: grid;
  grid-template-columns: 58px 128px;
  width: 204px;
  gap: 6px;
  padding: 4px;
  border: 1px solid #edf0f2;
  border-radius: 6px;
  background: #fff;
}

.product-media-editor .editable-media-item.no-media-sku {
  grid-template-columns: 58px;
  width: 66px;
}

.product-media-editor .editable-media-item img,
.product-media-editor .video-token {
  width: 58px;
  height: 58px;
  border: 1px solid var(--line);
  border-radius: 50%;
}

.product-media-editor .media-sku-select {
  align-self: center;
  width: 128px;
  min-height: 30px;
}

.product-media-editor .editable-media-item a {
  display: none;
}

.product-media-editor .delete-media-item {
  position: absolute;
  top: -6px;
  right: -6px;
  width: 22px;
  min-height: 22px;
  padding: 0;
  border-radius: 50%;
  color: white;
  background: #9b1c1c;
  font-size: 0;
}

.product-media-editor .delete-media-item::before {
  content: "×";
  font-size: 16px;
  line-height: 1;
}

.product-media-editor .media-empty {
  padding: 8px;
  font-size: 11px;
  line-height: 1.3;
}

.media-view-list {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  max-width: 128px;
}

.media-view-item {
  display: block;
}

.media-view-item img,
.media-view-item .video-token {
  width: 46px;
  height: 46px;
  border: 1px solid var(--line);
  border-radius: 50%;
  object-fit: contain;
}

.media-view-list strong {
  display: block;
  width: 100%;
  color: var(--muted);
  font-size: 12px;
  text-align: center;
}

.media-empty.compact {
  width: 100%;
  padding: 7px;
  text-align: center;
}

.readonly-text {
  max-width: 210px;
  overflow: hidden;
  color: #33404c;
  line-height: 1.45;
  text-overflow: ellipsis;
}

.editing-row {
  background: #fbfcfd;
}

.editing-row .product-description,
.editing-row .product-details {
  min-width: 260px;
  min-height: 132px;
  max-height: 240px;
  line-height: 1.45;
}

.site-editor {
  grid-template-columns: minmax(260px, 1fr) minmax(220px, .7fr) auto;
  align-items: end;
}

.sub-panel-head {
  margin-top: 32px;
}

.sub-panel-head h2 {
  margin: 0 0 18px;
}

.review-image-editor,
.kol-editor,
.dealer-editor,
.compare-category-editor {
  display: grid;
  grid-template-columns: minmax(320px, 1fr) minmax(220px, .8fr) auto;
  align-items: end;
  gap: 12px;
  margin-top: 22px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #f6f8f9;
}

.review-image-editor {
  grid-template-columns: repeat(12, minmax(0, 1fr));
  align-items: start;
}

.review-image-editor input[name="reviewAuthor"] {
  grid-column: 1 / 4;
  height: 46px;
}

.review-image-editor textarea[name="reviewText"] {
  grid-column: 4 / 13;
  min-height: 74px;
}

.review-image-editor .file-field {
  grid-column: span 6;
  min-height: 46px;
}

.review-image-editor .review-form-preview {
  grid-column: 1 / 11;
}

.review-image-editor .button {
  grid-column: 11 / 13;
  width: 150px;
  min-height: 46px;
  height: 46px;
  align-self: start;
  justify-self: end;
}

.review-image-editor textarea {
  min-height: 74px;
}

.compare-category-editor {
  grid-template-columns: minmax(320px, 1fr) auto;
}

.kol-auto-hint {
  align-self: center;
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.collection-editor {
  display: grid;
  gap: 14px;
  margin-top: 22px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #f6f8f9;
}

.collection-group {
  display: grid;
  gap: 10px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: white;
}

.collection-group-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.collection-group-head h3 {
  margin: 0;
  font-size: 18px;
}

.collection-product-rows {
  display: grid;
  gap: 8px;
}

.collection-product-row {
  display: grid;
  grid-template-columns: minmax(240px, 38%) minmax(0, 1fr) 96px;
  align-items: center;
  gap: 10px;
  padding: 8px;
  border: 1px solid #edf0f2;
  border-radius: 5px;
  background: #fbfcfd;
}

.collection-product-summary {
  display: grid;
  grid-template-columns: 62px 86px 66px 96px 86px minmax(150px, 1fr);
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.collection-product-summary span {
  color: var(--muted);
  font-weight: 900;
  min-width: 0;
  overflow-wrap: anywhere;
  line-height: 1.35;
}

.collection-product-summary span::before {
  display: block;
  margin-bottom: 3px;
  color: #1c2630;
  font-size: 11px;
}

.collection-product-summary span:nth-child(2)::before {
  content: "售价";
}

.collection-product-summary span:nth-child(3)::before {
  content: "折扣";
}

.collection-product-summary span:nth-child(4)::before {
  content: "划线价";
}

.collection-product-summary span:nth-child(5)::before {
  content: "国家";
}

.collection-product-summary span:nth-child(6)::before {
  content: "SKU";
}

.collection-product-thumb {
  width: 62px;
  height: 52px;
  border: 1px solid var(--line);
  border-radius: 5px;
  object-fit: contain;
  background: #eef2f4;
}

.collection-product-thumb.empty::after {
  content: "无图";
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.collection-editor .button {
  justify-self: end;
  min-width: 96px;
}

.collection-product-row > .button {
  width: 96px;
  min-width: 96px;
}

.admin-body:not(.sidebar-collapsed) .collection-product-row {
  grid-template-columns: minmax(260px, 36%) minmax(0, 1fr) 86px;
  gap: 8px;
  padding: 7px;
}

.admin-body:not(.sidebar-collapsed) .collection-product-row > .button {
  width: 86px;
  min-width: 86px;
  min-height: 40px;
  padding: 0 12px;
  font-size: 13px;
}

.admin-body:not(.sidebar-collapsed) .collection-product-select {
  min-height: 40px;
  font-size: 14px;
}

.admin-body:not(.sidebar-collapsed) .collection-product-summary {
  grid-template-columns: 52px minmax(58px, .55fr) minmax(44px, .4fr) minmax(70px, .55fr) minmax(72px, .5fr) minmax(86px, .7fr);
  gap: 7px;
}

.admin-body:not(.sidebar-collapsed) .collection-product-summary span {
  font-size: 13px;
  line-height: 1.25;
}

.admin-body:not(.sidebar-collapsed) .collection-product-summary span::before {
  margin-bottom: 2px;
  font-size: 10px;
}

.admin-body:not(.sidebar-collapsed) .collection-product-thumb {
  width: 52px;
  height: 44px;
}

.product-editor select,
.user-editor select,
.site-editor select,
.kol-editor select,
.dealer-editor select,
.compare-category-editor select,
.collection-editor select,
.admin-filters select {
  width: 100%;
  min-height: 42px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 3px;
  background: white;
}

.banner-preview-wrap {
  display: grid;
  gap: 10px;
  margin-top: 16px;
}

.banner-preview {
  aspect-ratio: 16 / 9;
  min-height: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    linear-gradient(110deg, rgba(255,255,255,.7), rgba(255,255,255,.1)),
    linear-gradient(100deg, #c8d0d7, #f3f6f7 48%, #b8c2cb);
  background-position: center;
  background-size: contain;
  background-repeat: no-repeat;
}

.banner-preview.empty::after {
  content: "暂无 Banner 图片";
  display: grid;
  place-items: center;
  min-height: 100%;
  color: var(--muted);
  font-weight: 900;
}

.banner-preview-wrap p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.banner-list,
.review-image-list,
.kol-list,
.dealer-list,
.compare-category-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
  gap: 12px;
}

.review-image-list {
  grid-template-columns: 1fr;
  margin-top: 14px;
}

.banner-item,
.review-image-item,
.kol-item,
.dealer-item,
.compare-category-item {
  display: grid;
  gap: 8px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f6f8f9;
}

.compare-category-list {
  grid-template-columns: 1fr;
  margin-top: 12px;
}

.compare-category-item {
  grid-template-columns: minmax(0, 1fr) 96px;
  align-items: center;
}

.compare-category-item strong {
  overflow-wrap: anywhere;
}

.banner-item img,
.review-image-item img,
.kol-item img,
.dealer-item img {
  width: 100%;
  aspect-ratio: 16 / 7;
  object-fit: contain;
  border-radius: 6px;
  background: white;
}

.banner-item img {
  aspect-ratio: 16 / 9;
}

.banner-item span,
.review-image-item span,
.kol-item span,
.kol-item a,
.dealer-item a {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.review-image-item {
  grid-template-columns: repeat(12, minmax(0, 1fr));
  align-items: start;
  gap: 12px;
  padding: 12px;
}

.review-admin-media {
  grid-column: 1 / 5;
}

.review-image-item .review-author {
  grid-column: 5 / 7;
}

.review-image-item .review-text {
  grid-column: 7 / 11;
}

.review-admin-actions {
  grid-column: 11 / 13;
}

.review-admin-preview {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(86px, 1fr));
  gap: 8px;
  max-height: 260px;
  overflow-y: auto;
}

.review-form-preview {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(82px, 1fr));
  gap: 8px;
  min-height: 92px;
  padding: 10px;
  border: 1px dashed var(--line);
  border-radius: 6px;
  color: var(--muted);
  background: white;
}

.review-form-preview img,
.review-form-preview video,
.review-form-preview .review-video-chip {
  width: 82px;
  height: 82px;
  border-radius: 6px;
  object-fit: contain;
}

.review-admin-media {
  display: grid;
  gap: 8px;
  align-content: start;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: white;
}

.review-admin-media .file-field {
  gap: 4px;
  min-height: 0;
  text-transform: none;
}

.review-admin-media input[type="file"] {
  width: 140px;
  font-size: 11px;
}

.review-admin-preview img,
.review-admin-preview video,
.review-video-chip {
  width: 86px;
  height: 86px;
  border-radius: 6px;
  object-fit: contain;
  background: #e9eef2;
}

.review-admin-preview video,
.review-form-preview video {
  background: #111820;
}

.review-video-chip {
  display: grid;
  place-items: center;
  color: #1c2630;
  font-size: 11px;
  font-weight: 900;
  text-decoration: none;
}

.review-image-item textarea {
  min-height: 118px;
  height: 118px;
}

.review-image-item .review-author {
  height: 46px;
  align-self: start;
}

.review-image-item .review-text {
  align-self: start;
}

.hidden-media-source {
  display: none;
}

.review-admin-actions {
  display: grid;
  align-content: center;
  gap: 8px;
}

.review-admin-actions .button {
  width: 100%;
}

@media (max-width: 1280px) {
  .review-image-editor input[name="reviewAuthor"],
  .review-image-editor textarea[name="reviewText"],
  .review-image-editor .file-field,
  .review-image-editor .review-form-preview,
  .review-image-editor .button,
  .review-admin-media,
  .review-image-item .review-author,
  .review-image-item .review-text,
  .review-admin-actions {
    grid-column: 1 / -1;
  }

  .review-image-editor .button {
    justify-self: start;
  }

  .review-admin-actions {
    grid-template-columns: repeat(2, minmax(120px, 160px));
  }
}

.kol-item img,
.kol-item iframe,
.kol-thumb-empty {
  aspect-ratio: 4 / 5;
}

.kol-item iframe {
  width: 100%;
  border: 0;
  border-radius: 6px;
  background: #eef2f4;
}

.kol-auto-thumb {
  display: grid;
}

.kol-thumb-empty {
  display: grid;
  place-items: center;
  border-radius: 6px;
  background: #eef2f4;
  color: var(--muted);
  font-weight: 900;
}

.kol-item strong,
.kol-item a {
  display: block;
  overflow-wrap: anywhere;
}

.dealer-editor {
  grid-template-columns: minmax(180px, .6fr) minmax(260px, 1fr) minmax(260px, 1fr) minmax(220px, .7fr) auto;
}

.dealer-item {
  grid-template-columns: 120px minmax(120px, .7fr) minmax(180px, 1fr) minmax(180px, 1fr) auto;
  align-items: center;
}

.dealer-item img {
  aspect-ratio: 4 / 3;
}

.dealer-actions {
  display: flex;
  gap: 8px;
}

.empty-banner-text {
  padding: 14px;
  border: 1px dashed var(--line);
  border-radius: 6px;
  background: #f6f8f9;
}

.file-field,
.active-field {
  display: grid;
  align-content: center;
  gap: 8px;
  min-height: 42px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.active-field {
  display: flex;
  align-items: center;
  color: var(--ink);
}

.active-field input {
  width: 20px;
  min-height: 20px;
}

.product-submit-area {
  grid-column: 3 / 5;
  display: grid;
  grid-template-columns: minmax(120px, .45fr) minmax(220px, 1fr);
  align-items: center;
  gap: 16px;
}

.product-submit-area .button {
  width: 100%;
}

.media-cell {
  display: grid;
  justify-items: center;
  gap: 8px;
}

.media-stack {
  align-content: start;
  gap: 5px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.media-stack a {
  display: block;
  width: 100%;
  overflow: hidden;
  color: #1c2630;
  text-overflow: ellipsis;
  white-space: nowrap;
  text-decoration: underline;
}

.media-cell img,
.admin-device-preview {
  width: 58px;
  height: 58px;
  object-fit: contain;
  border-radius: 6px;
  background: linear-gradient(180deg, #f7f9fa, #d7dde2);
}

.admin-device-preview {
  border-radius: 50%;
  background:
    radial-gradient(circle at 50% 50%, #f7fafb 0 15%, transparent 16%),
    radial-gradient(circle at 42% 38%, #ffffff, #abb4ba 58%, #4e5962 100%);
}

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

@media (max-width: 900px) {
  .admin-body {
    grid-template-columns: 1fr;
  }

  .admin-sidebar {
    position: relative;
    height: auto;
  }

  .admin-main {
    padding: 18px;
  }

  .admin-hero,
  .panel-head {
    display: grid;
  }

  .admin-metrics {
    grid-template-columns: 1fr 1fr;
  }

  .product-editor,
  .user-editor,
  .site-editor,
  .kol-editor,
  .dealer-editor,
  .compare-category-editor,
  .category-editor,
  .category-item {
    grid-template-columns: 1fr 1fr;
  }

  .category-editor > * {
    grid-column: span 1;
  }

  .product-submit-area {
    grid-column: 1 / -1;
    grid-template-columns: minmax(120px, .45fr) minmax(220px, 1fr);
  }

  .media-input-field {
    grid-template-columns: minmax(0, 1fr) 130px;
  }

  .spec-row,
  .table-spec-editor .spec-row {
    grid-template-columns: 1fr 1fr 82px;
  }

  .media-input-field .upload-button {
    width: 130px;
  }
}

@media (max-width: 560px) {
  .admin-metrics {
    grid-template-columns: 1fr;
  }

  .product-editor,
  .user-editor,
  .site-editor,
  .kol-editor,
  .dealer-editor,
  .compare-category-editor,
  .category-editor,
  .category-item,
  .product-editor textarea,
  .user-editor textarea {
    grid-template-columns: 1fr;
    grid-column: auto;
  }

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

  .media-input-field {
    grid-template-columns: 1fr;
  }

  .spec-row,
  .table-spec-editor .spec-row {
    grid-template-columns: 1fr;
  }

  .media-input-field .upload-button {
    width: 100%;
  }

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

.admin-login-body {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
  background: #f4f7f9;
}

.admin-login-card {
  width: min(460px, 100%);
  padding: 34px;
  border: 1px solid #d8e0e6;
  background: #fff;
}

.admin-login-card .brand {
  display: inline-block;
  margin-bottom: 30px;
}

.admin-login-card h1 {
  margin: 0 0 24px;
  font-size: 34px;
  letter-spacing: 0;
}

.admin-login-form {
  display: grid;
  gap: 18px;
}

.admin-login-form label {
  display: grid;
  gap: 8px;
  font-weight: 800;
}

.admin-login-form input {
  width: 100%;
  min-height: 52px;
  padding: 0 14px;
  border: 1px solid #d7dee5;
  font: inherit;
}

.admin-login-error {
  margin: 0;
  padding: 12px 14px;
  color: #9b1c1c;
  background: #fff1f1;
  border: 1px solid #efc3c3;
}

.admin-logout {
  justify-self: end;
  align-self: start;
  min-width: 120px;
}

