:root {
  --bg: #f6f7fb;
  --card: #ffffff;
  --text: #1f2933;
  --muted: #8a97a8;
  --primary: #4f7cff;
  --border: #e1e6ed;
  --ink: var(--text);
  --paper: var(--bg);
  --accent: var(--primary);
  --accent-dark: #3e66e6;
  --olive: #495464;
  --mist: #f1f4f8;
  --sun: #f1a452;
  --go: #2fb1a0;
  --warn: #f57c00;
  --drop: #e5436e;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Segoe UI", system-ui, -apple-system, sans-serif;
  color: var(--text);
  background: var(--bg);
  min-height: 100vh;
}

body.buyer-search-open {
  overflow: hidden;
}

a {
  color: inherit;
}

.scene {
  max-width: 1680px;
  width: min(96vw, 1680px);
  margin: 0 auto;
  padding: 20px 24px 56px;
  position: relative;
}

.masthead {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 12px 20px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 10px;
}

.brand {
  font-size: 20px;
  font-weight: 700;
  letter-spacing: 0.4px;
}

.nav {
  display: flex;
  gap: 18px;
  flex-wrap: wrap;
}

.masthead-right {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-left: auto;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.user-card {
  position: relative;
  display: inline-flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  padding: 6px 10px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: #f9fbff;
  min-width: 180px;
  cursor: pointer;
}

.user-card-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.user-name {
  font-size: 13px;
  font-weight: 600;
  line-height: 1.2;
}

.user-email {
  font-size: 12px;
  color: var(--muted);
  line-height: 1.2;
  max-width: 200px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.user-menu {
  position: absolute;
  right: 0;
  top: 100%;
  min-width: 160px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 6px;
  box-shadow: 0 12px 24px rgba(15, 23, 42, 0.08);
  opacity: 0;
  transform: translateY(6px);
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
  z-index: 30;
}

.user-card:hover .user-menu,
.user-card:focus-within .user-menu,
.user-card.open .user-menu {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.user-menu::before {
  content: "";
  position: absolute;
  top: -12px;
  left: 0;
  right: 0;
  height: 12px;
}

.user-menu-item {
  display: block;
  text-decoration: none;
  padding: 8px 10px;
  border-radius: 8px;
  font-size: 13px;
  color: var(--text);
}

.user-menu-item:hover {
  background: var(--mist);
}

.buyer-body {
  background: linear-gradient(180deg, #f2f6ff 0%, #f9fbff 100%);
  font-family: "Segoe UI", system-ui, -apple-system, sans-serif;
}

.buyer-shell {
  max-width: 480px;
  margin: 0 auto;
  height: 100vh;
  display: flex;
  flex-direction: column;
  padding: 0;
}

.buyer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 56px;
  height: 56px;
}

.buyer-header > * {
  flex-shrink: 0;
}

.buyer-header > .buyer-header-title,
.buyer-header > div:not(.buyer-header-actions) {
  flex: 1 1 auto;
  min-width: 0;
}

.buyer-search-trigger {
  border-color: var(--border);
  background: #fff;
  color: var(--text);
}

.buyer-search-trigger:hover {
  border-color: rgba(79, 124, 255, 0.4);
  background: #eef2ff;
}

.buyer-top {
  padding: 20px 16px 6px;
  background: linear-gradient(
    to bottom,
    rgba(242, 246, 255, 0.92) 0%,
    rgba(242, 246, 255, 0.55) 55%,
    rgba(242, 246, 255, 0) 100%
  );
  position: relative;
  z-index: 2;
}

.buyer-scroll {
  flex: 1;
  overflow: auto;
  padding: 8px 16px 24px;
}

.buyer-title {
  margin: 0;
  font-size: 20px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.buyer-subtitle {
  margin: 0 0 4px;
  font-size: 12px;
  color: var(--muted);
}

.buyer-project-title {
  font-size: 16px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.buyer-pill {
  padding: 6px 12px;
  border-radius: 999px;
  background: #fff;
  border: 1px solid var(--border);
  font-size: 12px;
  text-decoration: none;
  color: var(--text);
}

.buyer-back {
  text-decoration: none;
  color: var(--muted);
  margin-right: 8px;
  white-space: nowrap;
  width: 40px;
  height: 40px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.buyer-back-icon {
  width: 22px;
  height: 22px;
}

.buyer-search {
  display: flex;
  gap: 8px;
  margin: 10px 0;
}

.buyer-search input {
  flex: 1;
  height: 36px;
  border-radius: 10px;
  border: 1px solid var(--border);
  padding: 0 12px;
  font-size: 14px;
}

.buyer-search-modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
  z-index: 110;
}

.buyer-search-modal.is-open {
  opacity: 1;
  pointer-events: auto;
}

.buyer-search-panel {
  position: absolute;
  top: 70px;
  right: 16px;
  width: min(360px, calc(100% - 32px));
  transform: translateX(110%);
  transition: transform 0.2s ease;
  z-index: 111;
}

.buyer-search-modal.is-open .buyer-search-panel {
  transform: translateX(0);
}

.buyer-search-panel input {
  width: 100%;
  height: 44px;
  border-radius: 14px;
  border: 1px solid var(--border);
  padding: 0 14px;
  font-size: 14px;
  background: #fff;
  box-shadow: 0 12px 24px rgba(15, 23, 42, 0.12);
}

.buyer-filter-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin: 0 0 12px;
}

.buyer-filter-tags {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.buyer-filter-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  max-width: 220px;
  padding: 6px 10px;
  border-radius: 999px;
  background: #fff;
  border: 1px solid var(--border);
  font-size: 12px;
  color: var(--text);
}

.buyer-filter-tag span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.buyer-filter-tag button {
  border: none;
  background: transparent;
  color: var(--muted);
  font-size: 14px;
  cursor: pointer;
  padding: 0;
}

.buyer-filter-clear {
  border: 1px solid var(--border);
  background: #fff;
  color: var(--muted);
  padding: 6px 10px;
  border-radius: 12px;
  font-size: 12px;
  cursor: pointer;
}

.buyer-paste {
  margin-bottom: 16px;
}

.buyer-paste-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 12px;
}

.buyer-paste-title {
  font-weight: 600;
  font-size: 14px;
  margin-bottom: 4px;
}

.buyer-paste-sub {
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 10px;
}

.buyer-paste-card input {
  width: 100%;
  height: 36px;
  border-radius: 10px;
  border: 1px solid var(--border);
  padding: 0 12px;
  font-size: 14px;
}

.buyer-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  border: 1px solid var(--border);
  padding: 8px 12px;
  font-size: 13px;
  background: #fff;
  color: var(--text);
  text-decoration: none;
  cursor: pointer;
}

.buyer-btn.primary {
  background: var(--primary);
  color: #fff;
  border-color: transparent;
}

.buyer-btn.ghost {
  background: #fff;
}

.buyer-section {
  margin-bottom: 18px;
}

.buyer-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}

.buyer-section-head.buyer-section-head--inquiries {
  justify-content: flex-end;
}

.buyer-section-title {
  font-weight: 600;
  font-size: 14px;
}

.buyer-section-meta {
  font-size: 12px;
  color: var(--muted);
}

.buyer-load-more {
  margin-top: 12px;
  display: flex;
  align-items: center;
  gap: 10px;
  justify-content: center;
}

.buyer-load-meta {
  font-size: 12px;
  color: var(--muted);
}

.buyer-list {
  display: grid;
  gap: 12px;
}

.buyer-masonry {
  display: block;
  column-count: 2;
  column-gap: 12px;
}

.buyer-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 12px;
  box-shadow: 0 12px 24px rgba(15, 23, 42, 0.04);
}

.buyer-card-link {
  display: block;
  text-decoration: none;
  color: inherit;
}

.buyer-card-link:hover {
  border-color: rgba(76, 106, 255, 0.4);
  box-shadow: 0 14px 28px rgba(76, 106, 255, 0.12);
}

.project-card .project-title {
  font-weight: 600;
  margin-bottom: 6px;
}

.project-card {
  position: relative;
}

.project-card.is-locked {
  cursor: not-allowed;
}

.project-lock {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 24px;
  height: 24px;
  border-radius: 999px;
  background: rgba(31, 41, 51, 0.08);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.project-lock svg {
  width: 14px;
  height: 14px;
  stroke: rgba(31, 41, 51, 0.6);
  stroke-width: 2;
  fill: none;
}

.project-meta {
  display: flex;
  gap: 10px;
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 10px;
}

.project-owner {
  margin-top: 6px;
  color: var(--muted);
  font-size: 12px;
}

.project-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 6px 0 8px;
}

