* { margin: 0; padding: 0; box-sizing: border-box; }

:root {
  --primary: #4F46E5;
  --primary-light: #EEF2FF;
  --orange: #F59E0B;
  --green: #10B981;
  --blue: #3B82F6;
  --red: #EF4444;
  --purple: #8B5CF6;
  --gray-50: #F9FAFB;
  --gray-100: #F3F4F6;
  --gray-200: #E5E7EB;
  --gray-300: #D1D5DB;
  --gray-500: #6B7280;
  --gray-700: #374151;
  --gray-900: #111827;
  --sidebar-w: 220px;
  --header-h: 60px;
  --radius: 8px;
  --shadow: 0 1px 3px rgba(0,0,0,.1);
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', sans-serif;
  background: var(--gray-50);
  color: var(--gray-900);
  line-height: 1.5;
}

.layout { display: flex; min-height: 100vh; }

.sidebar {
  width: var(--sidebar-w);
  background: var(--gray-900);
  color: #fff;
  position: fixed;
  top: 0; left: 0; bottom: 0;
  z-index: 100;
  display: flex;
  flex-direction: column;
}

.logo {
  height: var(--header-h);
  display: flex;
  align-items: center;
  padding: 0 20px;
  border-bottom: 1px solid rgba(255,255,255,.1);
  gap: 10px;
}
.logo-icon { font-size: 24px; }
.logo-text { font-size: 18px; font-weight: 600; }

.nav { padding: 12px 0; flex: 1; }
.nav-item {
  display: flex;
  align-items: center;
  padding: 12px 20px;
  color: var(--gray-300);
  cursor: pointer;
  transition: all .2s;
  gap: 10px;
  text-decoration: none;
  font-size: 14px;
}
.nav-item:hover { background: rgba(255,255,255,.08); color: #fff; }
.nav-item.active { background: var(--primary); color: #fff; border-radius: 0; }

.main {
  flex: 1;
  margin-left: var(--sidebar-w);
  display: flex;
  flex-direction: column;
}

.header {
  height: var(--header-h);
  background: #fff;
  border-bottom: 1px solid var(--gray-200);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  position: sticky;
  top: 0;
  z-index: 50;
}
.page-title { font-size: 18px; font-weight: 600; }
.time { color: var(--gray-500); font-size: 14px; }

.page { padding: 24px; }
.hidden { display: none !important; }

.dashboard-filter-card {
  position: relative;
  margin-bottom: 22px;
  padding: 20px 22px 14px;
  overflow: hidden;
  background: linear-gradient(135deg, #fff 0%, #fbfdff 68%, #f2f7ff 100%);
  border: 1px solid #dfe5ec;
  border-radius: 12px;
  box-shadow: 0 8px 24px rgba(15, 43, 81, .05);
}
.dashboard-filter-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 22px;
  right: 22px;
  height: 2px;
  background: linear-gradient(90deg, var(--primary), #60a5fa 58%, transparent);
  opacity: .72;
}
.dashboard-filter-main {
  display: grid;
  grid-template-columns: minmax(330px, auto) minmax(230px, 1fr) minmax(230px, 1fr) auto;
  gap: 18px;
  align-items: end;
}
.dashboard-filter-field {
  min-width: 0;
}
.dashboard-filter-label {
  display: block;
  margin: 0 0 7px 2px;
  color: #667085;
  font-size: 13px;
  font-weight: 600;
  line-height: 1;
}
.dashboard-range-tabs {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  padding: 4px;
  background: #f4f6f8;
  border: 1px solid #d9dee5;
  border-radius: 10px;
}
.dashboard-range-btn {
  min-width: 72px;
  height: 42px;
  padding: 0 14px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #475467;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: color .18s ease, background .18s ease, box-shadow .18s ease, transform .18s ease;
}
.dashboard-range-btn:hover:not(.active) {
  color: var(--primary);
  background: rgba(255,255,255,.72);
}
.dashboard-range-btn.active {
  color: #fff;
  background: var(--primary);
  box-shadow: 0 4px 12px rgba(79, 70, 229, .26);
}
.dashboard-range-btn:active { transform: translateY(1px); }
.dashboard-time-input {
  width: 100%;
  height: 50px;
  padding: 0 14px;
  color: #344054;
  background: #fff;
  border: 1px solid #cfd6df;
  border-radius: 10px;
  font: inherit;
  font-size: 14px;
  font-variant-numeric: tabular-nums;
  outline: none;
  transition: border-color .18s ease, box-shadow .18s ease;
}
.dashboard-time-input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(79, 70, 229, .11);
}
.dashboard-filter-actions {
  display: flex;
  gap: 10px;
}
.dashboard-action-btn {
  height: 50px;
  min-width: 74px;
  padding: 0 18px;
  border-radius: 10px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}
.dashboard-action-btn:hover:not(:disabled) { transform: translateY(-1px); }
.dashboard-action-btn:disabled { opacity: .55; cursor: wait; }
.dashboard-query-btn {
  color: #344054;
  background: #fff;
  border: 1px solid #cfd6df;
}
.dashboard-query-btn:hover:not(:disabled) {
  color: var(--primary);
  border-color: var(--primary);
  box-shadow: 0 4px 12px rgba(15, 43, 81, .08);
}
.dashboard-refresh-btn {
  color: #fff;
  background: var(--primary);
  border: 1px solid var(--primary);
  box-shadow: 0 5px 14px rgba(79, 70, 229, .23);
}
.dashboard-refresh-icon {
  display: inline-block;
  margin-right: 5px;
  font-size: 18px;
  line-height: 0;
  vertical-align: -1px;
}
.dashboard-refresh-btn.is-loading .dashboard-refresh-icon {
  animation: dashboardRefreshSpin .7s linear infinite;
}
@keyframes dashboardRefreshSpin { to { transform: rotate(360deg); } }
.dashboard-period {
  display: block;
  min-height: 18px;
  margin-top: 10px;
  padding-left: 2px;
  font-size: 13px;
  color: var(--gray-500);
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 16px;
}
.stat-card {
  background: #fff;
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow);
  border-left: 4px solid var(--primary);
}
.stat-card.orange { border-left-color: var(--orange); }
.stat-card.blue { border-left-color: var(--blue); }
.stat-card.green { border-left-color: var(--green); }
.stat-card.purple { border-left-color: var(--purple); }
.stat-card.red { border-left-color: var(--red); }
.stat-value { font-size: 28px; font-weight: 700; color: var(--gray-900); }
.stat-label { font-size: 14px; color: var(--gray-500); margin-top: 4px; }

.toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
  flex-wrap: wrap;
  gap: 12px;
}
.toolbar-left { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.toolbar-right { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.page-size-label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--gray-600);
  white-space: nowrap;
}
.page-size-label .select { width: 72px; }
.pagination-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 16px;
  flex-wrap: wrap;
  gap: 12px;
}
.pagination-info {
  font-size: 13px;
  color: var(--gray-500);
}
.pagination-bar .pagination { margin-top: 0; }

.input {
  height: 36px;
  padding: 0 12px;
  border: 1px solid var(--gray-300);
  border-radius: 6px;
  font-size: 14px;
  outline: none;
  transition: border-color .2s;
  background: #fff;
}
.input:focus { border-color: var(--primary); }
.input.full { width: 100%; }
.select { min-width: 120px; }

