:root {
  color-scheme: light;
  --bg: #fff8f1;
  --surface: #ffffff;
  --surface-soft: #fffaf5;
  --surface-muted: #fdf2e7;
  --text: #3f2413;
  --muted: #8a6245;
  --line: #efd5bd;
  --line-strong: #dfb48d;
  --brand: #d97706;
  --brand-deep: #b45309;
  --brand-soft: #fff1df;
  --accent: #9a3412;
  --good: #166534;
  --good-bg: #effcf3;
  --shadow: 0 10px 24px rgba(148, 74, 22, 0.12);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-width: 1180px;
  background: linear-gradient(180deg, #fffaf5 0%, #fff3e6 100%);
  color: var(--text);
  font-family: "Segoe UI", system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
}

.dashop-dashboard {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.dashop-header,
.dashop-filter-bar,
.dashop-filter-bar-secondary,
.dashop-pagination-bar,
.dashop-summary-bar,
.dashop-content-area {
  padding-left: 32px;
  padding-right: 32px;
}

.dashop-header {
  background: var(--surface);
  border-bottom: 1px solid var(--line);
  padding-top: 18px;
  padding-bottom: 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
}

.dashop-header-left,
.dashop-header-meta,
.dashop-tab-btn,
.dashop-filter-inline,
.dashop-search-group,
.dashop-dropdown-trigger,
.dashop-pagination-left,
.dashop-pagination-right,
.dashop-summary-top,
.dashop-summary-bottom,
.dashop-card-chip,
.dashop-card-row,
.dashop-card-footer,
.dashop-shop-metric-row,
.dashop-back-to-top {
  display: flex;
  align-items: center;
}

.dashop-logo-mark {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  object-fit: cover;
  display: block;
  box-shadow: 0 8px 20px rgba(217, 119, 6, 0.22);
}

.dashop-title {
  font-size: 22px;
  font-weight: 700;
  color: #2f180a;
}

.dashop-subtitle {
  margin-top: 2px;
  font-size: 13px;
  color: var(--muted);
}

.dashop-header-meta {
  gap: 12px;
  flex-wrap: wrap;
}

.dashop-icon-btn,
.dashop-primary-btn,
.dashop-page-btn,
.dashop-clear-btn-text,
.dashop-dropdown-trigger,
.dashop-tab-btn {
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--text);
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.18s ease, border-color 0.18s ease, transform 0.18s ease;
}

.dashop-icon-btn,
.dashop-page-btn {
  width: 34px;
  height: 34px;
  justify-content: center;
  display: inline-flex;
  padding: 0;
  font-size: 18px;
}

.dashop-primary-btn {
  background: linear-gradient(135deg, var(--brand) 0%, var(--brand-deep) 100%);
  color: #fff;
  border-color: transparent;
  font-weight: 700;
  padding: 8px 14px;
  box-shadow: 0 8px 18px rgba(217, 119, 6, 0.2);
}

.dashop-last-update {
  font-size: 13px;
  color: var(--muted);
  font-weight: 600;
}

.dashop-tab-navigation {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 32px 0;
  background: var(--surface);
}

.dashop-tab-btn {
  gap: 8px;
  padding: 10px 16px;
  font-size: 14px;
  font-weight: 700;
  color: var(--muted);
  border-bottom-width: 2px;
}

.dashop-tab-btn.active {
  background: var(--brand-soft);
  color: var(--brand-deep);
  border-color: var(--line-strong);
}

.dashop-filter-bar,
.dashop-filter-bar-secondary {
  background: var(--surface);
  display: flex;
  align-items: center;
  gap: 18px;
  flex-wrap: wrap;
}

.dashop-filter-bar {
  padding-top: 18px;
  padding-bottom: 18px;
}

.dashop-filter-bar-secondary {
  padding-top: 0;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
}

.dashop-filter-group {
  position: relative;
}

.dashop-filter-inline {
  gap: 14px;
  flex-wrap: wrap;
}

.dashop-filter-group label,
.dashop-sort-group label,
.dashop-pagination-left label,
.dashop-pagination-right label {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
}

.dashop-filter-inline label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.dashop-filter-inline input[type="checkbox"],
.dashop-dropdown-menu input[type="checkbox"] {
  accent-color: var(--brand);
}

.dashop-search-group {
  position: relative;
}

.dashop-search-icon {
  position: absolute;
  left: 12px;
  color: var(--brand);
  font-size: 14px;
}

.dashop-search-group input,
.dashop-filter-group select,
.dashop-sort-group select,
.dashop-filter-group input[type="date"],
.dashop-filter-group input[type="number"],
.dashop-pagination-bar select {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--text);
  font: inherit;
  padding: 8px 12px;
  min-height: 36px;
}