.project-tag {
  display: inline-flex;
  align-items: center;
  max-width: 100%;
  padding: 4px 8px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: #f1f4f9;
  color: #5f6f82;
  font-size: 11px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.project-metrics {
  margin-top: 10px;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.metric-col {
  display: grid;
  gap: 4px;
  justify-items: center;
  text-align: center;
}

.metric-label {
  color: var(--muted);
  font-size: 11px;
}

.metric-value {
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.metric-value.metric-highlight {
  color: #e23b3b;
  font-weight: 700;
}

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

.item-card {
  display: block;
  padding: 0;
  overflow: hidden;
  margin-bottom: 12px;
  break-inside: avoid;
}

.item-thumb {
  width: 100%;
  aspect-ratio: 4 / 3;
  background: #f3f5f9;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.item-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.item-thumb-empty {
  font-size: 12px;
  color: var(--muted);
}

.item-body {
  padding: 10px 12px 12px;
}

.item-title {
  font-weight: 600;
  font-size: 14px;
  margin-bottom: 6px;
}

.item-meta {
  display: flex;
  gap: 10px;
  font-size: 12px;
  color: var(--muted);
}

.item-sub {
  font-size: 12px;
  color: var(--muted);
  margin-top: 4px;
}

.buyer-empty {
  text-align: center;
  padding: 24px 0;
  color: var(--muted);
  font-size: 13px;
}

.buyer-tabbar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  height: 64px;
  background: #fff;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: center;
  gap: 32px;
  align-items: center;
  padding-bottom: env(safe-area-inset-bottom, 0);
  z-index: 50;
}

.buyer-tab {
  text-decoration: none;
  font-size: 12px;
  color: var(--muted);
}

.buyer-tab.active {
  color: var(--primary);
  font-weight: 600;
}

.buyer-menu-btn {
  border: 1px solid var(--border);
  background: #fff;
  color: var(--text);
  border-radius: 12px;
  width: 40px;
  height: 40px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 18px;
  position: relative;
  flex-shrink: 0;
}

.buyer-menu-icon {
  width: 32px;
  height: 32px;
}

.buyer-menu-dot {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #e53935;
  display: none;
}

.buyer-menu-btn.has-unread .buyer-menu-dot {
  display: inline-block;
}

.buyer-header-actions {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.buyer-icon-btn {
  border: 1px solid var(--border);
  background: #fff;
  color: var(--text);
  border-radius: 12px;
  width: 40px;
  height: 40px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.buyer-search-icon {
  width: 20px;
  height: 20px;
}

.buyer-menu-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.24);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
  z-index: 140;
}

.buyer-menu-backdrop.active {
  opacity: 1;
  pointer-events: auto;
}

.buyer-menu {
  position: fixed;
  top: 0;
  right: 0;
  height: 100%;
  width: min(300px, 70vw);
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 0;
  padding: 24px 16px;
  box-shadow: 0 16px 30px rgba(15, 23, 42, 0.12);
  display: flex;
  flex-direction: column;
  gap: 8px;
  transform: translateX(100%);
  transition: transform 0.22s ease;
}

.buyer-menu-backdrop.active .buyer-menu {
  transform: translateX(0);
}

.buyer-nav-open .buyer-search-modal {
  display: none;
}

.buyer-nav-open .buyer-menu-backdrop {
  opacity: 1;
  pointer-events: auto;
}

.buyer-nav-open .buyer-menu {
  transform: translateX(0);
}

.buyer-menu-item {
  display: block;
  text-decoration: none;
  padding: 12px 14px;
  border-radius: 12px;
  font-size: 16px;
  color: var(--text);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.buyer-menu-item.active {
  background: var(--mist);
  font-weight: 600;
  color: var(--text);
}

.buyer-nav-badge {
  min-width: 18px;
  height: 18px;
  padding: 0 6px;
  border-radius: 999px;
  background: #e53935;
  color: #fff;
  font-size: 11px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.buyer-nav-badge.is-hidden {
  display: none;
}

.buyer-nav-open {
  overflow: hidden;
}

.buyer-shell {
  transition: transform 0.22s ease;
}

.buyer-nav-open .buyer-shell {
  transform: translateX(-24px);
}

.buyer-form {
  display: grid;
  gap: 8px;
}

.buyer-form input,
.buyer-form textarea {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 10px 12px;
  font-size: 13px;
}

.buyer-status {
  font-size: 12px;
  color: var(--muted);
  min-height: 18px;
}

.buyer-status.ok {
  color: #1d8f59;
}

.buyer-status.error {
  color: #d94841;
}

.buyer-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: #eef2ff;
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  margin-right: 12px;
}

.buyer-card .buyer-card-body {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-width: 0;
}

.buyer-card {
  display: flex;
  align-items: center;
  gap: 12px;
}

.buyer-actions {
  margin-top: 20px;
}

.buyer-name {
  font-weight: 600;
}

.buyer-email,
.buyer-role {
  font-size: 12px;
  color: var(--muted);
}

.nav-link {
  text-decoration: none;
  color: var(--muted);
  padding: 6px 4px;
  border-bottom: 2px solid transparent;
  transition: color 0.2s ease, border-color 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.nav-link:hover {
  color: var(--text);
}

.nav-link.active {
  color: var(--text);
  border-color: var(--primary);
  font-weight: 600;
}

.nav-badge {
  min-width: 18px;
  height: 18px;
  padding: 0 6px;
  border-radius: 999px;
  background: #e53935;
  color: #fff;
  font-size: 11px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.nav-badge.is-hidden {
  display: none;
}

.grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 16px;
  margin-top: 16px;
}

.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 16px;
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.04);
  animation: floatIn 0.4s ease both;
}

.panel {
  grid-column: span 6;
}

.full-width {
  grid-column: span 12;
}

button,
.btn {
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 8px 14px;
  font-size: 14px;
  cursor: pointer;
  color: var(--text);
  background: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  transition: transform 0.15s ease, box-shadow 0.2s ease;
}


button.primary,
.btn.primary {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
  box-shadow: 0 8px 18px rgba(79, 124, 255, 0.2);
}

button:disabled,
.btn:disabled {
  cursor: not-allowed;
  opacity: 0.55;
  transform: none;
  box-shadow: none;
}

button.primary:disabled,
.btn.primary:disabled {
  background: #9aa8c7;
  border-color: #9aa8c7;
  color: #fff;
}

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

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

.copy-helper {
  position: fixed;
  opacity: 0;
  pointer-events: none;
}

.offscreen-copy-helper {
  position: absolute;
  left: -9999px;
}

.copy-self-test-button {
  position: fixed;
  left: 16px;
  bottom: 16px;
  z-index: 9999;
}

.buyer-nav-menu-positioned {
  width: min(360px, 80vw);
  right: 0;
}

.auth-spacing-top {
  margin-top: 16px;
}

.auth-help-copy {
  margin-top: 8px;
  line-height: 1.6;
}

.auth-help-subsection {
  margin-top: 6px;
}

.save-status.with-top-spacing,
.muted.with-top-spacing {
  margin-top: 8px;
}

.muted.with-small-top-spacing {
  margin-top: 6px;
}

.line-height-relaxed {
  line-height: 1.5;
}

.enrich-inline.wrap-gap {
  gap: 12px;
  flex-wrap: wrap;
}

.progress-fill {
  --progress-percent: 0%;
  width: var(--progress-percent);
}

.progress-fill[data-progress="0"],
.progress-fill.progress-0 {
  width: 0%;
}

.progress-fill[data-progress="5"],
.progress-fill.progress-5 {
  width: 5%;
}

.progress-fill[data-progress="10"],
.progress-fill.progress-10 {
  width: 10%;
}

.progress-fill[data-progress="15"],
.progress-fill.progress-15 {
  width: 15%;
}

.progress-fill[data-progress="20"],
.progress-fill.progress-20 {
  width: 20%;
}

.progress-fill[data-progress="25"],
.progress-fill.progress-25 {
  width: 25%;
}

.progress-fill[data-progress="30"],
.progress-fill.progress-30 {
  width: 30%;
}

.progress-fill[data-progress="35"],
.progress-fill.progress-35 {
  width: 35%;
}

.progress-fill[data-progress="40"],
.progress-fill.progress-40 {
  width: 40%;
}

.progress-fill[data-progress="45"],
.progress-fill.progress-45 {
  width: 45%;
}

.progress-fill[data-progress="50"],
.progress-fill.progress-50 {
  width: 50%;
}

.progress-fill[data-progress="55"],
.progress-fill.progress-55 {
  width: 55%;
}

.progress-fill[data-progress="60"],
.progress-fill.progress-60 {
  width: 60%;
}

.progress-fill[data-progress="65"],
.progress-fill.progress-65 {
  width: 65%;
}

.progress-fill[data-progress="70"],
.progress-fill.progress-70 {
  width: 70%;
}

.progress-fill[data-progress="75"],
.progress-fill.progress-75 {
  width: 75%;
}

.progress-fill[data-progress="80"],
.progress-fill.progress-80 {
  width: 80%;
}

.progress-fill[data-progress="85"],
.progress-fill.progress-85 {
  width: 85%;
}

.progress-fill[data-progress="90"],
.progress-fill.progress-90 {
  width: 90%;
}

.progress-fill[data-progress="95"],
.progress-fill.progress-95 {
  width: 95%;
}

.progress-fill[data-progress="100"],
.progress-fill.progress-100 {
  width: 100%;
}

button.primary:hover,
.btn.primary:hover {
  background: var(--accent-dark);
  transform: translateY(-1px);
}

.btn.ghost {
  background: #fff;
}

.btn.text-danger {
  border: none;
  background: transparent;
  padding: 2px 6px;
  font-size: 12px;
  color: #c62828;
  box-shadow: none;
}

.btn.text-danger:hover {
  text-decoration: underline;
  box-shadow: none;
}

.btn.text-danger:active {
  transform: translateY(1px);
}

.btn.tiny {
  padding: 8px 14px;
  font-size: 12px;
  min-height: 36px;
  min-width: 120px;
}

.btn.text-reset {
    padding: 2px 8px;
    min-width: 0;
    min-height: auto;
    font-size: 12px;
    border-radius: 6px;
  }

  .icon-btn {
    width: 32px;
    height: 32px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    cursor: pointer;
    color: var(--text);
    text-decoration: none;
  }

  .icon-btn.ghost {
    background: transparent;
  }

  .icon-btn.danger {
    color: #d14343;
    border-color: #f5c2c7;
    background: #fff5f5;
  }

  .icon-btn.danger:hover {
    border-color: #eb9090;
    box-shadow: 0 0 0 2px rgba(209, 67, 67, 0.12);
  }

  .icon-btn svg {
    width: 18px;
    height: 18px;
    fill: currentColor;
  }

  .icon-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
  }

.multi-select-modes {
  align-items: center;
}

.hero {
  grid-column: span 7;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.kicker {
  text-transform: uppercase;
  letter-spacing: 2px;
  font-size: 12px;
  color: var(--muted);
  margin: 0;
}

.hero h1 {
  font-size: 32px;
  margin: 0;
  line-height: 1.2;
}

.subhead {
  font-size: 14px;
  line-height: 1.6;
  margin: 0;
  color: #4b5666;
}

.hero-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.hero-meta {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

.hero-meta div {
  background: #f5f7fb;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 10px;
}

.meta-label {
  display: block;
  font-size: 12px;
  color: var(--muted);
}

.meta-value {
  display: block;
  font-size: 14px;
  font-weight: 600;
}

.upload {
  grid-column: span 5;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.dropzone {
  border: 2px dashed #d0d7e2;
  border-radius: 14px;
  padding: 18px;
  cursor: pointer;
  transition: border 0.2s ease, background 0.2s ease;
}

.dropzone:hover {
  border-color: var(--primary);
  background: rgba(79, 124, 255, 0.06);
}

.dropzone input {
  display: none;
}

.dropzone-inner {
  display: flex;
  align-items: center;
  gap: 14px;
}

.orb {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: linear-gradient(135deg, #6c8bff, #8fb0ff);
}

.dropzone-title {
  font-size: 15px;
  font-weight: 600;
}

.dropzone-hint {
  font-size: 12px;
  color: var(--muted);
}

.upload-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #f5f7fb;
  padding: 10px 14px;
  border-radius: 10px;
  border: 1px solid var(--border);
}

.upload-result {
  font-size: 13px;
  color: var(--muted);
  line-height: 1.5;
}

.panel-title {
  display: flex;
  align-items: center;
  gap: 10px;
}

.panel-title.stacked {
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
}

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

.save-status {
  font-size: 12px;
  color: var(--muted);
  min-width: 120px;
  margin: 8px 0;
}

.save-status.ok {
  color: #2e8b57;
}

.save-status.error {
  color: #c62828;
}

.unit-toggles {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.unit-toggles .toggle-group {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #f1f4f8;
  padding: 4px 6px;
  border-radius: 999px;
}

.unit-toggles .toggle-label {
  font-size: 12px;
  color: var(--muted);
  padding: 0 4px;
}

.panel-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.amazon-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-top: 12px;
}

.amazon-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px;
}

.amazon-grid.single-column {
  grid-template-columns: 1fr;
}

.amazon-form.single-column {
  max-width: 720px;
}

.amazon-form.single-column .panel-actions {
  justify-content: flex-start;
}

.amazon-form.single-column .mapping-select,
.amazon-form.single-column input,
.amazon-form.single-column textarea {
  width: 100%;
}

.amazon-grid label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 12px;
}

.amazon-grid input,
.amazon-grid textarea {
  padding: 8px 10px;
  border-radius: 8px;
  border: 1px solid var(--border);
  font-size: 12px;
}

.amazon-grid textarea {
  resize: vertical;
}

.amazon-span {
  grid-column: span 2;
}

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

.amazon-actions .action-group {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.amazon-config {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  font-size: 12px;
}

.amazon-config label {
  display: inline-flex;
  flex-direction: column;
  gap: 6px;
}

.amazon-summary-card {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 12px;
}

.summary-item {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 10px 12px;
  border-radius: 12px;
  background: #f6f7fb;
  font-size: 12px;
}

.summary-item strong {
  font-size: 16px;
  color: #1b1f2a;
}

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

.amazon-table th,
.amazon-table td {
  border-bottom: 1px solid var(--border);
  padding: 10px 12px;
  font-size: 12px;
}

.amazon-table .row-highlight td {
  background: #fff7e8;
}

.tab-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.sheet-picker {
  display: flex;
  align-items: center;
  gap: 8px;
}

.sheet-picker .muted {
  min-width: 48px;
  white-space: nowrap;
}

.sheet-picker select {
  min-width: 220px;
}

.step-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--muted);
  background: #f5f7fb;
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid var(--border);
}

.upload-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.upload-tools {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.invite-fields {
  display: grid;
  gap: 10px;
  margin-top: 12px;
}

.invite-output {
  display: grid;
  gap: 8px;
}

.invite-target {
  font-size: 12px;
  color: var(--muted);
}

.invite-link-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.invite-link {
  display: none;
}

.invite-link-box {
  flex: 1 1 auto;
  width: 100%;
  min-height: 96px;
  max-height: 140px;
  padding: 10px;
  border: 1px solid var(--border);
  border-radius: 8px;
  resize: vertical;
  white-space: pre-wrap;
  word-break: break-all;
  overflow-y: auto;
  font-family: inherit;
  font-size: 12px;
  background: #f3f5fa;
}

.upload-inline {
  display: flex;
  align-items: center;
  gap: 10px;
  background: #f5f7fb;
  border-radius: 10px;
  padding: 10px 12px;
  border: 1px dashed var(--border);
  flex: 1 1 auto;
  min-width: 280px;
  cursor: pointer;
  transition: border-color 0.2s ease, background 0.2s ease;
}

.upload-filters {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 0 0 auto;
}

.upload-filters select {
  height: 32px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: #fff;
  padding: 4px 10px;
  font-size: 13px;
}

.upload-inline input[type="file"] {
  display: none;
}

.upload-status {
  font-size: 12px;
  color: var(--muted);
  max-width: 240px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.upload-inline.dragover {
  border-color: var(--primary);
  background: rgba(79, 124, 255, 0.08);
}

.upload-inline .btn {
  flex: 0 0 auto;
}

.upload-inline .upload-status {
    flex: 1 1 auto;
    max-width: none;
  }

.buyer-paste-box {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    padding: 0;
    background: transparent;
    border: none;
    border-radius: 0;
    margin-left: auto;
  }

  .buyer-paste-input-wide {
    height: 38px;
    padding: 8px 10px;
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: 14px;
    width: 360px;
    max-width: 100%;
  }

.upload-list {
  display: grid;
  gap: 8px;
  margin-top: 10px;
}

.upload-table-grid {
  display: grid;
  grid-template-columns:
    36px
    minmax(220px, 1.6fr)
    80px
    120px
    120px
    100px
    100px
    96px
    minmax(140px, auto);
  align-items: center;
  gap: 12px;
}

.upload-list-header {
  padding: 0 12px;
  font-size: 12px;
  color: var(--muted);
}

.upload-row {
  padding: 12px;
  border-radius: 10px;
  background: #f5f7fb;
  border: 1px solid var(--border);
}

.upload-col {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--text);
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.upload-col.file {
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
}

.upload-col.file .upload-name,
.upload-col.file .upload-sub {
  width: 100%;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.upload-col.select {
  width: 36px;
  min-width: 36px;
  max-width: 36px;
  justify-content: center;
  flex-shrink: 0;
}

.upload-col.actions,
.upload-col.visibility {
  justify-content: center;
  text-align: center;
}

.upload-col.actions {
  overflow: visible;
  text-overflow: initial;
  white-space: nowrap;
}

.upload-col.visibility {
  min-width: 140px;
}

.upload-row.buyer-view .upload-col.visibility,
.upload-list-header.buyer-view .upload-col.visibility {
  width: 100px;
  min-width: 100px;
  max-width: 100px;
}

.upload-row.buyer-view .upload-col.actions,
.upload-list-header.buyer-view .upload-col.actions {
  white-space: nowrap;
  width: 64px;
  min-width: 64px;
  max-width: 64px;
  justify-content: center;
}

.upload-row.buyer-view .upload-actions {
  flex-wrap: nowrap;
  gap: 8px;
  justify-content: center;
}

  .upload-actions .btn {
    padding-left: 10px;
    padding-right: 10px;
  }

  .upload-actions .text-danger {
    padding-left: 4px;
    padding-right: 4px;
  }

  .upload-actions .readonly-flag {
    font-size: 12px;
    color: var(--muted);
  }

.upload-name {
  font-size: 13px;
  font-weight: 600;
}

.upload-sub {
  font-size: 12px;
  color: var(--muted);
}

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

.tab-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.tab {
  border: 1px solid var(--border);
  background: #fff;
  color: var(--text);
  padding: 6px 12px;
  border-radius: 999px;
  cursor: pointer;
  font-size: 12px;
}

.tab.active {
  border-color: rgba(79, 124, 255, 0.35);
  background: rgba(79, 124, 255, 0.12);
  color: var(--primary);
}

.tab:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.mapping-workspace {
  grid-column: span 12;
}

.normalize-workspace {
  grid-column: span 12;
}

.category-panel {
  display: grid;
  grid-template-columns: minmax(200px, 1.2fr) minmax(220px, 1fr) minmax(200px, 0.8fr) minmax(160px, 0.6fr);
  gap: 12px 16px;
  align-items: center;
  margin-top: 12px;
  padding: 12px 16px;
  border-radius: 10px;
  background: #f5f7fb;
  border: 1px solid var(--border);
}

.mapping-search {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 12px;
}

.mapping-search .search-field {
  flex: 1;
}

.mapping-search .search-input {
  flex: 1;
  min-width: 240px;
}

.mapping-search .search-field input {
  min-width: 0;
  width: 100%;
}

.category-label {
  display: block;
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 6px;
}

.category-scope {
  display: flex;
  align-items: center;
  gap: 12px;
}

.category-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  justify-content: flex-end;
}

.category-filter {
  display: flex;
  justify-content: flex-end;
}

.category-status {
  font-size: 12px;
  color: var(--muted);
}

.category-option {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--text);
}

.mapping-table {
  margin-top: 12px;
  background: #fff;
  border-radius: 10px;
  padding: 0 12px 8px;
  overflow-x: auto;
  overflow-y: visible;
  max-height: none;
  border: 1px solid var(--border);
}

#items-table {
  max-height: none;
}

.mapping-table table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  table-layout: fixed;
  min-width: max-content;
}