.btn {
  height: 36px;
  padding: 0 16px;
  border: 1px solid var(--gray-300);
  border-radius: 6px;
  background: #fff;
  font-size: 14px;
  cursor: pointer;
  transition: all .2s;
  white-space: nowrap;
}
.btn:hover { background: var(--gray-50); }
.btn-primary {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}
.btn-primary:hover { opacity: .9; }
.btn-sm { height: 28px; padding: 0 10px; font-size: 12px; }
.btn-danger { color: var(--red); border-color: var(--red); }
.btn-danger:hover { background: #FEF2F2; }
.btn-warning { color: #D97706; border-color: #D97706; }
.btn-warning:hover { background: #FFFBEB; }
.btn-success { color: var(--green); border-color: var(--green); }
.btn-success:hover { background: #F0FDF4; }
.btn-blue { color: var(--blue); border-color: var(--blue); }
.btn-blue:hover { background: #EFF6FF; }
.btn-pin { color: var(--primary); border-color: var(--primary); }
.btn-pin:hover { background: var(--primary-light); }

.table-wrap {
  background: #fff;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow-x: auto;
}
.table { width: 100%; border-collapse: collapse; font-size: 14px; }
.table th {
  text-align: left;
  padding: 12px 16px;
  background: var(--gray-50);
  color: var(--gray-500);
  font-weight: 500;
  border-bottom: 1px solid var(--gray-200);
  white-space: nowrap;
}
.table td {
  padding: 12px 16px;
  border-bottom: 1px solid var(--gray-100);
  vertical-align: middle;
}
.table tr:hover td { background: var(--gray-50); }

.table .thumb {
  width: 50px;
  height: 50px;
  object-fit: cover;
  border-radius: 6px;
  background: var(--gray-100);
  content-visibility: auto;
  contain-intrinsic-size: 50px 50px;
}
.table .actions { display: flex; gap: 6px; }

.badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 10px;
  font-size: 12px;
  font-weight: 500;
}
.badge-pending { background: #FEF3C7; color: #92400E; }
.badge-paid { background: #FEE2E2; color: #991B1B; }
.badge-shipped { background: #DBEAFE; color: #1E40AF; }
.badge-completed { background: #D1FAE5; color: #065F46; }
.badge-cancelled { background: var(--gray-100); color: var(--gray-500); }
.badge-refunding { background: #FEF3C7; color: #92400E; }
.badge-refunded { background: #FDE68A; color: #78350F; }

.pagination {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 16px;
}
.pagination button {
  width: 32px; height: 32px;
  border: 1px solid var(--gray-300);
  border-radius: 6px;
  background: #fff;
  cursor: pointer;
  font-size: 13px;
}
.pagination button.active {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}
.pagination button:disabled { opacity: .4; cursor: not-allowed; }

.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 20px;
}
.modal {
  background: #fff;
  border-radius: 12px;
  width: 100%;
  max-width: 600px;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  box-shadow: 0 20px 60px rgba(0,0,0,.2);
}
#productModal .modal { max-width: 980px; }
.modal-sm { max-width: 440px; }
.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 20px;
  border-bottom: 1px solid var(--gray-200);
}
.modal-header h3 { font-size: 16px; }
.modal-close {
  width: 32px; height: 32px;
  border: none; background: none;
  font-size: 20px; cursor: pointer;
  border-radius: 6px;
  color: var(--gray-500);
}
.modal-close:hover { background: var(--gray-100); }
.modal-body {
  padding: 20px;
  overflow-y: auto;
  flex: 1;
}
.modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  padding: 16px 20px;
  border-top: 1px solid var(--gray-200);
}

.radio-group {
  display: flex;
  gap: 20px;
  align-items: center;
}
.radio-option {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  color: var(--gray-700);
  cursor: pointer;
}
.radio-option input[type="radio"] {
  accent-color: var(--primary);
  width: 16px;
  height: 16px;
}
.input-addon-group {
  display: flex;
  align-items: stretch;
  max-width: 320px;
}
.input-addon-group .input-addon {
  display: flex;
  align-items: center;
  padding: 0 12px;
  background: var(--gray-100);
  border: 1px solid var(--gray-300);
  font-size: 13px;
  color: var(--gray-600);
  white-space: nowrap;
}
.input-addon-group .input-addon:first-child {
  border-right: none;
  border-radius: 6px 0 0 6px;
}
.input-addon-group .input-addon:last-child {
  border-left: none;
  border-radius: 0 6px 6px 0;
}
.input-addon-group .input {
  flex: 1;
  border-radius: 0;
  text-align: center;
}

.shipping-template-modal { max-width: 720px; }
.shipping-rules-container { display: flex; flex-direction: column; gap: 12px; }
.shipping-rule-card {
  border: 1px solid var(--gray-200);
  border-radius: 8px;
  padding: 14px;
  background: #fafafa;
}
.shipping-rule-card .rule-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}
.shipping-rule-card .rule-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--gray-700);
}
.shipping-rule-grid {
  display: grid;
  grid-template-columns: 1fr repeat(4, minmax(72px, 1fr));
  gap: 8px;
  align-items: end;
}
.shipping-rule-grid .rule-field label {
  display: block;
  font-size: 12px;
  color: var(--gray-500);
  margin-bottom: 4px;
}
.shipping-rule-grid .rule-field .input { width: 100%; }
.region-picker-btn {
  width: 100%;
  text-align: left;
  min-height: 36px;
  padding: 8px 12px;
  border: 1px solid var(--gray-300);
  border-radius: 6px;
  background: #fff;
  font-size: 13px;
  color: var(--gray-700);
  cursor: pointer;
}
.region-picker-btn.placeholder { color: var(--gray-400); }
.region-picker-btn:hover { border-color: var(--primary); }
.btn-link-add {
  margin-top: 8px;
  border: none;
  background: none;
  color: var(--primary);
  font-size: 13px;
  cursor: pointer;
  padding: 0;
}
.btn-link-add:hover { text-decoration: underline; }
.btn-text-danger {
  border: none;
  background: none;
  color: var(--red);
  font-size: 12px;
  cursor: pointer;
}
.region-picker-toolbar {
  display: flex;
  gap: 8px;
  margin-bottom: 12px;
}
.region-picker-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  max-height: 320px;
  overflow-y: auto;
}
.region-picker-item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--gray-700);
  cursor: pointer;
  padding: 4px 2px;
}
.region-picker-item input { accent-color: var(--primary); }
.shipping-template-preview {
  margin-top: 8px;
  padding: 10px 12px;
  background: var(--gray-50, #f9fafb);
  border: 1px solid var(--gray-200);
  border-radius: 6px;
  font-size: 12px;
  color: var(--gray-600);
  line-height: 1.6;
}
.shipping-template-preview strong { color: var(--gray-800); }

.form-row { margin-bottom: 16px; }
.form-row label {
  display: block;
  font-size: 13px;
  font-weight: 500;
  color: var(--gray-700);
  margin-bottom: 6px;
}
.form-row .required { color: var(--red); }
.form-text { font-size: 14px; color: var(--gray-700); padding: 6px 0; }

.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.four-col { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
@media (max-width: 900px) {
  .four-col { grid-template-columns: repeat(2, 1fr); }
}

.upload-area { }
.upload-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 8px 14px;
  border: 1px dashed var(--gray-300);
  border-radius: 6px;
  cursor: pointer;
  font-size: 13px;
  color: var(--gray-500);
  transition: all .2s;
}
.upload-btn:hover { border-color: var(--primary); color: var(--primary); }
.upload-btn input[type=file] { display: none; }

.upload-preview {
  margin-bottom: 8px;
}
.upload-preview img {
  width: 100px; height: 100px;
  object-fit: cover;
  border-radius: 6px;
  border: 1px solid var(--gray-200);
}
.upload-previews {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 8px;
}
.upload-previews .preview-item {
  position: relative;
}
.upload-previews img {
  width: 80px; height: 80px;
  object-fit: cover;
  border-radius: 6px;
  border: 1px solid var(--gray-200);
}
.upload-previews .remove-img {
  position: absolute;
  top: -6px; right: -6px;
  width: 18px; height: 18px;
  background: var(--red);
  color: #fff;
  border: none;
  border-radius: 50%;
  font-size: 11px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}
.preview-item-uploading {
  position: relative;
}
.preview-uploading-img {
  opacity: 0.55;
}
.preview-uploading-mask {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.45);
  border-radius: 6px;
}
.preview-uploading-mask .spinner {
  width: 18px; height: 18px;
  border: 2px solid var(--gray-300);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin .8s linear infinite;
}
.upload-preview .preview-item-uploading img {
  width: 100px; height: 100px;
  object-fit: cover;
  border-radius: 6px;
  border: 1px solid var(--gray-200);
}

.order-detail-section {
  margin-bottom: 20px;
}
.order-detail-section h4 {
  font-size: 14px;
  color: var(--gray-500);
  margin-bottom: 8px;
  padding-bottom: 6px;
  border-bottom: 1px solid var(--gray-100);
}
.detail-row {
  display: flex;
  padding: 6px 0;
  font-size: 14px;
}
.detail-label {
  width: 80px;
  color: var(--gray-500);
  flex-shrink: 0;
}
.detail-value { color: var(--gray-900); }

.admin-tracking-actions {
  display: flex;
  justify-content: flex-end;
  margin: 6px 0 8px;
}
.admin-tracking-package {
  padding: 8px 0;
  border-bottom: 1px solid var(--gray-100);
}
.admin-tracking-package:last-child {
  border-bottom: none;
}
.admin-tracking-result {
  background: var(--gray-50);
  border: 1px solid var(--gray-200);
  border-radius: 8px;
  padding: 10px 12px;
  margin-top: 8px;
}
.admin-tracking-summary {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  margin-bottom: 10px;
}
.admin-tracking-number {
  font-family: monospace;
  color: var(--gray-600);
}
.admin-tracking-taketime {
  color: var(--gray-500);
}
.admin-tracking-timeline {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.admin-tracking-trace {
  display: flex;
  align-items: flex-start;
  gap: 8px;
}
.admin-tracking-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--gray-300);
  margin-top: 5px;
  flex-shrink: 0;
}
.admin-tracking-trace.active .admin-tracking-dot {
  background: var(--primary);
}
.admin-tracking-trace-body {
  flex: 1;
  min-width: 0;
}
.admin-tracking-desc {
  font-size: 13px;
  color: var(--gray-900);
  line-height: 1.5;
}
.admin-tracking-time {
  font-size: 12px;
  color: var(--gray-500);
  margin-top: 2px;
}
.admin-tracking-loading,
.admin-tracking-empty,
.admin-tracking-error {
  font-size: 13px;
  color: var(--gray-500);
}
.admin-tracking-error {
  color: var(--red);
}

.order-items-list { }
.order-item-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 0;
  border-bottom: 1px solid var(--gray-100);
}
.order-item-row img {
  width: 50px; height: 50px;
  object-fit: cover;
  border-radius: 6px;
}
.order-item-info { flex: 1; }
.order-item-title { font-size: 14px; }
.order-item-meta { font-size: 12px; color: var(--gray-500); }

/* Order shipping info cell */
.order-shipping-info {
  display: flex;
  align-items: flex-start;
  gap: 8px;
}
.order-shipping-text {
  flex: 1;
  min-width: 0;
}
.order-shipping-name {
  font-size: 13px;
  line-height: 1.4;
  word-break: break-all;
}
.order-shipping-addr {
  font-size: 12px;
  color: var(--gray-500);
  line-height: 1.5;
  margin-top: 2px;
  word-break: break-all;
}
.order-detail-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 8px;
}
.order-detail-section-head h4 {
  margin-bottom: 0;
}