.dashop-search-group input {
  min-width: 240px;
  padding-left: 34px;
}

.dashop-filter-label {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
}

.dashop-dropdown {
  position: relative;
}

.dashop-dropdown-trigger {
  gap: 10px;
  padding: 8px 12px;
  min-height: 36px;
  font-size: 14px;
}

.dashop-dropdown-menu {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  z-index: 30;
  min-width: 240px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
  box-shadow: var(--shadow);
  padding: 10px;
  display: grid;
  gap: 8px;
}

.dashop-dropdown-menu label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
}

.dashop-pagination-meta {
  margin-left: auto;
  font-size: 13px;
  color: var(--muted);
}

.dashop-filter-mini input {
  width: 112px;
}

.dashop-clear-btn-text {
  padding: 8px 12px;
  font-weight: 700;
  background: var(--surface-soft);
}

.dashop-pagination-bar {
  background: var(--surface-soft);
  padding-top: 10px;
  padding-bottom: 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  border-bottom: 1px solid var(--line);
}

.dashop-pagination-left,
.dashop-pagination-right {
  gap: 10px;
}

.dashop-summary-bar {
  background: var(--surface-soft);
  padding-top: 14px;
  padding-bottom: 14px;
  display: grid;
  gap: 12px;
  border-bottom: 1px solid var(--line);
}

.dashop-summary-top {
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.dashop-summary-info,
.dashop-summary-item {
  border: 1px solid var(--line);
  background: var(--surface);
  border-radius: 8px;
  padding: 10px 12px;
  box-shadow: 0 4px 10px rgba(148, 74, 22, 0.05);
}

.dashop-summary-info {
  font-size: 14px;
  font-weight: 600;
}

.dashop-summary-bottom {
  gap: 12px;
  flex-wrap: wrap;
}

.dashop-summary-item {
  font-size: 13px;
  color: var(--text);
}

.dashop-content-area {
  padding-top: 18px;
  padding-bottom: 36px;
}

.dashop-empty-state {
  border: 1px solid var(--line);
  background: var(--surface);
  border-radius: 10px;
  padding: 18px;
  color: var(--muted);
}

.dashop-tab-content {
  display: none;
}

.dashop-tab-content.active {
  display: block;
}

.dashop-card-grid {
  display: grid;
  grid-template-columns: repeat(var(--dashop-grid-cols, 4), minmax(0, 1fr));
  gap: 16px;
}

.dashop-product-card,
.dashop-shop-card {
  background: var(--surface);
  border: 1px solid #dbe6f2;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 10px 28px rgba(114, 133, 164, 0.14);
}

.dashop-product-cover {
  position: relative;
  aspect-ratio: 16 / 9;
  background: #f4f7fb;
  margin: 18px 18px 0;
  border-radius: 14px;
  overflow: hidden;
}

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

.dashop-product-rank {
  position: absolute;
  top: -2px;
  left: -2px;
  color: #67b7ff;
  font-size: 30px;
  font-weight: 700;
  line-height: 1;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.9);
}

.dashop-product-body,
.dashop-shop-body {
  padding: 16px 18px 18px;
  display: grid;
  gap: 12px;
}

.dashop-product-head {
  display: grid;
  gap: 8px;
}

.dashop-product-title,
.dashop-shop-title {
  font-size: 16px;
  line-height: 1.4;
  font-weight: 700;
  color: #334155;
  text-decoration: none;
}