.items-table {
  table-layout: fixed;
}

.items-table th,
.items-table td {
  padding: 6px 8px;
  min-width: 0;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.items-table .col-idx {
  width: 50px;
  min-width: 50px;
  max-width: 50px;
  text-align: right;
}

.items-table .col-name {
  text-align: left;
  overflow: visible;
  min-width: 260px;
  max-width: 480px;
}

.items-table .col-category {
  width: 120px;
  min-width: 120px;
  text-align: center;
}

.items-table .col-price,
.items-table .col-stock,
.items-table .col-amazon-price,
.items-table .col-amazon-sales {
  text-align: right;
  min-width: 100px;
  max-width: 100px;
  width: 100px;
}

.items-table .col-asin {
  width: 120px;
  min-width: 120px;
  text-align: center;
}

.items-table .col-amazon-link {
  min-width: 180px;
  text-align: left;
}

.items-table .col-source {
  min-width: 180px;
  text-align: center;
}

.items-table .col-actions {
  text-align: center;
  white-space: nowrap;
  width: 72px;
  min-width: 72px;
  max-width: 72px;
  overflow: visible;
}

.items-table th .sort-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.items-table th.col-text,
.items-table th.col-number,
.items-table th.col-tag,
.items-table th.col-time,
.items-table th.col-action {
  text-align: center;
}

.items-table td.col-text {
  text-align: left;
}

.items-table td.col-number {
  text-align: right;
}

.items-table td.col-tag,
.items-table td.col-time,
.items-table td.col-action {
  text-align: center;
}

.name-cell {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.name-cell .item-thumb {
  width: 48px;
  height: 48px;
  flex-shrink: 0;
}

.name-stack {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

.name-stack .item-title {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.name-stack .item-sub {
  white-space: nowrap;
  overflow: visible;
  text-overflow: clip;
}

.name-stack .item-sub .item-id {
  font-weight: 600;
}

.items-table .col-source .tag-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: auto;
  padding-left: 10px;
  padding-right: 10px;
  margin-top: 4px;
}

.items-table td.col-text {
  text-align: left;
}

.items-table td.col-number {
  text-align: right;
}

.items-table td.col-tag,
.items-table td.col-time,
.items-table td.col-action {
  text-align: center;
}

.mapping-table table th:first-child,
.mapping-table table td:first-child {
  width: 50px;
  min-width: 50px;
  max-width: 50px;
}

.users-table {
  table-layout: fixed;
}

.users-table th {
  text-align: center;
}

.users-table td {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.users-table .numeric {
  text-align: right;
}

.users-table .col-role,
.users-table .col-status,
.users-table .col-created,
.users-table .col-login,
.users-table .col-actions {
  text-align: center;
}

.users-table .col-name {
  width: 140px;
}

.users-table .col-email {
  width: 140px;
}

.users-table .col-role {
  width: 80px;
}

.users-table .col-status {
  width: 90px;
}

.users-table .col-inquiry {
  width: 80px;
}

.users-table .col-owner {
  width: 120px;
}

.users-table .col-created,
.users-table .col-login {
  width: 100px;
}

.users-table .col-actions {
  width: 240px;
}

.items-table th:last-child,
.items-table td:last-child {
  text-align: center;
}

.mapping-table th,
.mapping-table td {
  padding: 8px;
  border-bottom: 1px solid var(--border);
  text-align: left;
  min-width: 120px;
  max-width: 240px;
}

.mapping-table th {
  background: #f5f7fb;
  position: sticky;
  top: 0;
  z-index: 1;
  color: var(--muted);
  font-weight: 600;
}

.mapping-table .mapping-row td {
  background: #fff;
}

.mapping-table .mapping-row {
  position: sticky;
  top: 34px;
  z-index: 1;
}

.mapping-table thead tr {
  position: sticky;
  top: 0;
  z-index: 2;
}

table {
  width: 100%;
  border-collapse: collapse;
}

.numeric {
  text-align: right;
}

.table-actions {
    text-align: center;
    white-space: nowrap;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
  }

th,
td {
  padding: 8px;
  border-bottom: 1px solid var(--border);
  text-align: left;
  font-size: 13px;
}

th {
  color: var(--muted);
  font-weight: 600;
  text-align: center;
}

.num-cell {
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.num-cell .truncate {
  display: block;
  text-align: right;
}

.date-cell {
  line-height: 1.1;
  text-align: center;
}

.date-cell .date {
  display: block;
  font-size: 12px;
  color: #4b5666;
}

.date-cell .time {
  display: block;
  font-size: 11px;
  color: #9aa3b2;
}

.sort-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 0;
  border: none;
  background: transparent;
  color: inherit;
  font: inherit;
  cursor: pointer;
}

.sort-icons {
  display: inline-flex;
  flex-direction: column;
  line-height: 10px;
  font-size: 10px;
  color: rgba(31, 28, 26, 0.4);
}

.sort-btn.asc .sort-up,
.sort-btn.desc .sort-down {
  color: rgba(31, 28, 26, 0.9);
}

.pagination {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 12px;
  margin-left: auto;
}

.pagination-info {
  font-size: 12px;
  color: var(--muted);
}

.pagination-jump {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--muted);
}

.pagination-jump input {
  width: 64px;
  padding: 4px 6px;
  border-radius: 8px;
  border: 1px solid var(--border);
  font-size: 12px;
}

.list-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 12px;
}

.list-footer-left {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-size: 12px;
  color: var(--muted);
}

.page-size {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.page-size select {
  padding: 4px 6px;
  border-radius: 8px;
  border: 1px solid var(--border);
  font-size: 12px;
  background: #fff;
}

.total-count {
  font-size: 12px;
  color: var(--muted);
}

.table-filters {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  margin: 6px 0 12px;
}

.filters-left {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 1;
  min-width: 220px;
}

.filters-right {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.search-field {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
}

.search-field input {
  height: 32px;
  min-width: 240px;
  padding: 6px 10px;
  border-radius: 8px;
  border: 1px solid var(--border);
  font-size: 12px;
}

.search-input {
  position: relative;
  display: inline-flex;
  align-items: center;
  min-width: 240px;
}

.search-input input:disabled {
  background: #f3f5f9;
  color: transparent;
  text-shadow: none;
  cursor: default;
}

.search-chip {
  position: absolute;
  left: 6px;
  top: 50%;
  transform: translateY(-50%);
}

.filter-option {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: var(--text);
}

.filter-option.full-width {
  grid-column: 1 / -1;
}

.filter-option select {
  padding: 4px 8px;
  border-radius: 8px;
  border: 1px solid var(--border);
  font-size: 12px;
  background: #fff;
}

.multi-select {
  position: relative;
}

.multi-select-toggle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: #fff;
  cursor: pointer;
  font-size: 12px;
}

.multi-select-panel {
    position: fixed;
    top: 0;
    left: 0;
  min-width: 220px;
  max-width: 320px;
  padding: 10px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: #fff;
  box-shadow: 0 12px 30px rgba(31, 28, 26, 0.18);
  opacity: 0;
  pointer-events: none;
  transform: translateY(-6px);
  transition: opacity 0.15s ease, transform 0.15s ease;
    z-index: 80;
  }

.multi-select-panel.open {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.multi-select-modes {
  display: flex;
  gap: 12px;
  font-size: 12px;
  margin-bottom: 8px;
}

.multi-select-list {
    display: grid;
    gap: 6px;
    max-height: min(260px, calc(100vh - 220px));
    overflow-y: auto;
    overscroll-behavior: contain;
    scrollbar-gutter: stable;
  }

.multi-select-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(8, 12, 22, 0.38);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.15s ease;
    z-index: 70;
  }

.multi-select-backdrop.active {
    opacity: 1;
    pointer-events: auto;
  }

body.modal-open {
    overflow: hidden;
  }

.checkbox-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
}

.progress-bar {
  position: relative;
  height: 6px;
  margin: 6px 0 10px;
  border-radius: 999px;
  background: #e7ecf4;
  overflow: hidden;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}

.progress-bar.active {
  opacity: 1;
}

.progress-bar .progress-fill {
  position: absolute;
  inset: 0;
  width: 40%;
  border-radius: 999px;
  background: linear-gradient(90deg, #5e7bff, #7be2ff);
  animation: progressSlide 1.1s ease-in-out infinite;
}

@keyframes progressSlide {
  0% {
    transform: translateX(-60%);
  }
  100% {
    transform: translateX(160%);
  }
}

.list-loading-wrapper {
  position: relative;
}
.list-loading-overlay {
  position: absolute;
  inset: 0;
  background: rgba(255, 255, 255, 0.72);
  backdrop-filter: blur(2px);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}
.list-loading-wrapper.is-loading .list-loading-overlay {
  opacity: 1;
  pointer-events: all;
}
.list-loading-indicator {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 16px;
  background: rgba(0, 0, 0, 0.04);
  border-radius: 12px;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.08);
  font-weight: 600;
  color: #444;
}
.list-loading-indicator .spinner {
  width: 24px;
  height: 24px;
  border: 3px solid #d0d5dd;
  border-top-color: #3b82f6;
  border-radius: 50%;
  animation: list-spin 1s linear infinite;
}
.list-loading-indicator .text {
  font-size: 14px;
}
@keyframes list-spin {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

.truncate {
  display: inline-block;
  max-width: 100%;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  vertical-align: bottom;
}

.url-cell {
  max-width: 100%;
}

.filename-cell {
  max-width: 220px;
}

.cell-image {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.cell-thumb,
.item-thumb {
  width: 40px;
  height: 40px;
  border-radius: 8px;
  object-fit: cover;
  border: 1px solid var(--border);
  background: #fff;
  display: block;
}

.buyer-body .buyer-masonry .buyer-item-thumb {
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 3;
  border-radius: 12px 12px 0 0;
  background: #f3f5f9;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.buyer-body .buyer-masonry .buyer-item-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.buyer-item-thumb-empty {
  font-size: 12px;
  color: var(--muted);
}

.buyer-item-card {
  display: block;
  padding: 0;
  overflow: hidden;
  margin-bottom: 12px;
  break-inside: avoid;
  position: relative;
  z-index: 1;
}

.buyer-item-body {
  padding: 10px 12px 12px;
}

.buyer-item-title {
  font-weight: 600;
  font-size: 14px;
  margin-bottom: 6px;
}

.buyer-item-meta {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-top: 6px;
}

.buyer-item-metric {
  display: grid;
  gap: 4px;
}

.buyer-item-label {
  font-size: 11px;
  color: var(--muted);
}

.buyer-item-value {
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
}

.buyer-item-value.price {
  color: #e23b3b;
  font-weight: 700;
}

.buyer-item-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 6px;
}

.buyer-item-tag {
  display: inline-flex;
  align-items: center;
  max-width: 100%;
  padding: 4px 8px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: #f1f4f9;
  color: #5f6f82;
  font-size: 11px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.buyer-inquiry-tag {
  position: absolute;
  top: 8px;
  right: 8px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  background: #e8f7ed;
  color: #2e8b57;
  border: 1px solid #c8e6c9;
  box-shadow: 0 6px 16px rgba(46, 139, 87, 0.15);
  z-index: 2;
}

.status-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #e53935;
  display: inline-block;
  margin-right: 6px;
}

.buyer-inquiry-tag.new-reply {
  background: #e53935;
  color: #fff;
  border-color: #e53935;
  box-shadow: 0 6px 16px rgba(229, 57, 53, 0.2);
}

.buyer-item-sub {
  font-size: 12px;
  color: var(--muted);
  margin-top: 4px;
}

.buyer-item-link {
  text-decoration: none;
  color: inherit;
}

.buyer-detail-header {
  align-items: flex-start;
}

.buyer-detail-page .buyer-top {
  background: transparent;
  padding-bottom: 0;
}

.buyer-detail-page .buyer-scroll {
  padding-top: 0;
  margin-top: -72px;
}

.buyer-detail-page .buyer-back {
  color: var(--text);
}

.buyer-detail-page .buyer-detail-hero {
  margin: 0 -16px 12px;
}

.buyer-detail-page .buyer-detail-image {
  border-radius: 0;
  aspect-ratio: 1 / 1;
}

.buyer-detail-hero {
  margin-bottom: 12px;
}

.buyer-detail-image {
  width: 100%;
  aspect-ratio: 4 / 3;
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid var(--border);
  background: #f3f5f9;
  display: flex;
  align-items: center;
  justify-content: center;
}

.buyer-detail-image img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.buyer-detail-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 14px;
  margin-bottom: 12px;
  box-shadow: 0 12px 24px rgba(15, 23, 42, 0.04);
}

.buyer-detail-section-title {
  font-weight: 600;
  margin-bottom: 10px;
}

.buyer-detail-price {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 10px;
}

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

.buyer-detail-metric {
  display: grid;
  gap: 4px;
}

.buyer-detail-metric.price-metric {
  text-align: right;
}

.buyer-detail-metric.price-metric .buyer-detail-value {
  justify-self: end;
  white-space: nowrap;
}

.buyer-detail-label {
  font-size: 11px;
  color: var(--muted);
}

.buyer-detail-value {
  font-size: 16px;
  font-weight: 600;
  color: var(--text);
}

.buyer-detail-value.price {
  color: #e23b3b;
  font-weight: 700;
}

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

.buyer-detail-row {
  display: grid;
  grid-template-columns: 90px 1fr;
  gap: 10px;
  font-size: 12px;
}

.buyer-detail-key {
  color: var(--muted);
}

.buyer-detail-val a {
  color: var(--primary);
  text-decoration: none;
}

.buyer-detail-empty {
  color: var(--muted);
  font-size: 12px;
}

.buyer-inquiry-card {
  margin-bottom: 24px;
  padding-bottom: 96px;
}

.buyer-message-card {
  padding-bottom: 96px;
}

.buyer-inquiry-form {
  display: grid;
  gap: 16px;
}

.buyer-inquiry-sent {
  margin-top: 10px;
  font-size: 12px;
  color: var(--muted);
}

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

.buyer-inquiry-options {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(72px, 1fr));
  gap: 10px;
}

.buyer-inquiry-row.check {
  grid-template-columns: 1fr auto;
  align-items: center;
}

.buyer-inquiry-label {
  font-size: 12px;
  color: var(--muted);
}

.buyer-inquiry-choice {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--text);
  justify-content: center;
}