/* Order list inline product images */
.order-items-preview {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.order-item-inline {
  display: flex;
  align-items: center;
  gap: 10px;
}
.order-item-inline img {
  object-fit: cover;
  border-radius: 6px;
  border: 1px solid var(--gray-200);
  flex-shrink: 0;
  content-visibility: auto;
}
.order-item-inline-info {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}
.order-item-inline-title {
  font-size: 13px;
  color: var(--gray-700);
  font-weight: 500;
  word-break: break-all;
  line-height: 1.4;
}
.order-item-inline-qty {
  font-size: 12px;
  color: var(--gray-500);
  white-space: nowrap;
}

/* Order actions two rows */
.actions-two-row {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.actions-row {
  display: flex;
  gap: 4px;
}

.empty-state {
  text-align: center;
  padding: 60px 20px;
  color: var(--gray-500);
}
.empty-state .empty-icon { font-size: 48px; margin-bottom: 12px; }

.toast {
  position: fixed;
  top: 20px;
  right: 20px;
  padding: 12px 20px;
  border-radius: 8px;
  background: var(--gray-900);
  color: #fff;
  font-size: 14px;
  z-index: 2000;
  animation: slideIn .3s ease;
  box-shadow: 0 10px 30px rgba(0,0,0,.2);
}
.toast.success { background: var(--green); }
.toast.error { background: var(--red); }

@keyframes slideIn {
  from { transform: translateX(100%); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}

.video-mode-tabs {
  display: flex;
  gap: 0;
  margin-bottom: 12px;
  border: 1px solid var(--gray-300);
  border-radius: 6px;
  overflow: hidden;
  width: fit-content;
}
.tab-btn {
  padding: 6px 16px;
  border: none;
  background: #fff;
  font-size: 13px;
  cursor: pointer;
  color: var(--gray-500);
  transition: all .2s;
}
.tab-btn:not(:last-child) { border-right: 1px solid var(--gray-300); }
.tab-btn.active {
  background: var(--primary);
  color: #fff;
}
.tab-btn:hover:not(.active) { background: var(--gray-50); }

.video-preview { margin-bottom: 8px; }
.video-preview video {
  max-width: 320px;
  max-height: 200px;
  border-radius: 6px;
  border: 1px solid var(--gray-200);
  background: #000;
}
.video-preview video.video-preview-portrait {
  max-width: 180px;
  max-height: 320px;
}
.video-preview video.video-preview-landscape {
  max-width: 320px;
  max-height: 200px;
}
.video-vod-meta {
  margin-top: 6px;
  font-size: 12px;
  color: var(--gray-500);
  word-break: break-all;
}

.video-poster-empty {
  width: 120px;
  height: 80px;
  border: 1px dashed var(--gray-300);
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  color: var(--gray-500);
  background: var(--gray-50);
}

#videoPosterRow.hidden {
  display: none;
}

.pdv-detail-video-cover {
  position: relative;
  overflow: hidden;
  border-radius: 6px;
  background: #000;
}
.pdv-detail-video-cover.landscape { height: 120px; }
.pdv-detail-video-cover.portrait { height: 200px; }
.pdv-detail-video-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.85;
}
.pdv-detail-video-play {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 12px;
  font-weight: 600;
  background: rgba(0, 0, 0, 0.35);
}

.upload-hint {
  font-size: 12px;
  color: var(--gray-500);
  margin-top: 6px;
}

.url-input-row {
  display: flex;
  gap: 8px;
  align-items: center;
}
.url-input-row .input { flex: 1; }

.video-uploading {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px;
  background: var(--gray-50);
  border-radius: 6px;
  font-size: 13px;
  color: var(--gray-700);
}
.video-uploading-vod {
  max-width: 360px;
  align-items: flex-start;
}
.video-upload-body {
  flex: 1;
  min-width: 0;
}
.video-upload-progress {
  height: 6px;
  margin-top: 8px;
  overflow: hidden;
  border-radius: 999px;
  background: var(--gray-200);
}
.video-upload-progress span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--primary);
  transition: width .2s;
}
.video-uploading .spinner {
  width: 18px; height: 18px;
  border: 2px solid var(--gray-300);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin .8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ========== Template card list ========== */
.showcase-card {
  background: #fff;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  margin-bottom: 16px;
  overflow: hidden;
}
.showcase-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 20px;
  border-bottom: 1px solid var(--gray-100);
}
.showcase-card-header h4 {
  font-size: 15px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.showcase-card-header .sc-meta {
  font-size: 12px;
  color: var(--gray-500);
  font-weight: 400;
}
.showcase-card-actions {
  display: flex;
  gap: 6px;
  align-items: center;
}
.showcase-card-body {
  padding: 16px 20px;
}

.sc-empty {
  text-align: center;
  padding: 40px 20px;
  color: var(--gray-500);
  font-size: 14px;
}

.es-item {
  background: #fff;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
  padding: 14px 16px;
  cursor: grab;
  transition: all .2s;
  display: flex;
  align-items: flex-start;
  gap: 12px;
}
.es-item:hover { box-shadow: 0 2px 8px rgba(0,0,0,.08); border-color: var(--primary); }
.es-item.dragging { opacity: .4; }
.es-drag { color: var(--gray-300); font-size: 18px; cursor: grab; padding-top: 2px; user-select: none; }
.es-body { flex: 1; min-width: 0; }
.es-header { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; }
.es-type-badge {
  font-size: 11px; padding: 2px 8px;
  background: var(--primary-light); color: var(--primary);
  border-radius: 4px; font-weight: 600;
  white-space: nowrap;
}
.es-title { font-size: 14px; font-weight: 500; color: var(--gray-700); }
.es-summary {
  font-size: 12px; color: var(--gray-500); line-height: 1.5;
  display: flex; flex-wrap: wrap; gap: 6px; align-items: center;
}
.es-summary-img {
  width: 36px; height: 36px;
  border-radius: 4px; border: 1px solid var(--gray-200);
  object-fit: cover; vertical-align: middle;
}
.es-summary-tag {
  background: var(--gray-100); padding: 1px 6px; border-radius: 3px;
  font-size: 11px; color: var(--gray-700);
}
.es-actions { display: flex; gap: 4px; flex-shrink: 0; padding-top: 2px; }

.es-add-btn {
  display: flex; align-items: center; justify-content: center;
  padding: 14px; border: 2px dashed var(--gray-300);
  border-radius: var(--radius); color: var(--gray-500);
  cursor: pointer; font-size: 14px; font-weight: 500;
  transition: all .2s; margin-top: 4px;
}
.es-add-btn:hover {
  border-color: var(--primary); color: var(--primary); background: var(--primary-light);
}

/* ========== Phone Preview ========== */
.phone-preview-wrap { text-align: center; }
.phone-frame {
  width: 320px;
  height: 580px;
  border: 3px solid var(--gray-900);
  border-radius: 32px;
  overflow: hidden;
  background: #FFF9E6;
  display: flex;
  flex-direction: column;
  box-shadow: 0 8px 30px rgba(0,0,0,.15);
  position: relative;
}
.phone-notch {
  width: 120px; height: 24px;
  background: var(--gray-900);
  border-radius: 0 0 14px 14px;
  margin: 0 auto;
  position: relative; z-index: 2;
}
.phone-header {
  background: #FF6B35;
  padding: 6px 16px 10px;
  text-align: center;
  margin-top: -2px;
}
.phone-header-title {
  color: #fff; font-size: 14px; font-weight: 600;
}
.phone-screen {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
}
.phone-screen::-webkit-scrollbar { width: 0; }
.phone-empty {
  display: flex; align-items: center; justify-content: center;
  height: 100%; color: var(--gray-500); font-size: 13px;
}
.preview-hint {
  font-size: 12px; color: var(--gray-500); margin-top: 10px;
}

/* ========== Product Picker ========== */
.picker-list { max-height: 400px; overflow-y: auto; }
.picker-item {
  display: flex; align-items: center; gap: 12px;
  padding: 10px; border-bottom: 1px solid var(--gray-100);
  cursor: pointer; transition: background .2s;
}
.picker-item:hover { background: var(--primary-light); }
.picker-item img {
  width: 44px; height: 44px;
  border-radius: 6px; object-fit: cover; background: var(--gray-100);
}
.picker-item-info { flex: 1; min-width: 0; }
.picker-item-title { font-size: 13px; color: var(--gray-900); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.picker-item-meta { font-size: 12px; color: var(--gray-500); }
.picker-item-price { color: var(--red); font-weight: 600; font-size: 14px; white-space: nowrap; }
.picker-item-id { font-size: 11px; color: var(--gray-500); background: var(--gray-100); padding: 1px 6px; border-radius: 3px; }

/* Inline image preview for config forms */
.cfg-img-preview {
  display: inline-block; margin-top: 6px;
}
.cfg-img-preview img {
  width: 60px; height: 60px; object-fit: cover;
  border-radius: 4px; border: 1px solid var(--gray-200);
}

/* ========== Reviews ========== */
.review-stats-card {
  background: #fff;
  border: 1px solid var(--gray-200);
  border-radius: 8px;
  padding: 16px;
  margin-bottom: 16px;
}
.review-stats-card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 12px;
}
.review-stats-card-header h4 {
  margin: 0 0 4px;
  font-size: 15px;
  color: var(--gray-800);
}
.review-stats-hint {
  margin: 0;
  font-size: 12px;
  color: var(--gray-500);
}
.review-stats-toggle {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--gray-700);
  white-space: nowrap;
  cursor: pointer;
}
.review-stats-form.disabled {
  opacity: 0.55;
  pointer-events: none;
}
.review-stats-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 12px;
}
.field-hint {
  font-size: 11px;
  color: var(--gray-500);
  margin-top: 4px;
}
.review-stars { color: #FFB800; font-size: 14px; letter-spacing: 1px; }
.review-thumb {
  width: 36px; height: 36px; object-fit: cover;
  border-radius: 4px; border: 1px solid var(--gray-200);
  margin-right: 2px; vertical-align: middle;
  content-visibility: auto;
  contain-intrinsic-size: 36px 36px;
}
.review-media { display: flex; align-items: center; gap: 2px; flex-wrap: nowrap; }
.review-more {
  font-size: 11px; color: var(--gray-500); background: var(--gray-100);
  border-radius: 4px; padding: 2px 6px; white-space: nowrap;
}
.review-video-tag {
  display: inline-block; font-size: 11px; color: #fff; background: var(--primary);
  border-radius: 3px; padding: 1px 6px; margin-left: 4px; white-space: nowrap;
}

.star-select { display: flex; gap: 4px; align-items: center; padding-top: 8px; }
.star-item {
  font-size: 24px; color: var(--gray-300); cursor: pointer;
  transition: color 0.15s; user-select: none;
}
.star-item.active { color: #FFB800; }
.star-item:hover { color: #FFC940; }

.review-spec-options {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  min-height: 36px;
}
.review-spec-option {
  padding: 8px 14px;
  border: 1px solid var(--gray-300);
  border-radius: 6px;
  background: #fafafa;
  color: var(--gray-800);
  font-size: 13px;
  line-height: 1.4;
  cursor: pointer;
  transition: border-color 0.15s, color 0.15s, background 0.15s;
}
.review-spec-option:hover {
  border-color: var(--primary);
  color: var(--primary);
}
.review-spec-option.selected {
  border-color: var(--primary);
  background: #fff3e8;
  color: var(--primary);
  font-weight: 600;
}
.review-spec-empty {
  font-size: 13px;
  color: var(--gray-500);
}

@media (max-width: 768px) {
  .sidebar { width: 60px; }
  .logo-text, .nav-item span:not(.nav-icon) { display: none; }
  .main { margin-left: 60px; }
  .nav-item { justify-content: center; padding: 14px; }
  .stats-grid { grid-template-columns: 1fr 1fr; }
  .dashboard-filter-card { padding: 18px 14px 12px; }
  .dashboard-filter-main { grid-template-columns: 1fr; gap: 14px; }
  .dashboard-filter-actions { width: 100%; }
  .dashboard-action-btn { flex: 1; }
  .dashboard-range-btn { min-width: 0; padding: 0 8px; font-size: 14px; }
  .hp-editor-layout {
    flex-direction: column;
  }
}

@media (min-width: 769px) and (max-width: 1280px) {
  .dashboard-filter-main {
    grid-template-columns: minmax(310px, 1.1fr) minmax(220px, 1fr) minmax(220px, 1fr);
  }
  .dashboard-filter-actions { grid-column: 3; justify-self: end; }
}

/* ========== SKU/规格管理 ========== */
.sku-toolbar {
  display: flex;
  gap: 8px;
  margin-bottom: 10px;
}
.sku-list {
  border: 1px solid var(--gray-200);
  border-radius: 8px;
  overflow-x: auto;
  overflow-y: hidden;
}
.sku-empty {
  padding: 20px;
  text-align: center;
  color: var(--gray-500);
  font-size: 13px;
}
.sku-table-header,
.sku-item-edit {
  display: grid;
  grid-template-columns: 82px minmax(120px, 1fr) 60px 88px 88px 80px 44px 60px;
  gap: 8px;
  align-items: center;
  padding: 10px 12px;
  min-width: 820px;
}
.sku-image-cell {
  position: relative;
  width: 70px;
  min-height: 70px;
}
.sku-image-upload {
  width: 70px;
  height: 70px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  overflow: hidden;
  color: #98a2b3;
  background: #fbfcfe;
  border: 2px dashed #c9d0da;
  border-radius: 10px;
  cursor: pointer;
  transition: border-color .18s ease, color .18s ease, background .18s ease, transform .18s ease;
}
.sku-image-upload:hover {
  color: var(--primary);
  background: var(--primary-light);
  border-color: var(--primary);
  transform: translateY(-1px);
}
.sku-image-upload.has-image {
  padding: 0;
  border-style: solid;
  border-width: 1px;
  background: #fff;
}
.sku-image-upload input { display: none; }
.sku-image-upload img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}
.sku-image-plus {
  font-size: 28px;
  font-weight: 300;
  line-height: 1;
}
.sku-image-caption {
  font-size: 11px;
  white-space: nowrap;
}
.sku-image-remove {
  position: absolute;
  top: -7px;
  right: -7px;
  width: 20px;
  height: 20px;
  padding: 0;
  color: #fff;
  background: #ef4444;
  border: 2px solid #fff;
  border-radius: 50%;
  box-shadow: 0 2px 6px rgba(15, 23, 42, .22);
  font-size: 14px;
  line-height: 15px;
  cursor: pointer;
}
.sku-image-spinner {
  width: 20px;
  height: 20px;
  border: 2px solid #d8defc;
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: dashboardRefreshSpin .7s linear infinite;
}
.sku-default-cell {
  display: flex;
  align-items: center;
  justify-content: center;
}
.sku-default-cell input[type="checkbox"] {
  width: 16px;
  height: 16px;
  cursor: pointer;
}
.sku-table-header {
  background: var(--gray-50);
  border-bottom: 1px solid var(--gray-200);
  font-size: 12px;
  font-weight: 600;
  color: var(--gray-600);
}
.sku-item-edit {
  border-bottom: 1px solid var(--gray-100);
  transition: background 0.15s;
}
.sku-item-edit:last-child {
  border-bottom: none;
}
.sku-item-edit:hover {
  background: var(--gray-50);
}
.sku-input-spec {
  min-width: 0;
}
.sku-input-font-size,
.sku-input-price,
.sku-input-original-price,
.sku-input-stock {
  min-width: 0;
}

/* Product sorting & top */
#productList tr[draggable="true"] {
  transition: background 0.15s, box-shadow 0.15s;
}
#productList tr.dragging {
  opacity: 0.5;
  background: var(--gray-100);
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}
#productList tr.product-row-top {
  background: var(--primary-light);
  box-shadow: inset 3px 0 0 rgba(79, 70, 229, 0.28);
}
#productList tr.product-row-top:hover {
  background: #E0E7FF;
}
.drag-handle:hover {
  color: var(--primary) !important;
}
.sort-order-input:focus {
  outline: none;
  border-color: var(--primary) !important;
  box-shadow: 0 0 0 2px rgba(255, 107, 53, 0.15);
}
.product-sort-hint {
  display: flex;
  align-items: center;
  gap: 8px;
}
.btn-warning {
  background: #F59E0B;
  color: #fff;
  border: none;
}
.btn-warning:hover {
  background: #D97706;
}