.dashop-product-title:hover,
.dashop-shop-title:hover {
  text-decoration: underline;
}

.dashop-product-shop-link,
.dashop-product-meta,
.dashop-shop-meta,
.dashop-wishlist-note {
  font-size: 14px;
  color: #52a7f2;
  line-height: 1.5;
  text-decoration: none;
}

.dashop-product-detail-list {
  display: grid;
  gap: 8px;
}

.dashop-product-detail-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  font-size: 13px;
  line-height: 1.55;
  color: #64748b;
}

.dashop-inline-accent {
  color: #eb8d32;
}

.dashop-inline-good {
  color: #66bf3c;
}

.dashop-product-actions {
  display: grid;
  gap: 8px;
}

.dashop-stack-btn {
  display: flex;
  align-items: center;
  min-height: 34px;
  padding: 0 14px;
  border-radius: 9px;
  border: 1px solid #2f3a4c;
  background: #273245;
  color: #ffffff;
  text-decoration: none;
  font-size: 13px;
  font-weight: 700;
  box-shadow: 0 6px 16px rgba(39, 50, 69, 0.14);
}

.dashop-stack-btn.is-active {
  background: #1d2635;
  border-color: #121926;
}

.dashop-stack-btn[disabled] {
  opacity: 1;
  cursor: default;
}

.dashop-stack-btn:hover {
  background: #1f2937;
}

.dashop-metrics-table {
  display: grid;
  border: 1px solid #edf2f7;
  border-radius: 12px;
  overflow: hidden;
  background: #ffffff;
}

.dashop-metrics-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
}

.dashop-metrics-row + .dashop-metrics-row {
  border-top: 1px solid #edf2f7;
}

.dashop-metrics-label,
.dashop-metrics-value {
  padding: 10px 12px;
  font-size: 13px;
  line-height: 1.35;
}

.dashop-metrics-label {
  background: #fafcff;
  color: #73839b;
  font-weight: 600;
}

.dashop-metrics-value {
  color: #374151;
  font-weight: 700;
  border-left: 1px solid #edf2f7;
}

.dashop-card-footer {
  justify-content: space-between;
  gap: 10px;
}

.dashop-link-btn {
  text-decoration: none;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 8px 10px;
  font-size: 12px;
  font-weight: 700;
  color: var(--text);
  background: var(--surface);
  flex: 1;
  text-align: center;
}

.dashop-link-btn.primary {
  background: var(--brand-soft);
  color: var(--brand-deep);
  border-color: var(--line-strong);
}

.dashop-wishlist-note {
  padding: 10px 12px;
  border-radius: 10px;
  background: #fff8f0;
  border: 1px dashed #f4d5b1;
  color: #8b5e3c;
}

.dashop-shop-card {
  min-height: 100%;
}

.dashop-shop-head {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: flex-start;
}

.dashop-shop-badge {
  padding: 4px 8px;
  border-radius: 999px;
  background: var(--brand-soft);
  color: var(--brand-deep);
  font-size: 11px;
  font-weight: 700;
}

.dashop-shop-metric-row {
  justify-content: space-between;
  gap: 10px;
  padding: 8px 0;
  border-bottom: 1px solid var(--line);
  font-size: 13px;
}

.dashop-shop-metric-row:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.dashop-shop-metric-label {
  color: var(--muted);
}

.dashop-shop-metric-value {
  font-weight: 700;
  text-align: right;
}

.dashop-shop-highlight {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-soft);
  padding: 10px;
}

.dashop-back-to-top {
  position: fixed;
  right: 24px;
  bottom: 24px;
  width: 40px;
  height: 40px;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  background: var(--brand);
  color: #fff;
  justify-content: center;
  box-shadow: 0 12px 24px rgba(217, 119, 6, 0.25);
}

.dashop-back-to-top[hidden] {
  display: none;
}

.is-hidden {
  display: none !important;
}

button:hover,
a:hover {
  transform: translateY(-1px);
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.6;
  transform: none;
}