.buyer-inquiry-form input[type="text"],
.buyer-inquiry-form textarea {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 10px 12px;
  font-size: 13px;
  resize: vertical;
}

.inquiry-answer {
  font-size: 13px;
  color: var(--text);
}

.buyer-inquiry-form input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: var(--primary);
}

.buyer-inquiry-submit {
  width: 100%;
}

.buyer-body .buyer-primary-footer {
  position: fixed;
  left: 16px;
  right: 16px;
  bottom: env(safe-area-inset-bottom, 0px);
  z-index: 10;
}

.buyer-body .buyer-primary-footer .buyer-btn {
  width: 100%;
  max-width: 100%;
  height: 32px;
  line-height: 32px;
  padding: 0 14px;
}

.buyer-inquiry-submit:disabled,
.buyer-inquiry-submit.is-disabled {
  background: #e6e9f2;
  color: #9aa3b2;
  border-color: #d9dee8;
  box-shadow: none;
  cursor: not-allowed;
}

.buyer-filter-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 8px;
  align-items: center;
  transition: max-width 0.2s ease;
}

.buyer-filter-input,
.buyer-filter-select {
  border-radius: 999px;
  border: 1px solid rgba(0, 0, 0, 0.08);
  padding: 6px 14px;
  font-size: 14px;
  outline: none;
  transition: border-color 0.2s ease;
}