/* ========== User Center / Distribution ========== */
.uc-tabs {
  display: flex;
  gap: 0;
  border-bottom: 2px solid var(--gray-200);
  margin-bottom: 20px;
}
.uc-tab {
  padding: 10px 20px;
  font-size: 14px;
  font-weight: 500;
  border: none;
  background: none;
  color: var(--gray-500);
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  transition: all .2s;
}
.uc-tab:hover { color: var(--primary); }
.uc-tab.active {
  color: var(--primary);
  border-bottom-color: var(--primary);
}

.uc-panel { }

.uc-desc-card {
  background: #fff;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 20px 24px;
  margin-top: 20px;
}
.uc-desc-card h4 {
  font-size: 15px;
  margin-bottom: 12px;
  color: var(--gray-700);
}
.uc-desc-card ul {
  padding-left: 20px;
  list-style: disc;
}
.uc-desc-card li {
  font-size: 14px;
  color: var(--gray-500);
  line-height: 2;
}
.uc-desc-card li strong {
  color: var(--primary);
}

.uc-summary-row {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  margin-bottom: 20px;
}
.uc-storage-card,
.uc-points-card {
  background: #fff;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 24px;
  flex: 1 1 280px;
  max-width: 600px;
  min-width: 280px;
}
.uc-points-hint {
  font-size: 13px;
  color: var(--gray-500);
}
.uc-points-value-wrap {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin: 8px 0 4px;
}
.uc-points-value {
  font-size: 36px;
  font-weight: 700;
  line-height: 1.1;
  color: var(--primary);
}
.uc-points-unit {
  font-size: 14px;
  color: var(--gray-500);
}
.uc-points-expire {
  margin: 8px 0 0;
  font-size: 13px;
  color: var(--gray-600);
}
.uc-invite-field {
  margin-top: 16px;
}
.uc-invite-field label {
  display: block;
  font-size: 13px;
  color: var(--gray-600);
  margin-bottom: 8px;
}
.uc-invite-copy-row {
  display: flex;
  gap: 8px;
  align-items: center;
}
.uc-invite-copy-row .input {
  flex: 1;
}
.uc-invite-hint {
  margin: 12px 0 0;
  font-size: 13px;
  color: var(--gray-500);
  text-align: center;
}

/* 我的邀请：客服微信 + 定制广告并排 */
.uc-invitation-contact-card {
  max-width: 720px;
}
.uc-invitation-contact-row {
  display: flex;
  gap: 20px;
  align-items: stretch;
}
.uc-invitation-wechat-col {
  flex: 0 0 240px;
}
.uc-invitation-wechat-col .wechat-image-preview {
  width: 100%;
}
.uc-custom-dev-ad {
  flex: 1;
  min-width: 0;
  position: relative;
  padding: 20px 18px 18px;
  border-radius: var(--radius);
  background: linear-gradient(145deg, #EEF2FF 0%, #F5F3FF 48%, #FFF7ED 100%);
  border: 1px solid #C7D2FE;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8);
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.uc-custom-dev-ad::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  border-radius: var(--radius) var(--radius) 0 0;
  background: linear-gradient(90deg, var(--primary), var(--purple), var(--orange));
}
.uc-custom-dev-ad-badge {
  display: inline-flex;
  align-self: flex-start;
  align-items: center;
  padding: 3px 10px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--primary);
  background: rgba(255, 255, 255, 0.85);
  border: 1px solid #C7D2FE;
  border-radius: 999px;
  margin-bottom: 12px;
}
.uc-custom-dev-ad-title {
  margin: 0 0 8px;
  font-size: 16px;
  font-weight: 700;
  line-height: 1.4;
  color: var(--gray-900);
}
.uc-custom-dev-ad-desc {
  margin: 0 0 14px;
  font-size: 13px;
  line-height: 1.6;
  color: var(--gray-600);
}
.uc-custom-dev-ad-tags {
  list-style: none;
  margin: 0 0 14px;
  padding: 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.uc-custom-dev-ad-tags li {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 10px;
  font-size: 13px;
  font-weight: 500;
  color: var(--gray-700);
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(199, 210, 254, 0.6);
  border-radius: 6px;
}
.uc-custom-dev-ad-icon {
  font-size: 15px;
  line-height: 1;
}
.uc-custom-dev-ad-cta {
  margin: 0;
  padding: 10px 12px;
  font-size: 12px;
  line-height: 1.5;
  color: #4338CA;
  text-align: center;
  background: rgba(255, 255, 255, 0.9);
  border: 1px dashed #A5B4FC;
  border-radius: 6px;
}
@media (max-width: 680px) {
  .uc-invitation-contact-row {
    flex-direction: column;
    align-items: center;
  }
  .uc-invitation-wechat-col {
    flex: none;
    width: 100%;
    max-width: 240px;
  }
  .uc-custom-dev-ad {
    width: 100%;
  }
}
.uc-storage-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}
.uc-storage-header h4 {
  font-size: 16px;
  margin: 0;
  color: var(--gray-900);
}
.uc-storage-remaining {
  font-size: 13px;
  color: var(--gray-500);
}
.uc-storage-bar-wrap {
  display: flex;
  align-items: center;
  gap: 12px;
}
.uc-storage-bar-bg {
  flex: 1;
  height: 10px;
  background: var(--gray-100);
  border-radius: 5px;
  overflow: hidden;
}
.uc-storage-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, #FF8C42, #FF4D00);
  border-radius: 5px;
  transition: width 0.3s ease;
}
.uc-storage-bar-fill.warning {
  background: linear-gradient(90deg, #FFB020, #FF8C00);
}
.uc-storage-bar-fill.full {
  background: linear-gradient(90deg, #FF6B6B, #EE4444);
}
.uc-storage-percent {
  font-size: 13px;
  color: var(--gray-600);
  min-width: 42px;
  text-align: right;
}
.uc-storage-detail {
  margin: 12px 0 0;
  font-size: 13px;
  color: var(--gray-500);
}
.uc-storage-card.warning {
  border: 1px solid #FFD591;
  background: #FFFBF0;
}
.uc-storage-warning {
  margin: 12px 0 0;
  padding: 10px 12px;
  font-size: 13px;
  line-height: 1.5;
  color: #D46B08;
  background: #FFF7E6;
  border: 1px solid #FFD591;
  border-radius: 6px;
}

.uc-settings-card {
  background: #fff;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 24px;
  max-width: 600px;
}
.uc-settings-card h4 {
  font-size: 16px;
  margin-bottom: 8px;
  color: var(--gray-900);
}
.uc-settings-desc {
  font-size: 13px;
  color: var(--gray-500);
  margin-bottom: 16px;
}
.uc-feature-note {
  margin-top: 14px;
  padding: 12px 14px;
  border: 1px solid #B7EB8F;
  border-radius: 6px;
  background: #F6FFED;
  color: #3F6600;
  font-size: 13px;
  line-height: 1.7;
}

.uc-audit-prep-card {
  max-width: 520px;
}
.uc-audit-prep-list {
  margin: 0 0 16px 20px;
  font-size: 14px;
  color: var(--gray-700);
  line-height: 1.8;
}
.uc-audit-prep-list strong {
  color: var(--gray-900);
}
.uc-audit-prep-warning {
  font-size: 13px;
  color: #D97706;
  background: #FFFBEB;
  border: 1px solid #FDE68A;
  border-radius: 6px;
  padding: 10px 12px;
  margin-bottom: 16px;
}
.uc-audit-prep-alert {
  font-size: 14px;
  font-weight: 600;
  color: #DC2626;
  background: #FEF2F2;
  border: 2px solid #FCA5A5;
  border-radius: 8px;
  padding: 12px 14px;
  margin-bottom: 16px;
  line-height: 1.6;
}

.wechat-image-preview {
  width: 240px;
  min-height: 240px;
  border: 2px dashed var(--gray-300);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background: var(--gray-50);
}
.wechat-image-preview img {
  width: 100%;
  height: auto;
  display: block;
}
.wechat-image-empty {
  color: var(--gray-500);
  font-size: 13px;
  text-align: center;
  padding: 20px;
}

.user-cell {
  display: flex;
  align-items: center;
  gap: 8px;
}
.user-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  object-fit: cover;
  background: var(--gray-100);
}
.user-avatar-placeholder {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--gray-100);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
}

/* ========== Display Settings ========== */
.img-size-selector {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  margin-top: 12px;
}
.img-size-option {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 12px 16px;
  border: 2px solid var(--gray-200);
  border-radius: 8px;
  cursor: pointer;
  transition: all .2s;
}
.img-size-option:hover {
  border-color: var(--primary);
  background: var(--primary-light);
}
.img-size-option:has(input:checked) {
  border-color: var(--primary);
  background: var(--primary-light);
  box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}
.img-size-option input[type="radio"] {
  display: none;
}
.img-size-option span {
  font-size: 12px;
  color: var(--gray-700);
  font-weight: 500;
}
.img-size-demo {
  background: var(--gray-200);
  border-radius: 4px;
  border: 1px dashed var(--gray-400);
}
.img-size-preview-box {
  background: var(--gray-100);
  border: 2px dashed var(--primary);
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--gray-500);
  font-size: 12px;
  margin-top: 8px;
  transition: all .3s ease;
}

/* 合并发货 */
.merge-hint {
  background: #fffbeb;
  border: 1px solid #fbbf24;
  border-radius: 8px;
  padding: 10px 12px;
  margin-bottom: 10px;
  font-size: 14px;
  color: #92400e;
}
.merge-order-item {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 8px 10px;
  background: var(--gray-50);
  border: 1px solid var(--gray-200);
  border-radius: 6px;
  margin-bottom: 6px;
  cursor: pointer;
  transition: background .15s;
}
.merge-order-item:hover {
  background: var(--gray-100);
}
.merge-order-item input[type="checkbox"] {
  margin-top: 3px;
  flex-shrink: 0;
}
.merge-order-info {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 12px;
  font-size: 13px;
}
.merge-order-no {
  font-family: monospace;
  color: var(--gray-700);
}
.merge-order-price {
  color: var(--red);
  font-weight: 600;
}
.merge-order-items {
  color: var(--gray-500);
  font-size: 12px;
  width: 100%;
}

/* ========== Homepage Template Management ========== */
.hp-tabs {
  display: flex;
  gap: 4px;
  margin-bottom: 16px;
  border-bottom: 1px solid var(--gray-200);
  padding-bottom: 0;
}
.hp-tab {
  padding: 8px 20px;
  font-size: 14px;
  border: none;
  background: none;
  cursor: pointer;
  color: var(--gray-500);
  border-bottom: 2px solid transparent;
  transition: all .2s;
}
.hp-tab.active {
  color: var(--primary);
  border-bottom-color: var(--primary);
  font-weight: 600;
}
.hp-tab:hover { color: var(--primary); }
.hp-panel { }
.hp-panel.hidden { display: none; }

/* Homepage help cards */
.hp-help-card {
  background: linear-gradient(135deg, #f0f7ff 0%, #fff 100%);
  border: 1px solid #dbeafe;
  border-radius: 12px;
  padding: 20px 24px;
  margin-bottom: 16px;
}
.hp-help-card-ab {
  background: linear-gradient(135deg, #f0fdf4 0%, #fff 100%);
  border-color: #bbf7d0;
}
.hp-help-card h4 {
  font-size: 15px;
  font-weight: 600;
  color: var(--gray-800);
  margin: 0 0 10px;
}
.hp-help-intro {
  font-size: 14px;
  color: var(--gray-600);
  line-height: 1.7;
  margin: 0 0 16px;
}
.hp-help-intro strong {
  color: var(--primary);
}
.hp-starter-recipe {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin: 0 0 16px;
  padding: 18px 20px;
  color: #fff;
  background: linear-gradient(125deg, #172033 0%, #283956 72%, #344968 100%);
  border: 1px solid #425879;
  border-radius: 10px;
  box-shadow: 0 10px 24px rgba(23, 32, 51, .14);
}
.hp-starter-copy { min-width: 0; }
.hp-starter-kicker {
  display: block;
  margin-bottom: 5px;
  color: #facc15;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .08em;
}
.hp-starter-copy > strong { font-size: 18px; }
.hp-starter-copy > p { margin: 6px 0 0; color: #cbd5e1; font-size: 12px; line-height: 1.65; }
.hp-starter-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.hp-starter-tags span {
  padding: 4px 8px;
  color: #e2e8f0;
  background: rgba(255, 255, 255, .08);
  border: 1px solid rgba(255, 255, 255, .12);
  border-radius: 999px;
  font-size: 10px;
}
.hp-starter-action { flex: 0 0 auto; min-height: 38px; }
.hp-help-steps {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 12px;
}
.hp-help-step {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  background: #fff;
  border-radius: 8px;
  padding: 12px 14px;
  border: 1px solid var(--gray-200);
}
.hp-help-step-num {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.hp-help-step strong {
  display: block;
  font-size: 13px;
  color: var(--gray-800);
  margin-bottom: 2px;
}
.hp-help-step span {
  font-size: 12px;
  color: var(--gray-500);
  line-height: 1.5;
}
.hp-help-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 14px;
  margin-bottom: 14px;
}
.hp-help-block {
  background: #fff;
  border-radius: 8px;
  padding: 14px 16px;
  border: 1px solid var(--gray-200);
}
.hp-help-block h5 {
  font-size: 13px;
  font-weight: 600;
  color: var(--gray-700);
  margin: 0 0 8px;
}
.hp-help-block ul {
  margin: 0;
  padding-left: 18px;
  list-style: disc;
}
.hp-help-block li {
  font-size: 12px;
  color: var(--gray-500);
  line-height: 1.8;
}
.hp-help-block li strong {
  color: var(--primary);
}
.hp-help-tip {
  font-size: 13px;
  color: #166534;
  background: #dcfce7;
  border-radius: 8px;
  padding: 10px 14px;
  line-height: 1.6;
}
.hp-help-tip strong {
  color: #15803d;
}

/* AB test summary & legend */
.hp-ab-summary {
  border-radius: 10px;
  padding: 12px 16px;
  font-size: 13px;
  line-height: 1.7;
  margin-bottom: 16px;
}
.hp-ab-summary-warn {
  background: #fffbeb;
  border: 1px solid #fde68a;
  color: #92400e;
}
.hp-ab-summary-info {
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  color: #1e40af;
}
.hp-ab-summary-success {
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  color: #166534;
}
.hp-ab-legend {
  margin-top: 20px;
  background: var(--gray-50);
  border-radius: 10px;
  padding: 16px 20px;
  border: 1px solid var(--gray-200);
}
.hp-ab-legend h5 {
  font-size: 13px;
  font-weight: 600;
  color: var(--gray-600);
  margin: 0 0 10px;
}
.hp-ab-legend-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 6px 20px;
  font-size: 12px;
  color: var(--gray-500);
  line-height: 1.8;
}
.hp-ab-legend-grid strong {
  color: var(--gray-700);
}
.ab-stat-best {
  border-color: #22c55e;
  box-shadow: 0 0 0 1px #22c55e;
}
.ab-best-badge {
  display: inline-block;
  font-size: 11px;
  font-weight: 600;
  color: #fff;
  background: #22c55e;
  border-radius: 4px;
  padding: 1px 6px;
  vertical-align: middle;
  margin-left: 4px;
}
.ab-stat-note {
  margin-top: 10px;
  font-size: 11px;
  color: var(--gray-400);
  text-align: center;
}
.ab-metric {
  cursor: help;
}

/* Product list in editor */
.hp-prod-list {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.hp-prod-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  background: #fff;
  border: 1px solid var(--gray-200);
  border-radius: 8px;
  cursor: grab;
  transition: box-shadow .15s, background .15s;
}
.hp-prod-item:hover {
  box-shadow: 0 2px 8px rgba(0,0,0,.06);
  background: var(--gray-50);
}
.hp-prod-item.dragging {
  opacity: .4;
  box-shadow: 0 4px 12px rgba(0,0,0,.12);
}
.hp-prod-drag {
  color: var(--gray-400);
  cursor: grab;
  font-size: 14px;
  user-select: none;
}
.hp-prod-order {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--gray-100);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 600;
  color: var(--gray-500);
  flex-shrink: 0;
}
.hp-prod-img {
  width: 56px;
  height: 56px;
  border-radius: 6px;
  object-fit: cover;
  flex-shrink: 0;
}
.hp-prod-info {
  flex: 1;
  min-width: 0;
}
.hp-prod-title {
  font-size: 14px;
  font-weight: 500;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.hp-prod-meta {
  display: flex;
  gap: 12px;
  font-size: 12px;
  color: var(--gray-500);
  margin-top: 4px;
}

/* AB Test Stats */
.ab-stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 16px;
}
.ab-stat-card {
  background: #fff;
  border: 1px solid var(--gray-200);
  border-radius: 12px;
  padding: 16px;
  transition: box-shadow .2s;
}
.ab-stat-card:hover {
  box-shadow: 0 4px 12px rgba(0,0,0,.06);
}
.ab-stat-disabled {
  opacity: .6;
}
.ab-stat-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 14px;
}
.ab-stat-header h4 {
  font-size: 15px;
  font-weight: 600;
  margin: 0;
}
.ab-stat-body {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 6px;
  margin-bottom: 14px;
}
.ab-metric {
  text-align: center;
  padding: 8px 4px;
  background: var(--gray-50);
  border-radius: 8px;
}
.ab-metric-value {
  font-size: 18px;
  font-weight: 700;
  color: var(--gray-800);
}
.ab-metric-label {
  font-size: 11px;
  color: var(--gray-500);
  margin-top: 2px;
}
.ab-stat-rates {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.ab-rate {
  display: flex;
  align-items: center;
  gap: 8px;
}
.ab-rate-label {
  font-size: 12px;
  color: var(--gray-500);
  width: 42px;
  flex-shrink: 0;
}
.ab-rate-bar {
  flex: 1;
  height: 8px;
  background: var(--gray-100);
  border-radius: 4px;
  overflow: hidden;
}
.ab-rate-fill {
  height: 100%;
  border-radius: 4px;
  transition: width .3s;
}
.ab-rate-value {
  font-size: 13px;
  font-weight: 600;
  width: 48px;
  text-align: right;
}

/* Homepage Editor - Two Part Layout */
.hp-editor-layout {
  display: flex;
  gap: 24px;
  align-items: flex-start;
}
.hp-editor-left {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.preview-modal {
  max-width: 400px;
}
.preview-modal-body {
  padding: 20px;
  display: flex;
  justify-content: center;
}
.hp-editor-part {
  background: #fff;
  border-radius: 10px;
  border: 1px solid var(--gray-200);
  overflow: hidden;
}
.hp-part-header {
  padding: 16px 20px;
  background: var(--gray-50);
  border-bottom: 1px solid var(--gray-200);
  display: flex;
  align-items: center;
  gap: 12px;
}
.hp-part-header h4 {
  margin: 0;
  font-size: 15px;
  font-weight: 600;
}
.hp-part-desc {
  font-size: 12px;
  color: var(--gray-500);
}
.hp-section-list {
  padding: 12px;
  min-height: 80px;
}
.hp-remaining-preview {
  padding: 12px;
}
.hp-marquee-config {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
  padding: 12px;
  background: var(--gray-50);
  border-radius: 8px;
  border: 1px solid var(--gray-200);
}
.hp-marquee-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--gray-700);
  flex-shrink: 0;
}
.hp-marquee-config .input {
  flex: 1;
  min-width: 200px;
}
.hp-remaining-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.hp-remaining-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px;
  background: var(--gray-50);
  border-radius: 8px;
  border: 1px solid var(--gray-100);
}
.hp-remaining-item img {
  width: 48px;
  height: 48px;
  border-radius: 6px;
  object-fit: cover;
  flex-shrink: 0;
}
.hp-remaining-info {
  flex: 1;
  min-width: 0;
}
.hp-remaining-title {
  font-size: 13px;
  color: #333;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Section product list in editor */
.hp-sec-prod-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-top: 6px;
}
.hp-sec-prod-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px 6px;
  background: var(--gray-50);
  border-radius: 6px;
  font-size: 12px;
}
.hp-sec-prod-item img {
  width: 32px;
  height: 32px;
  border-radius: 4px;
  object-fit: cover;
  flex-shrink: 0;
  content-visibility: auto;
  contain-intrinsic-size: 32px 32px;
}
.hp-sec-prod-name {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--gray-700);
}
.hp-sec-prod-price {
  color: var(--red);
  font-weight: 600;
  flex-shrink: 0;
}
/* Homepage phone preview inner elements */
.hpv-banner {
  width: 100%;
  height: 100px;
  background: linear-gradient(135deg, #FF8C42, #FF4D00);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 11px;
  font-weight: 600;
}
.hpv-banner img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.hpv-sec-header { padding: 8px 10px 4px; }
.hpv-sec-title { font-size: 12px; font-weight: 700; color: #FF4D00; }
.hpv-sec-sub { font-size: 9px; color: #999; margin-top: 2px; }

.hpv-two-col {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 0 8px 6px;
}
.hpv-two-col-item {
  width: calc(50% - 3px);
  background: #fff;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 1px 4px rgba(0,0,0,.06);
}
.hpv-two-col-item img { width: 100%; height: 72px; object-fit: cover; }
.hpv-prod-info { padding: 6px; }
.hpv-prod-title {
  font-size: 9px;
  color: #333;
  line-height: 1.3;
  height: 24px;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}
.hpv-prod-price { font-size: 11px; font-weight: 700; color: #FF4D00; margin-top: 2px; }
.hpv-prod-old { font-size: 8px; color: #999; text-decoration: line-through; margin-left: 4px; }
.hpv-prod-sold { font-size: 8px; color: #999; margin-top: 2px; }

.hpv-waterfall {
  display: flex;
  gap: 6px;
  padding: 0 8px 6px;
}
.hpv-waterfall-col { flex: 1; display: flex; flex-direction: column; gap: 6px; }
.hpv-waterfall-card {
  background: #fff;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 1px 4px rgba(0,0,0,.06);
}
.hpv-waterfall-card img { width: 100%; height: 60px; object-fit: cover; }

.hpv-single-card { padding: 0 8px 6px; }
.hpv-single-item {
  background: #fff;
  border-radius: 10px;
  overflow: hidden;
  margin-bottom: 6px;
  box-shadow: 0 2px 6px rgba(0,0,0,.08);
}
.hpv-single-item img { width: 100%; height: 90px; object-fit: cover; }
.hpv-single-body { padding: 8px; }
.hpv-single-title { font-size: 11px; font-weight: 700; color: #222; line-height: 1.3; }

/* single-large-image preview */
.hpv-single-large-image { padding: 0 8px 6px; }
.hpv-single-large-item {
  position: relative;
  margin-bottom: 8px;
  border-radius: 8px;
  overflow: hidden;
}
.hpv-single-large-item img { width: 100%; display: block; border-radius: 8px; }
.hpv-single-large-item.has-link { cursor: pointer; }
.hpv-single-large-link-badge {
  position: absolute;
  bottom: 8px;
  right: 8px;
  background: rgba(0,0,0,.55);
  color: #fff;
  font-size: 9px;
  padding: 2px 6px;
  border-radius: 4px;
}

/* section image config form */
.hp-img-list { display: flex; flex-direction: column; gap: 10px; }
.hp-img-item {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 10px;
  background: var(--gray-50);
  border: 1px solid var(--gray-200);
  border-radius: 8px;
}

.hpv-three-col {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  padding: 0 8px 6px;
}
.hpv-three-col-item {
  width: calc(33.33% - 3px);
  background: #fff;
  border-radius: 6px;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(0,0,0,.05);
}
.hpv-three-col-item img { width: 100%; height: 48px; object-fit: cover; }
.hpv-three-col-name {
  font-size: 8px;
  color: #333;
  padding: 3px 4px 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.hpv-three-col-price {
  font-size: 9px;
  color: #FF4D00;
  font-weight: 600;
  padding: 2px 4px 6px;
}

.hpv-big-small { padding: 0 8px 6px; }
.hpv-big-small-main { position: relative; border-radius: 8px; overflow: hidden; margin-bottom: 6px; }
.hpv-big-small-main img { width: 100%; height: 90px; object-fit: cover; }
.hpv-big-small-overlay {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  padding: 8px;
  background: linear-gradient(transparent, rgba(0,0,0,.6));
}
.hpv-big-small-name { color: #fff; font-size: 11px; font-weight: 700; }
.hpv-big-small-price { color: #FFD54F; font-size: 12px; font-weight: 700; }
.hpv-big-small-grid { display: flex; flex-wrap: wrap; gap: 4px; }
.hpv-big-small-sub {
  width: calc(50% - 2px);
  background: #fff;
  border-radius: 6px;
  overflow: hidden;
}
.hpv-big-small-sub img { width: 100%; height: 48px; object-fit: cover; }

.hpv-immersive { padding: 0 6px 6px; }
.hpv-immersive-item { position: relative; margin-bottom: 4px; border-radius: 6px; overflow: hidden; }
.hpv-immersive-item img { width: 100%; height: 110px; object-fit: cover; }
.hpv-immersive-tag {
  position: absolute;
  bottom: 6px; right: 6px;
  background: rgba(0,0,0,.5);
  color: #FFD54F;
  font-size: 9px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 10px;
}

.hpv-shelf { margin-bottom: 6px; }
.hpv-shelf-cat { padding: 6px 10px 4px; font-size: 10px; font-weight: 600; color: #333; border-left: 3px solid #FF4D00; margin-left: 8px; padding-left: 8px; }
.hpv-shelf-scroll {
  display: flex;
  gap: 6px;
  padding: 0 8px 6px;
  overflow-x: auto;
}
.hpv-shelf-scroll::-webkit-scrollbar { height: 0; }
.hpv-shelf-item {
  flex-shrink: 0;
  width: 70px;
  background: #fff;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 1px 4px rgba(0,0,0,.06);
}
.hpv-shelf-item img { width: 70px; height: 70px; object-fit: cover; }

.hpv-remaining-header {
  display: flex;
  align-items: center;
  padding: 8px 10px 4px;
  gap: 8px;
}
.hpv-marquee-bar {
  display: flex;
  align-items: center;
  margin: 6px 8px;
  height: 24px;
  background: linear-gradient(135deg, #FFF8F3, #FFE8D6);
  border: 1px solid #FFD4B0;
  border-radius: 12px;
  overflow: hidden;
}
.hpv-marquee-icon {
  flex-shrink: 0;
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #FF8C42, #FF4D00);
  border-radius: 12px 0 0 12px;
  font-size: 11px;
}
.hpv-marquee-track {
  flex: 1;
  overflow: hidden;
  height: 24px;
}
.hpv-marquee-content {
  display: inline-flex;
  align-items: center;
  height: 24px;
  white-space: nowrap;
  animation: hpv-marquee-scroll linear infinite;
  font-size: 9px;
  color: #D4380D;
  font-weight: 500;
}
.hpv-marquee-gap {
  display: inline-block;
  width: 32px;
}
@keyframes hpv-marquee-scroll {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}
.hpv-remaining-tag {
  background: linear-gradient(135deg, #FF8C42, #FF4D00);
  color: #fff;
  font-size: 8px;
  padding: 2px 8px;
  border-radius: 10px;
}

.hpv-legacy-list { padding: 0 8px 6px; }
.hpv-legacy-single {
  display: flex;
  background: #fff;
  border-radius: 8px;
  overflow: hidden;
  margin-bottom: 6px;
  box-shadow: 0 1px 4px rgba(0,0,0,.06);
}
.hpv-legacy-single img { width: 72px; height: 72px; object-fit: cover; flex-shrink: 0; }
.hpv-legacy-single-info { flex: 1; padding: 8px; }

.hp-sec-prod-remove {
  width: 20px;
  height: 20px;
  border: none;
  background: transparent;
  color: var(--gray-400);
  cursor: pointer;
  font-size: 12px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: all .15s;
}
.hp-sec-prod-remove:hover {
  background: #fee2e2;
  color: var(--red);
}

/* Product detail phone preview */
.pdv-page {
  background: #F5F5F5;
  min-height: 100%;
  padding-bottom: 52px;
}
.pdv-swiper {
  position: relative;
  width: 100%;
  height: 200px;
  background: #fff;
  overflow: hidden;
}
.pdv-swiper img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.pdv-swiper-empty,
.pdv-empty-media {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  color: #999;
  font-size: 12px;
  background: #fff;
}
.pdv-swiper-video-badge,
.pdv-gif-badge {
  position: absolute;
  top: 8px;
  right: 8px;
  font-size: 9px;
  color: #fff;
  padding: 2px 6px;
  border-radius: 4px;
  font-weight: 600;
}
.pdv-swiper-video-badge { background: rgba(0, 120, 215, 0.85); }
.pdv-gif-badge { background: rgba(255, 77, 0, 0.85); }
.pdv-swiper-video img { opacity: 0.85; }
.pdv-thumbs {
  display: flex;
  gap: 4px;
  padding: 6px 8px;
  background: #fff;
  overflow-x: auto;
}
.pdv-thumbs::-webkit-scrollbar { height: 0; }
.pdv-thumb {
  position: relative;
  width: 36px;
  height: 36px;
  border-radius: 4px;
  overflow: hidden;
  flex-shrink: 0;
  border: 2px solid transparent;
}
.pdv-thumb.active { border-color: #FF4D00; }
.pdv-thumb img { width: 100%; height: 100%; object-fit: cover; }
.pdv-thumb-tag {
  position: absolute;
  bottom: 1px;
  right: 1px;
  font-size: 7px;
  color: #fff;
  background: rgba(0, 0, 0, 0.55);
  padding: 0 2px;
  border-radius: 2px;
}
.pdv-thumb-tag.gif { background: rgba(255, 77, 0, 0.85); }
.pdv-thumb-more {
  width: 36px;
  height: 36px;
  border-radius: 4px;
  background: #f0f0f0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  color: #666;
  flex-shrink: 0;
}
.pdv-price-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  padding: 10px 10px 6px;
  background: #fff;
}
.pdv-price { color: #FF4D00; font-weight: 700; }
.pdv-price-symbol { font-size: 11px; }
.pdv-price-value { font-size: 18px; }
.pdv-price-suffix { font-size: 11px; margin-left: 2px; }
.pdv-original-price {
  font-size: 10px;
  color: #999;
  text-decoration: line-through;
}
.pdv-title-block {
  padding: 0 10px 10px;
  background: #fff;
  margin-bottom: 6px;
}
.pdv-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-bottom: 6px;
}
.pdv-tag {
  font-size: 8px;
  padding: 2px 6px;
  border-radius: 4px;
  color: #fff;
  display: inline-flex;
  align-items: center;
  gap: 2px;
}
.pdv-tag-video { background: #0078D7; }
.pdv-tag-gif { background: #FF4D00; color: #fff; }
.pdv-tag-cat { background: #FF6B35; }
.pdv-tag-dot {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: #fff;
}
.pdv-title {
  font-size: 12px;
  font-weight: 700;
  color: #222;
  line-height: 1.4;
  margin-bottom: 6px;
}
.pdv-hot-bar-wrap {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 4px;
}
.pdv-hot-label { font-size: 9px; color: #999; white-space: nowrap; }
.pdv-hot-bar {
  flex: 1;
  height: 4px;
  background: #f0f0f0;
  border-radius: 2px;
  overflow: hidden;
}
.pdv-hot-fill {
  height: 100%;
  border-radius: 2px;
}
.pdv-hot-fill.fire { background: linear-gradient(90deg, #FF2D2D, #FF6B35); }
.pdv-hot-fill.hot { background: linear-gradient(90deg, #FF6B35, #FFAA33); }
.pdv-hot-fill.warm { background: linear-gradient(90deg, #FFAA33, #FFD54F); }
.pdv-hot-fill.normal { background: #ccc; }
.pdv-hot-value { font-size: 10px; font-weight: 600; }
.pdv-stats { font-size: 9px; color: #999; }
.pdv-spec {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px;
  background: #fff;
  margin-bottom: 6px;
  font-size: 11px;
}
.pdv-spec-label { color: #999; }
.pdv-spec-value { flex: 1; color: #333; }
.pdv-spec-arrow { color: #ccc; }
.pdv-detail {
  background: #fff;
  margin-bottom: 6px;
}
.pdv-detail-header {
  padding: 8px 10px;
  font-size: 11px;
  font-weight: 600;
  color: #333;
  border-bottom: 1px solid #f0f0f0;
}
.pdv-detail-item {
  position: relative;
}
.pdv-detail-item img {
  width: 100%;
  display: block;
}
.pdv-detail-video {
  height: 80px;
  background: #111;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-size: 11px;
}
.pdv-detail-gif {
  position: absolute;
  bottom: 6px;
  left: 6px;
  font-size: 8px;
  color: #fff;
  background: rgba(255, 77, 0, 0.85);
  padding: 2px 6px;
  border-radius: 4px;
}
.pdv-footer {
  position: sticky;
  bottom: 0;
  display: flex;
  gap: 8px;
  padding: 8px 10px;
  background: #fff;
  border-top: 1px solid #f0f0f0;
  margin-top: 6px;
}
.pdv-footer-btn {
  flex: 1;
  text-align: center;
  padding: 8px 0;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 600;
}
.pdv-footer-btn.cart {
  background: #FFF3E0;
  color: #FF6B35;
  border: 1px solid #FF6B35;
}
.pdv-footer-btn.buy {
  background: linear-gradient(135deg, #FF6B35, #FF4D00);
  color: #fff;
}

/* Toggle switch */
.switch-label {
  position: relative;
  display: inline-block;
  width: 44px;
  height: 24px;
  cursor: pointer;
}
.switch-label input {
  opacity: 0;
  width: 0;
  height: 0;
}
.switch-slider {
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: var(--gray-300);
  border-radius: 24px;
  transition: background 0.2s;
}
.switch-slider::before {
  content: '';
  position: absolute;
  width: 18px;
  height: 18px;
  left: 3px;
  bottom: 3px;
  background: #fff;
  border-radius: 50%;
  transition: transform 0.2s;
}
.switch-label input:checked + .switch-slider {
  background: var(--primary, #4F46E5);
}
.switch-label input:checked + .switch-slider::before {
  transform: translateX(20px);
}

.admin-user-info {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-right: 16px;
}
.admin-username {
  font-size: 13px;
  font-weight: 600;
  color: var(--gray-700);
}
.role-badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 10px;
  font-size: 11px;
  font-weight: 600;
  line-height: 1.4;
}
.badge-admin {
  background: #EEF2FF;
  color: var(--primary);
}
.badge-operator {
  background: #ECFDF5;
  color: var(--green);
}

.password-field {
  position: relative;
}
.password-field .input,
.password-field .login-input {
  padding-right: 40px;
}
.password-toggle {
  position: absolute;
  right: 4px;
  top: 50%;
  transform: translateY(-50%);
  width: 32px;
  height: 32px;
  border: none;
  background: transparent;
  cursor: pointer;
  color: var(--gray-500);
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
  padding: 0;
  transition: color .2s, background .2s;
}
.password-toggle:hover {
  color: var(--gray-700);
  background: var(--gray-100);
}
.password-toggle:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 1px;
}
.password-icon {
  display: block;
  flex-shrink: 0;
}
.password-icon-hide {
  display: none;
}
.password-toggle.is-visible .password-icon-show {
  display: none;
}
.password-toggle.is-visible .password-icon-hide {
  display: block;
}

/* 快递查询额度 */
.tracking-quota-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 72px;
}
.tracking-quota-num {
  font-size: 28px;
  font-weight: 700;
  color: var(--primary);
  line-height: 1.2;
}
.tracking-quota-label {
  font-size: 12px;
  color: var(--gray-500);
  margin-top: 4px;
}
.tracking-quota-bar-wrap {
  width: 100%;
  max-width: 360px;
}
.tracking-quota-bar-bg {
  height: 8px;
  background: var(--gray-100);
  border-radius: 4px;
  overflow: hidden;
}
.tracking-quota-bar-fill {
  height: 100%;
  background: var(--primary);
  border-radius: 4px;
  transition: width .4s ease;
}

/* 投诉管理 */
.complaint-config-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 18px;
}
.complaint-config-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 20px 22px;
  background: #fff;
  border: 1px solid var(--gray-200);
  border-radius: 10px;
  box-shadow: 0 2px 10px rgba(15, 23, 42, .04);
}
.complaint-config-card h4 {
  margin: 0 0 7px;
  color: var(--gray-800);
  font-size: 15px;
}
.complaint-config-card p {
  margin: 0;
  color: var(--gray-500);
  font-size: 12px;
  line-height: 1.6;
}
.complaint-config-card .switch-label { flex: 0 0 auto; }
.complaint-config-card .switch-label:has(input:disabled),
.complaint-user-visibility-row .switch-label:has(input:disabled) { cursor: not-allowed; opacity: .55; }
.complaint-toolbar { align-items: flex-start; }
.complaint-filter-row { flex-wrap: wrap; }
.complaint-filter-row input[type="date"] { width: 145px; }
.complaint-date-separator { align-self: center; color: var(--gray-500); font-size: 13px; }
.complaint-table { min-width: 1050px; }
.complaint-user-phone { margin-top: 4px; color: var(--gray-500); font-size: 12px; }
.complaint-content-cell {
  max-width: 280px;
  overflow: hidden;
  color: var(--gray-700);
  text-overflow: ellipsis;
  white-space: nowrap;
}
.complaint-image-mark {
  display: inline-block;
  margin-top: 4px;
  padding: 1px 6px;
  color: #9a5b27;
  font-size: 10px;
  background: #fff3e8;
  border-radius: 8px;
}
.complaint-status {
  display: inline-block;
  padding: 4px 9px;
  color: #9a6400;
  font-size: 12px;
  background: #fff7df;
  border-radius: 12px;
}
.complaint-status.status-processing { color: #175cd3; background: #edf4ff; }
.complaint-status.status-resolved { color: #067647; background: #ecfdf3; }
.complaint-empty { padding: 42px 16px !important; color: var(--gray-500); text-align: center !important; }
.complaint-detail-modal { max-width: 780px; }
.complaint-detail-meta {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  padding: 16px;
  background: var(--gray-50);
  border-radius: 8px;
}
.complaint-detail-meta div { display: flex; flex-direction: column; gap: 4px; }
.complaint-detail-meta span { color: var(--gray-500); font-size: 11px; }
.complaint-detail-meta strong { color: var(--gray-800); font-size: 13px; overflow-wrap: anywhere; }
.complaint-detail-block { margin-top: 18px; }
.complaint-detail-block h4 { margin: 0 0 9px; font-size: 13px; }
.complaint-detail-block p { margin: 0; color: var(--gray-700); font-size: 13px; line-height: 1.75; white-space: pre-wrap; overflow-wrap: anywhere; }
.complaint-evidence-grid { display: grid; grid-template-columns: repeat(4, 112px); gap: 10px; }
.complaint-evidence-button { width: 112px; height: 112px; padding: 0; overflow: hidden; background: #f4f4f5; border: 1px solid var(--gray-200); border-radius: 8px; cursor: zoom-in; }
.complaint-evidence-button img { width: 100%; height: 100%; object-fit: cover; }
.complaint-no-evidence { color: var(--gray-400); font-size: 12px; }
.complaint-existing-result {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 18px;
}
.complaint-existing-result > div { padding: 12px; background: #fafafa; border: 1px solid var(--gray-200); border-radius: 8px; }
.complaint-existing-result span { color: var(--gray-500); font-size: 11px; }
.complaint-existing-result p { margin: 6px 0 0; color: var(--gray-700); font-size: 12px; line-height: 1.6; white-space: pre-wrap; overflow-wrap: anywhere; }
.complaint-handling-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin-top: 22px; }
.complaint-user-visibility-row { display: flex; align-items: center; gap: 10px; height: 36px; }
.complaint-user-visibility-row > span { color: var(--gray-700); font-size: 13px; }
.complaint-textarea { min-height: 96px; resize: vertical; line-height: 1.6; }
.complaint-public-hint { margin-top: 6px; color: #9a5b27; font-size: 12px; line-height: 1.5; }
.complaint-audit { margin-top: 12px; color: var(--gray-500); font-size: 12px; }

@media (max-width: 900px) {
  .complaint-config-grid,
  .complaint-detail-meta,
  .complaint-existing-result,
  .complaint-handling-grid { grid-template-columns: 1fr; }
  .complaint-filter-row { width: 100%; }
  .complaint-filter-row .input { flex: 1 1 150px; }
  .complaint-evidence-grid { grid-template-columns: repeat(3, 92px); }
  .complaint-evidence-button { width: 92px; height: 92px; }
}

/* ========== 新手引导：任务地图 + 真实页面聚光讲解 ========== */
.header-right { display: flex; align-items: center; gap: 14px; }
.nav-item-guide {
  position: relative;
  margin: 5px 10px 10px;
  padding: 12px 10px;
  color: #fff7cc;
  background: rgba(250, 204, 21, .1);
  border: 1px solid rgba(250, 204, 21, .25);
  border-radius: 10px;
}
.nav-item-guide:hover { background: rgba(250, 204, 21, .17); }
.nav-item-guide.active { color: #172033; background: #facc15; border-color: #facc15; }
.guide-nav-badge {
  margin-left: auto;
  padding: 2px 6px;
  color: #1f2937;
  background: #facc15;
  border-radius: 999px;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: .03em;
}
.nav-item-guide.active .guide-nav-badge { color: #facc15; background: #172033; }
.guide-header-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 34px;
  padding: 0 12px;
  color: #273248;
  background: #fffbe8;
  border: 1px solid #e7c536;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 750;
  cursor: pointer;
  transition: transform .18s ease, background .18s ease, box-shadow .18s ease;
}
.guide-header-btn:hover { background: #fef3a8; box-shadow: 0 4px 12px rgba(113, 82, 0, .12); transform: translateY(-1px); }

.guide-page {
  --guide-ink: #172033;
  --guide-paper: #fffdf4;
  --guide-yellow: #facc15;
  --guide-line: #d8d2bd;
  color: var(--guide-ink);
}
.guide-hero {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(260px, .7fr);
  gap: 36px;
  min-height: 330px;
  padding: 42px 46px;
  overflow: hidden;
  color: #f8fafc;
  background:
    linear-gradient(90deg, rgba(255,255,255,.035) 1px, transparent 1px) 0 0 / 28px 28px,
    linear-gradient(rgba(255,255,255,.035) 1px, transparent 1px) 0 0 / 28px 28px,
    #172033;
  border-radius: 18px;
  box-shadow: 0 20px 46px rgba(18, 28, 48, .16);
}
.guide-hero::before {
  content: '';
  position: absolute;
  right: -82px;
  bottom: -154px;
  width: 420px;
  height: 420px;
  border: 82px solid rgba(250, 204, 21, .9);
  border-radius: 50%;
  opacity: .15;
}
.guide-hero::after {
  content: 'START';
  position: absolute;
  top: 22px;
  right: 30px;
  color: rgba(255,255,255,.055);
  font: 900 72px/1 Georgia, 'Songti SC', serif;
  letter-spacing: -.06em;
}
.guide-hero-copy { position: relative; z-index: 1; align-self: center; }
.guide-eyebrow {
  display: inline-flex;
  padding: 5px 9px;
  color: #facc15;
  border: 1px solid rgba(250, 204, 21, .35);
  border-radius: 4px;
  font-size: 10px;
  font-weight: 850;
  letter-spacing: .15em;
}
.guide-hero h1 {
  max-width: 700px;
  margin: 20px 0 0;
  color: #fff;
  font: 800 clamp(30px, 3vw, 48px)/1.18 Georgia, 'Songti SC', 'STSong', serif;
  letter-spacing: -.035em;
}
.guide-hero-copy > p { max-width: 720px; margin: 18px 0 0; color: #cbd5e1; font-size: 15px; line-height: 1.85; }
.guide-hero-actions { display: flex; gap: 10px; margin-top: 26px; }
.guide-primary-action,
.guide-secondary-action {
  min-height: 44px;
  padding: 0 18px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 800;
  cursor: pointer;
  transition: transform .18s ease, box-shadow .18s ease, background .18s ease;
}
.guide-primary-action { color: #172033; background: #facc15; border: 1px solid #facc15; box-shadow: 0 5px 0 #9a7210; }
.guide-primary-action:hover { background: #fde047; transform: translateY(-1px); }
.guide-primary-action:active { box-shadow: none; transform: translateY(4px); }
.guide-secondary-action { color: #e2e8f0; background: transparent; border: 1px solid #526075; }
.guide-secondary-action:hover { color: #fff; background: rgba(255,255,255,.07); }
.guide-progress-board { position: relative; z-index: 1; display: grid; place-items: center; align-self: center; }
.guide-progress-ring {
  --guide-progress: 0deg;
  display: grid;
  place-content: center;
  width: 164px;
  height: 164px;
  text-align: center;
  background: radial-gradient(circle at center, #172033 59%, transparent 60%), conic-gradient(#facc15 var(--guide-progress), #354158 0);
  border-radius: 50%;
  box-shadow: 0 0 0 1px rgba(255,255,255,.08), 0 18px 34px rgba(0,0,0,.25);
}
.guide-progress-ring strong { color: #fff; font: 800 34px/1 Georgia, serif; }
.guide-progress-ring span { margin-top: 7px; color: #94a3b8; font-size: 11px; letter-spacing: .08em; }
.guide-progress-stats { display: grid; grid-template-columns: repeat(2, 1fr); width: 100%; margin-top: 22px; border-top: 1px solid rgba(255,255,255,.12); }
.guide-progress-stats div { padding: 14px 10px 0; text-align: center; }
.guide-progress-stats div + div { border-left: 1px solid rgba(255,255,255,.12); }
.guide-progress-stats strong { display: block; color: #facc15; font-size: 21px; }
.guide-progress-stats span { display: block; margin-top: 2px; color: #94a3b8; font-size: 11px; }

.guide-route-strip {
  display: grid;
  grid-template-columns: 230px minmax(0, 1fr);
  margin-top: 18px;
  background: #fffdf4;
  border: 1px solid #ded7bf;
  border-radius: 14px;
  box-shadow: 0 8px 22px rgba(57, 49, 27, .06);
}
.guide-route-title { padding: 22px 24px; border-right: 1px solid #ded7bf; }
.guide-route-title span { display: block; color: #9a7210; font-size: 10px; font-weight: 850; letter-spacing: .14em; }
.guide-route-title strong { display: block; margin-top: 6px; font: 750 15px/1.5 Georgia, 'Songti SC', serif; }
.guide-route-list { display: grid; grid-template-columns: repeat(7, minmax(100px, 1fr)); list-style: none; }
.guide-route-list li { position: relative; padding: 20px 16px; }
.guide-route-list li + li::before { content: '→'; position: absolute; top: 26px; left: -5px; color: #c2b78f; }
.guide-route-list span { color: #b08b1d; font: 800 10px/1 Georgia, serif; }
.guide-route-list strong { display: block; margin-top: 8px; font-size: 13px; }
.guide-route-list small { display: block; margin-top: 4px; color: #817a67; font-size: 10px; line-height: 1.5; }
.guide-section-heading { display: flex; align-items: end; justify-content: space-between; gap: 20px; margin: 34px 2px 16px; }
.guide-section-heading span { color: #9a7210; font-size: 10px; font-weight: 850; letter-spacing: .14em; }
.guide-section-heading h2 { margin-top: 4px; font: 800 25px/1.3 Georgia, 'Songti SC', serif; }
.guide-section-heading p { color: #777466; font-size: 12px; }
.guide-module-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.guide-module-card {
  position: relative;
  min-height: 300px;
  padding: 22px;
  overflow: hidden;
  background: #fff;
  border: 1px solid #ddd9cc;
  border-radius: 14px;
  box-shadow: 0 7px 20px rgba(28, 35, 52, .055);
  transition: transform .2s ease, border-color .2s ease, box-shadow .2s ease;
}
.guide-module-card:hover { border-color: #c5a62c; box-shadow: 0 14px 30px rgba(28, 35, 52, .11); transform: translateY(-3px); }
.guide-module-card::after { content: ''; position: absolute; right: -34px; top: -38px; width: 100px; height: 100px; border: 17px solid #facc15; border-radius: 50%; opacity: .08; }
.guide-module-card.is-complete { background: #fbfff9; border-color: #a7c59a; }
.guide-module-card.is-progress { border-color: #d6b832; }
.guide-module-topline { display: flex; align-items: center; justify-content: space-between; }
.guide-module-index { color: #a39463; font: 800 12px/1 Georgia, serif; letter-spacing: .09em; }
.guide-module-duration { color: #7a7461; font-size: 10px; }
.guide-module-icon { margin-top: 20px; font-size: 30px; filter: saturate(.85); }
.guide-module-eyebrow { margin-top: 13px; color: #9a7210; font-size: 9px; font-weight: 850; letter-spacing: .12em; }
.guide-module-card h3 { margin-top: 5px; color: #172033; font: 800 20px/1.35 Georgia, 'Songti SC', serif; }
.guide-module-description { min-height: 48px; margin-top: 9px; color: #676b72; font-size: 12px; line-height: 1.75; }
.guide-module-progress { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 10px; margin-top: 17px; }
.guide-module-progress > span { height: 5px; overflow: hidden; background: #ece9de; border-radius: 9px; }
.guide-module-progress i { display: block; height: 100%; background: #e2b714; border-radius: inherit; }
.guide-module-progress small { color: #888376; font-size: 10px; }
.guide-module-card > button {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  margin-top: 17px;
  padding: 10px 12px;
  color: #172033;
  background: #fff7c2;
  border: 1px solid #e6cf58;
  border-radius: 7px;
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
}
.guide-module-card > button:hover { background: #facc15; }
.guide-complete-stamp { position: absolute; top: 43px; right: -31px; width: 110px; padding: 4px 0; color: #fff; background: #56824a; font-size: 9px; font-weight: 850; text-align: center; transform: rotate(42deg); }
.guide-safety-note { display: flex; align-items: center; gap: 14px; margin-top: 18px; padding: 17px 20px; background: #eef7eb; border: 1px solid #bfd4b8; border-radius: 12px; }
.guide-safety-icon { display: grid; place-items: center; flex: 0 0 34px; height: 34px; color: #fff; background: #56824a; border-radius: 50%; font-weight: 900; }
.guide-safety-note strong { color: #355a2e; font-size: 13px; }
.guide-safety-note p { margin-top: 2px; color: #61715c; font-size: 11px; line-height: 1.6; }

.guide-focus-ring {
  position: fixed;
  z-index: 900;
  pointer-events: none;
  border: 3px solid #facc15;
  border-radius: 12px;
  box-shadow: 0 0 0 5px rgba(250, 204, 21, .27);
  transition: top .2s ease, left .2s ease, width .2s ease, height .2s ease;
}
.guide-focus-ring.is-dimmed { box-shadow: 0 0 0 5px rgba(250, 204, 21, .27), 0 0 0 9999px rgba(6, 12, 24, .7); }
.guide-focus-ring > span { position: absolute; top: -9px; right: -9px; width: 17px; height: 17px; background: #facc15; border: 4px solid rgba(250, 204, 21, .34); border-radius: 50%; background-clip: padding-box; animation: guide-pulse 1.4s ease-in-out infinite; }
.guide-coach,
.guide-entry-prompt {
  position: fixed;
  right: 24px;
  bottom: 22px;
  z-index: 1000;
  width: min(430px, calc(100vw - 32px));
  overflow: hidden;
  color: #f8fafc;
  background: #111827;
  border: 1px solid #39465b;
  border-radius: 16px;
  box-shadow: 0 28px 90px rgba(2, 6, 23, .52);
  animation: guide-rise .24s cubic-bezier(.22, 1, .36, 1) both;
}
.guide-coach-progress { height: 5px; background: #344054; }
.guide-coach-progress i { display: block; height: 100%; background: #facc15; transition: width .25s ease; }
.guide-coach-body { padding: 19px 20px 20px; }
.guide-coach-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.guide-coach-identity { display: flex; align-items: center; gap: 10px; }
.guide-coach-identity > span { display: grid; place-items: center; width: 39px; height: 39px; background: rgba(255,255,255,.08); border-radius: 10px; font-size: 20px; }
.guide-coach-identity small { display: block; color: #facc15; font-size: 9px; font-weight: 850; letter-spacing: .1em; }
.guide-coach-identity strong { display: block; margin-top: 3px; color: #94a3b8; font-size: 11px; }
.guide-coach-header > button { padding: 4px 7px; color: #94a3b8; background: transparent; border: 0; border-radius: 5px; font-size: 11px; cursor: pointer; }
.guide-coach-header > button:hover { color: #fff; background: rgba(255,255,255,.08); }
.guide-coach h2 { margin: 18px 0 0; color: #fff; font: 800 20px/1.4 Georgia, 'Songti SC', serif; }
.guide-coach-body > p { margin-top: 9px; color: #cbd5e1; font-size: 13px; line-height: 1.8; }
.guide-coach-hint { display: flex; align-items: flex-start; gap: 8px; margin-top: 13px; padding: 10px 11px; color: #cffafe; background: rgba(34, 211, 238, .09); border: 1px solid rgba(34, 211, 238, .18); border-radius: 8px; font-size: 11px; line-height: 1.6; }
.guide-coach-footer { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 8px; margin-top: 18px; padding-top: 16px; border-top: 1px solid rgba(255,255,255,.1); }
.guide-coach-footer > span { color: #64748b; font-size: 9px; text-align: center; }
.guide-coach-back,
.guide-coach-next { min-height: 36px; padding: 0 12px; border-radius: 7px; font-size: 11px; font-weight: 800; cursor: pointer; }
.guide-coach-back { color: #cbd5e1; background: transparent; border: 1px solid #465268; }
.guide-coach-back:disabled { opacity: .3; cursor: not-allowed; }
.guide-coach-next { color: #172033; background: #facc15; border: 1px solid #facc15; }
.guide-coach-next:hover { background: #fde047; }

.guide-entry-prompt { z-index: 1100; }
.guide-entry-accent { height: 6px; background: #facc15; }
.guide-entry-body { padding: 22px; }
.guide-entry-title { display: grid; grid-template-columns: auto 1fr auto; align-items: start; gap: 13px; }
.guide-entry-title > span { display: grid; place-items: center; width: 46px; height: 46px; color: #172033; background: #facc15; border-radius: 11px; box-shadow: 0 5px 0 #9a7210; font-size: 23px; }
.guide-entry-title small { color: #facc15; font-size: 9px; font-weight: 850; letter-spacing: .13em; }
.guide-entry-title h2 { margin-top: 3px; color: #fff; font: 800 20px/1.35 Georgia, 'Songti SC', serif; }
.guide-entry-title > button { color: #94a3b8; background: transparent; border: 0; font-size: 20px; cursor: pointer; }
.guide-entry-body > p { margin-top: 18px; color: #cbd5e1; font-size: 13px; line-height: 1.75; }
.guide-entry-tip { margin-top: 12px; padding: 9px 11px; color: #cffafe; background: rgba(34, 211, 238, .09); border: 1px solid rgba(34, 211, 238, .18); border-radius: 8px; font-size: 11px; }
.guide-entry-open { width: 100%; min-height: 43px; margin-top: 15px; color: #172033; background: #facc15; border: 0; border-radius: 8px; box-shadow: 0 5px 0 #9a7210; font-size: 13px; font-weight: 850; cursor: pointer; }
.guide-entry-open:active { box-shadow: none; transform: translateY(4px); }
.guide-entry-footer { display: flex; align-items: center; justify-content: space-between; margin-top: 18px; padding-top: 15px; border-top: 1px solid rgba(255,255,255,.1); }
.guide-entry-footer button { color: #94a3b8; background: transparent; border: 0; font-size: 11px; cursor: pointer; }
.guide-entry-footer button:last-child { padding: 7px 9px; border: 1px solid #465268; border-radius: 6px; }

@keyframes guide-rise { from { opacity: 0; transform: translateY(16px) scale(.985); } to { opacity: 1; transform: translateY(0) scale(1); } }
@keyframes guide-pulse { 0%, 100% { transform: scale(.82); opacity: .7; } 50% { transform: scale(1.15); opacity: 1; } }

@media (max-width: 1180px) {
  .guide-hero { grid-template-columns: 1fr 240px; padding: 34px; }
  .guide-route-strip { grid-template-columns: 1fr; }
  .guide-route-title { border-right: 0; border-bottom: 1px solid #ded7bf; }
  .guide-module-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 820px) {
  .hp-starter-recipe { align-items: stretch; flex-direction: column; gap: 14px; }
  .hp-starter-action { width: 100%; }
  .guide-header-btn { display: none; }
  .guide-hero { grid-template-columns: 1fr; }
  .guide-progress-board { grid-template-columns: auto 1fr; gap: 20px; justify-content: start; }
  .guide-progress-ring { width: 126px; height: 126px; }
  .guide-progress-stats { margin: 0; }
  .guide-route-list { grid-template-columns: repeat(2, 1fr); }
  .guide-route-list li + li::before { display: none; }
}

@media (max-width: 620px) {
  .guide-hero { padding: 26px 22px; }
  .guide-hero h1 { font-size: 30px; }
  .guide-hero-actions { flex-direction: column; }
  .guide-progress-board { grid-template-columns: 1fr; justify-items: center; }
  .guide-module-grid { grid-template-columns: 1fr; }
  .guide-section-heading { align-items: start; flex-direction: column; }
  .guide-coach,
  .guide-entry-prompt { right: 12px; bottom: 12px; width: calc(100vw - 24px); }
  .guide-coach-footer { grid-template-columns: auto 1fr; }
  .guide-coach-footer > span { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  .guide-module-card,
  .guide-header-btn,
  .guide-focus-ring,
  .guide-coach,
  .guide-entry-prompt,
  .guide-focus-ring > span { animation: none !important; transition: none !important; }
}