.buyer-filter-input:focus,
.buyer-filter-select:focus {
  border-color: rgba(0, 0, 0, 0.3);
}

.buyer-filter-row.is-open {
  display: flex;
}

.buyer-filter-row:not(.is-open) .buyer-filter-input {
  width: 0;
  padding: 0;
  border: 0;
  visibility: hidden;
  opacity: 0;
  pointer-events: none;
  margin: 0;
}

.buyer-filter-row.is-open .buyer-filter-input {
  visibility: visible;
  opacity: 1;
}

.buyer-filter-input {
  flex: 1;
  min-width: 180px;
}

.buyer-message-card {
  margin-bottom: 24px;
}

.buyer-message-composer {
  display: grid;
  gap: 10px;
}

.buyer-message-input {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 10px 12px;
  font-size: 13px;
  resize: vertical;
}

.buyer-message-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.buyer-message-history {
  margin-top: 12px;
  display: grid;
  gap: 12px;
}

.buyer-message-item {
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 12px 14px;
  background: #fff;
}

.buyer-message-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 6px;
}

.buyer-message-body {
  font-size: 13px;
  color: var(--text);
  line-height: 1.6;
  word-break: break-word;
}

.buyer-handshake-rows {
  display: grid;
  gap: 6px;
}

.buyer-handshake-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}

.buyer-handshake-label {
  color: var(--muted);
}

.buyer-handshake-value {
  text-align: right;
  color: var(--text);
}

.buyer-message-send:disabled {
  background: #e6e9f2;
  color: #9aa3b2;
  border-color: #d9dee8;
  box-shadow: none;
  cursor: not-allowed;
}

.item-sub {
  font-size: 11px;
  color: var(--muted);
  margin-top: 2px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}

.meta-info {
  margin-top: 6px;
  display: flex;
  flex-wrap: wrap;
  gap: 12px 16px;
  font-size: 12px;
  color: var(--muted);
}

.meta-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.meta-label {
  color: var(--text);
}

.meta-value {
  max-width: 360px;
}

.cell-inline {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.cell-stack {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.cell-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: nowrap;
  overflow: visible;
}

.copy-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  padding: 0;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: #fff;
  color: var(--text);
  cursor: pointer;
  transition: border-color 0.12s ease, box-shadow 0.12s ease, transform 0.12s ease;
}

.copy-btn svg {
  width: 12px;
  height: 12px;
  fill: currentColor;
}

.copy-btn:hover {
  border-color: #9fb6ff;
  box-shadow: 0 0 0 2px rgba(80, 110, 255, 0.15);
}

.copy-btn:active {
  transform: translateY(1px);
}

.copy-btn.copied {
  border-color: #4ecb71;
  box-shadow: 0 0 0 2px rgba(78, 203, 113, 0.2);
}

.copy-toast {
  position: fixed;
  right: 24px;
  bottom: 24px;
  padding: 8px 12px;
  border-radius: 999px;
  font-size: 12px;
  letter-spacing: 0.3px;
  background: rgba(15, 18, 26, 0.92);
  color: #fff;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.2s ease, transform 0.2s ease;
  z-index: 9999;
}

.copy-toast.ok {
  background: rgba(38, 153, 86, 0.95);
}

.copy-toast.fail {
  background: rgba(196, 60, 60, 0.95);
}

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

.invite-toast {
  position: fixed;
  top: 16px;
  right: 16px;
  padding: 12px 16px;
  background: #eff6ff;
  color: #111827;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
  z-index: 9999;
  max-width: 320px;
  font-size: 14px;
  opacity: 1;
  transition: opacity 0.3s ease;
}

.invite-toast.error {
  background: #fee2e2;
}

.invite-toast.success {
  background: #ecfdf3;
}

.invite-toast.is-fading {
  opacity: 0;
}

.item-title {
  display: inline-block;
  max-width: 100%;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  vertical-align: bottom;
}

.global-img-pop {
  position: fixed;
  left: 0;
  top: 0;
  background: #fff;
  border: 1px solid var(--border);
  box-shadow: 0 12px 30px rgba(31, 28, 26, 0.18);
  border-radius: 12px;
  padding: 8px;
  opacity: 0;
  transform: scale(0.98);
  transition: opacity 0.12s ease, transform 0.12s ease;
  z-index: 60;
  pointer-events: none;
}

.global-img-pop.active {
  opacity: 1;
  transform: scale(1);
}

.global-img-pop img {
  max-width: 180px;
  max-height: 180px;
  display: block;
}

.global-img-pop.large img {
  max-width: 400px;
  max-height: 400px;
}

.tab-pane {
  display: none;
}

.tab-pane.active {
  display: block;
}

.mapping-select,
.mapping-action {
  width: 100%;
  padding: 6px 8px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: #fff;
  font-size: 12px;
}

.mapping-stack {
  display: grid;
  gap: 6px;
}

.pill {
  font-size: 12px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 999px;
  text-align: center;
}

.pill.ok {
  background: rgba(47, 177, 160, 0.12);
  color: var(--go);
}

.pill.warn {
  background: rgba(245, 124, 0, 0.12);
  color: var(--warn);
}

.pill.drop {
  background: rgba(229, 67, 110, 0.12);
  color: var(--drop);
}

.tag-pill {
  display: inline-flex;
  align-items: center;
  padding: 2px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  border: 1px solid transparent;
  line-height: 1.4;
}

.tag-pill.neutral {
  background: #f1f3f5;
  color: #6b7280;
  border-color: #e5e7eb;
}

.tag-pill.success {
  background: #e8f7ed;
  color: #2e8b57;
  border-color: #c8e6c9;
}

.tag-pill.info {
  background: #e8f0ff;
  color: #3f51b5;
  border-color: #c5cae9;
}

.tag-pill.danger {
  background: #ffebee;
  color: #c62828;
  border-color: #ffcdd2;
}

.tag-pill.removable {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 999px;
  background: #eef1f7;
  border: 1px solid var(--border);
  color: var(--text);
  cursor: pointer;
}

.tag-pill.removable .chip-text {
  max-width: 180px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tag-pill.removable .chip-close {
  font-size: 14px;
  line-height: 1;
  color: var(--muted);
}

.tag-pill.removable:hover {
  border-color: #9fb6ff;
}

.tag-pill.processing {
  background: #e8f0ff;
  color: #335cff;
  border-color: #c8d6ff;
}

.progress-inline {
  margin-top: 8px;
  height: 4px;
  border-radius: 999px;
  background: #e7ecf4;
  overflow: hidden;
}

.progress-inline span {
  display: block;
  height: 100%;
  width: 40%;
  background: linear-gradient(90deg, #5e7bff, #7be2ff);
  animation: progressSlide 1.1s ease-in-out infinite;
}

.snapshot {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

.snapshot-card {
  background: #f5f7fb;
  border-radius: 10px;
  padding: 14px;
  display: grid;
  gap: 8px;
  border: 1px solid var(--border);
}

.snapshot-card.go {
  background: rgba(47, 177, 160, 0.08);
  border: 1px solid rgba(47, 177, 160, 0.2);
}

.tag {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--muted);
}

.value {
  font-size: 22px;
  font-weight: 600;
}

.label {
  font-size: 12px;
  color: var(--muted);
}

.muted {
  color: var(--muted);
  margin: 0;
  font-size: 13px;
  line-height: 1.6;
}

.chart-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(360px, 1fr));
  gap: 16px;
}

.status-progress {
  margin-bottom: 18px;
  padding: 16px;
  border-radius: 12px;
  background: #f7f9fc;
  border: 1px solid var(--border);
}

.status-progress-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.status-progress-header h3 {
  margin: 0 0 4px 0;
  font-size: 16px;
}

.amazon-progress {
  margin-top: 10px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.amazon-progress .progress-bar {
  height: 8px;
}

.amz-thumb {
  width: 40px;
  height: 40px;
  border-radius: 8px;
  object-fit: cover;
  display: inline-block;
  background: #f3f4f6;
}

.enrich-panel {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 280px;
}

.amz-link {
  color: #1f4fd6;
  text-decoration: none;
}

.amz-link:hover {
  text-decoration: underline;
}

.amazon-table .thumb {
  position: relative;
  display: inline-block;
}

.amazon-table .ellipsis {
  max-width: 220px;
  display: inline-block;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  vertical-align: bottom;
}

.amazon-table .thumb::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 400px;
  height: 400px;
  transform: translate(-50%, -50%);
  background: #fff;
  background-image: var(--preview);
  background-size: cover;
  background-position: center;
  border-radius: 12px;
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.2);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.15s ease;
  z-index: 20;
}

.amazon-table .thumb:hover::after {
  opacity: 1;
}

.progress-bar {
  width: 100%;
  height: 10px;
  border-radius: 999px;
  background: #e5e7eb;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  width: 0%;
  border-radius: 999px;
  background: linear-gradient(90deg, #4f46e5, #22c55e);
  transition: width 0.4s ease;
}

.progress-stats {
  margin-top: 6px;
  font-size: 12px;
}

.settings-card {
  padding: 16px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: #fff;
}

.settings-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.settings-inputs {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.settings-field {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 12px;
  color: var(--muted);
}

.settings-input {
  width: 96px;
  height: 32px;
  padding: 6px 8px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: #fff;
  font-size: 13px;
  color: var(--text);
}

.settings-static {
  min-width: 140px;
  height: 32px;
  padding: 6px 10px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: #f8fafc;
  font-size: 13px;
  color: var(--text);
  display: flex;
  align-items: center;
}

.radio-group {
  display: flex;
  align-items: center;
  gap: 16px;
}

.radio-option {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
}

.auth-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--page);
}

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

.auth-header .brand {
  font-size: 22px;
  font-weight: 700;
  margin-bottom: 6px;
}

.auth-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 14px;
  font-size: 13px;
  color: var(--muted);
}

.auth-field input,
.auth-field select {
  height: 36px;
  border-radius: 8px;
  border: 1px solid var(--border);
  padding: 6px 10px;
  font-size: 14px;
  color: var(--text);
}

.captcha-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 12px;
  flex-wrap: nowrap;
}

.captcha-row input {
  flex: 1;
  min-width: 0;
  height: 36px;
  border-radius: 8px;
  border: 1px solid var(--border);
  padding: 6px 10px;
  font-size: 14px;
  color: var(--text);
}

.captcha-image-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 0 0 auto;
}

.captcha-image {
  width: 120px;
  height: 40px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: #f8fafc;
}

.captcha-refresh,
.btn.tiny.captcha-refresh {
  width: 32px !important;
  height: 32px !important;
  padding: 0 !important;
  min-width: 32px !important;
  min-height: 32px !important;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%235a6c82' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'><path d='M4 12a8 8 0 1 0 2.7-6.2'/><path d='M4 4v5h5'/></svg>");
  background-repeat: no-repeat;
  background-position: center;
  background-size: 20px 20px;
}

.auth-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 14px;
}

.auth-actions.center {
  justify-content: center;
}

.auth-actions.split {
  justify-content: space-between;
  align-items: flex-start;
}

.auth-primary-stack {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}

.auth-primary-stack .save-status {
  margin: 0;
  text-align: center;
  min-height: 18px;
}

.auth-actions.center .btn {
  min-width: 220px;
}

.auth-actions.split .btn {
  min-width: 140px;
}

.chart-card {
  background: #fff;
  border-radius: 10px;
  padding: 14px;
  border: 1px solid var(--border);
  position: relative;
}

.chart-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
}

.toggle-group {
  display: inline-flex;
  gap: 6px;
  background: #f1f4f8;
  padding: 4px;
  border-radius: 999px;
}

.toggle {
  border: none;
  background: transparent;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 12px;
  cursor: pointer;
  color: var(--muted);
}

.toggle.active {
  background: #fff;
  color: var(--text);
  box-shadow: 0 6px 16px rgba(31, 41, 51, 0.12);
}

.sub-toggle {
  margin-top: 8px;
}

.chart-canvas {
  margin-top: 12px;
  height: 260px;
}

.chart-canvas canvas {
  width: 100% !important;
  height: 100% !important;
}

.chart-loading-overlay {
  position: absolute;
  inset: 0;
  background: rgba(255, 255, 255, 0.82);
  backdrop-filter: blur(1px);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
  border-radius: 10px;
}

.chart-card.is-loading .chart-loading-overlay {
  opacity: 1;
  pointer-events: all;
}

.chart-loading-indicator {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  background: rgba(0, 0, 0, 0.04);
  border-radius: 10px;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.06);
  font-weight: 600;
  color: #3f4957;
}

.chart-loading-indicator .spinner {
  width: 20px;
  height: 20px;
  border: 3px solid #d0d5dd;
  border-top-color: #3b82f6;
  border-radius: 50%;
  animation: chart-spin 1s linear infinite;
}

.chart-loading-indicator .text {
  font-size: 13px;
}

@keyframes chart-spin {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 999;
  padding: 16px;
}

.modal-backdrop.active {
  display: flex;
}

.modal {
  background: #fff;
  border-radius: 10px;
  padding: 16px;
  width: min(720px, 96vw);
  border: 1px solid var(--border);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.12);
}

.modal.infer-modal {
  width: min(960px, 96vw);
  max-height: 80vh;
  overflow: auto;
}

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

.infer-table th,
.infer-table td {
  padding: 8px 10px;
  border-bottom: 1px solid var(--border);
  text-align: left;
  font-size: 13px;
}

.infer-table th {
  color: var(--muted);
  font-weight: 600;
  background: #f7f9fc;
  position: sticky;
  top: 0;
}

.modal-actions {
  margin-top: 12px;
  justify-content: flex-end;
  align-items: center;
  gap: 8px;
  display: flex;
}

.form-row {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 12px;
}

.form-row label {
  font-size: 12px;
  color: #64748b;
}

.delete-preview {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 12px;
  max-height: 180px;
  overflow-y: auto;
  padding-right: 4px;
}

.delete-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 8px;
  border-radius: 10px;
  background: rgba(248, 250, 252, 0.9);
}

.delete-thumb {
  width: 40px;
  height: 40px;
  border-radius: 8px;
  object-fit: cover;
  background: #e7ebf2;
  flex: 0 0 auto;
}

.delete-thumb.placeholder {
  background: #e7ebf2;
}

.delete-meta {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.delete-title {
  font-size: 13px;
  color: #1f2937;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 360px;
}

.delete-sub {
  display: flex;
  gap: 6px;
  align-items: center;
  font-size: 12px;
  color: #6b7280;
}

.delete-label {
  color: #94a3b8;
}

.delete-id {
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
}

.visibility-options {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
}

.audit-list {
  margin-top: 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 8px;
  background: #f7f9fc;
  max-height: 180px;
  overflow: auto;
  font-size: 12px;
}

.audit-item {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 6px 4px;
  border-bottom: 1px dashed var(--border);
}

.audit-item:last-child {
  border-bottom: none;
}

.audit-meta {
  color: var(--muted);
  font-size: 12px;
}

.tag-pill.caution {
  background: rgba(245, 158, 11, 0.12);
  color: #b45309;
  border: 1px solid rgba(245, 158, 11, 0.35);
}

.tag-pill.public {
  background: rgba(16, 185, 129, 0.12);
  color: #0f766e;
  border: 1px solid rgba(16, 185, 129, 0.35);
}

body.modal-open {
  overflow: hidden;
}

@keyframes floatIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 900px) {
  .grid {
    grid-template-columns: repeat(6, 1fr);
  }

  .hero,
  .upload,
  .panel {
    grid-column: span 6;
  }

  .mapping-workspace {
    grid-column: span 6;
  }

  .hero-meta {
    grid-template-columns: 1fr;
  }

  .snapshot {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 600px) {
  .masthead {
    flex-direction: column;
    gap: 12px;
  }

  .hero h1 {
    font-size: 26px;
  }

  .hero-actions {
    flex-direction: column;
  }
}

.inquiry-filters {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.inquiry-search-field {
  flex: 1 1 260px;
  min-width: 220px;
}

.inquiry-search-field input {
  min-width: 240px;
}

.inquiry-filter-right {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 12px;
}

.inquiry-status-tabs {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.inquiry-status-select {
  width: auto;
  min-width: 140px;
}

.inquiry-workbench {
  display: flex;
  align-items: flex-start;
  grid-column: span 12;
  gap: 16px;
  margin-top: -12px;
}

.inquiry-list {
  flex: 0 0 20%;
  max-width: 20%;
}

.inquiry-list .panel-header h3 {
  margin: 0 0 8px;
}

.inquiry-detail {
  flex: 0 0 36%;
  max-width: 36%;
}

.inquiry-reply-panel {
  flex: 0 0 44%;
  max-width: 44%;
}

.inquiry-toolbar .inquiry-filters {
  width: 100%;
}

.inquiry-toolbar {
  margin-bottom: 8px;
}

.inquiry-list {
  display: flex;
  flex-direction: column;
  min-height: 520px;
}

.inquiry-list-body {
  display: grid;
  gap: 2px;
  margin-top: 8px;
  max-height: none;
  overflow: visible;
  padding-right: 0;
}

.inquiry-list-item {
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 8px 10px;
  display: grid;
  gap: 8px;
  cursor: pointer;
  background: #fff;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
}

.inquiry-list-item:hover {
  border-color: #9fb6ff;
  box-shadow: 0 6px 18px rgba(15, 23, 42, 0.08);
  transform: translateY(-1px);
}

.inquiry-list-item.active {
  border-color: rgba(79, 124, 255, 0.6);
  box-shadow: 0 10px 24px rgba(79, 124, 255, 0.16);
  background: #f7f9ff;
}

.inquiry-list-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  margin: 0;
}

.inquiry-list-main {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.inquiry-thumb-wrap {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: #f3f5f9;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  flex: 0 0 auto;
}

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

.inquiry-thumb-placeholder {
  font-size: 11px;
  color: var(--muted);
}

.inquiry-list-title {
  font-weight: 600;
  font-size: 14px;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.inquiry-list-meta {
  font-size: 12px;
  color: var(--muted);
}

.inquiry-list-snippet {
  font-size: 12px;
  color: #4b5666;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  flex: 1 1 70%;
  min-width: 0;
  max-width: 100%;
}

.inquiry-list-meta.inquiry-list-snippet {
  display: inline-block;
}

@media (max-width: 600px) {
  .inquiry-list-row:last-child .inquiry-list-snippet {
    max-width: calc(100% - 120px);
  }
}

.inquiry-detail-head {
  display: flex;
  flex-direction: column;
  gap: 16px;
  align-items: stretch;
}

.inquiry-detail-block {
  display: grid;
  gap: 10px;
}

.inquiry-detail-block-title {
  font-weight: 600;
  font-size: 14px;
  color: var(--text);
}

.inquiry-detail-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.inquiry-detail-id {
  font-size: 12px;
  color: var(--muted);
}

.inquiry-detail-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
}

.inquiry-detail-item {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 10px;
  align-items: center;
  min-width: 0;
}

.inquiry-detail-label {
  font-size: 12px;
  color: var(--muted);
  line-height: 1.4;
}

.inquiry-detail-value {
  font-size: 13px;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.4;
}

.inquiry-detail {
  display: flex;
  flex-direction: column;
}

.inquiry-detail-body {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-top: 12px;
}

.inquiry-detail-section {
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-width: 0;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: #f8f9fc;
}

.inquiry-summary-compact .buyer-inquiry-form {
  gap: 10px;
}

.inquiry-summary-questions .buyer-inquiry-label {
  margin-top: 6px;
}

.inquiry-reply {
  display: grid;
  gap: 12px;
}

.inquiry-reply-manage {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: #f8f9fc;
}

.inquiry-reply-manage-title {
  font-size: 13px;
  font-weight: 600;
}

.inquiry-close-product {
  display: flex;
  gap: 12px;
  align-items: center;
  margin: 12px 0;
  padding: 10px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: #f8f9fc;
}

.inquiry-close-thumb {
  width: 64px;
  height: 64px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: #f1f3f6;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  color: var(--muted);
  overflow: hidden;
}

.inquiry-close-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.inquiry-close-title {
  font-weight: 600;
  font-size: 14px;
  margin-bottom: 4px;
}

.inquiry-close-id {
  font-size: 12px;
  color: var(--muted);
}

.inquiry-close-choice {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--text);
}

.inquiry-sync-list {
  display: grid;
  gap: 6px;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: #f8f9fc;
  font-size: 13px;
}

.inquiry-sync-list .muted {
  margin: 0;
}

.modal-actions.split {
  justify-content: space-between;
}

.inquiry-close-actions {
  justify-content: flex-end;
}

.inquiry-close-actions .btn {
  min-width: 120px;
}

.inquiry-reply .panel-actions {
  justify-content: flex-end;
}

.inquiry-reply .panel-actions #inquiry-reply-status {
  margin-right: auto;
  color: #c62828;
}

.inquiry-reply .btn:disabled {
  background: #f4f6fb;
  color: #9aa3b2;
  border-color: #e4e9f2;
  box-shadow: none;
  cursor: not-allowed;
}

#inquiry-reply {
  min-width: 200px;
  margin: 10px 0;
}

#inquiry-reply:disabled {
  background: #f4f6fb;
  color: #9aa3b2;
  border-color: #e4e9f2;
  box-shadow: none;
  cursor: not-allowed;
}

.inquiry-reply.is-closed .inquiry-chat-composer {
  display: none;
}

.inquiry-handshake {
  padding: 12px 14px;
  border: 1px solid #e6ebf3;
  border-radius: 12px;
  background: #fbfcff;
  margin-bottom: 16px;
}

.inquiry-handshake-title {
  font-weight: 600;
  margin-bottom: 10px;
}

.inquiry-message-list {
  margin-top: 18px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.inquiry-message-item {
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid #e6ebf3;
  background: #fff;
}

.inquiry-message-meta {
  font-size: 12px;
  color: #64748b;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 6px;
}

.inquiry-message-time {
  margin-left: 12px;
  white-space: nowrap;
}

.inquiry-message-body {
  font-size: 14px;
  color: #1f2a44;
  line-height: 1.6;
  white-space: normal;
  word-break: break-word;
}

.handshake-rows {
  display: grid;
  gap: 6px;
}

.handshake-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}

.handshake-label {
  color: #526078;
}

.handshake-value {
  text-align: right;
  color: #1f2a44;
}

.inquiry-reply.is-closed .inquiry-reply-choice {
  color: #9aa3b2;
}

.inquiry-reply.is-closed .inquiry-reply-choice input {
  accent-color: #cbd5e1;
}

.inquiry-reply-answers {
  display: grid;
  gap: 15px;
}

.inquiry-reply-item {
  display: block;
}

.inquiry-reply-label {
  font-size: 12px;
  color: var(--muted);
}

.inquiry-reply-item > :not(.inquiry-reply-label) {
  margin-top: 6px;
}

.inquiry-reply-item.is-invalid {
  border: 1px solid #e53935;
  border-radius: 10px;
  padding: 8px 10px;
  background: rgba(229, 57, 53, 0.06);
}

.inquiry-reply-input {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 10px 12px;
  font-size: 13px;
  background: #fff;
  resize: vertical;
}

.inquiry-reply-input:disabled {
  color: #9aa3b2;
  background: #f4f6fb;
  border-color: #e4e9f2;
}

.inquiry-reply-input.inline {
  height: 36px;
  padding: 6px 10px;
}

.inquiry-reply-qty {
  max-width: 120px;
  text-align: right;
}

.inquiry-reply-qty::placeholder {
  color: #b7c0cd;
}

.inquiry-reply-input::placeholder {
  color: #b7c0cd;
}

.inquiry-reply-options {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.inquiry-reply-choice {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--text);
}

.inquiry-reply-inline {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.inquiry-reply-inline-tight {
  flex-wrap: nowrap;
}

.inquiry-reply-unit {
  height: 36px;
  border-radius: 8px;
  border: 1px solid var(--border);
  padding: 4px 8px;
  background: #fff;
  font-size: 12px;
}

.inquiry-reply-static {
  font-size: 13px;
  color: var(--text);
  line-height: 1.4;
}

.inquiry-summary {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
}

.inquiry-summary .buyer-inquiry-row {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 10px;
  align-items: center;
}

.inquiry-summary .buyer-inquiry-label {
  font-size: 12px;
  color: var(--muted);
  line-height: 1.4;
}

.inquiry-summary .inquiry-answer {
  font-size: 13px;
  color: var(--text);
  word-break: break-word;
  line-height: 1.4;
}

.inquiry-question-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 10px;
  background: #f1f4ff;
  border: 1px solid rgba(79, 124, 255, 0.2);
}

.inquiry-question-index {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: #4f7cff;
  color: #fff;
  font-weight: 700;
  font-size: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
}

.inquiry-question-text {
  font-weight: 700;
  color: #1f2a44;
  font-size: 13px;
}

.inquiry-summary-row {
  display: flex;
  gap: 8px;
  align-items: baseline;
}

.inquiry-summary-label {
  color: #64748b;
  font-size: 12px;
  min-width: 90px;
}

.inquiry-summary-value {
  color: #0f172a;
  font-weight: 600;
  font-size: 13px;
  word-break: break-word;
}

.inquiry-quote-row {
  display: grid;
  grid-template-columns: 1fr 120px;
  gap: 12px;
}

.status-tag {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
  border: 1px solid transparent;
}

.status-new {
  background: rgba(59, 130, 246, 0.12);
  color: #1d4ed8;
  border-color: rgba(59, 130, 246, 0.3);
}

.status-replied {
  background: rgba(16, 185, 129, 0.12);
  color: #0f766e;
  border-color: rgba(16, 185, 129, 0.3);
}

.status-negotiating {
  background: rgba(234, 179, 8, 0.14);
  color: #b45309;
  border-color: rgba(234, 179, 8, 0.4);
}

.status-closed {
  background: rgba(148, 163, 184, 0.2);
  color: #475569;
  border-color: rgba(148, 163, 184, 0.4);
}

.status-blocked {
  background: rgba(239, 68, 68, 0.12);
  color: #b91c1c;
  border-color: rgba(239, 68, 68, 0.3);
}

.status-default {
  background: rgba(148, 163, 184, 0.14);
  color: #475569;
  border-color: rgba(148, 163, 184, 0.3);
}

@media (max-width: 1100px) {
  .inquiry-summary {
    grid-template-columns: 1fr;
  }
}

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

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

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

  .inquiry-list-body,
  .inquiry-detail {
    max-height: none;
  }

  .inquiry-reply-panel {
    grid-column: auto;
  }
}

/* --- TikTok 分析页新增样式 --- */
.tk-page {
  background: #f6f7fa;
}

.tk-main {
  width: 100%;
  max-width: none;
  margin: 0 0 48px;
  padding: 12px 0 0;
}

.tk-section {
  width: 100%;
  margin-bottom: 18px;
}

.tk-section .panel-header {
  align-items: center;
}

.tk-section .panel-actions .btn {
  margin-left: 8px;
}

.tk-section .stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
  margin-top: 12px;
}

.tk-section .stat-card {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  padding: 14px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.04);
  color: #0f172a;
}

.tk-section .stat-card .muted {
  color: #64748b;
  font-size: 12px;
}

.tk-section .stat-card .stat-value {
  margin-top: 6px;
  font-size: 20px;
  font-weight: 700;
  color: #0f172a;
}

.tk-progress-wrap {
  margin-top: 12px;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  padding: 10px 12px;
  background: #fff;
}

.tk-progress-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-size: 13px;
  color: #334155;
}

.tk-progress-track {
  margin-top: 8px;
  width: 100%;
  height: 8px;
  border-radius: 999px;
  background: #e2e8f0;
  overflow: hidden;
}

.tk-progress-fill {
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, #4f7cff, #2fb1a0);
  transition: width 0.3s ease;
}

.tk-section .table {
  margin-top: 16px;
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  overflow: hidden;
  color: #0f172a;
}

.tk-section .table-head,
.tk-section .table-row {
  display: grid;
  grid-template-columns: 1.2fr 0.6fr 0.6fr 0.6fr 0.8fr;
  gap: 8px;
  align-items: center;
  padding: 12px 14px;
}

.tk-section .table-head {
  background: #f8fafc;
  font-weight: 700;
  color: #0f172a;
  font-size: 13px;
  border-bottom: 1px solid #e5e7eb;
}

.tk-section .table-row {
  border-bottom: 1px solid #e5e7eb;
  cursor: pointer;
  transition: background 0.15s ease;
}

.tk-section .table-row:hover {
  background: rgba(79, 124, 255, 0.08);
}

.tk-section .table-cell {
  min-width: 0;
}

.tk-section .table-cell.small {
  font-size: 13px;
  color: #64748b;
}

.tk-section .tk-inline-action {
  margin-top: 6px;
}

.tk-section .tk-row-progress {
  margin-top: 8px;
}

.tk-section .tk-row-progress-text {
  font-size: 12px;
  margin-bottom: 4px;
}

.tk-section .tk-row-progress-track {
  width: 180px;
  max-width: 100%;
  height: 6px;
  border-radius: 999px;
  background: #e2e8f0;
  overflow: hidden;
}

.tk-section .tk-row-progress-fill {
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, #4f7cff, #2fb1a0);
  transition: width 0.3s ease;
}

.tk-section .strong {
  font-weight: 700;
  color: #0f172a;
}

.tk-section .pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.2px;
  border: 1px solid transparent;
}

.tk-section .pill.success {
  background: rgba(16, 185, 129, 0.18);
  color: #34d399;
  border-color: rgba(52, 211, 153, 0.4);
}

.tk-section .pill.warn {
  background: rgba(234, 179, 8, 0.2);
  color: #fbbf24;
  border-color: rgba(251, 191, 36, 0.4);
}

.tk-section .pill.danger {
  background: rgba(239, 68, 68, 0.18);
  color: #ef4444;
  border-color: rgba(239, 68, 68, 0.4);
}

.tk-section .pill.info {
  background: rgba(59, 130, 246, 0.18);
  color: #3b82f6;
  border-color: rgba(59, 130, 246, 0.4);
}

.tk-section .chart-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 14px;
  margin: 16px 0;
}

.tk-section .chart-card {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 14px;
  box-shadow: 0 6px 14px rgba(0, 0, 0, 0.05);
}

.tk-section .chart-header h3 {
  margin: 0;
  color: #0f172a;
}

.tk-section .chart-header .muted {
  color: #64748b;
}

.tk-section .chart-canvas {
  margin-top: 10px;
}

.tk-section .card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 12px;
  margin-top: 12px;
}

.tk-section .mini-card {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  padding: 12px;
  color: #0f172a;
  box-shadow: 0 6px 14px rgba(0, 0, 0, 0.04);
}

.tk-section .mini-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 6px;
  font-size: 12px;
  color: #64748b;
}

.tk-section .mini-card-title {
  font-weight: 700;
  line-height: 1.4;
  margin-bottom: 6px;
}

.tk-section .tk-product-title-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.tk-section .tk-product-title-col {
  min-width: 0;
}

.tk-section .tk-product-cover {
  display: block;
  object-fit: cover;
  background: #f3f4f6;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  flex-shrink: 0;
}

.tk-section .tk-product-cover-list {
  width: 56px;
  height: 56px;
}

.tk-section .tk-product-cover-card {
  width: 100%;
  aspect-ratio: 1 / 1;
  margin-bottom: 10px;
}

.tk-section .mini-card-meta {
  font-size: 12px;
  color: #4b5563;
  margin-bottom: 2px;
}

@media (max-width: 900px) {
  .tk-section .table-head,
  .tk-section .table-row {
    grid-template-columns: 1fr;
  }
}

/* 产品列表专用表头列数 */
.tk-section #tk-product-table .table-head,
.tk-section #tk-product-table .table-row {
  grid-template-columns: 60px 3fr 1fr 1fr 1.2fr 1fr 1fr 1.4fr 1fr;
}

.tk-section #tk-task-list .table-head,
.tk-section #tk-task-list .table-row {
  grid-template-columns: 1.2fr 0.58fr 0.58fr 0.5fr 0.85fr 0.42fr;
}

.tk-modal-backdrop {
  background: rgba(15, 23, 42, 0.42);
  backdrop-filter: blur(3px);
}

#tk-modal .tk-modal {
  width: min(760px, 94vw);
  border-radius: 14px;
  border-color: #dbe2ea;
  box-shadow: 0 20px 60px rgba(15, 23, 42, 0.2);
  padding: 20px;
}

#tk-modal .modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}

#tk-modal .modal-header h3 {
  margin: 0;
  font-size: 30px;
  font-weight: 800;
  letter-spacing: 0.2px;
}

#tk-modal .tk-modal-close {
  width: 34px;
  height: 34px;
  min-width: 34px;
  border-radius: 10px;
  border: 1px solid #d7dde5;
  background: #fff;
  color: #344256;
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
}

#tk-modal .tk-modal-close:hover {
  background: #f8fafc;
}

#tk-modal .modal-body {
  padding-top: 2px;
}

#tk-modal .form-grid {
  display: grid;
  grid-template-columns: 2.2fr 1fr 1fr;
  gap: 12px;
}

#tk-modal label {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

#tk-modal input,
#tk-modal select {
  width: 100%;
  height: 40px;
  border: 1px solid #d6deea;
  border-radius: 10px;
  padding: 0 12px;
  font-size: 14px;
  background: #fff;
}

#tk-modal input:focus,
#tk-modal select:focus {
  border-color: #6f8dff;
  box-shadow: 0 0 0 3px rgba(79, 124, 255, 0.15);
  outline: none;
}

#tk-modal .modal-actions {
  margin-top: 18px;
  padding-top: 12px;
  border-top: 1px solid #e7edf4;
}

@media (max-width: 760px) {
  #tk-modal .form-grid {
    grid-template-columns: 1fr;
  }
}
/* User analytics page */
#analytics-cards {
  display: none;
  gap: 12px;
  flex-direction: column;
}

#analytics-cards.ua-visible {
  display: flex;
}

#analytics-cards .metric-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

#analytics-cards .metric-card {
  flex: 1 1 180px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

#analytics-cards .metric-label {
  font-size: 13px;
  color: var(--muted, #64748b);
  margin-bottom: 6px;
}

#analytics-cards .metric-value {
  font-size: 28px;
  font-weight: 700;
  line-height: 1.2;
}

#range-switcher .btn.active {
  background: #0f172a;
  color: #fff;
  border-color: #0f172a;
}

#range-switcher .btn {
  border: 1px solid #cbd5e1;
}

@media (max-width: 720px) {
  #analytics-cards .metric-card {
    flex: 1 1 45%;
  }
}
