:root {
  --app-bg: #eef0f7;
  --sidebar: #ffffff;
  --surface: #ffffff;
  --ink: #111827;
  --text: #344054;
  --muted: #98a2b3;
  --line: #eceef2;
  --soft: #f7f8fb;
  --black: #020617;
  --purple: #6d5df6;
  --cyan: #e9fbff;
  --blue: #2563eb;
  --orange: #f97316;
  --green: #16a34a;
  --shadow: 0 18px 48px rgba(28, 35, 52, 0.08);
  --layer-app-message: 20010;
  --layer-app-confirm: 20020;
  --layer-app-toast: 20030;
}

.total-selection-table-shell {
  width: 100%;
}

.total-selection-table-shell .tabulator {
  border: 1px solid rgba(226, 232, 240, 0.9);
  border-radius: 10px;
  overflow: hidden;
  font-size: 14px;
}

.total-selection-table-shell .tabulator .tabulator-header {
  background: #f8fafc;
  border-bottom: 1px solid rgba(226, 232, 240, 0.9);
}

.total-selection-table-shell .tabulator-row strong {
  display: block;
  color: #1e293b;
}

.total-selection-table-shell .tabulator-row small {
  display: block;
  margin-top: 4px;
  color: #64748b;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-width: 320px;
  min-height: 100vh;
  overflow: hidden;
  background: var(--app-bg);
  color: var(--ink);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    "PingFang SC", "Microsoft YaHei", sans-serif;
}

.login-body {
  display: grid;
  place-items: center;
  padding: 24px;
  background:
    radial-gradient(circle at 70% 18%, rgba(103, 232, 249, 0.3), transparent 24%),
    radial-gradient(circle at 35% 20%, rgba(135, 72, 255, 0.14), transparent 30%),
    var(--app-bg);
}

.login-shell {
  display: grid;
  grid-template-columns: minmax(260px, 0.85fr) minmax(340px, 420px);
  align-items: stretch;
  width: min(920px, 100%);
  min-height: 520px;
  border-radius: 22px;
  overflow: hidden;
  background: #ffffff;
  box-shadow: var(--shadow);
}

.login-brand {
  display: grid;
  align-content: center;
  gap: 18px;
  padding: 48px;
  background: #111827;
  color: #ffffff;
}

.login-logo {
  display: block;
  width: min(100%, 340px);
  height: auto;
  padding: 14px 16px;
  border-radius: 16px;
  background: #ffffff;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.22);
}

.login-brand p {
  color: #cbd5e1;
  font-weight: 800;
}

.login-card {
  display: grid;
  align-content: center;
  gap: 18px;
  padding: 48px;
}

.login-card h2 {
  font-size: 30px;
}

.login-card p {
  margin: 8px 0 0;
  color: var(--muted);
  font-weight: 700;
}

.login-card label {
  display: grid;
  gap: 8px;
  color: #667085;
  font-size: 14px;
  font-weight: 900;
}

.login-card input {
  height: 48px;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 0 14px;
  color: var(--ink);
  outline: none;
}

.login-card .dark-btn {
  min-height: 48px;
}

.login-error {
  min-height: 20px;
  color: #dc2626;
  font-weight: 800;
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

.app-frame {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  gap: 14px;
  height: 100vh;
  padding: 14px;
  transition: grid-template-columns 0.2s ease;
  overflow: hidden;
}

body.sidebar-collapsed .app-frame {
  grid-template-columns: 78px minmax(0, 1fr);
}

.sidebar,
.page {
  border-radius: 18px;
  background: var(--surface);
}

.sidebar {
  display: flex;
  flex-direction: column;
  height: calc(100vh - 28px);
  min-height: 0;
  padding: 20px;
  background: #fcfcfd;
  border: 1px solid rgba(236, 238, 242, 0.9);
  box-shadow: 0 20px 50px rgba(17, 24, 39, 0.05);
  overflow: hidden;
}

.brand-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 30px;
  align-items: center;
  gap: 12px;
  padding: 12px 0 20px;
}

.brand-identity {
  display: grid;
  min-width: 0;
  gap: 0;
  justify-items: start;
}

.brand-logo {
  display: block;
  object-fit: contain;
  object-position: left center;
}

.brand-logo-full {
  width: min(100%, 198px);
  height: auto;
}

.brand-logo-mark {
  display: none;
  width: 40px;
  height: 40px;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.user-row strong,
.user-row span {
  display: block;
}

.collapse-btn,
.bell-btn {
  display: grid;
  place-items: center;
  border: 1px solid #cfd6e1;
  border-radius: 7px;
  background: #ffffff;
  color: #667085;
  font-weight: 800;
}

.collapse-btn {
  width: 30px;
  height: 30px;
  font-size: 18px;
  border-color: #eceef2;
  border-radius: 10px;
  box-shadow: none;
}

.collapse-btn[aria-pressed="false"] {
  transform: rotate(180deg);
}

.platform-picker {
  position: relative;
  margin-bottom: 18px;
}

.platform-current {
  display: grid;
  grid-template-columns: 1fr 24px;
  align-items: center;
  width: 100%;
  min-height: 58px;
  border: 1px solid #eceef2;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.74);
  box-shadow: 0 10px 28px rgba(17, 24, 39, 0.04);
  color: var(--ink);
  font-size: 17px;
  font-weight: 650;
  text-align: left;
  padding: 0 14px 0 16px;
}

.platform-current:hover {
  border-color: #dde2eb;
  box-shadow: 0 14px 34px rgba(17, 24, 39, 0.06);
}

.chevron {
  display: grid;
  place-items: center;
  color: #667085;
  font-size: 20px;
  transition: transform 0.18s ease;
}

.platform-picker.open .chevron {
  transform: rotate(180deg);
}

.platform-menu {
  display: none;
  position: absolute;
  z-index: 5;
  top: calc(100% + 8px);
  left: 0;
  right: 0;
  gap: 6px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: #ffffff;
  box-shadow: 0 24px 52px rgba(28, 35, 52, 0.14);
}

.platform-picker.open .platform-menu {
  display: grid;
}

.platform-option {
  width: 100%;
  min-height: 42px;
  border: 0;
  border-radius: 14px;
  background: transparent;
  color: #667085;
  font-size: 15px;
  font-weight: 600;
  text-align: left;
  padding: 0 20px;
}

.platform-option:hover,
.platform-option.active {
  background: var(--soft);
  color: var(--ink);
}

.menu-list {
  display: grid;
  gap: 6px;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 2px 0;
}

.menu-item {
  position: relative;
  display: grid;
  grid-template-columns: 32px 1fr auto;
  align-items: center;
  width: 100%;
  min-height: 48px;
  border: 0;
  border-radius: 12px;
  padding: 0 12px;
  background: transparent;
  color: #6b7280;
  text-align: left;
  font-size: 16px;
  font-weight: 500;
  letter-spacing: 0;
  transition: background 0.16s ease, color 0.16s ease;
}

.menu-item::before {
  content: "";
  position: absolute;
  left: 0;
  top: 12px;
  bottom: 12px;
  width: 3px;
  border-radius: 999px;
  background: transparent;
}

.menu-group {
  display: grid;
  gap: 4px;
}

.menu-sublist {
  position: relative;
  display: none;
  gap: 2px;
  margin: -2px 0 6px 32px;
  padding: 4px 0 4px 18px;
}

.menu-sublist::before {
  content: "";
  position: absolute;
  left: 5px;
  top: 6px;
  bottom: 6px;
  width: 1px;
  background: #eceef2;
}

.menu-group.open .menu-sublist {
  display: grid;
}

.menu-subitem {
  position: relative;
  min-height: 34px;
  border: 0;
  border-radius: 9px;
  padding: 0 10px 0 14px;
  background: transparent;
  color: #667085;
  text-align: left;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0;
}

.menu-subitem::before {
  content: "";
  position: absolute;
  left: 2px;
  top: 50%;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #c8d1dd;
  transform: translateY(-50%);
}

.menu-subitem:hover,
.menu-subitem.active {
  background: #f4f6f8;
  color: var(--ink);
  box-shadow: none;
}

.menu-subitem.active::before {
  background: var(--purple);
}

.menu-group.open .menu-caret {
  transform: rotate(180deg);
}

body.sidebar-collapsed .brand-row {
  grid-template-columns: 1fr;
  justify-items: center;
  padding-bottom: 18px;
}

body.sidebar-collapsed .brand-identity {
  justify-items: center;
}

body.sidebar-collapsed .brand-logo-full,
body.sidebar-collapsed .platform-picker,
body.sidebar-collapsed .menu-item span:nth-child(2),
body.sidebar-collapsed .menu-badge,
body.sidebar-collapsed .menu-sublist {
  display: none;
}

body.sidebar-collapsed .brand-logo-mark {
  display: block;
}

body.sidebar-collapsed .collapse-btn {
  margin-top: 8px;
}

body.sidebar-collapsed .menu-list {
  justify-items: center;
}

body.sidebar-collapsed .sidebar .account-panel {
  justify-items: center;
  padding-top: 12px;
}

body.sidebar-collapsed .sidebar .quota-card,
body.sidebar-collapsed .sidebar .user-row div:nth-child(2),
body.sidebar-collapsed .sidebar .account-bell {
  display: none;
}

body.sidebar-collapsed .sidebar .user-row {
  display: grid;
  grid-template-columns: 1fr;
  justify-items: center;
  width: 48px;
  padding: 4px;
}

body.sidebar-collapsed .sidebar .account-menu {
  left: 58px;
  right: auto;
  bottom: 0;
  width: 220px;
}

body.sidebar-collapsed .menu-group {
  display: grid;
  justify-items: center;
  width: 48px;
  overflow: hidden;
}

body.sidebar-collapsed .menu-item {
  grid-template-columns: 1fr;
  justify-items: center;
  width: 48px;
  padding: 0;
}

body.sidebar-collapsed .menu-caret,
body.sidebar-collapsed .menu-sublist,
body.sidebar-collapsed .menu-sublist::before,
body.sidebar-collapsed .menu-subitem,
body.sidebar-collapsed .menu-subitem::before {
  display: none !important;
}

.menu-item:hover,
.menu-item.active {
  background: #f4f6f8;
  box-shadow: none;
  color: var(--ink);
}

.menu-item.active::before {
  background: var(--purple);
}

.menu-icon {
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border-radius: 0;
  color: currentColor;
  opacity: 0.75;
  font-size: 0;
  line-height: 1;
}

.menu-icon svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.menu-item.active .menu-icon {
  color: var(--purple);
  opacity: 1;
}

.menu-badge {
  color: #c2c9d4;
  font-size: 14px;
  transition: transform 0.16s ease;
}

.account-panel {
  position: relative;
  display: grid;
  gap: 12px;
  margin-top: auto;
  padding: 18px 0 0;
}

.sidebar-message-center {
  position: relative;
  margin-top: auto;
  margin-bottom: 8px;
}

.sidebar-message-center + .account-panel {
  margin-top: 0;
}

body.sidebar-collapsed .sidebar-message-trigger span:not(.sidebar-message-icon),
body.sidebar-collapsed .sidebar-message-trigger strong {
  display: none;
}

.sidebar-message-trigger {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  min-height: 44px;
  padding: 0 12px;
  border: 1px solid #e5e7eb;
  border-radius: 13px;
  background: #fff;
  color: #334155;
  font-weight: 800;
  cursor: pointer;
}

.sidebar-message-trigger strong {
  display: grid;
  place-items: center;
  min-width: 20px;
  height: 20px;
  margin-left: auto;
  padding: 0 5px;
  border-radius: 999px;
  background: #ef4444;
  color: #fff;
  font-size: 11px;
}

.sidebar-message-popover {
  position: absolute;
  z-index: 120;
  left: 0;
  bottom: calc(100% + 8px);
  display: none;
  width: 360px;
  max-width: calc(100vw - 32px);
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 22px 60px rgba(15, 23, 42, 0.2);
  overflow: hidden;
}

.sidebar-message-center.open .sidebar-message-popover {
  display: block;
}

.sidebar-message-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px;
  border-bottom: 1px solid #eef2f7;
}

.sidebar-message-head span {
  color: #94a3b8;
  font-size: 12px;
}

.sidebar-message-list {
  display: grid;
  max-height: 380px;
  overflow: auto;
}

.sidebar-message-item {
  display: grid;
  gap: 6px;
  padding: 14px 16px;
  border: 0;
  border-bottom: 1px solid #eef2f7;
  background: #fff;
  color: #334155;
  text-align: left;
  cursor: pointer;
}

.sidebar-message-item.unread {
  background: #fff7ed;
}

.sidebar-message-item span {
  color: #64748b;
  line-height: 1.55;
}

.sidebar-message-item small,
.sidebar-message-empty {
  color: #94a3b8;
}

.sidebar-message-empty {
  padding: 28px 16px;
  text-align: center;
}

.quota-card {
  min-height: 120px;
  padding: 18px;
  border: 1px solid #eceef2;
  border-radius: 18px;
  background: rgba(250, 250, 251, 0.86);
  box-shadow: none;
  backdrop-filter: blur(10px);
}

.quota-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.quota-title strong {
  color: var(--ink);
  font-size: 16px;
  line-height: 1;
  font-weight: 650;
}

.quota-title span {
  display: none;
}

.quota-number {
  margin-top: 18px;
  color: var(--ink);
  font-size: 34px;
  line-height: 1;
  font-weight: 700;
  letter-spacing: 0;
}

.quota-number.quota-number-unlimited {
  margin-top: 18px;
  font-size: 28px;
  letter-spacing: 0;
}

.quota-bar {
  height: 6px;
  margin: 14px 0 10px;
  overflow: hidden;
  border-radius: 999px;
  background: #eceef2;
}

.quota-bar span {
  display: block;
  width: 58%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #7c5cfc, #d946ef);
}

.quota-card small {
  color: #8a8f98;
  font-size: 12px;
  font-weight: 600;
}

.user-row {
  display: grid;
  grid-template-columns: 40px 1fr 32px;
  align-items: center;
  gap: 12px;
  width: 100%;
  border: 1px solid transparent;
  border-radius: 16px;
  background: transparent;
  padding: 10px;
  text-align: left;
  cursor: pointer;
}

.user-row:hover,
.user-row[aria-expanded="true"] {
  border-color: #eceef2;
  background: #ffffff;
  box-shadow: 0 10px 24px rgba(17, 24, 39, 0.06);
}

.user-row[aria-expanded="true"] {
  outline: 0;
}

.avatar {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: linear-gradient(145deg, #eef2ff, #f5f3ff);
  color: var(--purple);
  font-size: 16px;
  font-weight: 700;
}

.user-row strong {
  color: var(--ink);
  font-size: 14px;
  line-height: 1.15;
  font-weight: 600;
}

.user-row span {
  display: block;
  margin-top: 4px;
  color: #8a8f98;
  font-size: 12px;
  font-weight: 500;
}

.account-bell {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 10px;
  color: #6b7280;
  font-size: 15px;
}

.user-row:hover .account-bell,
.user-row[aria-expanded="true"] .account-bell {
  background: #f4f6f8;
  color: var(--ink);
}

.account-menu {
  position: absolute;
  left: 6px;
  right: 6px;
  bottom: 92px;
  z-index: 20;
  display: none;
  gap: 6px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: #ffffff;
  padding: 16px;
  box-shadow: 0 18px 42px rgba(28, 35, 52, 0.16);
}

.account-panel.menu-open .account-menu {
  display: grid;
}

.account-menu button {
  display: flex;
  align-items: center;
  gap: 14px;
  min-height: 52px;
  border: 0;
  border-radius: 12px;
  background: transparent;
  color: #344054;
  padding: 0 14px;
  text-align: left;
  font-size: 17px;
  font-weight: 900;
  cursor: pointer;
}

.account-menu button:hover {
  background: var(--soft);
}

.account-menu button span {
  display: grid;
  place-items: center;
  width: 26px;
  color: #667085;
  font-size: 20px;
}

.account-menu .logout-menu-btn {
  margin-top: 12px;
  border-top: 1px solid var(--line);
  border-radius: 0 0 14px 14px;
  color: #ef4444;
  padding-top: 14px;
}

.account-menu .logout-menu-btn span {
  color: #ef4444;
}

.page {
  min-width: 0;
  height: calc(100vh - 28px);
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  border: 1px solid rgba(255, 255, 255, 0.8);
}

.content-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  min-height: 72px;
  padding: 12px 28px;
  border-bottom: 1px solid var(--line);
}

.content-header p {
  display: none;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 0;
  font-size: 24px;
  line-height: 1.2;
  letter-spacing: 0;
}

h2 {
  margin-bottom: 0;
  font-size: 24px;
  letter-spacing: 0;
}

h3 {
  margin-bottom: 0;
  font-size: 16px;
}

.header-actions {
  display: flex;
  gap: 10px;
}

.ghost-btn,
.dark-btn,
.pill-btn {
  min-height: 40px;
  border-radius: 10px;
  padding: 0 16px;
  font-weight: 900;
}

.ghost-btn {
  border: 1px solid var(--line);
  background: #ffffff;
  color: #344054;
}

.dark-btn {
  border: 0;
  background: #000000;
  color: #ffffff;
}

.content-surface {
  min-height: calc(100vh - 114px);
  padding: 36px;
  overflow: visible;
  background:
    radial-gradient(circle at 72% 18%, rgba(103, 232, 249, 0.24), transparent 24%),
    radial-gradient(circle at 50% 24%, rgba(135, 72, 255, 0.1), transparent 28%),
    linear-gradient(180deg, #ffffff 0%, #ffffff 60%, #fbfcff 100%);
}

.content-surface.link-operations-surface {
  height: 100%;
  min-height: 100%;
  padding: 0;
  overflow: hidden;
  background: #fbfcff;
}

.link-operations-frame {
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
  background: #fbfcff;
}

.category-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 18px;
  align-content: start;
  min-height: 680px;
}

.section-tabs-panel,
.section-content {
  border: 1px solid var(--line);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 18px 46px rgba(28, 35, 52, 0.06);
}

.section-content-header p {
  margin: 0 0 6px;
  color: var(--purple);
  font-size: 13px;
  font-weight: 900;
}

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

.category-select {
  display: grid;
  gap: 8px;
  min-width: 280px;
}

.category-select span {
  color: #667085;
  font-size: 13px;
  font-weight: 900;
}

.category-select select {
  width: 100%;
  height: 52px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #ffffff;
  color: var(--ink);
  padding: 0 16px;
  font-size: 18px;
  font-weight: 900;
  outline: none;
}

.header-category-title h1 {
  font-size: 24px;
}

.header-category-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-right: 60px;
}

.category-select.compact {
  min-width: 300px;
  gap: 0;
}

.category-select.compact span {
  display: none;
}

.category-select.compact select {
  height: 44px;
  border-radius: 12px;
  font-size: 16px;
}

.section-tabs-panel {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
  align-self: start;
  position: sticky;
  top: 0;
  z-index: 30;
  min-height: 66px;
  padding: 10px 14px;
  border-color: rgba(255, 255, 255, 0.78);
  background: rgba(255, 255, 255, 0.72);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.92),
    0 14px 36px rgba(28, 35, 52, 0.08);
  overflow: hidden;
  -webkit-backdrop-filter: blur(20px) saturate(160%);
  backdrop-filter: blur(20px) saturate(160%);
}

.section-tabs-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 0 4px;
}

.section-tabs-title strong,
.section-tabs-title span {
  display: block;
}

.section-tabs-title strong {
  font-size: 20px;
}

.section-tabs-title span {
  margin-top: 5px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.section-tabs {
  display: flex;
  flex-wrap: nowrap;
  gap: 12px;
  overflow-x: auto;
  scrollbar-width: thin;
}

.section-tab {
  display: grid;
  grid-template-columns: 28px 1fr;
  justify-items: start;
  align-items: center;
  gap: 8px;
  flex: 0 0 auto;
  width: auto;
  min-width: 132px;
  max-width: none;
  height: 44px;
  min-height: 44px;
  max-height: 44px;
  border: 0;
  border-radius: 12px;
  background: transparent;
  color: #667085;
  text-align: left;
  padding: 0 14px;
  appearance: none;
  box-shadow: none;
  transform: none;
  transition:
    transform 100ms ease-out,
    background-color 160ms ease-out,
    color 160ms ease-out,
    box-shadow 160ms ease-out;
  overflow: hidden;
}

.section-tab span {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: var(--soft);
}

.section-tab strong {
  font-size: 14px;
  line-height: 1.25;
  white-space: nowrap;
}

.section-tab.active {
  background: linear-gradient(180deg, #1f2937 0%, #111827 100%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.12),
    0 7px 16px rgba(17, 24, 39, 0.2);
  color: #ffffff;
}

.section-tab.active:hover,
.section-tab.active:active,
.section-tab.active:focus,
.section-tab.active:focus-visible {
  background: linear-gradient(180deg, #1f2937 0%, #111827 100%);
  color: #ffffff;
}

.section-tab:hover {
  background: rgba(255, 255, 255, 0.82);
  box-shadow:
    inset 0 0 0 1px rgba(17, 24, 39, 0.05),
    0 4px 12px rgba(28, 35, 52, 0.05);
  color: #344054;
}

.section-tab:focus {
  outline: 0;
}

.section-tab:focus-visible {
  outline: 3px solid rgba(109, 93, 246, 0.28);
  outline-offset: 2px;
}

.section-tab:active {
  transform: scale(0.97);
}

.section-tab:active:not(.active),
.section-tab:focus-visible:not(.active) {
  background: rgba(255, 255, 255, 0.86);
  color: #344054;
}

.section-tab.active span {
  background: rgba(255, 255, 255, 0.13);
}

.section-tab:hover span {
  background: #eef2f7;
}

.section-tab.active:hover span,
.section-tab.active:active span,
.section-tab.active:focus-visible span {
  background: rgba(255, 255, 255, 0.13);
}

.section-tab:active:not(.active) span,
.section-tab:focus-visible:not(.active) span {
  background: #eef2f7;
}

@media (prefers-reduced-motion: reduce) {
  .section-tab {
    transition: none;
  }

  .section-tab:active {
    transform: none;
  }
}

.online-selection-tabs-panel {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 8px;
}

.online-selection-tabs-main {
  flex: 0 0 auto;
  min-width: 0;
}

.online-selection-tabs-side {
  display: flex;
  flex: 0 0 auto;
  justify-content: flex-start;
  margin-left: 8px;
}

.online-selection-tabs-side .section-tab {
  border: 1px solid var(--line);
  background: #ffffff;
  box-shadow: 0 12px 26px rgba(28, 35, 52, 0.08);
}

.online-selection-tabs-side .section-tab.active {
  border-color: #111827;
  background: #111827;
}

.online-selection-content {
  padding: 0;
  overflow: hidden;
}

.search-rank-page {
  display: grid;
  gap: 14px;
  min-width: 0;
  background: #eef3f8;
  padding: 0 0 18px;
}

.search-rank-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 50px;
  border-bottom: 1px solid #dbe4ef;
  background: #ffffff;
  padding: 0 22px;
}

.search-rank-category-switch,
.search-rank-period,
.search-rank-period-buttons {
  display: flex;
  align-items: center;
  gap: 8px;
}

.search-rank-category-switch {
  min-width: 0;
}

.search-rank-category-toggle {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  min-height: 34px;
  border: 0;
  background: transparent;
  color: #475467;
  font: inherit;
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
  padding: 0;
  text-align: left;
}

.search-rank-category-toggle-label {
  flex: 0 0 auto;
  color: #475467;
}

.search-rank-category-toggle-path {
  min-width: 0;
  overflow: hidden;
  color: #344054;
  font-weight: 750;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.search-rank-category-toggle-caret {
  flex: 0 0 auto;
  color: #98a2b3;
  font-size: 15px;
  transition: transform 180ms ease;
}

.search-rank-category-toggle[aria-expanded="true"] .search-rank-category-toggle-caret {
  transform: rotate(180deg);
}

.search-rank-period {
  flex: 0 0 auto;
  color: #98a2b3;
  font-size: 12px;
  font-weight: 700;
}

.search-rank-period-field {
  position: relative;
}

.search-rank-period-trigger {
  border: 0;
  background: transparent;
  color: inherit;
  cursor: pointer;
  font: inherit;
  font-weight: inherit;
  padding: 6px 0;
}

.search-rank-period-trigger:hover,
.search-rank-period-trigger:focus-visible {
  color: #2563eb;
}

.search-rank-period-buttons {
  gap: 0;
  overflow: hidden;
  border: 1px solid #dbe4ef;
  border-radius: 8px;
}

.search-rank-period-buttons button {
  min-width: 46px;
  min-height: 32px;
  border: 0;
  border-right: 1px solid #dbe4ef;
  background: #ffffff;
  color: #667085;
  cursor: pointer;
  font: inherit;
  font-size: 12px;
  font-weight: 800;
}

.search-rank-period-buttons button:last-child {
  border-right: 0;
}

.search-rank-period-buttons button.active {
  color: #2563eb;
  background: #f5f8ff;
}

.search-rank-card {
  margin: 0 22px;
  border: 1px solid #e4ebf2;
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 14px 34px rgba(28, 35, 52, 0.04);
}

.search-rank-card h2 {
  margin: 0;
  color: var(--ink);
  font-size: 18px;
  font-weight: 850;
}

.search-rank-analysis-card {
  display: grid;
  gap: 14px;
  padding: 22px 24px;
}

.search-rank-input {
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr) 32px;
  align-items: center;
  width: min(720px, 100%);
  min-height: 44px;
  border: 1px solid #d9e2ec;
  background: #ffffff;
  padding: 0 6px 0 14px;
}

.search-rank-input span {
  color: #b8c2cf;
  font-size: 15px;
}

.search-rank-input input {
  min-width: 0;
  border: 0;
  color: var(--ink);
  font: inherit;
  font-size: 13px;
  font-weight: 700;
  outline: none;
}

.search-rank-input input::placeholder {
  color: #b8c2cf;
}

.search-rank-input button {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border: 0;
  border-radius: 6px;
  background: #111827;
  color: #ffffff;
  cursor: pointer;
  font: inherit;
  font-size: 13px;
  font-weight: 900;
}

.search-rank-input button:hover {
  background: #2563eb;
}

.search-rank-history {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: #98a2b3;
  font-size: 13px;
  font-weight: 700;
}

.search-rank-history button {
  border: 0;
  background: transparent;
  color: #2563eb;
  cursor: pointer;
  font: inherit;
  font-size: 13px;
  font-weight: 800;
  padding: 0;
}

.search-rank-table-card {
  padding: 22px 24px 0;
}

.search-rank-table-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.search-rank-loading {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  width: fit-content;
  margin: 14px 0 0;
  border: 1px solid #dbeafe;
  border-radius: 999px;
  background: #eff6ff;
  color: #1d4ed8;
  font-size: 13px;
  font-weight: 850;
  padding: 8px 12px;
}

.search-rank-loading span {
  width: 14px;
  height: 14px;
  border: 2px solid #bfdbfe;
  border-top-color: #2563eb;
  border-radius: 999px;
  animation: search-rank-spin 0.8s linear infinite;
}

.search-rank-loading b {
  font: inherit;
}

@keyframes search-rank-spin {
  to {
    transform: rotate(360deg);
  }
}

.search-rank-pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  min-height: 58px;
  border-top: 1px solid #eef2f6;
  padding: 10px 0;
}

.search-rank-page-size {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #475467;
  font-size: 13px;
  font-weight: 750;
  white-space: nowrap;
}

.search-rank-page-size select {
  width: 52px;
  height: 34px;
  border: 1px solid #dbe4ef;
  border-radius: 6px;
  background: #ffffff;
  color: #344054;
  padding: 0 8px;
  font: inherit;
  font-weight: 750;
  outline: none;
}

.search-rank-page-nav {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 14px;
  min-width: 0;
  color: #667085;
  font-size: 13px;
  font-weight: 800;
  white-space: nowrap;
}

.search-rank-page-nav button {
  min-width: 18px;
  height: 32px;
  border: 0;
  border-bottom: 2px solid transparent;
  background: transparent;
  color: #344054;
  cursor: pointer;
  font: inherit;
  font-weight: 800;
  padding: 0 2px;
}

.search-rank-page-nav button.active {
  border-bottom-color: #2563eb;
  color: #2563eb;
}

.search-rank-page-nav button:disabled {
  color: #c4ccd8;
  cursor: not-allowed;
}

.search-rank-page-nav span {
  color: #98a2b3;
}

.section-content {
  position: relative;
  z-index: 1;
  min-width: 0;
  padding: 18px 20px;
  overflow: visible;
}

.section-content.online-selection-content {
  padding: 0;
  overflow: hidden;
}

.section-content .hero-panel {
  min-height: 500px;
}

.section-content-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 40px;
  margin-bottom: 12px;
}

.hero-panel {
  display: grid;
  place-items: center;
  min-height: 680px;
  text-align: center;
}

.hero-inner {
  width: min(1120px, 100%);
}

.hero-title {
  margin-bottom: 16px;
  font-size: 38px;
  line-height: 1.24;
  letter-spacing: 0;
}

.hero-title span {
  color: var(--purple);
}

.hero-copy {
  margin-bottom: 70px;
  color: var(--muted);
  font-size: 17px;
}

.ai-input {
  display: grid;
  grid-template-rows: 1fr auto;
  width: min(1060px, 100%);
  min-height: 236px;
  margin: 0 auto;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: #ffffff;
  box-shadow: 0 28px 70px rgba(28, 35, 52, 0.08);
  text-align: left;
}

.ai-input textarea {
  width: 100%;
  min-height: 156px;
  border: 0;
  border-radius: 20px 20px 0 0;
  padding: 24px 26px;
  resize: none;
  outline: none;
  color: var(--ink);
  font-size: 18px;
}

.input-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 14px 18px 18px;
}

.link-btn,
.send-btn {
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 12px;
}

.link-btn {
  width: 42px;
  height: 42px;
  background: #ffffff;
  border: 1px solid var(--line);
  color: var(--ink);
  font-size: 20px;
}

.model-row {
  display: flex;
  align-items: center;
  gap: 14px;
  color: var(--ink);
  font-weight: 800;
}

.model-dot {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #e0f2fe, #8b5cf6 42%, #67e8f9);
  box-shadow: 0 0 18px rgba(103, 232, 249, 0.8);
}

.send-btn {
  width: 46px;
  height: 46px;
  background: #9ca3af;
  color: #ffffff;
  font-size: 20px;
}

.suggestions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 14px;
  width: min(900px, 100%);
  margin: 46px auto 0;
}

.suggestions button {
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0 18px;
  background: rgba(255, 255, 255, 0.78);
  color: #98a2b3;
  font-weight: 700;
}

.dashboard-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(320px, 0.85fr);
  gap: 18px;
}


.panel {
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.88);
  box-shadow: 0 18px 46px rgba(28, 35, 52, 0.06);
}

.panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 20px 22px;
  border-bottom: 1px solid var(--line);
}

.panel-header p {
  margin: 6px 0 0;
  color: var(--muted);
}


.rank-list,
.keyword-list,
.qa-list {
  display: grid;
  gap: 10px;
  padding: 16px;
}

.rank-row,
.keyword-row,
.qa-row {
  display: grid;
  align-items: center;
  gap: 14px;
  min-height: 68px;
  border-radius: 14px;
  background: var(--soft);
  padding: 12px 14px;
}

.rank-row {
  grid-template-columns: 34px 1fr auto;
}

.rank-num {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: #111827;
  color: #ffffff;
  font-weight: 900;
}

.rank-row strong,
.keyword-row strong,
.qa-row strong {
  display: block;
  margin-bottom: 5px;
}

.rank-row span,
.keyword-row span,
.qa-row span {
  color: var(--muted);
  font-size: 13px;
}

.product-qa-panel {
  overflow: visible;
}

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

.product-qa-view-switch {
  display: inline-flex;
  align-items: center;
  padding: 3px;
  border: 1px solid #dbe4ef;
  border-radius: 8px;
  background: #f8fafc;
}

.product-qa-view-switch button {
  min-width: 62px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: #667085;
  font-size: 12px;
  font-weight: 900;
  cursor: pointer;
}

.product-qa-view-switch button.active {
  background: #111827;
  color: #ffffff;
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.16);
}

.product-qa-ai-progress {
  margin: 14px 18px 0;
}

.product-qa-ai-edit-panel {
  display: grid;
  gap: 10px;
  margin: 14px 18px 0;
  padding: 12px 14px;
  border: 1px solid #bfdbfe;
  border-radius: 8px;
  background: #eff6ff;
  color: #1e3a8a;
  font-size: 13px;
  font-weight: 850;
}

.product-qa-ai-edit-panel > div:first-child {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.product-qa-ai-edit-panel strong {
  color: #111827;
  font-size: 14px;
}

.product-qa-ai-edit-panel span {
  color: #475467;
}

.product-qa-ai-edit-panel em {
  width: fit-content;
  border-radius: 999px;
  padding: 4px 9px;
  background: #111827;
  color: #ffffff;
  font-style: normal;
}

.product-qa-ai-edit-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.product-qa-ai-edit-panel details {
  border-top: 1px solid #dbeafe;
  padding-top: 8px;
}

.product-qa-ai-edit-panel summary {
  cursor: pointer;
}

.product-qa-ai-edit-panel ol {
  display: grid;
  gap: 6px;
  margin: 8px 0 0;
  padding-left: 20px;
}

.product-qa-ai-edit-panel li {
  color: #334155;
}

.product-qa-ai-edit-panel li span {
  color: #111827;
  font-weight: 900;
}

.product-qa-ai-edit-panel li i {
  margin: 0 6px;
  color: #64748b;
  font-style: normal;
}

.product-qa-ai-edit-panel li small {
  display: block;
  margin-top: 2px;
  color: #64748b;
}

.product-qa-table-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 18px;
  border-top: 1px solid var(--line);
  color: #667085;
  font-size: 13px;
  font-weight: 850;
}

.product-qa-table-toolbar strong {
  color: var(--ink);
}

.product-qa-table-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.product-qa-x-scroll {
  position: relative;
  height: 20px;
  overflow-x: auto;
  overflow-y: hidden;
  background: #fbfcfe;
  cursor: pointer;
  scrollbar-width: none;
}

.product-qa-x-scroll::-webkit-scrollbar {
  display: none;
}

.product-qa-x-scroll-top {
  border-top: 1px solid var(--line);
  border-bottom: 1px solid #edf1f6;
}

.product-qa-x-scroll-bottom {
  border-top: 1px solid #edf1f6;
}

.product-qa-x-scroll-inner {
  height: 1px;
}

.product-qa-x-scroll::before {
  content: "";
  position: absolute;
  left: 10px;
  right: 10px;
  top: 50%;
  height: 6px;
  border-radius: 999px;
  background: #e6ebf2;
  transform: translateY(-50%);
  pointer-events: none;
}

.product-qa-x-scroll-thumb {
  position: sticky;
  left: 0;
  z-index: 2;
  display: block;
  width: 120px;
  height: 8px;
  margin-top: 6px;
  border-radius: 999px;
  background: #8f98a6;
  box-shadow: 0 0 0 1px rgba(102, 112, 133, 0.12);
  pointer-events: none;
  transition:
    height 0.12s ease,
    margin-top 0.12s ease,
    background 0.12s ease;
}

.product-qa-x-scroll:hover .product-qa-x-scroll-thumb,
.product-qa-x-scroll.dragging .product-qa-x-scroll-thumb {
  height: 13px;
  margin-top: 3px;
  background: #667085;
}

.product-qa-table-wrap {
  max-width: 100%;
  min-height: 420px;
  max-height: calc(100vh - 270px);
  overflow-x: hidden;
  overflow-y: auto;
}

.product-qa-table-wrap::-webkit-scrollbar:vertical {
  width: 10px;
}

.product-qa-table-wrap:hover::-webkit-scrollbar:vertical {
  width: 14px;
}

.product-qa-table-wrap::-webkit-scrollbar-track {
  background: #eef2f7;
}

.product-qa-table-wrap::-webkit-scrollbar-thumb {
  border: 2px solid #eef2f7;
  border-radius: 999px;
  background: #8f98a6;
}

.product-qa-table-wrap:hover::-webkit-scrollbar-thumb {
  background: #667085;
}

.product-qa-pagination {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  padding: 10px 18px;
  border-top: 1px solid #edf1f6;
  color: #667085;
  font-size: 12px;
  font-weight: 850;
}

.product-qa-pagination button.active {
  background: #111827;
  color: #ffffff;
}

.product-qa-summary-section {
  margin: 18px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #ffffff;
  overflow: hidden;
}

.product-qa-summary-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 18px;
  border-bottom: 1px solid var(--line);
}

.product-qa-summary-header h3 {
  margin: 0;
  color: var(--ink);
  font-size: 18px;
  font-weight: 950;
}

.product-qa-summary-header p {
  margin: 5px 0 0;
  color: #98a2b3;
  font-size: 13px;
  font-weight: 800;
}

.product-qa-summary-header > span {
  flex: 0 0 auto;
  color: #667085;
  font-size: 13px;
  font-weight: 900;
}

.product-qa-summary-body {
  display: grid;
  grid-template-columns: minmax(380px, 0.9fr) minmax(420px, 1.1fr);
  gap: 14px;
  padding: 14px;
  align-items: stretch;
  min-height: 0;
}

.product-qa-summary-card {
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 0;
  height: clamp(420px, 54vh, 620px);
  border: 1px solid #e5eaf2;
  border-radius: 10px;
  background: #fcfdff;
  padding: 14px;
  overflow: hidden;
}

.product-qa-summary-card-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 12px;
}

.product-qa-summary-card-title h4 {
  margin: 0;
  color: var(--ink);
  font-size: 15px;
  font-weight: 950;
}

.product-qa-summary-card-title span {
  color: #667085;
  font-size: 12px;
  font-weight: 900;
}

.product-qa-summary-card-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
}

.product-qa-summary-tools {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}

.product-qa-summary-tools label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #475467;
  font-size: 13px;
  font-weight: 900;
}

.product-qa-summary-tools select {
  height: 34px;
  min-width: 126px;
  border: 1px solid #dbe4ef;
  border-radius: 9px;
  background: #ffffff;
  color: var(--ink);
  padding: 0 30px 0 10px;
  font: inherit;
  cursor: pointer;
}

.product-qa-summary-path {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  min-height: 30px;
  margin-bottom: 10px;
  color: #98a2b3;
  font-size: 12px;
  font-weight: 850;
}

.product-qa-summary-path button {
  border: 1px solid #dbe4ef;
  border-radius: 8px;
  background: #ffffff;
  color: #475467;
  padding: 4px 8px;
  cursor: pointer;
  font-weight: 900;
}

.product-qa-summary-path button:hover {
  border-color: #2563eb;
  color: #2563eb;
}

.product-qa-summary-path b {
  color: #c0c7d2;
}

.product-qa-summary-chart-body {
  flex: 1;
  min-height: 0;
  overflow: hidden;
  grid-template-columns: minmax(210px, 1fr) minmax(180px, 250px);
}

.product-qa-summary-legend .category-share-legend-row.active {
  background: #eaf3ff;
  color: #1d4ed8;
}

.product-qa-summary-table {
  display: grid;
  flex: 1;
  min-height: 0;
  max-height: 100%;
  overflow: auto;
  border: 1px solid #e5eaf2;
  border-radius: 9px;
  background: #ffffff;
}

.product-qa-summary-table-head,
.product-qa-summary-row {
  display: grid;
  grid-template-columns: minmax(140px, 1fr) 82px 82px 72px 106px;
  align-items: center;
  gap: 10px;
  min-height: 42px;
  padding: 0 12px;
  border-bottom: 1px solid #edf1f6;
}

.product-qa-summary-table-head {
  position: sticky;
  top: 0;
  z-index: 2;
  background: #f8fafc;
  color: #667085;
  font-size: 12px;
  font-weight: 950;
}

.product-qa-summary-table-head b {
  text-align: right;
}

.product-qa-summary-filter-cell {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
}

.product-qa-summary-filter-cell > span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.product-qa-summary-filter-btn {
  position: static;
  flex: 0 0 auto;
}

.product-qa-summary-table-head.open .product-qa-summary-filter-menu {
  display: grid;
  gap: 12px;
}

.column-filter-menu.product-qa-summary-filter-menu {
  position: fixed;
  z-index: 1600;
  width: min(420px, calc(100vw - 24px));
  max-width: calc(100vw - 24px);
  max-height: calc(100vh - 24px);
  max-height: calc(100dvh - 24px);
  overflow: auto;
  box-sizing: border-box;
  text-align: left;
}

.product-qa-summary-filter-tabs {
  grid-template-columns: repeat(2, 1fr);
}

.product-qa-summary-row {
  width: 100%;
  border: 0;
  background: #ffffff;
  color: var(--ink);
  font-size: 13px;
  font-weight: 850;
  text-align: left;
  cursor: pointer;
}

.product-qa-summary-row[data-product-qa-source-questions] {
  cursor: pointer;
}

.product-qa-summary-row[data-product-qa-source-questions]:hover {
  background: #f8fbff;
}

.product-qa-summary-row:hover {
  background: #f8fbff;
}

.product-qa-summary-row.active {
  background: #eaf3ff;
  box-shadow: inset 3px 0 0 #2563eb;
}

.product-qa-summary-row.active span {
  color: #1d4ed8;
}

.product-qa-summary-row span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.product-qa-summary-label {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

.product-qa-summary-label-edit {
  display: inline-grid;
  place-items: center;
  justify-self: end;
  width: 48px;
  height: 28px;
  border: 1px solid #dbe4ef;
  border-radius: 7px;
  background: #ffffff;
  color: #667085;
  cursor: pointer;
  font-size: 12px;
  font-weight: 850;
  transition: border-color 0.15s ease, background 0.15s ease, color 0.15s ease;
}

.product-qa-summary-row-actions {
  display: flex;
  justify-content: flex-end;
  gap: 5px;
  overflow: visible !important;
  white-space: nowrap;
}

.product-qa-summary-label-split {
  display: inline-grid;
  place-items: center;
  width: 48px;
  height: 28px;
  border: 1px solid #dbe4ef;
  border-radius: 7px;
  background: #fff;
  color: #667085;
  cursor: pointer;
  font-size: 12px;
  font-weight: 850;
}

.product-qa-summary-label-split:hover {
  border-color: #a9c3f5;
  background: #eaf1ff;
  color: #2563eb;
}

.product-qa-ai-dialog.product-qa-summary-split-dialog {
  width: min(1120px, calc(100vw - 32px));
  max-width: 1120px;
  height: min(760px, calc(100vh - 32px));
  max-height: calc(100vh - 32px);
  grid-template-rows: auto minmax(260px, 1fr) auto;
  padding: 0;
  gap: 0;
  border-radius: 18px;
}

.product-qa-summary-split-dialog .product-qa-summary-merge-title-row {
  padding: 18px 22px 16px;
  border-bottom: 1px solid #e5eaf2;
}

.product-qa-summary-split-dialog .product-qa-summary-split-kicker {
  margin-bottom: 5px;
  color: #7b8495;
  font-size: 12px;
  letter-spacing: 0.01em;
}

.product-qa-summary-split-header-cancel {
  flex: 0 0 auto;
}

.product-qa-summary-split-dialog .product-qa-summary-split-add-form input:focus {
  border-color: #8eb4ed;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.12);
}

.product-qa-summary-split-workspace {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  min-height: 0;
  margin: 16px 22px 0;
  border: 1px solid #dfe5ee;
  border-radius: 14px 14px 0 0;
  overflow: hidden;
  background: #fff;
}

.product-qa-summary-split-empty {
  grid-row: 2;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 8px;
  min-height: 100%;
  padding: 32px;
  color: #98a2b3;
  font-weight: 800;
  text-align: center;
}

.product-qa-summary-split-empty strong {
  color: #667085;
  font-size: 15px;
}

.product-qa-summary-split-empty span {
  font-size: 12px;
}

.product-qa-summary-split-toolbar,
.product-qa-summary-split-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.product-qa-summary-split-toolbar {
  display: grid;
  align-items: stretch;
  justify-content: stretch;
  gap: 10px;
  padding: 13px 16px 12px;
  border-bottom: 1px solid #e5eaf2;
  background: rgba(248, 250, 252, 0.94);
  backdrop-filter: blur(18px) saturate(140%);
}

.product-qa-summary-split-toolbar-title,
.product-qa-summary-split-toolbar-tools,
.product-qa-summary-split-categories,
.product-qa-summary-split-add-form {
  display: flex;
  align-items: center;
}

.product-qa-summary-split-toolbar-title,
.product-qa-summary-split-toolbar-tools {
  justify-content: space-between;
  gap: 12px;
}

.product-qa-summary-split-toolbar-title b {
  color: #182230;
  font-size: 15px;
  font-weight: 950;
}

.product-qa-summary-split-toolbar-title span,
.product-qa-summary-split-toolbar-tools span {
  color: #667085;
  font-size: 12px;
  font-weight: 800;
}

.product-qa-summary-split-categories {
  flex-wrap: wrap;
  gap: 8px;
}

.product-qa-summary-split-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 34px;
  padding: 6px 10px;
  border: 1px solid #d5dde8;
  border-radius: 10px;
  background: #fff;
  color: #344054;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}

.product-qa-summary-split-chip strong {
  font-size: 13px;
  font-weight: 900;
}

.product-qa-summary-split-chip em {
  color: #8a94a6;
  font-size: 11px;
  font-style: normal;
  font-weight: 850;
}

.product-qa-summary-split-chip-remove {
  display: inline-grid;
  place-items: center;
  width: 20px;
  height: 20px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: #98a2b3;
  cursor: pointer;
  font-size: 16px;
  line-height: 1;
}

.product-qa-summary-split-chip-remove:hover {
  background: #eef2f7;
  color: #475467;
}

.product-qa-summary-split-add-button {
  min-height: 34px;
  padding: 6px 11px;
  border: 1px dashed #9eb7d8;
  border-radius: 10px;
  background: #f8fbff;
  color: #2f6db4;
  cursor: pointer;
  font-size: 12px;
  font-weight: 900;
}

.product-qa-summary-split-add-form {
  flex: 1 1 360px;
  max-width: 520px;
  gap: 7px;
}

.product-qa-summary-split-dialog .product-qa-summary-split-add-form input {
  flex: 1 1 180px;
  min-width: 140px;
  width: auto;
  min-height: 34px;
  padding: 6px 10px;
  border-radius: 9px;
  font-size: 12px;
}

.product-qa-summary-split-add-button,
.product-qa-summary-split-question button {
  transition: border-color 140ms ease, background-color 140ms ease, color 140ms ease, transform 90ms ease;
}

.product-qa-summary-split-add-button:hover {
  border-color: #5f91cf;
  background: #edf5ff;
}

.product-qa-summary-split-add-button:active,
.product-qa-summary-split-question button:active {
  transform: scale(0.98);
}

.product-qa-summary-split-notice {
  padding: 8px 10px;
  border-radius: 9px;
  background: #eaf8ef;
  color: #187245;
  font-size: 12px;
  font-weight: 850;
}

.product-qa-summary-split-grid {
  min-height: 0;
  overflow: auto;
  overscroll-behavior: contain;
}

.product-qa-summary-split-question {
  display: grid;
  grid-template-columns: minmax(300px, 1.25fr) minmax(360px, 1fr);
  gap: 12px;
  align-items: center;
  min-height: 48px;
  padding: 7px 12px;
  border-bottom: 1px solid #edf1f6;
}

.product-qa-summary-split-question > span {
  color: var(--ink);
  font-size: 13px;
  font-weight: 800;
}

.product-qa-summary-split-question > span em {
  margin-right: 7px;
  color: #98a2b3;
  font-style: normal;
}

.product-qa-summary-split-question > div {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.product-qa-summary-split-question button {
  border: 1px solid #dbe4ef;
  border-radius: 7px;
  background: #fff;
  color: #667085;
  padding: 5px 8px;
  cursor: pointer;
  font-size: 12px;
  font-weight: 850;
}

.product-qa-summary-split-question button.active {
  border-color: #93b4f5;
  background: #eaf2ff;
  color: #1d4ed8;
  box-shadow: inset 0 0 0 1px rgba(37, 99, 235, 0.08);
}

.product-qa-summary-split-footer {
  padding: 12px 22px 16px;
  border-top: 1px solid #e5eaf2;
  background: rgba(255, 255, 255, 0.96);
  color: #667085;
  font-size: 13px;
  font-weight: 850;
}

@media (max-width: 760px) {
  .product-qa-ai-dialog.product-qa-summary-split-dialog {
    width: calc(100vw - 20px);
    height: calc(100vh - 20px);
    max-height: calc(100vh - 20px);
  }

  .product-qa-summary-split-question {
    grid-template-columns: minmax(0, 1fr);
  }

  .product-qa-summary-split-workspace {
    margin-inline: 12px;
  }

  .product-qa-summary-split-question > div {
    padding-left: 24px;
  }

  .product-qa-summary-split-footer {
    align-items: flex-start;
    padding-inline: 14px;
  }
}

.product-qa-summary-label-edit:hover {
  border-color: #a9c3f5;
  background: #eaf1ff;
  color: #2563eb;
}

.product-qa-summary-label-input {
  width: 100%;
  min-width: 0;
  height: 32px;
  border: 1px solid #93b4f5;
  border-radius: 8px;
  background: #ffffff;
  color: var(--ink);
  padding: 0 9px;
  font: inherit;
  font-weight: 850;
  outline: none;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.12);
}

.product-qa-summary-label-input:disabled {
  opacity: 0.65;
}

.product-qa-summary-row b,
.product-qa-summary-row em {
  color: var(--ink);
  font-style: normal;
  text-align: right;
}

.product-qa-summary-row em {
  color: #667085;
}

.product-qa-summary-level {
  justify-self: end;
  min-width: 46px;
  border-radius: 999px;
  padding: 4px 8px;
  color: #ffffff;
  font-size: 12px;
  font-weight: 950;
  text-align: center;
}

.product-qa-summary-level.level-1 {
  background: #94a3b8;
}

.product-qa-summary-level.level-2 {
  background: #0891b2;
}

.product-qa-summary-level.level-3 {
  background: #2563eb;
}

.product-qa-summary-level.level-4 {
  background: #7c3aed;
}

.product-qa-summary-level.level-5 {
  background: #e11d48;
}

.product-qa-source-tooltip {
  position: fixed;
  z-index: 3000;
  width: min(440px, calc(100vw - 24px));
  max-height: min(360px, calc(100vh - 24px));
  overflow: auto;
  padding: 12px 14px;
  border: 1px solid #dbe4ef;
  border-radius: 10px;
  background: #ffffff;
  box-shadow: 0 20px 48px rgba(15, 23, 42, 0.2);
  pointer-events: auto;
  overscroll-behavior: contain;
}

.product-qa-source-tooltip strong {
  display: block;
  margin-bottom: 8px;
  color: var(--ink);
  font-size: 13px;
  font-weight: 950;
}

.product-qa-source-tooltip ol {
  display: grid;
  gap: 10px;
  margin: 0;
  padding-left: 18px;
}

.product-qa-source-tooltip li {
  color: #344054;
  font-size: 12px;
  font-weight: 800;
  line-height: 1.45;
}

.product-qa-source-question {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 6px;
}

.product-qa-source-question-jump {
  display: block;
  width: 100%;
  margin: -3px 0;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: inherit;
  padding: 3px 5px;
  text-align: left;
  cursor: pointer;
  transition: background 0.15s ease, box-shadow 0.15s ease;
}

.product-qa-source-question-jump:hover,
.product-qa-source-question-jump:focus-visible {
  background: #f2f7ff;
  box-shadow: 0 0 0 1px #cfe0ff;
  outline: none;
}

.product-qa-source-related-tag {
  display: inline-flex;
  align-items: center;
  flex: 0 0 auto;
  max-width: 180px;
  min-height: 20px;
  border-radius: 6px;
  background: #eef4ff;
  color: #2563eb;
  padding: 2px 7px;
  font-size: 11px;
  font-style: normal;
  font-weight: 850;
  line-height: 1.35;
  white-space: normal;
  word-break: break-word;
}

.product-qa-source-tooltip li span {
  white-space: normal;
}

.product-qa-source-tooltip li em {
  display: inline-block;
  margin-left: 6px;
  color: #2563eb;
  font-style: normal;
  font-weight: 950;
}

.product-qa-source-tooltip small {
  display: block;
  margin-top: 8px;
  color: #98a2b3;
  font-size: 12px;
  font-weight: 850;
}

.product-qa-table td.product-qa-ai-cell {
  background: #f8fbff;
  color: #111827;
}

.product-qa-ai-header-edit {
  width: 22px;
  height: 22px;
  margin-left: 5px;
  border: 1px solid #bfdbfe;
  border-radius: 6px;
  background: #eff6ff;
  color: #1d4ed8;
  font-size: 12px;
  font-weight: 950;
  cursor: pointer;
}

.product-qa-table td.product-qa-ai-editable-cell {
  background: #f0f7ff;
}

.product-qa-ai-cell-edit {
  width: 100%;
  min-height: 28px;
  border: 1px solid #bfdbfe;
  border-radius: 6px;
  background: #ffffff;
  color: #111827;
  font: inherit;
  font-weight: 950;
  cursor: pointer;
}

.product-qa-ai-cell-edit:hover,
.product-qa-ai-header-edit:hover {
  border-color: #2563eb;
  box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.14);
}

.product-qa-ai-row-add {
  float: right;
  width: 24px;
  height: 24px;
  margin-left: 8px;
  border: 1px solid #bfdbfe;
  border-radius: 999px;
  background: #eff6ff;
  color: #1d4ed8;
  font-size: 16px;
  font-weight: 950;
  line-height: 1;
  cursor: pointer;
}

.product-qa-ai-row-add:hover {
  border-color: #2563eb;
  background: #dbeafe;
}

.product-qa-ai-dialog-overlay {
  position: fixed;
  inset: 0;
  z-index: 2400;
  display: grid;
  place-items: center;
  padding: 18px;
  background: rgba(15, 23, 42, 0.44);
}

.product-qa-ai-dialog {
  display: grid;
  gap: 12px;
  width: min(620px, calc(100vw - 36px));
  max-height: min(720px, calc(100vh - 36px));
  overflow: hidden;
  border-radius: 10px;
  border: 1px solid #dbe4ef;
  background: #ffffff;
  padding: 18px;
  box-shadow: 0 24px 70px rgba(15, 23, 42, 0.28);
}

.product-qa-ai-dialog h3 {
  margin: 0;
  color: #111827;
  font-size: 18px;
  font-weight: 950;
}

.product-qa-ai-dialog p {
  margin: 0;
  color: #667085;
  font-size: 13px;
  font-weight: 850;
}

.product-qa-ai-dialog-options {
  display: grid;
  gap: 8px;
  max-height: 420px;
  overflow: auto;
  padding-right: 4px;
}

.product-qa-ai-dialog-options button {
  display: grid;
  gap: 3px;
  width: 100%;
  border: 1px solid #dbe4ef;
  border-radius: 8px;
  background: #f8fafc;
  padding: 10px 12px;
  color: #111827;
  text-align: left;
  cursor: pointer;
}

.product-qa-ai-dialog-options button:hover {
  border-color: #2563eb;
  background: #eff6ff;
}

.product-qa-ai-dialog-options strong {
  white-space: normal;
  word-break: break-word;
  font-size: 14px;
  font-weight: 950;
}

.product-qa-ai-dialog-options span {
  color: #667085;
  font-size: 12px;
  font-weight: 800;
}

.product-qa-ai-dialog input,
.product-qa-ai-dialog textarea {
  width: 100%;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  padding: 11px 12px;
  color: #111827;
  font-size: 14px;
  font-weight: 850;
}

.product-qa-ai-dialog textarea {
  min-height: 140px;
  resize: vertical;
  line-height: 1.6;
}

.product-qa-ai-dialog-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

.product-qa-summary-empty {
  display: grid;
  min-height: 190px;
  place-items: center;
  border: 1px dashed #dbe4ef;
  border-radius: 10px;
  color: #98a2b3;
  font-size: 13px;
  font-weight: 900;
}

.product-qa-table {
  width: max-content;
  border-collapse: separate;
  border-spacing: 0;
  table-layout: fixed;
  background: #ffffff;
}

.product-qa-table th,
.product-qa-table td {
  height: 38px;
  padding: 0 10px;
  border-right: 1px solid #e5eaf2;
  border-bottom: 1px solid #e5eaf2;
  color: var(--ink);
  font-size: 13px;
  font-weight: 800;
  text-align: left;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.product-qa-table th {
  position: sticky;
  top: 0;
  z-index: 20;
  height: auto;
  min-height: 48px;
  padding-top: 8px;
  padding-bottom: 8px;
  background: #f8fafc;
  color: #667085;
  font-weight: 950;
  line-height: 1.25;
  vertical-align: top;
  white-space: normal;
}

.product-qa-table th.product-qa-frozen-cell,
.product-qa-table td.product-qa-frozen-cell {
  position: sticky;
  z-index: 12;
  background: #ffffff;
  box-shadow: 1px 0 0 #e5eaf2;
}

.product-qa-table th.product-qa-frozen-cell {
  z-index: 60;
  background: #f8fafc;
}

.product-qa-table th.product-qa-header-cell {
  overflow: visible;
  min-width: 0;
  position: sticky;
  padding-right: 20px;
}

.product-qa-column-resizer {
  position: absolute;
  top: 0;
  right: 0;
  z-index: 40;
  width: 8px;
  height: 100%;
  cursor: col-resize;
}

.product-qa-column-resizer::after {
  content: "";
  position: absolute;
  top: 7px;
  right: 0;
  bottom: 7px;
  width: 2px;
  border-radius: 999px;
  background: transparent;
}

.product-qa-column-resizer:hover::after,
.product-qa-resizing .product-qa-column-resizer::after {
  background: #2563eb;
}

.product-qa-resizing,
.product-qa-resizing * {
  cursor: col-resize !important;
  user-select: none;
}

.product-qa-table th.product-qa-header-cell.open {
  z-index: 90;
}

.product-qa-table th.product-qa-header-cell.product-qa-frozen-cell.open {
  z-index: 100;
}

.product-qa-header-cell > span {
  display: block;
  width: 100%;
  max-width: 100%;
  overflow: hidden;
  text-overflow: clip;
  vertical-align: middle;
  white-space: normal;
  word-break: break-word;
  overflow-wrap: anywhere;
}

.product-qa-header-cell > .column-filter-btn {
  position: absolute;
  top: 9px;
  right: 8px;
  width: 16px;
  height: 16px;
  padding: 0;
  border-radius: 4px;
  font-size: 11px;
}

.product-qa-table th.product-qa-fill-column,
.product-qa-table td.product-qa-fill-column {
  width: 72px;
  min-width: 72px;
  max-width: 72px;
  padding-left: 6px;
  padding-right: 6px;
}

.product-qa-table th.product-qa-fill-column {
  cursor: grab;
}

.product-qa-column-drag-handle {
  position: absolute;
  left: 3px;
  top: 8px;
  bottom: 8px;
  z-index: 45;
  width: 6px;
  border-radius: 999px;
  background: transparent;
  cursor: grab;
  opacity: 0;
}

.product-qa-table th.product-qa-fill-column:hover .product-qa-column-drag-handle {
  background: transparent;
}

.product-qa-table th.product-qa-fill-column.product-qa-column-dragging {
  background: #eaf3ff;
  opacity: 0.72;
}

.product-qa-table th.product-qa-column-drop-before::before,
.product-qa-table th.product-qa-column-drop-after::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  z-index: 160;
  width: 4px;
  border-radius: 999px;
  background: #2563eb;
  box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.16);
}

.product-qa-table th.product-qa-column-drop-before::before {
  left: 0;
}

.product-qa-table th.product-qa-column-drop-after::before {
  right: 0;
}

.product-qa-column-reordering,
.product-qa-column-reordering * {
  cursor: grabbing !important;
  user-select: none;
}

.product-qa-table th.product-qa-fill-column > span {
  max-width: 100%;
}

.product-qa-header-cell > span[contenteditable="true"] {
  min-width: 0;
  padding: 3px 4px;
  border-radius: 6px;
  outline: none;
  cursor: text;
}

.product-qa-header-cell[data-product-qa-header-tip]:hover::after {
  content: attr(data-product-qa-header-tip);
  position: absolute;
  left: 8px;
  top: 34px;
  z-index: 980;
  max-width: 260px;
  padding: 7px 9px;
  border: 1px solid #dbe4ef;
  border-radius: 8px;
  background: #111827;
  color: #ffffff;
  font-size: 12px;
  font-weight: 850;
  line-height: 1.35;
  white-space: normal;
  box-shadow: 0 16px 36px rgba(15, 23, 42, 0.22);
  pointer-events: none;
}

.product-qa-header-cell.open::after,
.product-qa-header-cell:has(.product-qa-column-resizer:hover)::after {
  display: none;
}

.product-qa-header-cell > span[contenteditable="true"]:focus {
  background: #ffffff;
  box-shadow: inset 0 0 0 2px #3b82f6;
  color: var(--ink);
}

.product-qa-header-cell > span.product-qa-header-editing,
.product-qa-header-cell > span[contenteditable="true"]:focus {
  position: absolute;
  left: 8px;
  top: 6px;
  z-index: 110;
  min-width: max(160px, calc(100% - 16px));
  max-width: 360px;
  max-height: 140px;
  overflow: auto;
  white-space: normal;
  word-break: break-word;
  text-overflow: clip;
  line-height: 1.4;
  background: #ffffff;
  box-shadow:
    inset 0 0 0 2px #3b82f6,
    0 18px 40px rgba(15, 23, 42, 0.18);
}

.product-qa-table th.product-qa-header-cell:has(> span.product-qa-header-editing),
.product-qa-table th.product-qa-header-cell:has(> span[contenteditable="true"]:focus) {
  z-index: 140;
}

.product-qa-header-cell:has(> span.product-qa-header-editing)::after,
.product-qa-header-cell:has(> span[contenteditable="true"]:focus)::after {
  display: none;
}

.product-qa-header-cell.active .column-filter-btn,
.product-qa-header-cell.open .column-filter-btn {
  background: #eaf1ff;
  color: #3b82f6;
}

.product-qa-header-cell.open .product-qa-filter-menu {
  display: grid;
  gap: 12px;
}

.product-qa-filter-menu {
  top: 34px;
  left: 8px;
  z-index: 920;
}

.product-qa-table td.product-qa-question-cell {
  height: auto;
  min-height: 38px;
  padding-top: 8px;
  padding-bottom: 8px;
  white-space: normal;
  word-break: break-word;
  overflow-wrap: anywhere;
  line-height: 1.38;
  vertical-align: top;
}

.product-qa-table td.product-qa-question-cell.product-qa-question-unassigned {
  background: #fff1f0;
  color: #d92d20;
  font-weight: 800;
}

.product-qa-table .product-qa-row-number-cell {
  text-align: center;
  color: #64748b;
  font-variant-numeric: tabular-nums;
}

.product-qa-table td.product-qa-link-image-cell {
  height: 52px;
  padding: 3px 8px;
  overflow: visible;
}

.product-qa-table td.product-qa-product-id-cell {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  font-size: 12px;
}

.product-qa-table td.product-qa-blank-cell {
  position: relative;
  background: #fcfdff;
  color: var(--ink);
  outline: none;
}

.product-qa-table td.product-qa-blank-cell:focus {
  background: #ffffff;
  box-shadow: inset 0 0 0 2px #3b82f6;
}

.product-qa-table th.product-qa-column-active {
  background: #eaf3ff;
  color: #1d4ed8;
}

.product-qa-table td.product-qa-row-active {
  background: #fff8e6;
}

.product-qa-table td.product-qa-column-active {
  background: #edf6ff;
}

.product-qa-table td.product-qa-row-active.product-qa-column-active {
  background: #dff0ff;
}

.product-qa-table td.product-qa-cell-active,
.product-qa-table td.product-qa-cell-active.product-qa-row-active.product-qa-column-active {
  background: #dbeafe;
  box-shadow: inset 0 0 0 2px #2563eb;
}

.product-qa-table td.product-qa-draft-selected,
.product-qa-table td.product-qa-draft-selected.product-qa-row-active.product-qa-column-active {
  background: #ffffff;
  box-shadow: inset 0 0 0 2px #7c3aed;
}

.product-qa-table td.product-qa-draft-fill-target {
  background: #f0fdf4;
  box-shadow: inset 0 0 0 2px #22c55e;
}

.product-qa-draft-fill-handle {
  position: absolute;
  right: 4px;
  bottom: 4px;
  width: 8px;
  height: 8px;
  border: 1px solid #ffffff;
  border-radius: 2px;
  background: #7c3aed;
  box-shadow: 0 0 0 1px rgba(124, 58, 237, 0.35);
  cursor: crosshair;
  opacity: 0;
  transition: opacity 0.12s ease;
}

.product-qa-table td.product-qa-blank-cell:hover .product-qa-draft-fill-handle,
.product-qa-table td.product-qa-draft-selected .product-qa-draft-fill-handle {
  opacity: 1;
}

.product-qa-pagination {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 8px;
  padding: 8px 10px 10px;
  border-top: 1px solid #edf1f7;
  color: #64748b;
  font-size: 13px;
  font-weight: 800;
}

.product-qa-pagination strong {
  color: var(--ink);
  font-weight: 900;
}

.product-qa-pagination label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.product-qa-pagination select {
  height: 32px;
  padding: 0 28px 0 10px;
  border: 1px solid #dbe4ef;
  border-radius: 10px;
  background: #ffffff;
  color: var(--ink);
  font-weight: 850;
}

.trend-up {
  color: var(--green);
  font-weight: 900;
}

.trend-hot {
  color: var(--orange);
  font-weight: 900;
}

.metric-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  padding: 16px;
}

.metric-card {
  min-height: 132px;
  border-radius: 16px;
  background: var(--soft);
  padding: 18px;
}

.metric-card span {
  color: var(--muted);
  font-weight: 800;
}

.metric-card strong {
  display: block;
  margin-top: 14px;
  font-size: 30px;
}

.my-selection-page {
  display: grid;
  gap: 16px;
}

.my-selection-hero .panel-header {
  border-bottom: 0;
}

.my-selection-columns {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  align-items: stretch;
}

.jd-calculator-page {
  display: grid;
  gap: 18px;
}

.jd-panel-header {
  align-items: flex-start;
}

.jd-shop-select {
  display: grid;
  min-width: 240px;
  gap: 8px;
  color: #667085;
  font-size: 13px;
  font-weight: 900;
}

.jd-shop-select select,
.jd-input-grid input,
.jd-price-row input,
.jd-config-row input {
  width: 100%;
  height: 44px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #ffffff;
  color: var(--ink);
  padding: 0 14px;
  font-weight: 850;
  outline: none;
}

.jd-shop-select select:focus,
.jd-input-grid input:focus,
.jd-price-row input:focus,
.jd-config-row input:focus {
  border-color: #93c5fd;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}

.jd-header-actions {
  align-items: stretch;
}

.jd-header-shop-select {
  min-width: 260px;
}

.jd-price-table {
  overflow-x: auto;
  padding: 0 22px 22px;
}

.jd-price-table-head,
.jd-price-row {
  display: grid;
  grid-template-columns: 42px minmax(140px, 1fr) repeat(6, minmax(106px, 0.68fr)) repeat(4, minmax(118px, 0.76fr)) 76px;
  gap: 10px;
  align-items: center;
  min-width: 1580px;
}

.jd-price-table-head {
  border-bottom: 1px solid var(--line);
  color: #98a2b3;
  font-size: 12px;
  font-weight: 950;
  padding: 12px 0;
}

.jd-price-row {
  border-bottom: 1px solid #edf1f7;
  padding: 10px 0;
}

.jd-price-row:last-child {
  border-bottom: 0;
}

.jd-row-index {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 9px;
  background: #f1f5f9;
  color: #667085;
  font-weight: 950;
}

.jd-price-row label {
  display: grid;
  gap: 6px;
  min-width: 0;
  color: #667085;
  font-size: 0;
  font-weight: 900;
}

.jd-price-row label input {
  height: 40px;
  border-radius: 10px;
  font-size: 13px;
}

.jd-row-result {
  min-width: 0;
  border-radius: 10px;
  background: #f8fafc;
  padding: 9px 10px;
}

.jd-row-result span {
  display: block;
  color: #98a2b3;
  font-size: 11px;
  font-weight: 900;
}

.jd-row-result strong {
  display: block;
  overflow: hidden;
  margin-top: 4px;
  color: var(--ink);
  font-size: 15px;
  font-weight: 950;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.jd-row-result.positive strong {
  color: #16a34a;
}

.jd-row-result.negative strong {
  color: #e11d48;
}

.jd-row-delete {
  min-width: 0;
  min-height: 38px;
  border-radius: 10px;
  padding: 0 10px;
}

.jd-row-delete:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.jd-calculator-body {
  display: grid;
  gap: 18px;
  padding: 18px 22px 22px;
}

.jd-input-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.jd-input-grid label,
.jd-config-row label {
  display: grid;
  gap: 8px;
  color: #344054;
  font-size: 13px;
  font-weight: 900;
}

.jd-calculator-results {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.jd-result-card {
  min-width: 0;
  border: 1px solid #edf1f7;
  border-radius: 14px;
  background: #f8fafc;
  padding: 16px;
}

.jd-result-card span,
.jd-breakdown-table span {
  color: #98a2b3;
  font-size: 12px;
  font-weight: 900;
}

.jd-result-card strong {
  display: block;
  margin-top: 8px;
  color: var(--ink);
  font-size: 26px;
  line-height: 1.1;
}

.jd-result-card em,
.jd-breakdown-table em {
  display: block;
  margin-top: 8px;
  color: #667085;
  font-size: 12px;
  font-style: normal;
  font-weight: 800;
  line-height: 1.35;
}

.jd-result-card.positive strong {
  color: #16a34a;
}

.jd-result-card.negative strong {
  color: #e11d48;
}

.jd-breakdown-table {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 14px;
}

.jd-breakdown-table div {
  min-width: 0;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: 14px 16px;
}

.jd-breakdown-table div:nth-child(3n) {
  border-right: 0;
}

.jd-breakdown-table div:nth-last-child(-n + 3) {
  border-bottom: 0;
}

.jd-breakdown-table strong {
  display: block;
  margin-top: 7px;
  color: var(--ink);
  font-size: 18px;
  font-weight: 950;
}

.jd-config-list {
  display: grid;
  gap: 12px;
  padding: 18px 22px 0;
}

.jd-config-row {
  display: grid;
  grid-template-columns: minmax(180px, 1.2fr) repeat(4, minmax(120px, 0.8fr)) auto;
  gap: 12px;
  align-items: end;
  border: 1px solid #edf1f7;
  border-radius: 14px;
  background: #fcfcfd;
  padding: 14px;
}

.jd-config-row .ghost-btn {
  min-width: 72px;
}

.jd-config-row .danger {
  color: #e11d48;
}

.jd-config-row .danger:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.jd-config-actions {
  display: flex;
  gap: 10px;
  padding: 16px 22px 22px;
}

.jd-config-modal-panel {
  width: min(1180px, calc(100vw - 32px));
}

.my-selection-column {
  min-height: 560px;
  padding: 16px;
}

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

.selection-column-card {
  display: grid;
  gap: 8px;
  border: 1px solid #dbeafe;
  border-radius: 12px;
  background: #f8fbff;
  padding: 13px 14px;
}

.selection-column-card div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.selection-column-card strong {
  min-width: 0;
  color: var(--ink);
  font-size: 16px;
  font-weight: 1000;
  word-break: break-word;
}

.selection-column-card p {
  margin: 0;
  color: #475569;
  font-size: 13px;
  font-weight: 850;
  line-height: 1.45;
}

.selection-column-card em {
  color: #98a2b3;
  font-style: normal;
  font-size: 12px;
  font-weight: 900;
}

@media (max-width: 1080px) {
  .my-selection-columns {
    grid-template-columns: 1fr;
  }
}

.my-selection-metrics {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  border-top: 1px solid var(--line);
}

.my-selection-metrics div {
  min-height: 86px;
  padding: 18px 22px;
  border-right: 1px solid var(--line);
}

.my-selection-metrics div:last-child {
  border-right: 0;
}

.my-selection-metrics strong {
  display: block;
  color: var(--ink);
  font-size: 28px;
  font-weight: 1000;
}

.my-selection-metrics span {
  color: var(--muted);
  font-weight: 900;
}

.my-selection-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.7fr) minmax(320px, 0.78fr);
  gap: 16px;
  align-items: start;
}

.my-selection-main {
  overflow: hidden;
}

.my-selection-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px;
  border-bottom: 1px solid var(--line);
}

.my-selection-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.my-selection-tabs button {
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #ffffff;
  color: #475569;
  padding: 0 14px;
  font-weight: 900;
}

.my-selection-tabs button.active {
  border-color: #bfdbfe;
  background: #eff6ff;
  color: #1d4ed8;
}

.my-selection-search {
  min-width: 190px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #f8fafc;
  color: #98a2b3;
  padding: 10px 12px;
  font-weight: 800;
}

.my-selection-table {
  display: grid;
}

.my-selection-head,
.my-selection-row {
  display: grid;
  grid-template-columns: minmax(240px, 1.35fr) 130px 150px 78px 90px 130px;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
}

.my-selection-head {
  background: #f8fafc;
  color: #475569;
  font-weight: 1000;
}

.my-selection-row {
  min-height: 86px;
  border-top: 1px solid var(--line);
}

.my-selection-row.active {
  background: #eff6ff;
}

.my-selection-row strong {
  display: block;
  color: var(--ink);
  font-size: 16px;
  font-weight: 1000;
}

.my-selection-row p {
  margin: 6px 0 0;
  color: #667085;
  font-size: 13px;
  font-weight: 800;
  line-height: 1.45;
}

.selection-type,
.selection-status {
  justify-self: start;
  min-height: 28px;
  border-radius: 999px;
  padding: 5px 10px;
  font-size: 12px;
  font-weight: 1000;
}

.selection-type.dev,
.selection-type.combo {
  background: #dbeafe;
  color: #1d4ed8;
}

.selection-type.spot {
  background: #dcfce7;
  color: #15803d;
}

.selection-type.clue {
  background: #fef3c7;
  color: #b45309;
}

.selection-status.pending {
  background: #f1f5f9;
  color: #64748b;
}

.selection-status.selected {
  background: #dbeafe;
  color: #0369a1;
}

.selection-status.project {
  background: #dcfce7;
  color: #15803d;
}

.selection-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

.selection-actions button,
.selection-detail-actions button {
  min-height: 34px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: #ffffff;
  color: #475569;
  padding: 0 12px;
  font-weight: 900;
}

.my-selection-detail {
  overflow: hidden;
}

.selection-detail-body {
  display: grid;
  gap: 14px;
  padding: 18px;
}

.selection-detail-body div {
  border-bottom: 1px solid var(--line);
  padding-bottom: 14px;
}

.selection-detail-body div:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.selection-detail-body span {
  display: block;
  color: #98a2b3;
  font-size: 13px;
  font-weight: 900;
}

.selection-detail-body strong {
  display: block;
  margin-top: 6px;
  color: var(--ink);
  font-size: 24px;
  font-weight: 1000;
}

.selection-detail-body p {
  margin: 8px 0 0;
  color: #475569;
  font-weight: 850;
  line-height: 1.55;
}

.selection-detail-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.my-selection-buckets {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.my-selection-buckets .panel {
  padding: 16px;
}

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

.bucket-head h3 {
  margin: 0;
  color: var(--ink);
  font-size: 20px;
  font-weight: 1000;
}

.bucket-head span {
  color: #98a2b3;
  font-weight: 900;
}

.bucket-item {
  display: grid;
  gap: 5px;
  min-height: 58px;
  border: 1px solid #dbeafe;
  border-radius: 10px;
  background: #f8fbff;
  padding: 10px 12px;
}

.bucket-item + .bucket-item {
  margin-top: 10px;
}

.bucket-item strong {
  color: var(--ink);
  font-weight: 1000;
}

.bucket-item span {
  color: #667085;
  font-size: 13px;
  font-weight: 850;
}

@media (max-width: 1180px) {
  .my-selection-layout,
  .my-selection-buckets {
    grid-template-columns: 1fr;
  }

  .my-selection-table {
    overflow-x: auto;
  }

  .my-selection-head,
  .my-selection-row {
    min-width: 980px;
  }
}

@media (max-width: 520px) {
  .online-selection-tabs-panel {
    align-items: stretch;
    flex-direction: column;
  }

  .online-selection-tabs-side {
    justify-content: flex-start;
    margin-left: 0;
  }
}

@media (max-width: 760px) {
  .my-selection-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .my-selection-toolbar {
    align-items: stretch;
    flex-direction: column;
  }

  .my-selection-search {
    min-width: 0;
  }
}

.selection-workspace {
  display: grid;
  gap: 14px;
  min-width: 0;
  overflow: hidden;
}

#category-selection-body {
  min-width: 0;
}

.selection-tab-panel {
  min-height: 360px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #ffffff;
  padding: 18px;
}

.selection-tab-panel h3 {
  margin: 0 0 18px;
  color: var(--ink);
  font-size: 22px;
  font-weight: 1000;
}

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

.selection-placeholder-grid div {
  min-height: 96px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #f8fafc;
  padding: 16px;
}

.selection-placeholder-grid span {
  display: block;
  color: #98a2b3;
  font-weight: 900;
}

.selection-placeholder-grid strong {
  display: block;
  margin-top: 12px;
  color: var(--ink);
  font-size: 24px;
  font-weight: 1000;
}

.ranking-combo-panel {
  display: grid;
  gap: 12px;
}

.ranking-combo-toolbar {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
}

.ranking-combo-period {
  display: flex;
  justify-content: flex-end;
}

.ranking-combo-period .map-period-control {
  justify-content: flex-end;
}

.ranking-combo-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.ranking-combo-head h3,
.ranking-combo-subhead h3 {
  margin: 0;
}

.ranking-combo-head p {
  margin: 8px 0 0;
  color: #98a2b3;
  font-weight: 900;
}

.map-period-control {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  color: #6b768a;
  font-size: 13px;
  font-weight: 900;
}

.map-period-control > span {
  flex: 0 0 100%;
}

.map-period-current {
  display: grid;
  min-width: 190px;
  min-height: 42px;
  border: 1px solid #e2e8f2;
  border-radius: 8px;
  background: #fff;
  padding: 7px 12px;
}

.map-period-current strong {
  color: #111827;
  font-size: 13px;
  line-height: 1.2;
}

.map-period-control em {
  color: #95a1b5;
  font-style: normal;
  line-height: 1.35;
  white-space: nowrap;
}

.period-review-trigger,
.period-review-latest {
  min-height: 38px;
}

.period-review-popover {
  right: auto;
  left: 0;
  width: 340px;
}

.period-review-card {
  border: 1px solid #e2e8f2;
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 22px 54px rgba(28, 35, 52, 0.18);
  padding: 14px;
}

.period-review-fields {
  display: grid;
  grid-template-columns: 118px 1fr;
  gap: 10px;
  margin-bottom: 12px;
}

.period-review-fields label {
  display: grid;
  gap: 7px;
  color: #667085;
  font-size: 12px;
  font-weight: 900;
}

.period-review-fields select,
.period-review-fields .period-trigger {
  min-width: 0;
  width: 100%;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  color: var(--ink);
  font-size: 14px;
  font-weight: 900;
  padding: 0 12px;
}

.period-review-fields .period-trigger {
  text-align: left;
}

.period-review-card .period-card {
  border: 0;
  border-radius: 0;
  box-shadow: none;
  padding: 0;
}

.period-review-foot {
  display: flex;
  justify-content: flex-end;
  margin-top: 12px;
}

.ranking-combo-level-tabs {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  min-width: 0;
}

.ranking-combo-level-tabs button {
  flex: 0 0 auto;
  min-height: 42px;
  border: 0;
  background: transparent;
  color: var(--ink);
  padding: 0 18px;
  font-size: 18px;
  font-weight: 900;
}

.ranking-combo-level-tabs button.active {
  background: #eef5ff;
  color: #111827;
}

.ranking-combo-toggles {
  position: relative;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  min-height: 40px;
}

.ranking-combo-toggles label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 36px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #ffffff;
  padding: 0 12px;
  color: #475467;
  font-weight: 900;
}

.ranking-combo-toggles input {
  width: 16px;
  height: 16px;
}

.ranking-combo-toggles .selection-inline-search {
  width: 220px;
  height: 38px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #ffffff;
  padding: 0 12px;
  color: #111827;
  font: inherit;
  font-weight: 800;
}

.ranking-combo-toggles .selection-inline-search::placeholder {
  color: #98a2b3;
}

.selection-filter-picker {
  position: static;
  display: inline-flex;
  z-index: 12;
}

.selection-filter-trigger {
  min-width: 128px;
  height: 38px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #ffffff;
  color: #344054;
  padding: 0 14px;
  font-weight: 900;
  text-align: left;
}

.selection-filter-picker.open .selection-filter-trigger {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
  color: #111827;
}

.selection-filter-popover {
  position: absolute;
  top: calc(100% + 10px);
  left: 0;
  width: min(1240px, 100%);
  max-height: 420px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #ffffff;
  box-shadow: 0 24px 60px rgba(15, 23, 42, 0.16);
}

.selection-filter-popover.total-selection-filter-popover {
  position: fixed;
  z-index: 10050;
  max-height: min(560px, calc(100vh - 32px));
  overflow: hidden;
}

.selection-filter-popover.combo-selection-filter-popover {
  position: fixed;
  z-index: 10050;
  max-height: min(560px, calc(100vh - 32px));
  overflow: hidden;
}

.selection-filter-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
}

.selection-filter-head strong {
  color: #111827;
  font-size: 15px;
}

.selection-filter-head button {
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #ffffff;
  color: #475467;
  padding: 6px 12px;
  font-weight: 900;
}

.selection-filter-head button:disabled {
  opacity: 0.45;
}

.selection-filter-search {
  position: relative;
  display: block;
  padding: 12px 16px;
  border-bottom: 1px solid var(--line);
  background: #ffffff;
}

.selection-filter-search input {
  width: 100%;
  height: 38px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #f8fafc;
  color: #111827;
  padding: 0 42px 0 12px;
  font: inherit;
}

.selection-filter-search input:focus {
  outline: 0;
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}

.selection-filter-search button {
  position: absolute;
  right: 24px;
  top: 50%;
  width: 28px;
  height: 28px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: #667085;
  font-size: 18px;
  transform: translateY(-50%);
}

.selection-filter-search button:disabled {
  opacity: 0.3;
}

.total-selection-source-trigger {
  min-height: 28px;
  border: 1px solid #d0d5dd;
  border-radius: 999px;
  background: #ffffff;
  color: #344054;
  padding: 4px 10px;
  font: inherit;
  font-weight: 800;
  white-space: nowrap;
}

.total-selection-source-trigger:hover,
.total-selection-source-trigger:focus-visible,
.total-selection-source-trigger[aria-expanded="true"] {
  border-color: var(--brand);
  color: #111827;
  outline: 0;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}

.total-selection-source-popover {
  position: fixed;
  z-index: 10040;
  width: min(360px, calc(100vw - 24px));
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #ffffff;
  box-shadow: 0 18px 48px rgba(15, 23, 42, 0.18);
  padding: 12px;
  color: #344054;
}

.total-selection-source-row + .total-selection-source-row {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid #eaecf0;
}

.total-selection-source-row strong {
  display: block;
  margin-bottom: 7px;
  color: #101828;
  font-size: 13px;
}

.total-selection-source-row > div {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.total-selection-source-tag {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  border-radius: 999px;
  background: #f2f4f7;
  color: #475467;
  padding: 3px 8px;
  font-size: 12px;
  font-weight: 800;
}

.total-selection-source-summary {
  margin-top: 10px;
  padding-top: 9px;
  border-top: 1px solid #eaecf0;
  color: #667085;
  font-size: 12px;
  font-weight: 800;
}

.selection-filter-columns {
  display: grid;
  grid-template-columns: repeat(6, minmax(128px, 1fr));
  max-height: 350px;
  overflow: auto;
}

.selection-filter-columns-two {
  grid-template-columns: repeat(2, minmax(180px, 1fr));
}

.total-selection-filter-popover .selection-filter-columns {
  max-height: min(480px, calc(100vh - 104px));
}

.combo-selection-filter-popover .selection-filter-columns {
  max-height: min(480px, calc(100vh - 104px));
}

.selection-filter-state {
  padding: 22px 16px;
  color: #667085;
  font-weight: 900;
}

.selection-filter-column {
  min-width: 0;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: 12px;
}

.selection-filter-column:nth-child(6n),
.selection-filter-column:last-child {
  border-right: 0;
}

.selection-filter-column h4 {
  margin: 0 0 10px;
  color: #667085;
  font-size: 13px;
  font-weight: 900;
}

.selection-filter-column-all {
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  min-height: 36px;
  border-radius: 10px;
  background: #eef5ff;
  color: #111827;
  padding: 0 8px;
  font-weight: 1000;
  margin-bottom: 10px;
}

.selection-filter-column-all input {
  width: 16px;
  height: 16px;
}

.selection-filter-column-all span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.selection-filter-column-all em {
  color: #2563eb;
  font-size: 12px;
  font-style: normal;
}

.selection-filter-options {
  display: grid;
  gap: 8px;
}

.selection-filter-options label {
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  min-height: 34px;
  border: 0;
  border-radius: 8px;
  background: #f8fafc;
  padding: 0 8px;
}

.selection-filter-options input {
  width: 16px;
  height: 16px;
}

.selection-filter-options span {
  min-width: 0;
  overflow: hidden;
  color: #111827;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.selection-filter-options em {
  color: #16a34a;
  font-size: 12px;
  font-style: normal;
}

.selection-filter-empty-column {
  border-radius: 8px;
  background: #f8fafc;
  color: #98a2b3;
  padding: 10px 8px;
  font-size: 12px;
  font-weight: 900;
}

.ranking-combo-toggles span,
.ranking-combo-toggles em {
  color: #98a2b3;
  font-style: normal;
  font-weight: 900;
}

.ranking-combo-toggles .selection-filter-options span {
  min-width: 0;
  overflow: hidden;
  color: #111827;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ranking-combo-toggles .selection-filter-options em {
  color: #16a34a;
  font-size: 12px;
  font-style: normal;
}

@media (max-width: 1320px) {
  .selection-filter-popover {
    width: min(760px, 100%);
  }

  .selection-filter-columns {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .selection-filter-column:nth-child(6n) {
    border-right: 1px solid var(--line);
  }

  .selection-filter-column:nth-child(3n),
  .selection-filter-column:last-child {
    border-right: 0;
  }
}

.ranking-combo-toggles .combo-legend-dot {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 32px;
  border-radius: 999px;
  padding: 0 12px;
  font-size: 13px;
}

.combo-legend-dot::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: currentColor;
}

.combo-legend-dot.existing {
  background: #eff6ff;
  color: #2563eb;
}

.combo-legend-dot.simulated {
  background: #f2f4f7;
  color: #667085;
}

.combo-legend-dot.accepted {
  background: #fff1f2;
  color: #e11d48;
}

.ranking-combo-scroll {
  max-height: 560px;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 14px;
}

.ranking-combo-table {
  width: 100%;
  min-width: 1280px;
  border-collapse: collapse;
  background: #ffffff;
}

.ranking-combo-table th,
.ranking-combo-table td {
  border-bottom: 1px solid var(--line);
  padding: 12px 14px;
  color: #344054;
  font-weight: 900;
  text-align: left;
  white-space: nowrap;
}

.ranking-combo-table td small {
  display: block;
  margin-top: 4px;
  color: #98a2b3;
  font-size: 12px;
  font-weight: 900;
}

.ranking-combo-link-count.has-links {
  cursor: pointer;
  text-decoration: underline;
  text-decoration-style: dotted;
  text-underline-offset: 3px;
}

.ranking-combo-table th {
  position: sticky;
  top: 0;
  z-index: 2;
  background: #f8fafc;
  color: var(--ink);
}

.combo-table-header-control {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.combo-table-header-control > span {
  flex: 0 0 auto;
}

.combo-table-header-control .selection-filter-trigger {
  min-width: auto;
  height: 30px;
  border-radius: 8px;
  padding: 0 10px;
  font-size: 12px;
}

.combo-table-header-control .selection-filter-picker {
  z-index: 5;
}

.combo-status-filter {
  position: relative;
}

.combo-status-filter summary {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  color: #475467;
  padding: 0 10px;
  font-size: 12px;
  font-weight: 1000;
  cursor: pointer;
  list-style: none;
}

.combo-status-filter summary::-webkit-details-marker {
  display: none;
}

.combo-status-filter[open] summary {
  border-color: var(--brand);
  color: #111827;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}

.combo-status-filter-menu {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  z-index: 20;
  display: grid;
  gap: 6px;
  min-width: 190px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #ffffff;
  box-shadow: 0 18px 42px rgba(15, 23, 42, 0.16);
  padding: 8px;
}

.combo-status-filter-menu label {
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  min-height: 34px;
  border-radius: 8px;
  background: #f8fafc;
  color: #344054;
  padding: 0 8px;
  font-size: 12px;
  font-weight: 900;
}

.combo-status-filter-menu input {
  width: 16px;
  height: 16px;
}

.combo-status-filter-menu span {
  color: #98a2b3;
}

.ranking-combo-table tr.existing td {
  background: #f2f8ff;
}

.ranking-combo-table tr.accepted td {
  background: #fff4f4;
}

.ranking-combo-table tr.simulated td {
  color: #667085;
}

.combo-rank-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 30px;
  height: 30px;
  border-radius: 8px;
  background: #f8fafc;
  color: #475467;
  font-weight: 1000;
}

.ranking-combo-table tr.removed td {
  background: #f8fafc;
  color: #98a2b3;
  text-decoration-color: #cbd5e1;
}

.combo-status {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  border-radius: 999px;
  padding: 0 10px;
  font-size: 12px;
  font-weight: 1000;
}

.combo-status.existing {
  background: #e0f2fe;
  color: #0369a1;
}

.combo-status.simulated {
  background: #f2f4f7;
  color: #667085;
}

.combo-status.accepted {
  background: #fee2e2;
  color: #dc2626;
}

.combo-status.removed {
  background: #e5e7eb;
  color: #667085;
}

.combo-output-status {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  border-radius: 999px;
  padding: 0 8px;
  font-size: 12px;
  font-weight: 1000;
}

.combo-output-status.pending {
  background: #f2f4f7;
  color: #667085;
}

.combo-output-status.existing {
  background: #dcfce7;
  color: #15803d;
}

.combo-output-status.removed {
  background: #e5e7eb;
  color: #667085;
}

.ranking-combo-row-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.ranking-map-virtual-sync-panel {
  margin-top: 18px;
}

.combo-accept-btn,
.combo-remove-row-btn,
.combo-restore-btn {
  min-height: 34px;
  border: 0;
  border-radius: 9px;
  padding: 0 14px;
  font-weight: 1000;
}

.combo-accept-btn {
  background: #2563eb;
  color: #ffffff;
}

.combo-accept-btn.segment {
  background: #0f766e;
}

.combo-accept-btn.accepted {
  background: #dc2626;
}

.combo-accept-btn.segment.accepted {
  background: #047857;
}

.combo-remove-row-btn {
  border: 1px solid var(--line);
  background: #f8fafc;
  color: #475467;
}

.combo-restore-btn {
  background: #111827;
  color: #ffffff;
}

.combo-retry-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  border: 0;
  border-radius: 9px;
  background: #111827;
  color: #ffffff;
  padding: 0 14px;
  font-weight: 1000;
}

.ranking-combo-accepted {
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 14px;
  background: #ffffff;
}

.ranking-combo-subhead {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.ranking-combo-subhead span {
  color: #98a2b3;
  font-weight: 900;
}

.ranking-combo-subhead-actions {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.total-selection-owner-filter {
  min-height: 30px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 10px;
  font-weight: 900;
  color: #334155;
  background: #ffffff;
}

.ranking-combo-accepted-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 10px;
}

.ranking-combo-accepted-item {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 6px 10px;
  align-items: center;
  border: 1px solid #fecaca;
  border-radius: 12px;
  background: #fff7f7;
  padding: 12px;
}

.ranking-combo-accepted-item strong {
  color: var(--ink);
  font-weight: 1000;
}

.ranking-combo-accepted-item span {
  color: #667085;
  font-size: 12px;
  font-weight: 900;
}

.ranking-combo-accepted-actions {
  grid-row: 1 / span 2;
  grid-column: 2;
  display: flex;
  align-items: center;
  gap: 8px;
}

.ranking-combo-accepted-item button {
  min-height: 32px;
  border: 1px solid #fecaca;
  border-radius: 8px;
  background: #ffffff;
  color: #dc2626;
  font-weight: 900;
}

.ranking-combo-accepted-item .combo-add-selection-btn {
  border-color: #bfdbfe;
  background: #2563eb;
  color: #ffffff;
}

.keyword-selection-panel .ranking-combo-head {
  align-items: center;
}

.keyword-selection-output-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(260px, 1fr));
  gap: 14px;
}

.keyword-selection-output-list {
  grid-template-columns: minmax(0, 1fr);
}

.keyword-selection-table {
  min-width: 980px;
}

.keyword-selection-actions {
  flex-wrap: wrap;
}

.keyword-selection-choice-btn,
.keyword-selection-choice-btn.segment {
  background: #2563eb;
  color: #ffffff;
}

.keyword-selection-choice-btn.accepted,
.keyword-selection-choice-btn.segment.accepted {
  border: 0;
  background: #16a34a;
  color: #ffffff;
  box-shadow: none;
}

.keyword-selection-accepted-item {
  grid-template-columns: minmax(150px, auto) minmax(0, 1fr) auto;
  border-color: #dbeafe;
  background: #f8fbff;
}

.keyword-selection-output-title {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.keyword-selection-output-title strong {
  min-width: 0;
}

.keyword-selection-output-title .map-grade {
  min-height: 24px;
  padding: 0 8px;
  flex: 0 0 auto;
}

.keyword-selection-accepted-item p {
  margin: 0;
  color: #475569;
  font-size: 13px;
  font-weight: 900;
  line-height: 1.4;
}

.total-selection-owner-note {
  color: #64748b;
  font-size: 12px;
  font-weight: 900;
}

.keyword-selection-output-actions {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
}

.keyword-selection-output-actions button {
  min-height: 28px;
  border-color: var(--line);
  color: #475569;
  padding: 0 10px;
}

.keyword-selection-output-actions .combo-add-selection-btn {
  border-color: #bfdbfe;
  background: #2563eb;
  color: #ffffff;
}

.cross-borrow-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.8fr) minmax(320px, 0.9fr);
  gap: 18px;
}

.cross-borrow-layout-full {
  grid-template-columns: 1fr;
}

.cross-borrow-mode-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 16px;
}

.cross-borrow-mode-tabs button {
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #ffffff;
  color: #475569;
  padding: 0 16px;
  font-size: 14px;
  font-weight: 1000;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.04);
}

.cross-borrow-mode-tabs button.active {
  border-color: #111827;
  background: #111827;
  color: #ffffff;
}

.cross-borrow-main,
.cross-borrow-side {
  min-width: 0;
}

.cross-borrow-metrics {
  margin-bottom: 16px;
}

.borrow-analysis-notice {
  margin-bottom: 14px;
  border: 1px solid #bfdbfe;
  border-radius: 10px;
  background: #eff6ff;
  color: #1d4ed8;
  padding: 10px 12px;
  font-size: 13px;
  font-weight: 900;
  line-height: 1.5;
}

.cross-research-panel {
  max-width: none;
}

.cross-research-panel .panel-header {
  align-items: center;
  margin-bottom: 12px;
}

.cross-research-panel .cross-research-grid,
.cross-research-panel .cross-research-actions {
  margin-right: 22px;
  margin-left: 22px;
}

.cross-research-panel .cross-research-actions {
  margin-bottom: 14px;
}

.cross-research-header-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  min-width: 0;
}

.cross-research-inline-notice {
  max-width: min(780px, 56vw);
  overflow: hidden;
  border: 1px solid #bfdbfe;
  border-radius: 10px;
  background: #eff6ff;
  color: #1d4ed8;
  padding: 8px 10px;
  font-size: 12px;
  font-weight: 900;
  line-height: 1.35;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.cross-main-image-stack {
  display: grid;
  gap: 14px;
  min-width: 0;
}

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

.cross-research-field {
  display: grid;
  gap: 6px;
}

.cross-research-field span {
  color: #111827;
  font-size: 13px;
  font-weight: 1000;
}

.cross-research-field input,
.cross-research-field textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #ffffff;
  color: #111827;
  padding: 9px 11px;
  font: inherit;
  font-size: 13px;
  font-weight: 800;
  outline: none;
}

.cross-research-field textarea {
  min-height: 62px;
  resize: vertical;
}

.cross-research-field input:focus,
.cross-research-field textarea:focus {
  border-color: #2563eb;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}

.cross-similarity-section {
  margin-top: 14px;
  border-top: 1px solid var(--line);
  padding-top: 14px;
}

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

.main-image-borrow-library-panel {
  align-self: start;
}

.main-image-saved-library-panel .panel-header {
  align-items: center;
}

.main-image-saved-library-panel .panel-header > strong {
  color: #2563eb;
  font-size: 22px;
  font-weight: 1000;
  white-space: nowrap;
}

.main-image-saved-library-list {
  display: grid;
  gap: 8px;
}

.main-image-saved-library-list .qa-row {
  min-height: 50px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #ffffff;
  padding: 10px 12px;
}

.main-image-borrow-bucket-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 14px;
}

.main-image-borrow-bucket-tabs button {
  min-height: 40px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #ffffff;
  color: #475569;
  padding: 0 14px;
  font-weight: 1000;
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.04);
}

.main-image-borrow-bucket-tabs button.active {
  border-color: #111827;
  background: #111827;
  color: #ffffff;
}

.main-image-borrow-bucket-tabs button.deferred {
  color: #667085;
}

.main-image-borrow-bucket-tabs button.deferred.active {
  color: #ffffff;
}

.main-image-borrow-tab-divider {
  flex: 1 0 100%;
  height: 1px;
  margin: 2px 0;
  background: var(--line);
}

.cross-borrow-bucket {
  display: grid;
  gap: 10px;
  min-height: 96px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #ffffff;
  padding: 12px;
}

.cross-borrow-bucket > div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.cross-borrow-bucket strong {
  color: #111827;
  font-size: 13px;
  font-weight: 1000;
}

.cross-borrow-bucket span {
  color: #98a2b3;
  font-size: 12px;
  font-weight: 900;
  white-space: nowrap;
}

.cross-borrow-bucket p {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0;
}

.cross-borrow-bucket em {
  border-radius: 999px;
  background: #eef5ff;
  color: #2563eb;
  padding: 5px 8px;
  font-size: 12px;
  font-style: normal;
  font-weight: 900;
}

.cross-borrow-bucket .empty-bucket {
  color: #98a2b3;
  font-size: 12px;
  font-weight: 850;
  line-height: 1.5;
}

.cross-research-actions {
  display: flex;
  gap: 10px;
  margin-top: 12px;
}

.cross-research-actions button {
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 0 14px;
  font-weight: 900;
}

.borrow-candidate-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 12px;
}

.cross-borrow-placeholder {
  align-self: start;
}

.borrow-candidate-list {
  display: grid;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #ffffff;
}

.borrow-candidate-row {
  display: grid;
  grid-template-columns: 42px minmax(180px, 1.2fr) 72px minmax(170px, 1fr) minmax(120px, 0.8fr) minmax(180px, 1.1fr) 92px 72px;
  align-items: center;
  gap: 10px;
  min-height: 54px;
  border-top: 1px solid var(--line);
  padding: 8px 12px;
  color: #344054;
  font-size: 12px;
  font-weight: 850;
}

.borrow-candidate-row:first-child {
  border-top: 0;
}

.borrow-candidate-row.excluded {
  background: #f8fafc;
  opacity: 0.68;
}

.borrow-candidate-head {
  min-height: 42px;
  background: #f8fafc;
  color: #667085;
  font-size: 12px;
  font-weight: 1000;
}

.borrow-row-rank {
  color: #98a2b3;
  font-weight: 1000;
}

.borrow-row-main {
  min-width: 0;
}

.borrow-row-main strong {
  display: block;
  overflow: hidden;
  color: var(--ink);
  font-size: 14px;
  font-weight: 1000;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.borrow-row-main span,
.borrow-row-tags,
.borrow-row-terms,
.borrow-row-idea,
.borrow-row-source {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.borrow-row-main span {
  display: block;
  margin-top: 3px;
  color: #667085;
}

.borrow-row-count {
  display: inline-flex;
  align-items: baseline;
  gap: 3px;
  color: #2563eb;
}

.borrow-row-count strong {
  font-size: 18px;
  font-weight: 1000;
}

.borrow-row-count span {
  color: #667085;
  font-size: 11px;
}

.borrow-row-action button {
  min-height: 30px;
  border-radius: 8px;
  padding: 0 10px;
  font-size: 12px;
  font-weight: 900;
}

.borrow-row-action {
  display: flex;
  gap: 6px;
}

.borrow-row-action .danger {
  color: #dc2626;
}

.main-image-borrow-list-tools {
  display: flex;
  align-items: center;
  gap: 10px;
}

.main-image-borrow-list-tools button {
  min-height: 32px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: #ffffff;
  color: #667085;
  padding: 0 10px;
  font-size: 12px;
  font-weight: 900;
}

.main-image-borrow-list-tools button.active {
  border-color: #111827;
  background: #111827;
  color: #ffffff;
}

.borrow-candidate-card {
  display: grid;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #ffffff;
  padding: 14px;
}

.borrow-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.borrow-card-head strong {
  display: block;
  color: var(--ink);
  font-size: 17px;
  font-weight: 1000;
}

.borrow-card-head span {
  display: block;
  margin-top: 4px;
  color: #667085;
  font-size: 12px;
  font-weight: 800;
  line-height: 1.4;
}

.borrow-score {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 42px;
  height: 30px;
  border-radius: 999px;
  background: #f1f5f9;
  color: #475569;
  font-size: 13px;
  font-weight: 1000;
}

.borrow-score.mid {
  background: #eef5ff;
  color: #2563eb;
}

.borrow-score.high {
  background: #dcfce7;
  color: #16a34a;
}

.borrow-match-list,
.borrow-direction-list,
.borrow-profile-list section div {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.borrow-match-list em,
.borrow-direction-list b,
.borrow-profile-list span {
  border-radius: 999px;
  background: #f8fafc;
  color: #475569;
  padding: 6px 10px;
  font-size: 12px;
  font-style: normal;
  font-weight: 900;
}

.borrow-direction-list b {
  background: #eef5ff;
  color: #2563eb;
}

.borrow-candidate-card p {
  margin: 0;
  color: #344054;
  font-size: 13px;
  font-weight: 800;
  line-height: 1.6;
}

.borrow-candidate-card .borrow-card-note {
  color: #111827;
}

.borrow-idea-section {
  display: grid;
  gap: 6px;
  border-radius: 10px;
  background: #f8fafc;
  padding: 10px 12px;
}

.borrow-idea-section strong {
  color: #111827;
  font-size: 13px;
  font-weight: 1000;
}

.borrow-idea-section ul {
  display: grid;
  gap: 5px;
  margin: 0;
  padding-left: 18px;
  color: #344054;
  font-size: 12px;
  font-weight: 850;
  line-height: 1.45;
}

.borrow-risk {
  display: block;
  color: #b45309;
  font-size: 12px;
  font-weight: 900;
  line-height: 1.5;
}

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

.borrow-card-actions > span {
  color: #98a2b3;
  font-size: 12px;
  font-weight: 900;
}

.borrow-card-actions button,
.borrow-saved-row button {
  min-height: 34px;
  border: 1px solid var(--line);
  border-radius: 9px;
  padding: 0 12px;
  font-weight: 900;
}

.borrow-profile-list {
  display: grid;
  gap: 14px;
}

.borrow-profile-list section {
  display: grid;
  gap: 8px;
}

.borrow-profile-list strong {
  color: #111827;
  font-size: 14px;
  font-weight: 1000;
}

.borrow-saved-box {
  margin-top: 18px;
  border-top: 1px solid var(--line);
  padding-top: 16px;
}

.borrow-saved-row button {
  background: #ffffff;
  color: #dc2626;
}

@media (max-width: 1100px) {
  .cross-borrow-layout {
    grid-template-columns: 1fr;
  }

  .borrow-candidate-row {
    grid-template-columns: 34px minmax(160px, 1fr) 64px minmax(160px, 1fr) 68px;
  }

  .borrow-candidate-row > div:nth-child(5),
  .borrow-candidate-row > div:nth-child(6),
  .borrow-candidate-row > div:nth-child(7) {
    display: none;
  }
}

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

  .cross-research-panel .panel-header,
  .cross-research-header-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .cross-research-inline-notice {
    max-width: none;
    white-space: normal;
  }

  .keyword-selection-output-grid {
    grid-template-columns: 1fr;
  }
}

.compact-empty {
  min-height: 80px;
}

.keyword-row {
  grid-template-columns: 1fr auto;
}

.category-map-workspace {
  display: grid;
  gap: 16px;
  min-width: 0;
  overflow: hidden;
}

#category-map-body {
  min-width: 0;
  overflow: hidden;
}

.category-map-tabs {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding: 4px 0 8px;
}

.category-map-tabs button {
  flex: 0 0 auto;
  height: 42px;
  min-height: 42px;
  max-height: 42px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #ffffff;
  padding: 0 16px;
  color: #475467;
  cursor: pointer;
  font-weight: 900;
  white-space: nowrap;
  appearance: none;
  box-shadow: none;
  transform: none;
  overflow: hidden;
}

.category-map-tabs button.active {
  border-color: #111827;
  background: #111827;
  color: #ffffff;
}

.category-map-tabs button.active:hover,
.category-map-tabs button.active:active,
.category-map-tabs button.active:focus,
.category-map-tabs button.active:focus-visible {
  border-color: #111827;
  background: #111827;
  color: #ffffff;
}

.category-map-tabs button:active,
.category-map-tabs button:focus,
.category-map-tabs button:focus-visible {
  outline: 0;
  box-shadow: none;
  transform: none;
}

.category-map-tabs button:active:not(.active),
.category-map-tabs button:focus:not(.active),
.category-map-tabs button:focus-visible:not(.active) {
  border-color: var(--line);
  background: #ffffff;
  color: #475467;
}

.map-area {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.map-card {
  min-height: 230px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.88);
  padding: 22px;
}

.map-card-wide {
  grid-column: 1 / -1;
  min-height: 190px;
}

.map-card p {
  margin: 10px 0 0;
  color: #667085;
  font-size: 14px;
  font-weight: 800;
  line-height: 1.6;
}

.keyword-map-scroll {
  width: 100%;
  min-width: 0;
  max-width: 100%;
  overflow-x: auto;
  overflow-y: hidden;
  padding-bottom: 8px;
}

.keyword-map-layout {
  display: grid;
  grid-template-columns: 1320px 430px;
  gap: 16px;
  align-items: start;
  min-width: 1766px;
  width: 1766px;
  scrollbar-gutter: stable;
}

.ranking-map-layout {
  grid-template-columns: max-content 560px;
  width: max-content;
  min-width: 1776px;
}

.product-qa-map-layout {
  grid-template-columns: max-content 560px;
  width: max-content;
  min-width: 1776px;
}

.keyword-map-board-scroll {
  min-width: 0;
  overflow: visible;
}

.ranking-map-layout .keyword-map-board {
  grid-template-columns: repeat(6, minmax(200px, 1fr));
  min-width: 1200px;
}

.ranking-map-layout .keyword-map-source {
  min-width: 0;
}

.keyword-map-source,
.keyword-map-board {
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #ffffff;
  overflow: hidden;
}

.keyword-map-toolbar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 18px;
  border-bottom: 1px solid var(--line);
}

.keyword-map-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px;
  background: var(--line);
  border-bottom: 1px solid var(--line);
}

.keyword-map-summary span {
  display: grid;
  gap: 2px;
  min-height: 64px;
  background: #ffffff;
  padding: 12px 14px;
  color: #667085;
  font-size: 12px;
  font-weight: 900;
}

.keyword-map-summary strong {
  color: var(--ink);
  font-size: 20px;
  line-height: 1;
}

.keyword-map-toolbar h2,
.keyword-map-column h3 {
  margin: 0;
  color: var(--ink);
}

.keyword-map-toolbar p {
  margin: 6px 0 0;
  color: #667085;
  font-size: 13px;
  font-weight: 800;
}

.keyword-map-toggles {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.keyword-map-toggles label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #667085;
  font-size: 12px;
  font-weight: 900;
  white-space: nowrap;
}

.keyword-map-toggles input {
  width: 14px;
  height: 14px;
  accent-color: var(--purple);
}

.keyword-map-tools {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(118px, 0.7fr);
  gap: 10px;
  align-items: end;
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
  background: #fcfcfd;
}

.keyword-map-tools label {
  display: grid;
  gap: 6px;
  color: #667085;
  font-size: 12px;
  font-weight: 900;
}

.keyword-map-tools input,
.keyword-map-tools select {
  width: 100%;
  min-height: 36px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #ffffff;
  padding: 0 10px;
  color: var(--ink);
  font-weight: 800;
}

.keyword-map-tools .ghost-btn,
.keyword-map-tools .dark-btn {
  width: 100%;
  min-height: 36px;
  min-width: 0;
  padding: 0 10px;
  line-height: 1.2;
  white-space: normal;
}

.keyword-map-tools .map-status {
  align-self: center;
}

.keyword-map-head,
.keyword-map-row {
  display: grid;
  grid-template-columns: minmax(70px, 1fr) 54px 92px 138px;
  gap: 8px;
  align-items: center;
  padding: 10px 14px;
  border-bottom: 1px solid var(--line);
}

.keyword-map-head {
  background: var(--soft);
  color: #667085;
  font-size: 12px;
  font-weight: 900;
}

.keyword-map-list {
  max-height: 620px;
  overflow: auto;
}

.keyword-map-row strong {
  overflow: hidden;
  color: var(--ink);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.keyword-map-row.assigned,
.keyword-map-row.canceled {
  opacity: 0.72;
}

.product-qa-map-row.is-highlighted {
  background: #fef9c3;
}

.map-grade {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 26px;
  border-radius: 999px;
  background: #eef2ff;
  color: #4338ca;
  font-size: 12px;
  font-weight: 950;
}

.grade-5 {
  background: rgba(22, 163, 74, 0.14);
  color: #15803d;
}

.grade-4 {
  background: rgba(14, 165, 233, 0.14);
  color: #0369a1;
}

.grade-3 {
  background: rgba(126, 87, 255, 0.13);
  color: var(--purple);
}

.grade-unset {
  background: #f3f4f6;
  color: #6b7280;
}

.grade-2 {
  background: rgba(245, 158, 11, 0.14);
  color: #b45309;
}

.grade-1 {
  background: #f2f4f7;
  color: #667085;
}

.map-ai-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 30px;
  border: 0;
  border-radius: 999px;
  padding: 0 10px;
  cursor: pointer;
  font-size: 12px;
  font-weight: 900;
  white-space: nowrap;
}

.map-ai-pill.recommend {
  background: rgba(22, 163, 74, 0.12);
  color: #15803d;
}

.map-ai-pill.reject {
  background: #f2f4f7;
  color: #667085;
}

.map-ai-pill.pending,
.map-ai-pill.unsure {
  background: #fff7ed;
  color: #b45309;
}

.keyword-map-ai-progress {
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  box-shadow: none;
}

.keyword-map-actions {
  display: flex;
  gap: 6px;
  align-items: center;
}

.keyword-map-actions .mini-btn {
  min-width: 56px;
  padding: 0 8px;
}

.map-status {
  color: #667085;
  font-size: 12px;
  font-weight: 900;
}

.keyword-map-board {
  display: grid;
  grid-template-columns: repeat(6, minmax(220px, 1fr));
  gap: 0;
  min-width: 1320px;
}

.keyword-map-column {
  min-height: 620px;
  border-right: 1px solid var(--line);
  background: #ffffff;
  padding: 16px;
}

.keyword-map-column:last-child {
  border-right: 0;
}

.keyword-map-column p {
  color: #98a2b3;
  font-weight: 800;
}

.custom-map-grade-select,
.basic-map-grade-select {
  width: 82px;
  height: 30px;
  border: 0;
  border-radius: 999px;
  background: #dcfce7;
  color: #16a34a;
  cursor: pointer;
  font-size: 12px;
  font-weight: 1000;
  text-align: center;
  text-align-last: center;
  outline: none;
}

.custom-map-grade-select.grade-unset,
.basic-map-grade-select.grade-unset {
  background: #f3f4f6;
  color: #6b7280;
}

.custom-map-grade-select.grade-4,
.basic-map-grade-select.grade-4 {
  background: #e0f2fe;
  color: #0284c7;
}

.custom-map-grade-select.grade-3,
.basic-map-grade-select.grade-3 {
  background: #fef3c7;
  color: #b45309;
}

.custom-map-grade-select.grade-2,
.basic-map-grade-select.grade-2 {
  background: #f1f5f9;
  color: #475569;
}

.custom-map-grade-select.grade-1,
.basic-map-grade-select.grade-1 {
  background: #f3f4f6;
  color: #6b7280;
}

.basic-map-column,
.basic-map-editor-column {
  display: flex;
  flex-direction: column;
}

.basic-map-chip {
  background: #fbfcff;
}

.basic-map-chip .map-chip-main {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 82px 52px;
  gap: 6px;
  align-items: center;
  width: 100%;
}

.basic-map-chip strong {
  display: block;
  width: 100%;
  color: var(--ink);
  font-size: 17px;
  line-height: 1.35;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.basic-map-chip small {
  color: #667085;
  font-size: 12px;
  font-weight: 800;
}

.basic-map-chip [data-basic-map-toggle-hidden] {
  justify-self: end;
  padding: 0 8px;
}

.hidden-total-map-chip [data-basic-map-toggle-hidden] {
  border-color: #bbf7d0;
  background: #dcfce7;
  color: #15803d;
}

.basic-category-map-modal {
  width: min(1280px, 96vw);
}

.basic-shops-modal {
  width: min(900px, 96vw);
}

.basic-shops-modal-body {
  display: grid;
  gap: 14px;
  min-height: 0;
  overflow: auto;
  padding: 24px;
}

.basic-shop-table-wrap {
  max-height: 480px;
}

.basic-shop-table th:first-child,
.basic-shop-table td:first-child {
  width: 72px;
}

.basic-shop-table th:last-child,
.basic-shop-table td:last-child {
  width: 100px;
}

.basic-category-map-modal-body {
  display: grid;
  gap: 14px;
  min-height: 0;
  overflow: auto;
  padding: 24px;
}

.basic-map-editor-scroll {
  min-height: 520px;
}

.basic-map-editor-board {
  min-height: 520px;
}

.basic-map-editor-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 72px;
  gap: 8px;
  margin: 10px 0 12px;
}

.basic-map-editor-form input,
.basic-map-editor-form select {
  min-width: 0;
  height: 36px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #ffffff;
  color: var(--ink);
  font-size: 13px;
  font-weight: 900;
  padding: 0 10px;
}

.basic-map-editor-form button {
  min-height: 34px;
  border: 0;
  border-radius: 10px;
  background: #111827;
  color: #ffffff;
  cursor: pointer;
  font-size: 13px;
  font-weight: 1000;
}

.basic-map-editor-items {
  display: grid;
  gap: 10px;
}

.basic-map-editor-item {
  margin-top: 0;
}

.basic-map-editor-item .map-chip-main {
  grid-template-columns: minmax(0, 1fr) 42px;
}

.basic-map-editor-item [data-basic-editor-remove] {
  justify-self: end;
  padding: 0 8px;
}

.ranking-map-chip small,
.total-map-chip small {
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
  color: #667085;
  font-size: 12px;
  font-weight: 800;
  line-height: 1.35;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.map-original-name {
  display: inline;
  margin-left: 6px;
  color: #98a2b3;
  font-size: 11px;
  font-weight: 700;
  line-height: 1.35;
  white-space: nowrap;
}

.product-qa-map-row b .map-original-name {
  font-size: 11px;
  font-weight: 700;
}

.product-qa-map-editable-name {
  display: inline-flex;
  align-items: center;
  gap: 0;
  max-width: 100%;
  min-width: 0;
  cursor: text;
}

.product-qa-map-editable-name > span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.product-qa-map-editable-name:hover > span {
  color: #4f46e5;
}

.product-qa-map-name-input {
  box-sizing: border-box;
  flex: 0 1 180px;
  width: 180px;
  max-width: 100%;
  min-width: 0;
  min-height: 30px;
  border: 1px solid #c7d2fe;
  border-radius: 8px;
  background: #ffffff;
  color: var(--ink);
  font: inherit;
  font-size: 13px;
  font-weight: 900;
  padding: 4px 8px;
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.12);
  outline: none;
}

.product-qa-map-name-input + .map-original-name {
  margin-left: 0;
}

.keyword-map-assign-popover {
  position: fixed;
  z-index: 5000;
  display: grid;
  gap: 8px;
  width: 220px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #ffffff;
  box-shadow: 0 18px 45px rgba(15, 23, 42, 0.18);
  padding: 12px;
}

.keyword-map-assign-popover button {
  min-height: 36px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #ffffff;
  cursor: pointer;
  font-weight: 900;
}

.ranking-map-period-note {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
  background: #f8fafc;
  color: #667085;
  font-size: 12px;
  font-weight: 900;
}

.ranking-map-period-note strong {
  color: var(--ink);
}

.ranking-map-head,
.ranking-map-row {
  grid-template-columns: minmax(92px, 1fr) 52px 92px 72px 116px;
  gap: 7px;
  padding-left: 12px;
  padding-right: 12px;
}

.ranking-map-row strong {
  display: grid;
  gap: 2px;
}

.ranking-map-row strong small {
  overflow: hidden;
  color: #98a2b3;
  font-size: 11px;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ranking-map-row b {
  color: var(--ink);
  font-size: 13px;
  white-space: nowrap;
}

.ranking-map-row.stale {
  background: #fff7ed;
}

.ranking-map-row.stale b {
  color: #c2410c;
  font-size: 12px;
}

.ranking-map-row .keyword-map-actions {
  justify-content: flex-end;
  gap: 6px;
  min-width: 0;
}

.ranking-map-row .keyword-map-actions .mini-btn {
  min-width: 50px;
  padding: 0 7px;
}

.map-card ul {
  display: grid;
  gap: 12px;
  margin: 20px 0 0;
  padding: 0;
  list-style: none;
}

.map-card li {
  border-radius: 12px;
  background: var(--soft);
  padding: 12px;
  color: #475467;
  font-weight: 800;
}

.qa-row {
  grid-template-columns: 1fr auto;
}

.chat-board {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 18px;
}

.chat-list,
.chat-detail {
  min-height: 560px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.88);
  padding: 18px;
}

.chat-list button {
  width: 100%;
  min-height: 58px;
  margin-bottom: 10px;
  border: 0;
  border-radius: 14px;
  background: var(--soft);
  color: #475467;
  text-align: left;
  padding: 0 14px;
  font-weight: 800;
}

.chat-bubble {
  width: fit-content;
  max-width: 72%;
  margin-bottom: 14px;
  border-radius: 16px;
  padding: 14px 16px;
  background: var(--soft);
  color: #344054;
}

.chat-bubble.right {
  margin-left: auto;
  background: #111827;
  color: #ffffff;
}

.ranking-view {
  display: grid;
  gap: 14px;
  max-width: 100%;
  min-width: 0;
}

.ranking-filter-panel,
.ranking-data-panel {
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.9);
}

.ranking-filter-panel {
  position: relative;
  z-index: 10;
  display: block;
  padding: 18px;
  overflow: visible;
}

.ranking-data-panel {
  position: relative;
  z-index: 1;
  max-width: 100%;
  min-width: 0;
  overflow: hidden;
}

.source-total-unranked {
  color: #98a2b3;
  font-size: 12px;
}

.payment-amount-conflict em {
  color: #b54708;
  background: #fffaeb;
}

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

.ranking-category-view {
  margin: 22px 18px 18px;
  border: 1px solid #d0d5dd;
  border-radius: 16px;
  background: #ffffff;
  padding: 14px;
}

.ranking-insight-shop-filter {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin: -2px 0 12px;
  color: #667085;
  font-size: 12px;
  font-weight: 700;
}

.ranking-insight-shop-filter.muted {
  color: #98a2b3;
}

.ranking-insight-shop-filter label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 30px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #f8fafc;
  padding: 0 10px;
  color: #475467;
  cursor: pointer;
}

.ranking-insight-shop-filter input {
  width: 14px;
  height: 14px;
  accent-color: var(--purple);
}

.ranking-category-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 12px;
}

.ranking-category-header h3 {
  margin: 0 0 4px;
  color: var(--ink);
  font-size: 18px;
  font-weight: 800;
}

.ranking-category-header p {
  margin: 0;
  color: #667085;
  font-size: 13px;
  font-weight: 650;
}

.ranking-category-totals {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.ranking-category-totals span {
  min-height: 34px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #f8fafc;
  color: #667085;
  padding: 7px 12px;
  font-size: 12px;
  font-weight: 650;
  white-space: nowrap;
}

.ranking-category-totals strong {
  margin-right: 4px;
  color: var(--ink);
  font-weight: 800;
}

.ranking-virtual-actions {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 10px;
  margin: 0 0 12px;
}

.ranking-virtual-actions > div:last-child {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.category-share-section {
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fbfdff;
  padding: 14px;
  margin: 0 0 14px;
}

.category-share-toolbar {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  justify-content: flex-start;
  gap: 12px;
  margin-bottom: 14px;
}

.category-share-toolbar-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 10px;
  margin-left: auto;
}

.category-share-toolbar label {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #344054;
  font-size: 13px;
  font-weight: 800;
}

.category-share-toolbar select {
  min-width: 190px;
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #ffffff;
  color: var(--ink);
  padding: 0 12px;
  font: inherit;
  font-weight: 750;
}

.category-share-path {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  min-height: 38px;
  border-radius: 10px;
  background: #eef6ff;
  padding: 0 12px;
  color: #475467;
  font-size: 13px;
  font-weight: 800;
}

.category-share-path button {
  border: 0;
  background: transparent;
  color: #2563eb;
  font: inherit;
  text-decoration: underline;
  cursor: pointer;
}

.category-share-path b {
  color: #98a2b3;
}

.category-share-path em {
  color: #667085;
  font-style: normal;
}

.category-share-back {
  min-height: 36px;
  border: 0;
  border-radius: 9px;
  background: #2563eb;
  color: #ffffff;
  padding: 0 14px;
  margin: 0 0 12px;
  font-size: 13px;
  font-weight: 850;
  cursor: pointer;
}

.category-share-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.category-share-chart {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #ffffff;
  padding: 14px;
}

.category-share-chart-combined {
  display: grid;
  grid-template-columns: minmax(500px, 620px) minmax(540px, 1fr);
  align-items: center;
  gap: 14px;
}

.category-share-chart-visuals {
  display: grid;
  grid-template-columns: repeat(2, minmax(230px, 250px));
  align-items: center;
  justify-content: start;
  justify-items: center;
  gap: 16px;
  min-width: 0;
}

.category-share-chart-info {
  min-width: 0;
  justify-self: stretch;
  width: 100%;
}

.category-share-donut-panel {
  min-width: 0;
}

.category-share-chart h4 {
  margin: 0 0 12px;
  color: var(--ink);
  font-size: 14px;
  font-weight: 850;
  text-align: center;
}

.category-share-chart-body {
  display: grid;
  grid-template-columns: minmax(var(--category-share-wrap-width, 240px), 1fr) minmax(190px, 270px);
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.category-share-donut-wrap {
  position: relative;
  display: grid;
  place-items: center;
  justify-self: center;
  width: var(--category-share-wrap-width, 240px);
  height: var(--category-share-wrap-height, 210px);
}

.category-share-donut {
  display: grid;
  place-items: center;
  justify-self: center;
  width: var(--category-share-donut-size, 180px);
  height: var(--category-share-donut-size, 180px);
  border-radius: 50%;
  position: relative;
  overflow: visible;
}

.category-share-arc-layer {
  position: absolute;
  inset: 0;
  z-index: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
}

.category-share-track,
.category-share-arc {
  fill: none;
  stroke-width: 46;
}

.category-share-track {
  stroke: #edf1f7;
}

.category-share-arc {
  filter: drop-shadow(0 10px 12px rgba(16, 24, 40, 0.1));
  stroke-linecap: butt;
}

.category-share-slice-label-layer {
  pointer-events: none;
}

.category-share-slice-label {
  font-weight: 760;
  letter-spacing: 0;
  pointer-events: none;
}

.category-share-slice-label-inside {
  fill: #ffffff;
  filter: drop-shadow(0 1px 2px rgba(15, 23, 42, 0.28));
  font-size: 10.5px;
  stroke: none;
}

.category-share-slice-label-outside {
  fill: #475467;
  font-size: 10.5px;
}

.category-share-slice-label-outside tspan:last-child {
  fill: #101828;
  font-size: 12px;
}

.category-share-slice-label-line {
  fill: none;
  stroke: #cbd5e1;
  stroke-linecap: round;
  stroke-width: 1.1;
}

.category-share-hit-layer {
  position: absolute;
  z-index: 3;
  width: var(--category-share-donut-size, 180px);
  height: var(--category-share-donut-size, 180px);
  inset: 50% auto auto 50%;
  transform: translate(-50%, -50%);
}

.category-share-hit-slice {
  cursor: pointer;
  fill-opacity: 0.001;
  filter: none;
  pointer-events: all;
  stroke-linecap: butt;
  stroke-opacity: 0.001;
  transform-box: view-box;
  transform-origin: center;
  transition: fill-opacity 0.08s ease, filter 0.08s ease, stroke-opacity 0.08s ease, transform 0.08s ease;
}

.category-share-hit-slice:hover,
.category-share-hit-slice:focus {
  fill-opacity: 0.96;
  filter: drop-shadow(0 10px 12px rgba(16, 24, 40, 0.2));
  outline: 0;
  stroke-opacity: 0.96;
  transform: scale(1.035);
}

.category-share-hover-tip {
  position: absolute;
  z-index: 7;
  max-width: 230px;
  border: 1px solid #d0d5dd;
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 12px 28px rgba(16, 24, 40, 0.16);
  color: #344054;
  font-size: 12px;
  font-weight: 750;
  line-height: 1.35;
  opacity: 0;
  padding: 7px 9px;
  pointer-events: none;
  transform: translateY(-2px);
  transition: opacity 0.04s ease, transform 0.04s ease;
  white-space: nowrap;
}

.category-share-hover-tip.show {
  opacity: 1;
  transform: translateY(0);
}

.category-share-donut::after {
  content: "";
  position: absolute;
  inset: var(--category-share-hole-inset, 52px);
  z-index: 1;
  border-radius: 50%;
  background: #ffffff;
  box-shadow:
    inset 0 0 0 1px #e8edf5,
    0 10px 24px rgba(16, 24, 40, 0.08);
}

.category-share-donut span,
.category-share-donut em {
  position: relative;
  z-index: 2;
  text-align: center;
}

.category-share-donut span {
  align-self: end;
  color: var(--ink);
  font-size: 17px;
  font-weight: 900;
}

.category-share-donut em {
  align-self: start;
  color: #98a2b3;
  font-size: 12px;
  font-style: normal;
  font-weight: 750;
}

.category-share-legend {
  display: grid;
  justify-self: start;
  gap: 6px;
  width: min(100%, 286px);
  max-height: 220px;
  overflow-x: hidden;
  overflow-y: auto;
  padding-right: 14px;
  scrollbar-gutter: stable;
}

.category-share-legend-combined {
  justify-self: end;
  width: min(100%, 680px);
  max-height: 280px;
  padding-right: 8px;
}

.category-share-legend-head,
.category-share-legend-row {
  display: grid;
  grid-template-columns: 10px minmax(54px, 1fr) 54px 64px;
  align-items: center;
  gap: 7px;
}

.category-share-legend-combined .category-share-legend-head,
.category-share-legend-combined .category-share-legend-row {
  grid-template-columns: 10px minmax(86px, 132px) 74px 80px 58px 88px 78px;
  justify-content: start;
  column-gap: 12px;
}

.category-share-legend-head {
  position: sticky;
  top: 0;
  z-index: 2;
  background: #ffffff;
  color: #98a2b3;
  font-size: 11px;
  font-weight: 850;
  padding: 0 4px 6px;
}

.category-share-legend-head::before {
  content: "";
}

.category-share-legend-head b,
.category-share-legend-head em {
  color: #98a2b3;
  font-style: normal;
  text-align: right;
}

.category-share-legend-row {
  position: relative;
  width: 100%;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: #475467;
  padding: 3px 4px;
  font-size: 12px;
  font-weight: 700;
  text-align: left;
  cursor: pointer;
}

.category-share-legend-row:hover,
.category-share-legend-row:focus {
  background: #f2f6ff;
}

.category-share-legend-row i {
  width: 10px;
  height: 10px;
  border-radius: 3px;
}

.category-share-legend-row span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.category-share-legend-row span[data-category-share-links] {
  cursor: help;
}

.category-share-legend-row b {
  color: var(--ink);
  font-weight: 850;
  text-align: right;
}

.category-share-legend-row em {
  min-width: 0;
  color: #667085;
  font-style: normal;
  text-align: right;
}

.category-share-empty {
  min-height: 210px;
  display: grid;
  place-items: center;
  border: 1px dashed var(--line);
  border-radius: 12px;
  color: #98a2b3;
  font-size: 13px;
  font-weight: 850;
}


@media (max-width: 1180px) {
  .category-share-grid,
  .category-share-chart-combined {
    grid-template-columns: 1fr;
  }

  .category-share-chart-info {
    justify-self: stretch;
  }
}

@media (max-width: 760px) {
  .category-share-chart-body {
    grid-template-columns: 1fr;
  }

  .category-share-chart-visuals {
    grid-template-columns: 1fr;
  }

  .category-share-legend-combined .category-share-legend-head,
  .category-share-legend-combined .category-share-legend-row {
    grid-template-columns: 10px minmax(88px, 1fr) 70px 76px 56px;
  }

  .category-share-legend-combined .category-share-legend-head em:nth-of-type(3),
  .category-share-legend-combined .category-share-legend-head em:nth-of-type(4),
  .category-share-legend-combined .category-share-legend-row em:nth-of-type(3),
  .category-share-legend-combined .category-share-legend-row em:nth-of-type(4) {
    display: none;
  }
}

@media (max-width: 520px) {
  .category-share-legend-combined .category-share-legend-head,
  .category-share-legend-combined .category-share-legend-row {
    grid-template-columns: 10px minmax(82px, 1fr) 70px 74px;
  }

  .category-share-legend-combined .category-share-legend-head em:nth-of-type(2),
  .category-share-legend-combined .category-share-legend-row em:nth-of-type(2),
  .category-share-legend-combined .category-share-legend-head em:nth-of-type(3),
  .category-share-legend-combined .category-share-legend-row em:nth-of-type(3),
  .category-share-legend-combined .category-share-legend-head em:nth-of-type(4),
  .category-share-legend-combined .category-share-legend-row em:nth-of-type(4) {
    display: none;
  }
}

@media (max-width: 760px) {
  .category-share-donut-wrap {
    width: min(100%, 240px);
  }

  .category-share-toolbar label {
    align-items: stretch;
    flex-direction: column;
    width: 100%;
  }

  .category-share-toolbar select {
    width: 100%;
  }
}

.ranking-category-table {
  border: 1px solid #d0d5dd;
  border-radius: 14px;
  overflow-x: auto;
  overflow-y: hidden;
  background: #d0d5dd;
}

.ranking-category-tree-table {
  width: max-content;
  min-width: 1480px;
  border-collapse: collapse;
  table-layout: fixed;
  background: #ffffff;
}

.ranking-category-tree-table .category-level-col {
  width: 108px;
}

.ranking-category-tree-table .category-note-col {
  width: 150px;
}

.ranking-category-tree-table .category-price-col {
  width: 120px;
}

.ranking-category-tree-table .category-link-col {
  width: 70px;
}

.ranking-category-tree-table .category-money-col {
  width: 96px;
}

.ranking-category-tree-table .category-ratio-col {
  width: 98px;
}

.ranking-category-tree-table .category-text-count-col {
  width: 96px;
}

.ranking-category-tree-table .category-rank-col {
  width: 120px;
}

.ranking-price-table {
  min-width: 798px;
}

.ranking-category-tree-table th,
.ranking-category-tree-table td {
  border: 1px solid #d0d5dd;
  padding: 10px 10px;
  color: #344054;
  font-size: 13px;
  font-weight: 500;
  line-height: 1.35;
  text-align: left;
  vertical-align: middle;
  white-space: nowrap;
}

.ranking-category-tree-table thead th {
  position: relative;
  background: var(--soft);
  color: #667085;
  font-weight: 600;
}

.insight-header-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-width: 0;
}

.insight-header-label b {
  overflow: hidden;
  text-overflow: ellipsis;
}

.insight-filter-menu {
  position: fixed;
  top: 0;
  left: 0;
  display: grid;
  gap: 12px;
}

.column-filter-menu.insight-filter-menu {
  position: fixed;
  top: 0;
  left: 0;
  display: grid;
  z-index: 1600;
}

.ranking-category-tree-table .category-level {
  color: var(--ink);
}

.ranking-category-tree-table .category-level-title.has-links {
  display: inline-flex;
  max-width: 100%;
  align-items: center;
  border-radius: 6px;
  cursor: help;
  padding: 2px 4px;
  transition: background 0.12s ease, color 0.12s ease;
}

.ranking-category-tree-table .category-level-title.has-links:hover {
  background: #eff6ff;
  color: #1d4ed8;
}

.ranking-category-tree-table .category-level[rowspan] {
  background: #fcfcfd;
  font-weight: 500;
}

.ranking-category-tree-table tbody tr:nth-child(even) td {
  background: #fbfdff;
}

.ranking-category-tree-table .category-muted {
  color: #c0c7d2;
  text-align: center;
}

.ranking-category-tree-table .category-metric {
  color: #475467;
  text-align: right;
}

.ranking-category-tree-table .category-note-cell {
  padding: 6px;
}

.category-note-cell input {
  width: 100%;
  min-height: 34px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  color: var(--ink);
  padding: 0 9px;
  font: inherit;
  font-size: 13px;
  font-weight: 700;
  outline: none;
}

.category-note-cell input:focus {
  border-color: var(--purple);
  box-shadow: 0 0 0 3px rgba(126, 87, 255, 0.12);
}

.ranking-category-empty {
  border: 1px dashed var(--line);
  border-radius: 14px;
  background: #f8fafc;
  color: #98a2b3;
  padding: 14px;
  font-weight: 900;
}

.ranking-filter-panel p {
  margin: 0 0 6px;
  color: var(--purple);
  font-size: 13px;
  font-weight: 900;
}

.ranking-filter-panel h2 {
  margin-bottom: 5px;
}

.ranking-filter-panel span {
  color: var(--muted);
  font-weight: 700;
}

.ranking-filters {
  display: grid;
  grid-template-columns: repeat(2, minmax(160px, 220px)) minmax(0, 1fr);
  gap: 12px 16px;
}


.ranking-data-status {
  margin-top: 12px;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 10px 12px;
  font-size: 13px;
  font-weight: 800;
  line-height: 1.45;
}

.ranking-data-status strong {
  color: inherit;
  font-weight: 950;
}

.ranking-data-status span {
  margin-left: 8px;
  color: inherit;
  font-weight: 750;
}

.ranking-data-status.ok {
  border-color: #bbf7d0;
  background: #f0fdf4;
  color: #15803d;
}

.ranking-data-status.warn {
  border-color: #fde68a;
  background: #fffbeb;
  color: #92400e;
}

.ranking-data-status.muted {
  background: #f8fafc;
  color: #64748b;
}

.ranking-filters label {
  display: grid;
  gap: 6px;
  color: #667085;
  font-size: 13px;
  font-weight: 900;
}

.inline-filter-row {
  display: grid;
  grid-template-columns: 76px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  min-height: 40px;
}

.inline-filter-row[hidden] {
  display: none !important;
}

.inline-filter-row:nth-child(n + 3) {
  grid-column: 1 / -1;
}

.inline-filter-row > span {
  color: #667085;
  font-size: 14px;
  font-weight: 900;
}

.radio-options {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 14px;
}

.radio-option {
  position: relative;
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: #344054;
  padding: 0 10px 0 28px;
  font-weight: 800;
}

.radio-option::before {
  content: "";
  position: absolute;
  left: 4px;
  width: 16px;
  height: 16px;
  border: 2px solid #d8dee8;
  border-radius: 50%;
  background: #ffffff;
}

.radio-option.active::before {
  border-color: #3b82f6;
  box-shadow: inset 0 0 0 4px #ffffff;
  background: #3b82f6;
}

.radio-option.active {
  color: var(--ink);
}

.ranking-filters select,
.ranking-filters input,
.period-trigger {
  height: 44px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #ffffff;
  color: var(--ink);
  padding: 0 14px;
  font-weight: 900;
  outline: none;
}

.period-date-field {
  position: relative;
}

.period-trigger {
  width: 100%;
  min-width: 180px;
  text-align: left;
}

.period-popover {
  display: none;
  position: absolute;
  z-index: 200;
  top: calc(100% + 8px);
  right: 0;
  width: 320px;
}

.period-popover.open {
  display: block;
}

.period-popover.floating-period-popover {
  position: fixed;
  top: auto;
  right: auto;
  z-index: 5000;
}

.search-rank-period-calendar-status {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 112px;
  color: #475467;
  font-size: 14px;
}

.search-rank-period-calendar-status.error {
  border-color: #fecaca;
  background: #fef2f2;
  color: #991b1b;
}

.search-rank-period-calendar-spinner {
  width: 16px;
  height: 16px;
  border: 2px solid #bfdbfe;
  border-top-color: #2563eb;
  border-radius: 50%;
  animation: search-rank-spin 0.8s linear infinite;
}

.period-card {
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #ffffff;
  box-shadow: 0 22px 54px rgba(28, 35, 52, 0.18);
  padding: 14px;
}

.calendar-title {
  margin-bottom: 12px;
  color: var(--ink);
  font-size: 14px;
  font-weight: 900;
}

.calendar-nav {
  display: grid;
  grid-template-columns: 34px 1fr 34px;
  align-items: center;
  gap: 8px;
  text-align: center;
}

.calendar-nav strong {
  font-size: 15px;
}

.calendar-nav-btn {
  display: grid;
  place-items: center;
  width: 34px;
  height: 30px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: #ffffff;
  color: #667085;
  font-size: 20px;
  font-weight: 900;
}

.calendar-nav-btn:hover {
  background: var(--soft);
  color: var(--ink);
}

.calendar-nav-btn:disabled,
.calendar-day:disabled,
.month-option:disabled {
  cursor: not-allowed;
  opacity: 0.38;
}

.calendar-weekdays,
.calendar-week {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 4px;
}

.calendar-weekdays {
  margin-bottom: 6px;
  color: #667085;
  font-size: 12px;
  font-weight: 900;
  text-align: center;
}

.calendar-body {
  display: grid;
  gap: 4px;
}

.calendar-day {
  position: relative;
  display: grid;
  place-items: center;
  height: 32px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--ink);
  font-weight: 800;
}

.calendar-day.muted-day {
  color: #c5ccda;
}

.calendar-day:disabled {
  background: transparent;
  color: #c5ccda;
}

.calendar-day.has-upload:not(:disabled) {
  background: #ecfdf5;
  color: #047857;
  box-shadow: inset 0 0 0 1px rgba(16, 185, 129, 0.18);
}

.calendar-day.has-upload::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 3px;
  width: 5px;
  height: 5px;
  border-radius: 999px;
  background: #22c55e;
  transform: translateX(-50%);
}

.day-mode .calendar-day:hover,
.calendar-day:focus-visible {
  background: var(--purple);
  color: #ffffff;
}

.day-mode .calendar-day.has-upload:hover::after,
.calendar-day.has-upload:focus-visible::after {
  background: #ffffff;
}

.day-mode .calendar-day:disabled:hover,
.calendar-day:disabled:focus-visible {
  background: transparent;
  color: #c5ccda;
}

.week-mode .calendar-week {
  border-radius: 10px;
}

.week-mode .calendar-week.disabled-period {
  cursor: not-allowed;
  opacity: 0.36;
}

.week-mode .calendar-week.has-upload:not(.disabled-period) {
  background: rgba(16, 185, 129, 0.1);
  box-shadow: inset 0 0 0 1px rgba(16, 185, 129, 0.18);
}

.week-mode .calendar-week.has-upload:not(.disabled-period) .calendar-day {
  background: #ecfdf5;
  color: #047857;
}

.week-mode .calendar-week.has-upload:not(.disabled-period) .calendar-day:first-child,
.week-mode .calendar-week.has-upload:not(.disabled-period) .calendar-day:last-child {
  background: #ecfdf5;
  color: #047857;
}

.week-mode .calendar-week:hover,
.week-mode .calendar-week:focus-within {
  background: rgba(135, 72, 255, 0.12);
}

.week-mode .calendar-week.disabled-period:hover,
.week-mode .calendar-week.disabled-period:focus-within {
  background: transparent;
}

.week-mode .calendar-week:hover .calendar-day,
.week-mode .calendar-week:focus-within .calendar-day {
  color: var(--purple);
}

.week-mode .calendar-week.disabled-period:hover .calendar-day,
.week-mode .calendar-week.disabled-period:focus-within .calendar-day {
  color: inherit;
}

.week-mode .calendar-week:hover .calendar-day:first-child,
.week-mode .calendar-week:hover .calendar-day:last-child {
  background: var(--purple);
  color: #ffffff;
}

.week-mode .calendar-week.disabled-period:hover .calendar-day:first-child,
.week-mode .calendar-week.disabled-period:hover .calendar-day:last-child {
  background: transparent;
  color: inherit;
}

.month-card {
  width: 280px;
}

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

.month-option {
  position: relative;
  min-height: 42px;
  border: 0;
  border-radius: 10px;
  background: var(--soft);
  color: var(--ink);
  font-weight: 900;
}

.month-option.has-upload:not(:disabled) {
  background: #ecfdf5;
  color: #047857;
  box-shadow: inset 0 0 0 1px rgba(16, 185, 129, 0.2);
}

.month-option.has-upload::after {
  content: "";
  position: absolute;
  right: 9px;
  top: 9px;
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: #22c55e;
}

.month-option:hover,
.month-option:focus-visible {
  background: var(--purple);
  color: #ffffff;
}

.month-option.has-upload:hover::after,
.month-option.has-upload:focus-visible::after {
  background: #ffffff;
}

.month-option:disabled:hover,
.month-option:disabled:focus-visible {
  background: var(--soft);
  color: var(--ink);
}

.period-upload-legend {
  display: flex;
  justify-content: flex-end;
  margin-top: 10px;
  color: #047857;
  font-size: 11px;
  font-weight: 900;
}

.period-upload-legend span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.period-upload-legend i {
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: #22c55e;
}

.ranking-table {
  display: block;
  max-width: 100%;
  overflow-x: auto;
  overflow-y: visible;
  overscroll-behavior-x: contain;
}

.top-horizontal-scrollbar {
  display: none;
  position: relative;
  width: 100%;
  max-width: 100%;
  height: 28px;
  overflow-x: hidden;
  overflow-y: hidden;
  margin: 12px 0 10px;
  border-radius: 999px;
  cursor: pointer;
  user-select: none;
}

.top-horizontal-scrollbar::-webkit-scrollbar {
  display: none;
}

.top-horizontal-scrollbar::-webkit-scrollbar-track {
  background: transparent;
}

.top-horizontal-scrollbar::-webkit-scrollbar-thumb {
  background: transparent;
}

.top-horizontal-scrollbar::before {
  content: "";
  position: absolute;
  right: 0;
  left: 0;
  top: 9px;
  height: 10px;
  border-radius: 999px;
  background: #e5eaf2;
}

.top-horizontal-scrollbar-thumb {
  position: absolute;
  top: 6px;
  left: 0;
  min-width: 90px;
  height: 16px;
  border-radius: 999px;
  background: #aeb8c8;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.35);
  cursor: grab;
}

.top-horizontal-scrollbar-thumb:active {
  cursor: grabbing;
  background: #8f9bad;
}

.top-horizontal-scrollbar-spacer {
  height: 1px;
  visibility: hidden;
}

.page-size-control select {
  height: 38px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #ffffff;
  color: var(--ink);
  padding: 0 12px;
  font-weight: 800;
  outline: none;
}

.page-size-control {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #667085;
  font-size: 13px;
  font-weight: 900;
  white-space: nowrap;
}

.ranking-table-head,
.ranking-table-row {
  display: grid;
  width: max-content;
  grid-template-columns: 80px minmax(260px, 1.2fr) minmax(180px, 0.8fr) minmax(130px, 0.5fr) minmax(130px, 0.5fr);
  align-items: center;
  gap: 0;
  padding: 0;
  padding-right: 24px;
  box-sizing: content-box;
}

.ranking-table-full {
  grid-template-columns:
    110px 90px 86px 270px 150px 180px 210px 90px 130px 130px 150px;
  min-width: 1600px;
}

.ranking-table-head {
  min-height: 56px;
  background: var(--soft);
  color: #667085;
  font-size: 13px;
  font-weight: 900;
  overflow: visible;
  position: relative;
  z-index: 20;
  box-shadow: 0 1px 0 var(--line), 0 8px 18px rgba(15, 23, 42, 0.05);
}

.ranking-header-cell {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  overflow: visible !important;
}

.ranking-cell {
  display: flex;
  align-items: center;
  min-width: 0;
  min-height: inherit;
  height: 100%;
  padding: 0 14px;
  background: #ffffff;
}

.ranking-col-rank_no,
.ranking-col-search_rank {
  padding: 0 10px;
}

.ranking-table-head .ranking-cell {
  background: var(--soft);
}

.ranking-cell-sticky {
  position: sticky !important;
  z-index: 8;
  box-shadow: 1px 0 0 var(--line);
}

.ranking-table-head .ranking-cell-sticky {
  z-index: 640;
}

.ranking-table-head .ranking-header-cell.open {
  z-index: 820 !important;
}

.ranking-col-product_image_url.ranking-cell-sticky {
  box-shadow: 2px 0 0 var(--line), 10px 0 18px rgba(15, 23, 42, 0.04);
}

.ranking-col-product_name {
  padding-right: 10px;
}

.ranking-header-cell b {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.column-filter-btn {
  display: inline-grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: #8a94a6;
  font-weight: 900;
}

.ranking-header-cell.active .column-filter-btn,
.ranking-header-cell.open .column-filter-btn,
.column-filter-btn:hover {
  background: #eaf1ff;
  color: #3b82f6;
}

.column-filter-menu {
  position: absolute;
  top: 34px;
  left: 0;
  z-index: 900;
  display: none;
  width: 420px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #ffffff;
  box-shadow: 0 18px 54px rgba(15, 23, 42, 0.18);
}

.ranking-header-cell.open .column-filter-menu {
  display: grid;
  gap: 12px;
}

.ranking-view-tmall .ranking-header-cell.open .column-filter-menu {
  position: fixed;
  z-index: 1600;
  width: min(420px, calc(100vw - 24px));
  max-width: calc(100vw - 24px);
  max-height: calc(100vh - 24px);
  max-height: calc(100dvh - 24px);
  overflow: auto;
  box-sizing: border-box;
}

.filter-sort-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.filter-sort-actions button,
.filter-menu-actions button {
  min-height: 38px;
}

.filter-sort-actions button {
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #ffffff;
  color: var(--ink);
  font-weight: 900;
}

.filter-tabs {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 4px;
  padding: 4px;
  border-radius: 10px;
  background: #f1f3f6;
}

.filter-tab {
  min-height: 34px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #667085;
  font-weight: 850;
}

.filter-tab.active {
  background: #ffffff;
  color: var(--ink);
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.08);
}

.filter-panel {
  display: grid;
  gap: 10px;
}

.filter-panel.hidden {
  display: none;
}

.filter-value-search {
  width: 100%;
  height: 40px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #ffffff;
  color: var(--ink);
  padding: 0 12px;
  font-weight: 800;
  outline: none;
}

.filter-check-actions {
  display: grid;
  grid-template-columns: 22px auto auto 1fr;
  column-gap: 10px;
  align-items: center;
  color: #667085;
}

.filter-select-all-toggle {
  display: contents;
  color: #475467;
  font-weight: 850;
  cursor: pointer;
}

.filter-select-all-toggle input {
  width: 16px;
  height: 16px;
  margin: 0;
  accent-color: #3b82f6;
  cursor: pointer;
}

.filter-select-all-toggle span {
  color: #475467;
  font-weight: 850;
}

.filter-check-actions button {
  border: 0;
  background: transparent;
  color: #475467;
  font-weight: 850;
  justify-self: start;
  padding: 0;
}

.filter-check-actions em {
  justify-self: end;
  color: #98a2b3;
  font-style: normal;
  font-weight: 850;
}

.filter-value-list {
  display: grid;
  max-height: 230px;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #ffffff;
}

.filter-value-option {
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  min-height: 38px;
  padding: 8px 10px;
  border-bottom: 1px solid #eef1f5;
  color: var(--ink);
  font-weight: 800;
}

.filter-value-option[hidden] {
  display: none !important;
}

.filter-value-option:last-child {
  border-bottom: 0;
}

.filter-value-option span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.filter-value-option em {
  color: #98a2b3;
  font-style: normal;
  font-weight: 800;
}

.filter-value-virtual-spacer {
  min-height: 0;
}

.filter-empty {
  min-height: 64px;
  display: grid;
  place-items: center;
  color: #98a2b3;
  font-weight: 800;
}

.filter-rule-box {
  display: grid;
  gap: 8px;
}

.filter-rule-box label {
  display: grid;
  gap: 7px;
  color: #667085;
  font-size: 13px;
  font-weight: 900;
}

.filter-rule-box select,
.filter-rule-box input {
  width: 100%;
  height: 38px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #ffffff;
  color: var(--ink);
  padding: 0 12px;
  font-weight: 800;
  outline: none;
}

.filter-menu-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

.ranking-table-row {
  position: relative;
  z-index: 1;
  min-height: 64px;
  border-top: 1px solid var(--line);
}

.ranking-table-row:hover {
  z-index: 40;
}

.ranking-table-row:hover .ranking-cell-sticky {
  z-index: 45;
}

.ranking-table-row strong {
  font-size: 15px;
}

.product-name-link {
  color: var(--ink);
  text-decoration: none;
}

.product-name-link:hover {
  color: #3b82f6;
  text-decoration: underline;
}

.ranking-table-row strong.product-name-cell {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
}

.product-name-cell .product-name-link,
.product-name-cell .product-name-text {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.product-name-fresh .product-name-link,
.product-name-fresh .product-name-text {
  color: #dc2626;
}

.product-name-fresh-badge {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  height: 18px;
  padding: 0 5px;
  border-radius: 999px;
  background: #fee2e2;
  color: #b91c1c;
  font-size: 10px;
  font-style: normal;
  font-weight: 950;
}

.source-category-cell {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  gap: 3px;
  min-width: 0;
}

.source-category-cell strong {
  max-width: 100%;
  color: var(--ink);
  font-size: 14px;
  font-weight: 950;
  line-height: 1.1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.source-category-cell em {
  color: #98a2b3;
  font-size: 11px;
  font-style: normal;
  font-weight: 900;
  line-height: 1;
}

.source-category-related em {
  color: #7c3aed;
}

.payment-amount-cell {
  gap: 8px;
  font-weight: 950;
}

.payment-amount-cell b {
  font: inherit;
}

.payment-amount-cell em {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  height: 20px;
  padding: 0 6px;
  border-radius: 999px;
  background: #fff7ed;
  color: #c2410c;
  font-size: 11px;
  font-style: normal;
  font-weight: 950;
}

.payment-amount-anomaly b {
  color: #c2410c;
}

.ranking-table-row span {
  color: #667085;
  font-weight: 800;
}

.ranking-table-row span,
.ranking-table-row strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ranking-table-row .ranking-col-product_id {
  overflow: visible;
}

.qa-upload-cell {
  justify-content: center;
}

.qa-upload-btn {
  height: 32px;
  padding: 0 12px;
  border: 1px solid #111827;
  border-radius: 8px;
  background: #111827;
  color: #ffffff;
  font-size: 12px;
  font-weight: 900;
  white-space: nowrap;
  cursor: pointer;
}

.qa-upload-btn:hover {
  background: #000000;
}

.qa-upload-btn.uploaded {
  border-color: #0f9f6e;
  background: #e8fbf3;
  color: #047857;
}

.qa-upload-btn.uploaded:hover {
  border-color: #047857;
  background: #d4f7e8;
  color: #065f46;
}

.qa-upload-btn:disabled {
  border-color: #d6dbe5;
  background: #eef2f7;
  color: #98a2b3;
  cursor: not-allowed;
}

.ranking-product-text-upload-menu {
  position: fixed;
  z-index: 80;
  width: 150px;
  padding: 6px;
  border: 1px solid #e4e8f1;
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 18px 42px rgba(15, 23, 42, 0.16);
}

.ranking-product-text-upload-menu button {
  width: 100%;
  height: 34px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: #172033;
  font-size: 12px;
  font-weight: 900;
  text-align: left;
  padding: 0 10px;
  cursor: pointer;
}

.ranking-product-text-upload-menu button:hover {
  background: #f3f6fb;
}

.ranking-product-text-upload-menu button.danger {
  color: #c2410c;
}

.ranking-product-text-upload-menu button.danger:hover {
  background: #fff3ed;
}

.mono-cell {
  color: var(--ink) !important;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

.product-id-fresh {
  gap: 4px;
  color: #dc2626 !important;
  font-weight: 950 !important;
}

.product-id-fresh em {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  height: 18px;
  padding: 0 5px;
  border-radius: 999px;
  background: #fee2e2;
  color: #b91c1c;
  font-family: inherit;
  font-size: 10px;
  font-style: normal;
  font-weight: 950;
}

.product-image-cell {
  display: flex;
  align-items: center;
  overflow: visible !important;
}

.product-image-cell:hover {
  z-index: 80 !important;
}

.image-preview-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border: 0;
  border-radius: 9px;
  background: transparent;
  padding: 0;
  cursor: zoom-in;
  overflow: visible;
}

.image-fresh-badge {
  position: absolute;
  top: 3px;
  left: 3px;
  z-index: 2;
  width: 8px;
  height: 8px;
  border: 2px solid #ffffff;
  border-radius: 999px;
  background: #dc2626;
  box-shadow: 0 2px 7px rgba(220, 38, 38, 0.35);
  pointer-events: none;
}

.product-image-cell img {
  width: 44px;
  height: 44px;
  border-radius: 8px;
  object-fit: cover;
  border: 1px solid var(--line);
  background: var(--soft);
  transition:
    transform 0.16s ease,
    box-shadow 0.16s ease;
  transform-origin: left center;
}

.ranking-table-row:first-child .product-image-cell img {
  transform-origin: left top;
}

.ranking-table-row:nth-last-child(-n + 2) .product-image-cell img {
  transform-origin: left bottom;
}

.product-image-cell img:hover {
  position: relative;
  z-index: 90;
  transform: scale(2.5);
  box-shadow: 0 18px 44px rgba(15, 23, 42, 0.24);
}

.image-preview-modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: grid;
  place-items: center;
  background: rgba(15, 23, 42, 0.52);
  padding: 28px;
}

.image-preview-dialog {
  position: relative;
  display: grid;
  gap: 12px;
  max-width: min(640px, 86vw);
  max-height: 86vh;
  border-radius: 18px;
  background: #ffffff;
  padding: 18px;
  box-shadow: 0 28px 80px rgba(15, 23, 42, 0.28);
}

.image-preview-nav {
  position: absolute;
  top: 50%;
  z-index: 2;
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 999px;
  background: rgba(17, 24, 39, 0.88);
  color: #ffffff;
  cursor: pointer;
  font-size: 34px;
  font-weight: 600;
  line-height: 1;
  transform: translateY(-50%);
}

.image-preview-prev {
  left: -54px;
}

.image-preview-next {
  right: -54px;
}

.image-preview-dialog img {
  display: block;
  max-width: 100%;
  max-height: 66vh;
  border-radius: 14px;
  object-fit: contain;
}

.image-preview-caption {
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
  max-width: 560px;
}

.image-preview-caption p {
  max-width: 560px;
  margin: 0;
  color: var(--ink);
  font-size: 14px;
  font-weight: 900;
  line-height: 1.45;
}

.image-preview-caption em {
  color: #dc2626;
  font-size: 13px;
  font-style: normal;
  font-weight: 1000;
  white-space: nowrap;
}

.image-preview-close {
  position: absolute;
  top: -12px;
  right: -12px;
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border: 0;
  border-radius: 999px;
  background: #111827;
  color: #ffffff;
  font-size: 20px;
  font-weight: 900;
  cursor: pointer;
}

.ranking-pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 58px;
  padding: 0 18px;
  border-top: 1px solid var(--line);
  color: #667085;
  font-weight: 800;
}

.ranking-pagination div {
  display: flex;
  gap: 8px;
}

.ranking-pagination .pagination-left {
  align-items: center;
  gap: 14px;
}

.ranking-pagination button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.hidden {
  display: none !important;
}

.keyword-workspace {
  display: grid;
  gap: 16px;
  min-width: 0;
}

.keyword-library-header {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #ffffff;
  padding: 12px 14px;
  overflow: hidden;
}

.keyword-library-tabs {
  display: flex;
  flex: 1 1 auto;
  align-items: center;
  gap: 8px;
  min-width: 0;
  overflow-x: auto;
  padding-bottom: 2px;
}

.keyword-library-tabs button {
  min-height: 34px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #ffffff;
  padding: 0 14px;
  color: #475467;
  cursor: pointer;
  font-size: 13px;
  font-weight: 500;
  white-space: nowrap;
}

.keyword-library-tabs button.active {
  border-color: #ddcffb;
  background: #f2ecff;
  color: #7045ce;
  font-weight: 650;
}

.keyword-library-tabs .keyword-library-create {
  border-style: dashed;
  color: var(--purple);
}

.keyword-library-tab {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 7px;
}

.keyword-library-tab.active {
  border-color: #ddcffb;
  background: #f2ecff;
}

.keyword-library-tab > button {
  border: 0;
  border-radius: 0;
  background: transparent;
}

.keyword-library-tab > [data-keyword-library] {
  max-width: 220px;
  overflow: hidden;
  text-overflow: ellipsis;
}

.keyword-library-tabs .keyword-library-tab-manage {
  width: 30px;
  padding: 0;
  color: #8b819f;
  font-size: 15px;
}

.keyword-library-tabs .keyword-library-tab-manage:hover {
  color: #7045ce;
  background: #ebe3fc;
}

.keyword-library-tabs button:focus-visible {
  outline: 2px solid #a991ee;
  outline-offset: -2px;
}

.keyword-library-dialog-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.keyword-library-dialog-heading strong {
  color: #263249;
  font-size: 17px;
}

.keyword-library-dialog-heading button {
  width: 32px;
  min-height: 32px;
  padding: 0;
  font-size: 18px;
}

.keyword-library-tabs .keyword-library-tab-delete {
  min-height: 28px;
  padding: 0 9px;
  border-radius: 9px;
  color: #98a2b3;
}

.keyword-library-tabs .keyword-library-tab-delete:hover {
  color: #ef4444;
}

.keyword-library-rule {
  flex: 0 1 420px;
  min-width: 0;
  max-width: min(420px, 36vw);
  overflow: hidden;
  color: #98a2b3;
  font-size: 12px;
  font-weight: 900;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.keyword-library-header [data-edit-keyword-library],
.keyword-library-header [data-delete-keyword-library] {
  flex: 0 0 auto;
}

.keyword-library-modal {
  width: min(760px, calc(100vw - 28px));
  max-height: calc(100vh - 64px);
  overflow-y: auto;
}

.keyword-library-modal label {
  display: grid;
  gap: 8px;
  margin-top: 14px;
  color: #667085;
  font-size: 13px;
  font-weight: 900;
}

.keyword-library-modal input,
.keyword-library-modal textarea,
.keyword-library-modal select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px;
  color: var(--ink);
  font: inherit;
  font-weight: 850;
  outline: none;
}

.keyword-library-modal textarea {
  min-height: 82px;
  resize: vertical;
}

.keyword-rule-editor-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 16px;
  color: #667085;
  font-size: 13px;
  font-weight: 900;
}

.keyword-rule-editor {
  display: grid;
  gap: 12px;
  margin-top: 10px;
}

.keyword-rule-card {
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #f8fafc;
  padding: 12px;
}

.keyword-rule-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  color: var(--ink);
  font-weight: 900;
}

.keyword-rule-card-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.keyword-condition-list {
  display: grid;
  gap: 10px;
  margin-top: 12px;
}

.keyword-condition-row {
  display: grid;
  grid-template-columns: 136px minmax(180px, 1fr) 70px;
  gap: 8px;
  align-items: center;
}

.keyword-condition-joiner {
  display: flex;
  grid-column: 1 / -1;
  gap: 18px;
  padding: 4px 0 2px;
  color: #475467;
  font-weight: 900;
}

.keyword-condition-joiner label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.keyword-condition-joiner input {
  width: 16px;
  height: 16px;
  accent-color: #3b82f6;
}

.keyword-condition-row input,
.keyword-condition-row select {
  background: #ffffff;
  min-height: 44px;
}

.keyword-condition-joiner[hidden] {
  display: none;
}

.keyword-condition-values {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  min-width: 0;
}

.keyword-condition-values input {
  flex: 1 1 150px;
  min-width: 130px;
}

.keyword-condition-row button {
  min-height: 44px;
}

.keyword-seed-panel,
.keyword-import-panel,
.keyword-table-card {
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #ffffff;
  overflow: hidden;
}

.keyword-import-panel {
  min-width: 0;
  overflow: visible;
}

.keyword-seed-panel,
.keyword-import-panel {
  padding: 14px 18px 18px;
}

.keyword-panel-title,
.keyword-table-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 14px;
}

.keyword-panel-title h2,
.keyword-table-title h2 {
  margin: 0;
  color: var(--ink);
  font-size: 24px;
  line-height: 1.15;
}

.keyword-table-actions {
  display: flex;
  flex: 1 1 auto;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  min-width: 80px;
}

.keyword-coverage-legend {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 6px;
  border: 1px solid #fecaca;
  border-radius: 999px;
  padding: 5px 9px;
  background: #fff7f7;
  color: #991b1b;
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.keyword-coverage-legend i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #dc2626;
}

.keyword-total-exclude-tools {
  display: flex;
  flex: 1 1 auto;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  min-width: 0;
  color: #98a2b3;
  font-size: 12px;
  font-weight: 900;
}

.keyword-total-exclude-tools span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.keyword-total-exclude-tools .mini-btn {
  flex: 0 0 auto;
}

.keyword-panel-title p {
  margin: 6px 0 0;
  color: #98a2b3;
  font-size: 14px;
  font-weight: 800;
}

.keyword-seed-grid {
  display: grid;
  grid-template-columns: minmax(320px, 0.8fr) minmax(260px, 1fr);
  gap: 14px;
}

.keyword-seed-editor {
  display: grid;
  gap: 8px;
  color: #667085;
  font-size: 13px;
  font-weight: 900;
}

.keyword-seed-editor textarea {
  min-height: 150px;
  resize: vertical;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 14px;
  color: var(--ink);
  font: inherit;
  font-weight: 800;
  outline: none;
}

.keyword-seed-editor textarea:focus {
  border-color: var(--purple);
  box-shadow: 0 0 0 4px rgba(126, 87, 255, 0.12);
}

.keyword-seed-preview {
  display: grid;
  align-content: start;
  gap: 10px;
  min-height: 150px;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 14px;
  background: var(--soft);
}

.keyword-seed-preview strong {
  color: var(--ink);
  font-size: 15px;
}

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

.seed-tags span {
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #ffffff;
  padding: 7px 10px;
  color: var(--ink);
  font-size: 13px;
  font-weight: 900;
}

.seed-tags em,
.keyword-import-status {
  color: #98a2b3;
  font-style: normal;
  font-weight: 800;
}

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

.keyword-seed-actions span {
  color: #667085;
  font-size: 13px;
  font-weight: 900;
}

.keyword-seed-upload-btn,
.keyword-root-upload-btn {
  position: relative;
  overflow: hidden;
  cursor: pointer;
}

.keyword-seed-upload-btn input,
.keyword-root-upload-btn input {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}

.keyword-selected-tools {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.keyword-selected-bulk-toggle {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: #475467;
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.keyword-selected-delete-btn:not(:disabled) {
  border-color: #fda29b;
  color: #b42318;
}

.keyword-manual-root-form {
  display: flex;
  align-items: center;
  gap: 6px;
}

.keyword-manual-root-form input {
  box-sizing: border-box;
  width: 126px;
  height: 32px;
  padding: 0 9px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  color: var(--ink);
  font: inherit;
}

.keyword-manual-root-form input:focus {
  border-color: #7c6cf2;
  outline: 2px solid rgba(124, 108, 242, 0.14);
}

.keyword-seed-table-wrap {
  max-height: 420px;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #ffffff;
}

.keyword-seed-table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
}

.keyword-seed-table th,
.keyword-seed-table td {
  border-bottom: 1px solid var(--line);
  padding: 8px;
  text-align: left;
  vertical-align: middle;
}

.keyword-seed-table th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: #f8fafc;
  color: #667085;
  font-size: 13px;
  font-weight: 900;
}

.keyword-seed-table th:first-child,
.keyword-seed-table td:first-child {
  width: 72px;
  text-align: center;
}

.keyword-seed-table th:last-child,
.keyword-seed-table td:last-child {
  width: 92px;
}

.keyword-seed-table input {
  width: 100%;
  height: 38px;
  border: 1px solid transparent;
  border-radius: 8px;
  background: transparent;
  color: var(--ink);
  padding: 0 10px;
  font: inherit;
  font-weight: 800;
  outline: none;
}

.keyword-seed-table input:focus {
  border-color: var(--purple);
  background: #ffffff;
  box-shadow: 0 0 0 3px rgba(126, 87, 255, 0.12);
}

.keyword-seed-table tr.duplicate-keyword-seed td {
  background: #fff1f2;
}

.keyword-seed-table input.duplicate-keyword-seed-input {
  border-color: #fb7185;
  background: #fff7f8;
  color: #9f1239;
  box-shadow: inset 0 0 0 1px rgba(251, 113, 133, 0.28);
}

.keyword-seed-duplicate-count {
  display: inline-flex;
  align-items: center;
  height: 32px;
  padding: 0 10px;
  border-radius: 999px;
  background: #fff1f2;
  color: #be123c;
  font-size: 13px;
  font-weight: 900;
}

.keyword-trim-save-status {
  display: inline-flex;
  align-items: center;
  height: 32px;
  padding: 0 10px;
  border-radius: 999px;
  background: #f1f5f9;
  color: #64748b;
  font-size: 13px;
  font-weight: 900;
}

.keyword-trim-save-status.saving {
  background: #fff7ed;
  color: #b45309;
}

.keyword-trim-save-status.saved {
  background: #ecfdf3;
  color: #027a48;
}

.keyword-trim-save-status.error {
  background: #fff1f2;
  color: #be123c;
}

.keyword-seed-table-foot {
  display: flex;
  justify-content: flex-start;
  margin-top: 12px;
}

.keyword-seed-empty {
  height: 96px;
  color: #98a2b3;
  font-weight: 900;
  text-align: center !important;
}

.keyword-controls {
  display: grid;
  grid-template-columns: minmax(150px, 190px) minmax(190px, 240px);
  align-items: end;
  gap: 12px;
}

.editor-section .keyword-controls {
  grid-template-columns: minmax(150px, 190px) minmax(190px, 240px) minmax(240px, 1fr) auto;
}

.keyword-upload-actions {
  display: grid;
  gap: 10px;
  align-self: end;
  min-width: 116px;
}

.keyword-upload-actions .ghost-btn,
.keyword-upload-actions .dark-btn {
  width: 100%;
  min-height: 40px;
  padding: 0 14px;
  white-space: nowrap;
}

.keyword-period-pull-btn {
  box-shadow: 0 12px 24px rgba(17, 24, 39, 0.12);
}

.keyword-controls label {
  display: grid;
  gap: 7px;
  color: #667085;
  font-size: 13px;
  font-weight: 900;
}

.keyword-controls select,
.keyword-controls input,
.keyword-controls .period-trigger {
  width: 100%;
  min-height: 46px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #ffffff;
  padding: 0 14px;
  color: var(--ink);
  font: inherit;
  font-weight: 900;
  outline: none;
}

.keyword-period-field {
  position: relative;
}

.keyword-period-field .period-popover {
  right: auto;
  left: 0;
}

.keyword-controls input[type="file"] {
  padding: 10px 14px;
}

.keyword-controls select:focus,
.keyword-controls input:focus,
.keyword-controls .period-trigger:focus-visible {
  border-color: var(--purple);
  box-shadow: 0 0 0 4px rgba(126, 87, 255, 0.12);
}

.keyword-import-status {
  margin: 10px 0 12px;
  font-size: 13px;
}

.keyword-import-status a {
  margin-left: 10px;
  color: var(--purple);
  font-weight: 900;
  text-decoration: none;
}

.keyword-table-card {
  margin-top: 16px;
}

.keyword-analysis-scroll {
  margin-top: 12px;
  width: 100%;
  min-width: 0;
  max-width: 100%;
  overflow-x: auto;
  overflow-y: hidden;
  padding-bottom: 8px;
}

.keyword-analysis-grid {
  --keyword-panel-height: min(760px, calc(100vh - 330px));
  display: grid;
  grid-template-columns: minmax(0, 3fr) minmax(380px, 2fr);
  gap: 14px;
  align-items: stretch;
  min-width: 820px;
}

.keyword-analysis-grid-sub {
  grid-template-columns: minmax(0, 3fr) minmax(380px, 2fr);
  min-width: 820px;
}

.keyword-analysis-grid:not(.keyword-analysis-grid-sub):not(.market-keyword-grid) { grid-template-columns: minmax(360px, 1.35fr) minmax(360px, 1fr) minmax(460px, 1.25fr); min-width: 1208px; }
.keyword-analysis-grid.keyword-auto-collapsed:not(.keyword-analysis-grid-sub) { grid-template-columns: minmax(360px, 1.35fr) minmax(360px, 1fr) 180px; min-width: 928px; }
.keyword-analysis-grid > .keyword-auto-card { grid-column: auto; }
.keyword-analysis-grid > .keyword-selected-card,
.keyword-analysis-grid > .keyword-main-table { min-width: 0; }
.keyword-analysis-grid .keyword-table-title h2 { font-size: 15px; line-height: 1.5; }
.keyword-analysis-grid .keyword-root-card-title h3 { font-size: 15px; }
.keyword-analysis-grid .keyword-selected-tools { gap: 6px; }
.keyword-analysis-grid .keyword-selected-tools .mini-btn { font-size: 12px; padding: 5px 8px; }
.keyword-analysis-grid > .keyword-main-table > .keyword-table-title,
.keyword-analysis-grid > .keyword-selected-card > .keyword-root-card-title { box-sizing: border-box; min-height: 126px; align-content: flex-start; flex-wrap: wrap; gap: 10px; }
.keyword-analysis-grid .keyword-selected-tools { width: 100%; justify-content: flex-start; }
.keyword-analysis-grid .keyword-table-actions { width: 100%; justify-content: space-between; flex-wrap: wrap; }

.market-keyword-grid {
  grid-template-columns: minmax(0, 1fr);
  min-width: 0;
}

.keyword-roots-readonly .keyword-selected-bulk-toggle,
.keyword-roots-readonly .keyword-selected-delete-btn,
.keyword-roots-readonly .keyword-manual-root-form,
.keyword-roots-readonly .keyword-root-upload-btn,
.keyword-roots-readonly [data-keyword-auto-select-visible],
.keyword-roots-readonly [data-keyword-auto-select-selected],
.keyword-roots-readonly [data-keyword-auto-hide-selected],
.keyword-roots-readonly [data-keyword-auto-restore-selected],
.keyword-roots-readonly .keyword-ai-total-control,
.keyword-roots-readonly .keyword-ai-suggest-btn,
.keyword-roots-readonly .keyword-ai-pause-btn,
.keyword-roots-readonly .keyword-auto-select,
.keyword-roots-readonly #edit-keyword-total-exclusions {
  display: none !important;
}

.keyword-root-readonly {
  color: var(--text-muted, #98a2b3);
  font-size: 12px;
  white-space: nowrap;
}


.keyword-main-table {
  min-width: 0;
  margin-top: 0;
}

.keyword-main-table,
.keyword-root-card {
  display: flex;
  flex-direction: column;
  height: var(--keyword-panel-height);
  min-height: 560px;
}

.keyword-root-card {
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #ffffff;
  overflow: hidden;
}

.keyword-root-card-title {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  flex: 0 0 auto;
  min-height: 64px;
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
}

.keyword-root-card-title h3 {
  flex: 0 0 auto;
  margin: 0;
  color: var(--ink);
  font-size: 18px;
  line-height: 1.15;
}

.keyword-root-card-title h3 .keyword-root-counts {
  margin-left: 10px;
  color: #98a2b3;
  font-size: 12px;
  font-weight: 900;
  white-space: nowrap;
}

.keyword-root-card-title span {
  color: #98a2b3;
  font-size: 12px;
  font-weight: 900;
  white-space: nowrap;
}

.keyword-root-head,
.keyword-root-row {
  display: grid;
  gap: 8px;
  align-items: center;
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
}

.keyword-auto-card .keyword-root-head,
.keyword-auto-card .keyword-root-row {
  grid-template-columns: 34px minmax(72px, 1fr) 82px 96px 118px;
}

.keyword-auto-card .keyword-root-row {
  box-sizing: border-box;
  height: 64px;
}

.keyword-auto-virtual-spacer {
  flex: 0 0 auto;
}

.keyword-selected-card .keyword-root-head,
.keyword-selected-card .keyword-root-row {
  grid-template-columns: 34px minmax(70px, 1fr) 82px minmax(70px, 94px) 48px;
}

.keyword-selected-row-check,
.keyword-selected-select-head {
  display: flex;
  align-items: center;
  justify-content: center;
}

.keyword-filter-error {
  min-height: 18px;
  color: #b42318;
  font-size: 12px;
  font-style: normal;
}

.keyword-selected-card .mini-btn {
  min-width: 44px;
  padding: 0 6px;
}

.keyword-root-head {
  flex: 0 0 auto;
  background: var(--soft);
  color: #667085;
  font-size: 12px;
  font-weight: 900;
}

.keyword-root-row span {
  overflow: hidden;
  color: var(--ink);
  font-weight: 900;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.keyword-root-row span small {
  display: block;
  overflow: hidden;
  color: #98a2b3;
  font-size: 10px;
  font-weight: 800;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.keyword-root-row b {
  color: var(--ink);
  font-variant-numeric: tabular-nums;
  text-align: right;
}

.keyword-root-row.selected {
  background: rgba(126, 87, 255, 0.08);
}

.keyword-root-row.hidden-root {
  opacity: 0.72;
}

.keyword-root-row.inherited-root {
  background: rgba(15, 23, 42, 0.02);
}

.keyword-root-row.inherited-root .mini-btn,
.keyword-root-row.inherited-root .keyword-root-note-input {
  opacity: 0.58;
}

.keyword-auto-tools {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
  min-width: 0;
  row-gap: 8px;
}

.keyword-auto-tools label {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: #667085;
  font-size: 12px;
  font-weight: 900;
  white-space: nowrap;
}

.keyword-auto-tools input {
  width: 14px;
  height: 14px;
  accent-color: var(--purple);
}

.keyword-auto-tools .keyword-ai-total-control {
  gap: 6px;
}

.keyword-auto-tools .keyword-ai-total-control input {
  width: 70px;
  height: 30px;
  padding: 0 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  font: inherit;
  font-size: 12px;
  font-weight: 900;
  text-align: center;
  accent-color: auto;
}

.keyword-ai-suggest-btn {
  min-width: 104px;
}

.keyword-ai-pause-btn {
  min-width: 56px;
}

.keyword-auto-card .keyword-root-card-title {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-items: start;
  min-height: 0;
}

.keyword-auto-card .keyword-root-counts {
  display: inline;
  white-space: normal;
  line-height: 1.45;
}

.keyword-auto-card .keyword-auto-tools {
  justify-content: flex-start;
  max-width: none;
  width: 100%;
}

.keyword-bulk-exclude-btn {
  min-width: 86px;
}

.keyword-bulk-restore-btn:disabled {
  opacity: 0.42;
  cursor: not-allowed;
}

.keyword-auto-select,
.keyword-auto-select-head {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.keyword-auto-select input {
  width: 16px;
  height: 16px;
  accent-color: var(--purple);
}

.keyword-ai-progress {
  border-bottom: 1px solid var(--line);
  background: #fbfcff;
  padding: 10px 14px;
}

.keyword-ai-progress-text {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  color: var(--ink);
  font-size: 12px;
  font-weight: 900;
}

.keyword-ai-progress-text span {
  color: #667085;
  font-variant-numeric: tabular-nums;
}

.keyword-ai-progress-track {
  height: 7px;
  margin-top: 8px;
  overflow: hidden;
  border-radius: 999px;
  background: #edf0f6;
}

.keyword-ai-progress-track i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #7e57ff, #36c6df);
  transition: width 0.25s ease;
}

.keyword-ai-progress.done .keyword-ai-progress-track i {
  background: linear-gradient(90deg, #16a34a, #5ee0a0);
}

.keyword-ai-progress.error .keyword-ai-progress-track i {
  background: #ef4444;
}

.keyword-ai-progress.reconnecting .keyword-ai-progress-track i {
  background: #f59e0b;
}

.keyword-ai-progress p {
  margin: 7px 0 0;
  color: #667085;
  font-size: 12px;
  font-weight: 800;
  line-height: 1.35;
}

.app-toast {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: var(--layer-app-toast);
  max-width: min(360px, calc(100vw - 48px));
  transform: translateY(16px);
  opacity: 0;
  pointer-events: none;
  border: 1px solid rgba(15, 23, 42, 0.12);
  border-radius: 14px;
  background: #111827;
  color: #ffffff;
  box-shadow: 0 18px 46px rgba(15, 23, 42, 0.22);
  padding: 12px 14px;
  font-size: 13px;
  font-weight: 900;
  transition: opacity 0.18s ease, transform 0.18s ease;
}

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

.app-toast.success {
  background: #0f7a3b;
}

.app-toast.error {
  background: #b42318;
}

.app-toast.info {
  background: #344054;
}

.ai-suggestion-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  min-height: 30px;
  border-radius: 999px;
  padding: 0 10px;
  cursor: pointer;
  font-size: 12px;
  font-weight: 900;
  white-space: nowrap;
}

span.ai-suggestion-badge {
  cursor: default;
}

.ai-suggestion-badge.recommend {
  background: rgba(22, 163, 74, 0.12);
  color: #15803d;
}

.ai-suggestion-badge.reject,
.ai-suggestion-badge.pending {
  background: #f2f4f7;
  color: #667085;
}

.ai-suggestion-badge.unsure {
  background: rgba(245, 158, 11, 0.12);
  color: #b45309;
}

.mini-btn {
  min-height: 32px;
  padding: 0 10px;
  border-radius: 10px;
  font-size: 12px;
}

.keyword-covered-char {
  display: inline;
  min-height: 0;
  border: 0;
  padding: 0;
  background: transparent;
  color: inherit;
}

.keyword-uncovered-char {
  display: inline;
  min-height: 0;
  border: 0;
  padding: 0;
  background: transparent;
  color: #dc2626;
  font-weight: 950;
}

.keyword-table-head span.numeric,
.keyword-table-row span.numeric {
  font-variant-numeric: tabular-nums;
  text-align: right;
}

.ranking-import {
  position: relative;
  display: grid;
  gap: 18px;
}

.import-toolbar,
.import-summary,
.import-rank-card {
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.9);
}

.import-toolbar {
  position: relative;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  min-height: 132px;
  padding: 22px;
  overflow: visible;
}

.import-toolbar p {
  margin: 0 0 6px;
  color: var(--purple);
  font-size: 13px;
  font-weight: 900;
}

.import-toolbar h2 {
  margin-bottom: 8px;
}

.import-toolbar span,
.import-rank-header span,
.price-band-name span {
  color: var(--muted);
  font-weight: 700;
}

.import-controls {
  display: flex;
  align-items: center;
  gap: 12px;
}

.ranking-period-pull-btn {
  align-self: end;
  height: 48px;
  white-space: nowrap;
}

.import-controls label {
  display: grid;
  gap: 8px;
  color: #667085;
  font-size: 13px;
  font-weight: 900;
}

.import-controls select,
.import-controls input,
.import-controls .period-trigger {
  height: 48px;
  min-width: 160px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #ffffff;
  color: var(--ink);
  padding: 0 14px;
  font-weight: 900;
  outline: none;
}

.compact-modal {
  width: min(520px, 100%);
}

.compact-modal .modal-body {
  padding: 20px 24px 4px;
}

.import-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px;
  overflow: hidden;
}

.import-summary div {
  min-height: 98px;
  padding: 18px;
  background: var(--soft);
}

.import-summary strong,
.import-summary span {
  display: block;
}

.import-summary strong {
  font-size: 28px;
}

.import-summary span {
  margin-top: 8px;
  color: var(--muted);
  font-weight: 800;
}

.import-board {
  display: grid;
  gap: 18px;
}

.import-rank-card {
  overflow: hidden;
}

.import-rank-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  min-height: 86px;
  padding: 18px 20px;
  border-bottom: 1px solid var(--line);
}

.import-rank-header h3 {
  margin-bottom: 6px;
  font-size: 20px;
}

.price-band-list {
  display: grid;
}

.price-band-row {
  display: grid;
  grid-template-columns: 180px minmax(0, 1fr);
  gap: 16px;
  padding: 16px 20px;
  border-bottom: 1px solid var(--line);
}

.price-band-row:last-child {
  border-bottom: 0;
}

.price-band-name {
  align-self: center;
}

.price-band-name strong {
  display: block;
  margin-bottom: 5px;
  font-size: 17px;
}

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

.upload-cell {
  display: grid;
  align-content: center;
  min-height: 76px;
  border: 1px dashed #cfd6e1;
  border-radius: 14px;
  background: #ffffff;
  padding: 12px 14px;
}

.upload-cell:hover {
  border-color: var(--purple);
  background: #fbfaff;
}

.upload-cell.uploaded {
  border-color: rgba(124, 58, 237, 0.55);
  background: #fbfaff;
}

.upload-cell.empty {
  border-color: rgba(148, 163, 184, 0.9);
  background: #f8fafc;
}

.upload-cell input {
  width: 100%;
  margin-bottom: 8px;
  color: #667085;
  font-size: 12px;
}

.upload-cell.uploaded input {
  display: none;
}

.upload-cell strong,
.upload-cell span {
  display: block;
}

.upload-cell strong {
  font-size: 14px;
}

.upload-cell span {
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.upload-cell.uploaded .upload-label {
  color: #16a34a;
}

.upload-cell.empty .upload-label {
  color: #64748b;
}

.empty-ranking-btn {
  justify-self: start;
  margin-top: 9px;
  border: 1px solid #d8dee9;
  border-radius: 999px;
  background: #ffffff;
  color: #475569;
  padding: 6px 10px;
  font-size: 12px;
  font-weight: 900;
  cursor: pointer;
}

.empty-ranking-btn:hover {
  border-color: #94a3b8;
  background: #f1f5f9;
}

.empty-ranking-btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.upload-cell.uploaded .empty-ranking-btn {
  display: none;
}

.upload-status {
  display: grid;
  gap: 4px;
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid rgba(124, 58, 237, 0.15);
  font-size: 12px;
}

.upload-status span {
  max-width: 100%;
  overflow: hidden;
  color: #667085;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.upload-status a {
  color: #7c3aed;
  font-weight: 900;
  text-decoration: none;
}

.upload-status em {
  color: #98a2b3;
  font-style: normal;
  font-weight: 800;
}

.delete-ranking-import-btn {
  justify-self: start;
  border: 0;
  border-radius: 999px;
  background: #fee2e2;
  color: #b42318;
  padding: 6px 10px;
  font-size: 12px;
  font-weight: 900;
  cursor: pointer;
}

.delete-ranking-import-btn:hover {
  background: #fecaca;
}

.delete-ranking-import-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.empty-state {
  display: grid;
  place-items: center;
  min-height: 680px;
  text-align: center;
}

.empty-state h2 {
  margin-bottom: 10px;
}

.empty-state p {
  color: var(--muted);
  font-size: 16px;
}

.management-page {
  display: grid;
  gap: 18px;
}

.management-header,
.category-table {
  border: 1px solid var(--line);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 18px 46px rgba(28, 35, 52, 0.06);
}

.management-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  min-height: 150px;
  padding: 24px;
}

.management-header p {
  margin: 0 0 6px;
  color: var(--purple);
  font-size: 13px;
  font-weight: 900;
}

.management-header h2 {
  margin-bottom: 8px;
}

.management-header span {
  color: var(--muted);
  font-weight: 700;
}

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

.category-table {
  overflow: hidden;
}

.table-head,
.table-row {
  display: grid;
  grid-template-columns:
    minmax(96px, 0.7fr) minmax(84px, 0.4fr) minmax(86px, 0.42fr) minmax(220px, 1.05fr)
    minmax(64px, 0.35fr) minmax(148px, 0.55fr);
  align-items: center;
  gap: 14px;
}

.table-head {
  min-height: 58px;
  padding: 0 22px;
  border-bottom: 1px solid var(--line);
  color: #667085;
  font-size: 13px;
  font-weight: 900;
}

.table-row {
  min-height: 74px;
  padding: 0 22px;
  border-bottom: 1px solid var(--line);
}

.table-row:last-child {
  border-bottom: 0;
}

.table-row strong {
  font-size: 16px;
}

.table-row span {
  color: #667085;
  font-weight: 800;
  min-width: 0;
  overflow-wrap: anywhere;
}

.category-url-status {
  display: inline-grid;
  place-items: center;
  width: fit-content;
  min-height: 28px;
  border: 1px solid #e6ebf3;
  border-radius: 8px;
  background: #f8fafc;
  padding: 0 10px;
  font-size: 12px;
  font-weight: 900;
}

.category-url-status.missing {
  border-color: #fed7aa;
  background: #fff7ed;
  color: #9a3412 !important;
}

.price-band-chip-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  min-width: 0;
}

.price-band-chip {
  display: inline-grid;
  place-items: center;
  min-height: 28px;
  border: 1px solid #e6ebf3;
  border-radius: 8px;
  background: #f8fafc;
  color: #667085 !important;
  padding: 0 10px;
  font-size: 12px;
  font-weight: 900;
  white-space: nowrap;
}

.state-pill {
  display: inline-grid;
  place-items: center;
  width: fit-content;
  min-width: 56px;
  min-height: 30px;
  border-radius: 999px;
  background: #dcfce7;
  color: #15803d !important;
  font-size: 13px;
}

.state-pill.muted {
  background: #f2f4f7;
  color: #667085 !important;
}

.category-management-page {
  gap: 18px;
}

.category-management-hero {
  border-radius: 0 0 20px 20px;
  box-shadow: 0 10px 32px rgba(30, 53, 84, 0.04);
}

.category-management-panel {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: #fff;
  box-shadow: 0 12px 30px rgba(30, 53, 84, 0.04);
}

.category-management-panel-head {
  position: relative;
  z-index: 4;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 18px;
  padding: 18px 22px 16px;
  border-bottom: 1px solid var(--line);
}

.category-management-type-controls {
  display: flex;
  align-items: center;
  gap: 10px;
}

.category-management-type-frame {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 4px;
  border: 1px solid #e7eaf0;
  border-radius: 13px;
  background: rgba(244, 246, 250, 0.92);
  transition:
    border-color 160ms ease,
    box-shadow 180ms ease,
    background 160ms ease;
}

.category-management-type-frame.is-active {
  border-color: rgba(109, 93, 246, 0.22);
  background: rgba(247, 246, 255, 0.96);
  box-shadow: 0 5px 16px rgba(64, 53, 155, 0.07);
}

.category-management-tabs {
  display: flex;
  gap: 4px;
}

.category-management-tab {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 38px;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: #66738c;
  padding: 0 14px;
  font-weight: 800;
  cursor: pointer;
  transition:
    color 140ms ease,
    background 160ms ease,
    box-shadow 180ms ease,
    transform 100ms ease;
}

.category-management-tab.active {
  background: #fff;
  color: #141b2b;
  box-shadow: 0 2px 8px rgba(25, 44, 76, 0.09);
}

.category-management-tab:active {
  transform: scale(0.985);
}

.category-management-tab:focus-visible {
  outline: 3px solid rgba(109, 93, 246, 0.2);
  outline-offset: 1px;
}

.category-management-tab span {
  min-width: 24px;
  height: 22px;
  padding: 0 7px;
  border-radius: 11px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #e9edf5;
  color: #66738c;
  font-size: 12px;
}

.category-management-tab.active span {
  background: #ece9ff;
  color: #5f50e8;
}

.category-management-guidance-trigger {
  display: inline-grid;
  place-items: center;
  flex: 0 0 auto;
  width: 30px;
  height: 30px;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: #8691a5;
  padding: 0;
  font-size: 16px;
  line-height: 1;
  transition:
    color 140ms ease,
    background 140ms ease,
    transform 100ms ease;
}

.category-management-guidance-trigger:hover,
.category-management-guidance-trigger[aria-expanded="true"] {
  background: rgba(255, 255, 255, 0.82);
  color: #5f50e8;
}

.category-management-guidance-trigger:focus-visible {
  outline: 3px solid rgba(109, 93, 246, 0.2);
  outline-offset: 1px;
}

.category-management-guidance-trigger:active {
  transform: scale(0.97);
}

.category-management-guidance-popover {
  position: absolute;
  z-index: 20;
  top: calc(50% + 23px);
  right: 4px;
  width: max-content;
  max-width: min(330px, calc(100vw - 48px));
  padding: 11px 13px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 13px;
  background: rgba(20, 25, 36, 0.88);
  -webkit-backdrop-filter: blur(18px) saturate(145%);
  backdrop-filter: blur(18px) saturate(145%);
  box-shadow:
    0 18px 44px rgba(17, 24, 39, 0.2),
    0 3px 10px rgba(17, 24, 39, 0.12);
  color: #ffffff;
  font-size: 13px;
  font-weight: 650;
  line-height: 1.55;
  pointer-events: none;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-5px) scale(0.985);
  transform-origin: top right;
  transition:
    opacity 140ms ease,
    transform 180ms cubic-bezier(0.2, 0.8, 0.2, 1),
    visibility 0s linear 180ms;
}

.category-management-guidance-popover::before {
  content: "";
  position: absolute;
  top: -5px;
  right: 11px;
  width: 10px;
  height: 10px;
  border-top: 1px solid rgba(255, 255, 255, 0.14);
  border-left: 1px solid rgba(255, 255, 255, 0.14);
  background: inherit;
  transform: rotate(45deg);
}

.category-management-guidance-popover.is-open {
  opacity: 1;
  visibility: visible;
  transform: translateY(0) scale(1);
  transition-delay: 0s;
}

.category-management-tools {
  display: flex;
  align-items: center;
  gap: 9px;
}

.category-management-search,
.category-management-tools button,
.category-management-tools select {
  height: 38px;
  border: 1px solid #e2e7ef;
  border-radius: 10px;
  background: #fff;
}

.category-management-search {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 278px;
  padding: 0 12px;
  color: #98a4b6;
}

.category-management-search input {
  width: 100%;
  border: 0;
  outline: 0;
  background: transparent;
  color: #263148;
}

.category-management-search button {
  height: 28px;
  border: 0;
  border-radius: 8px;
  background: #111827;
  color: #fff;
  padding: 0 10px;
  font-size: 12px;
  font-weight: 900;
  white-space: nowrap;
}

.category-management-tools button,
.category-management-tools select {
  padding: 0 13px;
  color: #56637a;
  font-weight: 800;
}

.category-management-tools select {
  min-width: 86px;
  outline: 0;
}

.category-management-tools .category-management-search button {
  color: #fff;
  padding: 0 10px;
}

.category-management-table-wrap {
  width: 100%;
  overflow: auto;
}

.category-management-table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
}

.category-management-table th {
  height: 54px;
  border-bottom: 1px solid var(--line);
  background: #fff;
  color: #667289;
  padding: 0 16px;
  text-align: left;
  font-size: 14px;
  font-weight: 900;
}

.category-management-table td {
  height: 82px;
  border-bottom: 1px solid var(--line);
  padding: 10px 16px;
  color: #293347;
  vertical-align: middle;
}

.category-management-table tr:hover td {
  background: #fcfdff;
}

.category-management-table .right {
  text-align: right;
}

.category-management-name {
  color: #171f2f;
  font-size: 15px;
  font-weight: 900;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.category-management-sub {
  margin-top: 6px;
  color: #909bad;
  font-size: 12px;
  font-weight: 700;
}

.category-management-owner {
  color: #68758c;
  font-weight: 800;
}

.category-management-chip {
  display: inline-flex;
  align-items: center;
  height: 28px;
  padding: 0 10px;
  border: 1px solid #dfe5ee;
  border-radius: 8px;
  background: #f5f7fb;
  color: #647089;
  font-size: 13px;
  font-weight: 900;
}

.category-management-chip.orange {
  border-color: #ffc995;
  background: #fff4e9;
  color: #d65d0a;
}

.category-management-remark {
  color: #68758c;
  font-weight: 800;
}

.category-management-status {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  color: #15a85a;
}

.category-management-status.gray {
  color: #7c8799;
}

.category-management-status i {
  display: inline-flex;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  align-items: center;
  justify-content: center;
  background: #e8faef;
}

.category-management-status.gray i {
  background: #eef1f5;
}

.category-management-status i::after {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: currentColor;
}

.category-management-status strong {
  font-size: 14px;
}

.category-management-actions {
  justify-content: flex-end;
  flex-wrap: nowrap;
}

.category-management-empty {
  height: 120px;
  text-align: center;
  color: #8b97a8;
  font-weight: 800;
}

.category-management-footer {
  min-height: 66px;
  padding: 14px 22px;
  border-top: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  color: #8490a2;
  font-size: 13px;
  font-weight: 700;
}

.category-management-footer strong {
  color: #39445b;
}

.category-management-pages {
  display: flex;
  align-items: center;
  gap: 7px;
}

.category-management-pages button {
  min-width: 34px;
  height: 34px;
  border: 1px solid #e1e6ee;
  border-radius: 9px;
  background: #fff;
  color: #657188;
  font-weight: 800;
}

.category-management-pages button:first-child,
.category-management-pages button:last-child {
  padding: 0 12px;
}

.category-management-pages button.active {
  background: #121212;
  border-color: #121212;
  color: #fff;
}

.permission-cards {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.permission-cards article {
  min-height: 96px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #ffffff;
  padding: 16px;
}

.permission-cards strong,
.permission-cards span {
  display: block;
}

.permission-cards strong {
  font-size: 16px;
}

.permission-cards span {
  margin-top: 8px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
  font-weight: 700;
}

.user-table-head,
.user-table-row {
  grid-template-columns: 1.05fr 0.9fr 0.8fr 1fr 0.8fr 1.3fr 0.8fr 1.5fr;
}

.basic-shop-manager-picker {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 260px;
}

.basic-shop-manager-picker > span {
  color: #667085;
  font-size: 12px;
  font-weight: 700;
}

.basic-shop-manager-picker-backdrop {
  z-index: 1200;
}

.basic-shop-manager-picker-modal {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  width: min(560px, calc(100vw - 48px));
  max-height: min(720px, calc(100vh - 48px));
  overflow: hidden;
}

.basic-shop-manager-picker-list {
  display: grid;
  gap: 10px;
  min-height: 0;
  padding: 22px 26px;
  overflow: auto;
}

.basic-shop-manager-picker-list label {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 13px 15px;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  background: #fff;
  cursor: pointer;
}

.basic-shop-manager-picker-list label:has(input:checked) {
  border-color: #8b5cf6;
  background: #f5f3ff;
}

.basic-shop-manager-picker-list span {
  display: grid;
  gap: 3px;
}

.basic-shop-manager-picker-list strong {
  color: #101828;
  font-size: 14px;
  font-weight: 700;
}

.basic-shop-manager-picker-list small {
  color: #667085;
  font-size: 12px;
  font-weight: 600;
}

.management-subheader {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin: 22px 0 12px;
}

.management-subheader h3 {
  margin: 0;
  font-size: 18px;
}

.management-subheader p {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.crawler-account-head,
.crawler-account-row {
  grid-template-columns: 1.2fr 1.5fr 0.7fr 1.4fr 1.2fr;
}

.crawler-account-row.empty {
  grid-template-columns: 1fr;
}

.form-grid .form-full {
  grid-column: 1 / -1;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(15, 23, 42, 0.42);
}

.system-modal {
  width: min(720px, 100%);
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #ffffff;
  box-shadow: 0 30px 80px rgba(15, 23, 42, 0.28);
}

.user-form {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  max-height: calc(100vh - 48px);
  overflow: hidden;
}

.user-form-body {
  min-height: 0;
  overflow: auto;
}

.app-message-backdrop {
  z-index: var(--layer-app-message);
}

.modal-backdrop.app-confirm-backdrop {
  z-index: var(--layer-app-confirm);
}

.app-message-modal {
  position: relative;
  width: min(420px, calc(100vw - 32px));
  border-radius: 16px;
  overflow: hidden;
}

.app-message-modal > .modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  z-index: 1;
}

.app-message-head {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  gap: 14px;
  padding: 24px 24px 12px;
}

.app-message-mark {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: #fff7ed;
  color: #c2410c;
  font-size: 22px;
  font-weight: 900;
}

.app-message-success .app-message-mark {
  background: #ecfdf3;
  color: #047857;
}

.app-message-head h2 {
  margin: 0;
  font-size: 18px;
  line-height: 1.25;
}

.app-message-head p {
  margin: 8px 0 0;
  color: #475467;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.7;
  overflow-wrap: anywhere;
}

.app-message-actions {
  padding-top: 14px;
}

.modal-header {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 20px;
  padding: 24px 24px 16px;
  border-bottom: 1px solid var(--line);
}

.modal-header h2 {
  font-size: 24px;
}

.modal-header p {
  margin: 8px 0 0;
  color: var(--muted);
  font-weight: 700;
}

.modal-close {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: #ffffff;
  color: #667085;
  font-size: 22px;
  font-weight: 900;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  padding: 20px 24px 12px;
}

.form-grid label {
  display: grid;
  gap: 8px;
  color: #667085;
  font-size: 13px;
  font-weight: 900;
}

.form-grid input,
.form-grid select {
  width: 100%;
  height: 46px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #ffffff;
  color: var(--ink);
  padding: 0 14px;
  font-weight: 800;
  outline: none;
}

.form-grid input[readonly] {
  background: var(--soft);
  color: #667085;
}

.permission-editor {
  display: grid;
  gap: 12px;
  padding: 0 24px 18px;
}

.permission-editor-group {
  border-radius: 14px;
  background: var(--soft);
  padding: 12px;
}

.permission-editor-group strong {
  display: block;
  color: var(--ink);
  font-size: 13px;
  margin-bottom: 10px;
}

.permission-editor-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.permission-editor-title strong {
  margin-bottom: 0;
}

.permission-editor-title span {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.permission-editor-title button {
  min-height: 28px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  color: #475467;
  padding: 0 8px;
  font-size: 12px;
  font-weight: 900;
}

.permission-editor-group > div:not(.permission-editor-title) {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.category-permission-sections,
.module-permission-sections {
  display: grid !important;
  grid-template-columns: 1fr !important;
  gap: 0 !important;
}

.permission-editor-subgroup {
  padding: 10px 0;
  border-top: 1px solid #e4e7ec;
}

.permission-editor-subgroup:first-child {
  padding-top: 2px;
  border-top: 0;
}

.permission-editor-subgroup-title {
  display: block;
  margin-bottom: 8px;
  color: #667085;
  font-size: 12px;
  font-weight: 900;
}

.permission-editor-subgroup > div {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.category-permission-sections {
  max-height: 320px;
  overflow: auto;
}

.category-permission-group .category-permission-list {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.permission-editor-empty {
  grid-column: 1 / -1;
  padding: 8px 10px;
  color: #98a2b3;
  font-size: 12px;
  font-weight: 700;
}

.permission-check {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 36px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #ffffff;
  padding: 0 10px;
  color: #475467;
  font-size: 12px;
  font-weight: 900;
}

.permission-check input {
  width: 15px;
  height: 15px;
  accent-color: var(--purple);
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding: 16px 24px 24px;
  border-top: 1px solid var(--line);
}

.user-form .modal-actions {
  background: #ffffff;
}

.user-table-row.is-disabled {
  opacity: 0.68;
}

.category-editor-modal {
  width: min(1180px, 96vw);
  max-height: 94vh;
  overflow: hidden;
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr);
}

.category-editor-modal.basic-category-map-modal,
.category-editor-modal.basic-shops-modal {
  grid-template-rows: auto minmax(0, 1fr) auto;
}

.category-editor-modal.expansion-assistant-mode {
  display: block;
  overflow-y: auto;
}

.category-editor-modal.expansion-assistant-mode .category-editor-body {
  overflow: visible;
}

.category-editor-modal.expansion-assistant-mode .keyword-seed-table-wrap {
  max-height: none;
  overflow: visible;
}

.category-create-modal {
  width: min(880px, 96vw);
}

.category-create-body {
  display: grid;
  gap: 16px;
  padding: 20px 24px;
}

.editor-tabs {
  display: flex;
  gap: 8px;
  padding: 14px 20px;
  border-bottom: 1px solid var(--line);
  background: var(--soft);
}

.editor-tab {
  min-height: 40px;
  border: 1px solid transparent;
  border-radius: 12px;
  background: transparent;
  color: #667085;
  padding: 0 16px;
  font-weight: 900;
}

.editor-tab.active {
  border-color: var(--line);
  background: #ffffff;
  color: var(--ink);
  box-shadow: 0 8px 22px rgba(15, 23, 42, 0.06);
}

.category-editor-body {
  overflow: auto;
  padding: 18px 20px 22px;
}

.category-editor-panel {
  display: grid;
  gap: 16px;
}

.editor-section {
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #ffffff;
  padding: 16px;
}

.editor-section-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 14px;
}

.editor-section-title h3 {
  margin: 0;
  color: var(--ink);
  font-size: 20px;
}

.editor-section-title p {
  margin: 6px 0 0;
  color: #98a2b3;
  font-size: 13px;
  font-weight: 800;
}

.editor-grid {
  display: grid;
  grid-template-columns: minmax(220px, 0.5fr) minmax(320px, 1fr);
  gap: 14px;
}

.editor-basic-stack {
  display: grid;
  gap: 16px;
}

.editor-name-field {
  max-width: 420px;
}

.editor-field {
  display: grid;
  gap: 8px;
  color: #667085;
  font-size: 13px;
  font-weight: 900;
}

.editor-field input,
.editor-field textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #ffffff;
  color: var(--ink);
  padding: 0 14px;
  font: inherit;
  font-weight: 900;
  outline: none;
}

.editor-field input {
  height: 46px;
}

.editor-field textarea {
  min-height: 92px;
  resize: vertical;
  padding-top: 12px;
}

.editor-field input:focus,
.editor-field textarea:focus {
  border-color: var(--purple);
  box-shadow: 0 0 0 4px rgba(126, 87, 255, 0.12);
}

.editor-field-hint,
.editor-field-warning {
  color: #98a2b3;
  font-size: 12px;
  font-weight: 800;
}

.editor-field-warning {
  color: #dc6803;
}

.price-band-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(120px, 1fr));
  gap: 10px;
}

.own-shop-grid {
  grid-template-columns: repeat(4, minmax(150px, 1fr));
}

.own-shop-editor {
  display: grid;
  gap: 14px;
}

.own-shop-editor-block {
  display: grid;
  gap: 8px;
}

.own-shop-editor-label {
  color: #98a2b3;
  font-size: 12px;
  font-weight: 900;
}

.own-shop-basic-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.own-shop-basic-item {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 38px;
  border: 1px solid #dbeafe;
  border-radius: 10px;
  background: #eff6ff;
  color: #1e3a8a;
  padding: 0 10px;
  font-size: 13px;
  font-weight: 900;
}

.own-shop-basic-item input {
  width: 16px;
  height: 16px;
}

.own-shop-basic-item em {
  color: #2563eb;
  font-style: normal;
  font-size: 12px;
}

.own-shop-basic-item.removed {
  border-color: #e5e7eb;
  background: #f8fafc;
  color: #98a2b3;
}

.own-shop-basic-item.removed em {
  color: #98a2b3;
}

.own-shop-basic-empty {
  border: 1px dashed var(--line);
  border-radius: 12px;
  color: #98a2b3;
  padding: 12px;
  font-size: 13px;
  font-weight: 900;
}

.price-band-cell {
  display: grid;
  align-content: center;
  gap: 6px;
  min-height: 78px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #ffffff;
  padding: 10px 12px;
}

.own-shop-cell {
  min-height: 72px;
}

.price-band-cell span {
  color: #98a2b3;
  font-size: 12px;
  font-weight: 900;
}

.price-band-cell strong {
  color: var(--ink);
  font-size: 18px;
}

.price-band-fixed {
  background: #f8fafc;
}

.price-band-input {
  width: 100%;
  height: 34px !important;
  border: 0 !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  padding: 0 !important;
  color: var(--ink);
  font: inherit;
  font-size: 16px;
  font-weight: 900;
  outline: none;
}

.price-band-input::placeholder {
  color: #c4ccd8;
}

.annotation-import-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  border: 1px dashed #d0d7e2;
  border-radius: 16px;
  background: #f8fafc;
  padding: 14px;
}

.annotation-import-card strong {
  display: block;
  color: var(--ink);
  font-size: 16px;
  font-weight: 1000;
}

.annotation-import-card span {
  display: block;
  margin-top: 6px;
  color: #98a2b3;
  font-size: 13px;
  font-weight: 800;
  line-height: 1.5;
}

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

.annotation-import-actions input {
  max-width: 260px;
  color: #667085;
  font-weight: 800;
}

.annotation-import-result {
  grid-column: 1 / -1;
  margin: 0;
  color: #667085;
  font-size: 13px;
  font-weight: 800;
}

.category-editor-modal .ranking-import {
  gap: 14px;
}

.category-editor-modal .import-toolbar,
.category-editor-modal .import-summary,
.category-editor-modal .import-rank-card {
  box-shadow: none;
}

.category-editor-modal .import-summary {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.category-editor-modal .keyword-controls {
  grid-template-columns: minmax(130px, 170px) minmax(180px, 220px) minmax(220px, 1fr) auto;
}

.expansion-assistant-upload {
  display: block;
}

.expansion-assistant-upload .editor-field {
  margin: 0;
}

.expansion-assistant-clear-btn {
  color: #b42318;
}

.expansion-assistant-upload-list {
  display: flex;
  align-items: center;
  flex: 1 1 100%;
  flex-wrap: wrap;
  gap: 10px;
  min-width: 0;
}

.expansion-assistant-upload-list:empty,
#expansion-assistant-upload-result:empty {
  display: none;
}

.expansion-assistant-upload-chip {
  position: relative;
  display: inline-flex;
  align-items: center;
  min-height: 42px;
  padding: 9px 38px 9px 14px;
  border: 1px solid #dfe4ec;
  border-radius: 11px;
  background: #f8fafc;
  color: #344054;
  font-size: 14px;
  font-weight: 800;
}

.expansion-assistant-upload-chip button {
  position: absolute;
  top: 4px;
  right: 5px;
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  padding: 0;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: #98a2b3;
  cursor: pointer;
  font-size: 18px;
  font-weight: 900;
  line-height: 1;
}

.expansion-assistant-upload-chip button:hover {
  background: #fee4e2;
  color: #b42318;
}

.expansion-assistant-add-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-width: 150px;
  min-height: 44px;
  padding: 9px 16px;
  border: 1.5px dashed #98a2b3;
  border-radius: 11px;
  background: #ffffff;
  color: #667085;
  cursor: pointer;
  font: inherit;
  font-size: 14px;
  font-weight: 900;
}

.expansion-assistant-add-chip span {
  font-size: 18px;
  line-height: 1;
}

.expansion-assistant-add-chip:hover {
  border-color: #7c3aed;
  background: rgba(124, 58, 237, 0.04);
  color: #7c3aed;
}

.expansion-assistant-source {
  max-width: 220px;
  color: #667085;
  font-size: 13px;
  word-break: break-all;
}

.expansion-assistant-header-cell {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.expansion-assistant-header-cell b {
  font: inherit;
}

.expansion-assistant-table th:first-child,
.expansion-assistant-table td:first-child {
  width: 42%;
}

.expansion-assistant-draft-input {
  width: 100%;
  min-width: 220px;
}

.expansion-assistant-draft-input.is-duplicate {
  border-color: #dc2626;
  background: #fef2f2;
  color: #b91c1c;
  box-shadow: 0 0 0 1px rgba(220, 38, 38, 0.12);
}

.expansion-assistant-draft-input.is-duplicate:focus {
  border-color: #dc2626;
  background: #fef2f2;
  color: #b91c1c;
  box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.14);
}

.expansion-assistant-match {
  padding: 0;
  background: transparent;
  color: #ef4444;
  font-weight: 900;
}

.expansion-assistant-overlap-match {
  color: #7e22ce;
}

.expansion-assistant-heading-copy {
  min-width: 0;
}

.expansion-assistant-heading-line,
.expansion-assistant-highlight-legend {
  display: flex;
  align-items: center;
}

.expansion-assistant-heading-line {
  flex-wrap: wrap;
  gap: 10px;
}

.expansion-assistant-highlight-legend {
  gap: 7px;
}

.expansion-assistant-legend-dot {
  position: relative;
  display: inline-block;
  width: 11px;
  height: 11px;
  flex: 0 0 11px;
  border-radius: 999px;
  cursor: help;
  box-shadow:
    inset 0 0 0 0.5px rgba(0, 0, 0, 0.18),
    inset 0 1px 1px rgba(255, 255, 255, 0.52),
    0 1px 2px rgba(15, 23, 42, 0.2);
  outline: none;
}

.expansion-assistant-legend-dot.is-single {
  background: radial-gradient(circle at 35% 28%, #ff918b 0 15%, #ff453a 42%, #e52d24 100%);
}

.expansion-assistant-legend-dot.is-overlap {
  background: radial-gradient(circle at 35% 28%, #e6adff 0 15%, #bf5af2 42%, #9638c8 100%);
}

.expansion-assistant-legend-dot::after {
  content: attr(data-tooltip);
  position: absolute;
  left: 50%;
  bottom: calc(100% + 9px);
  z-index: 30;
  width: max-content;
  max-width: min(260px, 70vw);
  padding: 7px 9px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 8px;
  background: rgba(29, 29, 31, 0.92);
  color: #ffffff;
  box-shadow: 0 7px 22px rgba(15, 23, 42, 0.2);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.35;
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  transform: translate(-50%, 3px) scale(0.98);
  transform-origin: 50% 100%;
  transition:
    opacity 120ms ease-out,
    transform 120ms ease-out;
}

.expansion-assistant-legend-dot:hover::after,
.expansion-assistant-legend-dot:focus-visible::after {
  opacity: 1;
  transform: translate(-50%, 0) scale(1);
}

.expansion-assistant-legend-dot:focus-visible {
  box-shadow:
    0 0 0 3px rgba(99, 102, 241, 0.2),
    inset 0 0 0 0.5px rgba(0, 0, 0, 0.18),
    inset 0 1px 1px rgba(255, 255, 255, 0.52),
    0 1px 2px rgba(15, 23, 42, 0.2);
}

@media (prefers-reduced-motion: reduce) {
  .expansion-assistant-legend-dot::after {
    transition: none;
  }
}

.expansion-assistant-save-status {
  color: #667085;
  font-size: 13px;
  font-weight: 900;
}

.expansion-assistant-save-status[data-state="saving"],
.expansion-assistant-save-status[data-state="dirty"] {
  color: #7c3aed;
}

.expansion-assistant-save-status[data-state="saved"] {
  color: #16a34a;
}

.expansion-assistant-save-status[data-state="error"] {
  color: #dc2626;
}

.expansion-assistant-heading-actions,
.expansion-assistant-sync-controls {
  display: flex;
  align-items: center;
  gap: 10px;
}

.expansion-assistant-sync-controls[hidden] {
  display: none;
}

.expansion-assistant-heading-actions {
  flex-wrap: wrap;
  justify-content: flex-end;
}

.expansion-assistant-sync-controls .dark-btn,
.expansion-assistant-sync-controls .ghost-btn,
.expansion-assistant-save-btn {
  min-height: 40px;
  padding: 0 16px;
  white-space: nowrap;
}

.category-product-selection-workspace {
  gap: 16px;
  min-width: 0;
}

.category-product-selection-workspace .selection-panel {
  display: grid;
  gap: 16px;
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
  padding: 22px;
  border: 1px solid #edf1f6;
  border-radius: 16px;
  background: #ffffff;
  box-shadow: 0 18px 42px rgba(15, 23, 42, 0.06);
}

.category-product-selection-workspace .selection-panel > *,
.ranking-map-virtual-sync-workspace [data-ranking-map-virtual-sync-body],
.ranking-map-virtual-sync-workspace .category-share-section {
  min-width: 0;
  max-width: 100%;
}

.ranking-map-virtual-sync-workspace [data-ranking-map-virtual-sync-body] {
  overflow: hidden;
}

.ranking-map-virtual-sync-workspace .category-share-chart-combined {
  grid-template-columns: minmax(0, 620px) minmax(0, 1fr);
}

.ranking-map-virtual-sync-workspace .category-share-chart-visuals {
  grid-template-columns: repeat(2, minmax(0, 250px));
}

.category-product-selection-workspace .selection-toolbar {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 12px;
  flex-wrap: wrap;
  min-width: 0;
}

.category-product-selection-workspace .map-period-control {
  flex: 1 1 420px;
  max-width: 760px;
  min-width: 0;
}

.category-product-selection-head-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
  flex: 0 0 auto;
}

.category-product-selection-workspace .selection-subhead {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  min-width: 0;
}

.category-product-selection-workspace .selection-subhead > div:first-child {
  min-width: 0;
}

.category-product-selection-workspace .selection-subhead h3 {
  margin: 0;
  color: var(--ink);
  font-size: 22px;
  font-weight: 1000;
}

.category-product-selection-workspace .selection-subhead p {
  margin: 6px 0 0;
  color: #98a2b3;
  font-weight: 900;
}

.category-product-selection-workspace .selection-subhead span {
  color: #667085;
  font-size: 18px;
  font-weight: 1000;
  white-space: nowrap;
}

.category-product-selection-table {
  width: 100%;
  max-width: 100%;
  overflow: auto;
  border: 1px solid #edf1f6;
  border-radius: 14px;
  scrollbar-gutter: stable;
  -webkit-overflow-scrolling: touch;
}

.category-product-selection-scrollbar {
  width: 100%;
  max-width: 100%;
  height: 20px;
  padding: 6px 0;
  cursor: grab;
  user-select: none;
  touch-action: none;
}

.category-product-selection-scrollbar.is-dragging {
  cursor: grabbing;
}

.category-product-selection-scrollbar.is-disabled {
  cursor: default;
}

.category-product-selection-scroll-track {
  position: relative;
  width: 100%;
  height: 8px;
  border-radius: 999px;
  background: #f1f5f9;
  transition: height 0.16s ease, background 0.16s ease;
}

.category-product-selection-scrollbar:hover .category-product-selection-scroll-track,
.category-product-selection-scrollbar.is-dragging .category-product-selection-scroll-track {
  height: 14px;
  background: #e2e8f0;
}

.category-product-selection-scroll-thumb {
  position: absolute;
  inset: 0 auto 0 0;
  min-width: 72px;
  height: 100%;
  border: 0;
  border-radius: 999px;
  background: #94a3b8;
  box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.5);
  cursor: grab;
  transition: background 0.16s ease, box-shadow 0.16s ease;
}

.category-product-selection-scroll-thumb:hover,
.category-product-selection-scrollbar.is-dragging .category-product-selection-scroll-thumb {
  background: #64748b;
  box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.65), 0 3px 10px rgba(15, 23, 42, 0.16);
}

.category-product-selection-scrollbar.is-disabled .category-product-selection-scroll-thumb {
  opacity: 0.45;
}

.category-product-selection-table::-webkit-scrollbar {
  height: 10px;
}

.category-product-selection-table::-webkit-scrollbar-track {
  background: #f8fafc;
}

.category-product-selection-table::-webkit-scrollbar-thumb {
  border: 2px solid #f8fafc;
  border-radius: 999px;
  background: #cbd5e1;
}

.category-product-selection-table .ranking-category-tree-table {
  min-width: 1640px;
}

.category-product-selection-table .category-product-virtual-draft-table {

  min-width: 2760px;

}

.category-product-virtual-table-wrap {
  max-height: min(88vh, 920px);
  overflow: auto;
}

.category-product-virtual-draft-table thead th {
  position: sticky;
  top: 0;
  z-index: 8;
}


.category-product-virtual-draft-table th,
.category-product-virtual-draft-table td {
  border-color: var(--line);
}

.category-product-virtual-empty-draft-cell {
  min-height: 58px;
}


.category-product-selection-table .category-product-parent-cell {
  cursor: pointer;
  transition: background 0.14s ease, box-shadow 0.14s ease, color 0.14s ease;
}

.category-product-selection-workspace.is-adding-virtual .category-product-selection-table .category-product-parent-cell:hover,
.ranking-category-table.is-adding-virtual .category-product-parent-cell:hover {
  background: #f0f9ff;
  box-shadow: inset 0 0 0 2px #bfdbfe;
}

.ranking-category-table .selected-product-parent-cell,
.ranking-category-table .selected-product-parent-cell[rowspan],
.category-product-selection-workspace.is-adding-virtual .category-product-selection-table .selected-product-parent-cell,
.category-product-selection-workspace.is-adding-virtual .category-product-selection-table .selected-product-parent-cell[rowspan] {
  background: #bfdbfe !important;
  color: #1d4ed8;
  box-shadow: inset 0 0 0 3px #2563eb;
}

.ranking-category-tree-table .category-status-col {
  width: 132px;
}

.category-product-selection-table .category-status-col {
  width: 150px;
}

.category-product-selection-table .category-date-col {
  width: 120px;
}

.category-product-selection-table .category-priority-col {
  width: 120px;
}

.category-product-virtual-expand-col {
  width: 104px;
}

.category-product-virtual-sku-col {
  width: 120px;
}

.category-product-virtual-image-col {

  width: 64px;

}

.category-product-virtual-name-col {
  width: 170px;
}

.category-product-virtual-image-group-col {
  width: 164px;
}


.category-product-virtual-image-package-col {
  width: 128px;
}


.category-product-virtual-image-wide-col {
  width: 248px;
}

.category-product-virtual-image-four-col {
  width: 206px;
}



.category-product-virtual-table-file-col {
  width: 150px;
}

.category-product-virtual-title-col {
  width: 180px;
}

.category-product-virtual-push-col {
  width: 116px;
}

.category-product-virtual-push-cell {
  text-align: center;
}

.category-product-virtual-sku-project-actions {
  display: flex;
  gap: 4px;
  align-items: center;
}

.category-product-virtual-sku-project-actions .category-product-virtual-sku-selector {
  min-width: 0;
  flex: 1;
}

.category-product-virtual-delete-btn {
  flex: 0 0 20px;
  width: 20px;
  height: 20px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: #dc2626;
  font-size: 17px;
  line-height: 20px;
  font-weight: 700;
  cursor: pointer;
}

.category-product-virtual-delete-btn:hover {
  background: #fef2f2;
}

.category-product-virtual-delete-btn:disabled {
  opacity: 0.5;
  cursor: wait;
}

.listing-management-table-wrap {
  overflow: auto;
  overscroll-behavior-inline: contain;
}

.listing-management-table-wrap.has-filter-menu {
  padding-bottom: 230px;
}

.listing-management-header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.listing-management-tools {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  min-height: 62px;
  padding: 10px 18px;
  border-bottom: 1px solid #e5e7eb;
  background: #fff;
}

.listing-management-query {
  display: flex;
  width: min(520px, 100%);
  min-height: 40px;
  align-items: center;
  gap: 9px;
  padding: 0 10px 0 12px;
  border: 1px solid #dbe2ea;
  border-radius: 10px;
  background: #fff;
  color: #98a2b3;
  transition: border-color 140ms ease, box-shadow 140ms ease;
}

.listing-management-query:focus-within {
  border-color: #98a2b3;
  box-shadow: 0 0 0 3px rgba(148, 163, 184, 0.13);
}

.listing-management-query svg {
  width: 17px;
  height: 17px;
  flex: 0 0 auto;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-width: 1.7;
}

.listing-management-query input {
  width: 100%;
  min-width: 0;
  min-height: 38px;
  padding: 0;
  border: 0;
  outline: 0;
  background: transparent;
  font: inherit;
  font-size: 13px;
}

.listing-management-query input::-webkit-search-cancel-button {
  display: none;
}

.listing-management-query kbd {
  flex: 0 0 auto;
  padding: 2px 5px;
  border: 1px solid #e4e7ec;
  border-bottom-width: 2px;
  border-radius: 5px;
  background: #f8fafc;
  color: #98a2b3;
  font-family: inherit;
  font-size: 10px;
  font-weight: 650;
  line-height: 1.2;
  opacity: 0.55;
}

.listing-management-query [data-clear-listing-query] {
  display: grid;
  width: 24px;
  height: 24px;
  flex: 0 0 auto;
  place-items: center;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: #f2f4f7;
  color: #667085;
  cursor: pointer;
}

.listing-management-result-count {
  margin-left: auto;
  color: #667085;
  font-size: 12px;
  font-weight: 700;
}

.listing-management-clear-filters {
  white-space: nowrap;
}

.listed-link-library-table {
  min-width: 1480px;
}

.listed-link-item-id {
  color: #2563eb;
  white-space: nowrap;
}

.listed-link-item-id-cell {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 140px;
}

.listed-link-library-pagination {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  padding: 14px 18px;
}

.listed-link-library-pagination span {
  margin-right: 6px;
  color: #64748b;
  font-size: 13px;
  font-weight: 700;
}

.listing-management-table {
  width: 100%;
  min-width: 1050px;
  border-collapse: collapse;
}

.listing-management-summary-table {
  width: max(100%, 1900px);
  min-width: 1900px;
  table-layout: fixed;
}

.listing-management-summary-table col.listing-col-select {
  width: 42px;
}

.listing-management-summary-table col.listing-col-sequence {
  width: 54px;
}

.listing-management-summary-table col.listing-col-expand {
  width: 46px;
}

.listing-management-summary-table col.listing-col-date {
  width: 152px;
}

.listing-management-summary-table col.listing-col-expected {
  width: 126px;
}

.listing-management-summary-table col.listing-col-image {
  width: 58px;
}

.listing-management-summary-table col.listing-col-item-id {
  width: 130px;
}

.listing-management-summary-table col.listing-col-shop {
  width: 124px;
}

.listing-management-summary-table col.listing-col-category {
  width: 105px;
}

.listing-management-summary-table col.listing-col-direction {
  width: 155px;
}

.listing-management-summary-table col.listing-col-product {
  width: 124px;
}

.listing-management-summary-table col.listing-col-person {
  width: 118px;
}

.listing-management-summary-table col.listing-col-assistant {
  width: 126px;
}

.listing-management-summary-table col.listing-col-status {
  width: 118px;
}

.listing-management-summary-table col.listing-col-actions {
  width: 74px;
}

.listing-management-table th,
.listing-management-table td {
  padding: 16px 18px;
  border-bottom: 1px solid #e5e7eb;
  text-align: left;
  vertical-align: middle;
}

.listing-management-summary-table th,
.listing-management-summary-table td {
  padding: 15px 8px;
}

.listing-management-table th {
  background: #f8fafc;
  color: #64748b;
  font-size: 13px;
}

.listing-push-date,
.listing-expected-launch-date,
.listing-listed-date {
  min-width: 118px;
  white-space: nowrap;
}

.listing-summary-text {
  display: -webkit-box;
  overflow: hidden;
  color: inherit;
  line-height: 1.45;
  overflow-wrap: anywhere;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.listing-summary-text.is-direction {
  -webkit-line-clamp: 3;
}

.listing-management-table .listing-collapsed-image-column,
.listing-rejected-records-table .listing-collapsed-image-column {
  width: 56px;
  min-width: 56px;
  padding-right: 7px;
  padding-left: 7px;
  text-align: center;
}

.listing-launch-status {
  display: inline-flex;
  padding: 5px 10px;
  border-radius: 999px;
  background: #fff7ed;
  color: #c2410c;
  font-size: 12px;
  font-weight: 800;
}

.listing-launch-status.rejected {
  background: #fef2f2;
  color: #dc2626;
}

.listing-launch-status.listed {
  background: #ecfdf3;
  color: #15803d;
}

.listing-launch-status.draft {
  background: #eef2f7;
  color: #475569;
}

.listing-listed-item-id {
  display: block;
  margin-top: 6px;
  color: #64748b;
  white-space: nowrap;
}

.listing-rejected-reason {
  display: block;
  max-width: 150px;
  margin-top: 6px;
  color: #94a3b8;
  line-height: 1.35;
}

.listing-inline-select {
  max-width: 180px;
  min-height: 34px;
  border: 1px solid transparent;
  border-radius: 8px;
  background: transparent;
  color: #1e293b;
  font: inherit;
  font-weight: 800;
  cursor: pointer;
}

.listing-inline-select:hover,
.listing-inline-select:focus {
  border-color: #cbd5e1;
  background: #fff;
  outline: none;
}

.listing-reject-btn {
  min-height: 34px;
  padding: 0 13px;
  border: 1px solid #fecaca;
  border-radius: 9px;
  background: #fff;
  color: #dc2626;
  font-weight: 800;
  cursor: pointer;
}

.listing-reject-btn:disabled {
  border-color: #e5e7eb;
  color: #94a3b8;
  cursor: default;
}

.listing-launch-action-btn {
  min-height: 34px;
  padding: 0 13px;
  border: 1px solid #111827;
  border-radius: 9px;
  background: #111827;
  color: #fff;
  font-weight: 800;
  cursor: pointer;
}

.listing-launch-action-btn:disabled {
  border-color: #e5e7eb;
  background: #f1f5f9;
  color: #94a3b8;
  cursor: default;
}

.danger-btn {
  min-height: 42px;
  padding: 0 18px;
  border: 0;
  border-radius: 10px;
  background: #dc2626;
  color: #fff;
  font-weight: 800;
  cursor: pointer;
}


.category-status-cell select,
.category-priority-cell select {
  width: 100%;
  min-width: 132px;
  min-height: 36px;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  background: #ffffff;
  color: #334155;
  font-size: 13px;
  font-weight: 900;
  padding: 0 10px;
}

.category-priority-cell select {
  min-width: 96px;
}

.category-date-cell {
  white-space: nowrap;
}

.category-status-cell select:focus,
.category-priority-cell select:focus {
  border-color: #93c5fd;
  outline: 3px solid rgba(59, 130, 246, 0.14);
}

.category-priority-cell {
  transition: background-color 160ms ease;
}

.category-priority-cell.category-priority-level-unset {
  background-color: #f8fafc;
}

.category-priority-cell.category-priority-level-1 {
  background-color: #f1f5f9;
}

.category-priority-cell.category-priority-level-2 {
  background-color: #eff6ff;
}

.category-priority-cell.category-priority-level-3 {
  background-color: #fefce8;
}

.category-priority-cell.category-priority-level-4 {
  background-color: #fff7ed;
}

.category-priority-cell.category-priority-level-5 {
  background-color: #fff1f2;
}

.category-priority-cell select[data-category-priority-level="unset"] {
  background-color: #ffffff;
  border-color: #cbd5e1;
  color: #475569;
}

.category-priority-cell select[data-category-priority-level="1"] {
  background-color: #e2e8f0;
  border-color: #94a3b8;
  color: #334155;
}

.category-priority-cell select[data-category-priority-level="2"] {
  background-color: #dbeafe;
  border-color: #60a5fa;
  color: #1e40af;
}

.category-priority-cell select[data-category-priority-level="3"] {
  background-color: #fef3c7;
  border-color: #f59e0b;
  color: #854d0e;
}

.category-priority-cell select[data-category-priority-level="4"] {
  background-color: #ffedd5;
  border-color: #fb923c;
  color: #9a3412;
}

.category-priority-cell select[data-category-priority-level="5"] {
  background-color: #fee2e2;
  border-color: #f87171;
  color: #991b1b;
}

#category-product-selection-body {
  min-width: 0;
  max-width: 100%;
}

.category-product-virtual-note {
  display: flex;
  align-items: center;
  gap: 8px;
}

.category-product-virtual-note span {
  flex: 0 0 auto;
  min-width: 0;
  padding: 6px 8px;
  border-radius: 999px;
  background: #fed7aa;
  color: #c2410c;
  font-size: 12px;
  font-weight: 1000;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.category-product-virtual-note span.is-warning {
  background: #fef3c7;
  color: #92400e;
}

.category-product-virtual-matched-row .category-product-virtual-note span {
  background: #d1fae5;
  color: #047857;
}

.category-product-virtual-matched-row .category-product-virtual-note span.is-warning,
.category-product-virtual-abandoned-row .category-product-virtual-note span.is-warning {
  background: #fef3c7;
  color: #92400e;
}

.category-product-virtual-abandoned-row .category-product-virtual-note span {
  background: #e2e8f0;
  color: #475569;
}

.category-product-virtual-note input {
  flex: 1 1 180px;
  min-width: 160px;
}

.category-product-virtual-note .mini-btn {
  flex: 0 0 auto;
}

.category-product-virtual-draft-cell input {
  width: 100%;
  min-height: 38px;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  background: #ffffff;
  color: #334155;
  font-size: 13px;
  font-weight: 800;
  padding: 0 10px;
}

.category-product-virtual-draft-stack {
  display: grid;

  gap: 0;

}

.category-product-virtual-draft-toggle-cell {
  text-align: left;
}

.category-product-virtual-draft-actions {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  align-items: center;
  gap: 6px;
}


.category-product-virtual-sub-toggle-cell {
  min-width: 0;
}


.category-product-virtual-draft-toggle {
  min-height: 34px;
  border: 1px dashed #bfdbfe;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.8);
  color: #1d4ed8;
  font-size: 13px;
  font-weight: 1000;
  padding: 0 12px;
  cursor: pointer;
  white-space: nowrap;
}

.category-product-virtual-draft-toggle:hover,
.category-product-virtual-draft-toggle.is-open {
  border-style: solid;
  background: #dbeafe;
}

.category-product-virtual-draft-toggle:disabled {
  cursor: default;
  opacity: 0.55;
}

.category-product-virtual-draft-cell input:focus {
  border-color: #93c5fd;
  outline: 3px solid rgba(59, 130, 246, 0.14);
}

.category-product-virtual-sku-selector {
  width: 100%;
  min-height: 42px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 2px 8px;
  border: 1px dashed #93c5fd;
  border-radius: 10px;
  background: #ffffff;
  color: #2563eb;
  padding: 7px 10px;
  text-align: left;
  cursor: pointer;
}

.category-product-virtual-sku-selector strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.category-product-virtual-sku-selector small {
  grid-column: 1 / -1;
  color: #94a3b8;
  font-size: 10px;
  font-weight: 700;
}

.category-product-virtual-sku-selector.has-value {
  border-style: solid;
  border-color: #dbeafe;
  color: #0f172a;
}

.category-product-virtual-sku-selector:hover,
.category-product-virtual-sku-selector:focus-visible {
  border-color: #3b82f6;
  background: #eff6ff;
  outline: none;
}

.category-product-virtual-sku-selector-dialog {
  width: min(980px, calc(100vw - 32px));
  max-height: min(820px, calc(100vh - 32px));
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.category-product-virtual-sku-selector-search {
  display: flex;
  gap: 10px;
  padding: 18px 22px 14px;
}

.category-product-virtual-sku-selector-search input {
  flex: 1;
  min-width: 0;
  min-height: 46px;
  border: 1px solid #dbe3ef;
  border-radius: 12px;
  padding: 0 14px;
  font-size: 14px;
}

.category-product-virtual-sku-selector-results {
  min-height: 260px;
  overflow: auto;
  display: grid;
  align-content: start;
  gap: 8px;
  padding: 0 22px 18px;
}

.category-product-virtual-sku-option {
  display: grid;
  grid-template-columns: 22px 56px minmax(0, 1fr) minmax(130px, 0.35fr);
  align-items: center;
  gap: 12px;
  width: 100%;
  min-height: 76px;
  border: 1px solid #e2e8f0;
  border-radius: 13px;
  background: #ffffff;
  padding: 10px 14px;
  color: #172033;
  text-align: left;
  cursor: pointer;
}

.category-product-virtual-sku-option:hover,
.category-product-virtual-sku-option.is-selected {
  border-color: #2563eb;
  background: #eff6ff;
}

.category-product-virtual-sku-option-radio {
  width: 18px;
  height: 18px;
  border: 2px solid #94a3b8;
  border-radius: 50%;
  background: #ffffff;
}

.category-product-virtual-sku-option.is-selected .category-product-virtual-sku-option-radio {
  border: 5px solid #2563eb;
}

.category-product-virtual-sku-option-image {
  width: 52px;
  height: 52px;
  display: grid;
  place-items: center;
  overflow: hidden;
  border-radius: 9px;
  background: #f1f5f9;
  color: #94a3b8;
  font-size: 11px;
}

.category-product-virtual-sku-option-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.category-product-virtual-sku-option-main,
.category-product-virtual-sku-option-meta {
  min-width: 0;
  display: grid;
  gap: 4px;
}

.category-product-virtual-sku-option-main em,
.category-product-virtual-sku-option-main small,
.category-product-virtual-sku-option-meta small {
  overflow: hidden;
  color: #64748b;
  font-style: normal;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.category-product-virtual-sku-option-meta {
  grid-template-columns: auto minmax(0, 1fr);
  font-size: 12px;
}

.category-product-virtual-sku-selector-empty {
  min-height: 220px;
  display: grid;
  place-items: center;
  border: 1px dashed #dbe3ef;
  border-radius: 14px;
  color: #94a3b8;
  font-weight: 800;
}

.category-product-virtual-sku-selector-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  border-top: 1px solid #e5e7eb;
  padding: 16px 22px;
}

.category-product-virtual-sku-selector-footer > span {
  min-width: 0;
  overflow: hidden;
  color: #64748b;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.category-product-virtual-sku-selector-footer > div {
  display: flex;
  gap: 10px;
}

@media (max-width: 720px) {
  .category-product-virtual-sku-option {
    grid-template-columns: 22px 48px minmax(0, 1fr);
  }

  .category-product-virtual-sku-option-meta {
    display: none;
  }
}

.category-product-virtual-image-slots {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 6px;
}

.category-product-virtual-image-slots.is-detail-main {
  flex-wrap: wrap;
  min-width: 194px;
}

.category-product-virtual-image-bulk {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 28px;
  padding: 4px 10px;
  border: 1px dashed #60a5fa;
  border-radius: 8px;
  background: #eff6ff;
  color: #2563eb;
  cursor: pointer;
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.category-product-virtual-image-bulk:hover {
  border-style: solid;
  background: #dbeafe;
}

.category-product-virtual-image-bulk.is-uploading,
.category-product-virtual-image-bulk.is-disabled {
  border-color: #cbd5e1;
  background: #f8fafc;
  color: #94a3b8;
  cursor: not-allowed;
}

.category-product-virtual-image-bulk em {
  font-style: normal;
}

.category-product-virtual-image-bulk input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.category-product-virtual-image-slot {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  flex: 0 0 34px;
  border: 1px dashed #cbd5e1;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.84);
  color: #64748b;
  font-size: 18px;
  font-weight: 900;
  line-height: 1;

  padding: 0;
  cursor: pointer;
  overflow: hidden;
  appearance: none;
  box-sizing: border-box;

}

.category-product-virtual-image-slot:hover {
  border-color: #93c5fd;
  background: #eff6ff;
  color: #2563eb;
}

.category-product-virtual-image-slot.is-filled {
  border-style: solid;
  border-color: #60a5fa;
  background: #ffffff;
  color: #1d4ed8;
  font-size: 13px;
}

.category-product-virtual-image-slot img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #f8fafc;
}

.category-product-virtual-image-slot input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}





.category-product-virtual-image-preview-dialog {
  gap: 14px;
}

.category-product-virtual-image-preview-modal .image-preview-dialog img {
  width: min(560px, 78vw);
  height: min(66vh, 720px);
  object-fit: contain;
  object-position: center;
  background: #f8fafc;
}

.category-product-virtual-image-preview-actions {
  display: flex;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
}

.category-product-virtual-image-preview-actions .ghost-btn,
.category-product-virtual-image-preview-actions .dark-btn {
  min-height: 38px;
  padding: 8px 16px;
}

.category-product-virtual-image-preview-empty {
  display: grid;
  place-items: center;
  width: min(420px, 76vw);
  min-height: 220px;
  border: 1px dashed #cbd5e1;
  border-radius: 14px;
  background: #f8fafc;
  color: #64748b;
  font-size: 14px;
  font-weight: 800;
}








.category-product-virtual-table-file,
.category-product-virtual-table-file-upload {
  display: inline-flex;
  align-items: center;
  max-width: 132px;
  min-height: 34px;
  gap: 6px;
  border: 1px dashed #bfdbfe;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.84);
  color: #1d4ed8;
  font-size: 12px;
  font-weight: 1000;
  padding: 5px 8px;
  box-sizing: border-box;
}

.category-product-virtual-table-file {
  border-style: solid;
  color: #334155;
}

.category-product-virtual-table-file > span,
.category-product-virtual-table-file > a {
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.category-product-virtual-table-file > a {
  color: #1d4ed8;
  text-decoration: none;
}

.category-product-virtual-table-file > a:hover {
  text-decoration: underline;
}

.category-product-virtual-table-file button,
.category-product-virtual-table-file-replace {
  flex: 0 0 auto;
  border: 0;
  background: transparent;
  color: #64748b;
  font: inherit;
  font-size: 12px;
  cursor: pointer;
}

.category-product-virtual-table-file-replace {
  color: #2563eb;
}

.category-product-virtual-table-file-upload {
  cursor: pointer;
}

.category-product-virtual-table-file-replace input,
.category-product-virtual-table-file-upload input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}


























.category-product-virtual-video-preview-dialog {
  width: min(960px, calc(100vw - 56px));
  overflow: hidden;
}

.category-product-virtual-video-preview-dialog > video {
  display: block;
  width: 100%;
  max-height: calc(100vh - 180px);
  background: #111827;
}





.category-product-virtual-product-image-info-dialog {
  width: min(1180px, calc(100vw - 56px));
  max-height: min(880px, calc(100vh - 56px));
  padding-bottom: 20px;
}

.category-product-virtual-product-image-info-content {
  display: grid;
  gap: 18px;
  min-height: 360px;
  overflow: auto;
  padding: 14px 4px 4px;
}

.category-product-virtual-product-image-info-section {
  min-width: 0;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  background: #ffffff;
  padding: 16px;
}

.category-product-virtual-product-image-info-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 12px;
}

.category-product-virtual-product-image-info-heading h3 {
  margin: 0;
  color: #0f172a;
  font-size: 16px;
  font-weight: 1000;
}

.category-product-virtual-product-image-info-heading span {
  color: #94a3b8;
  font-size: 13px;
  font-weight: 800;
}

.category-product-virtual-product-image-info-grid {
  display: flex;
  align-items: stretch;
  gap: 12px;
  min-height: 142px;
  overflow-x: auto;
  overflow-y: hidden;
  padding: 2px 2px 10px;
}

.category-product-virtual-product-image-info-item {
  position: relative;
  flex: 0 0 132px;
}

.category-product-virtual-product-image-info-item > button:first-child {
  display: grid;
  width: 132px;
  height: 132px;
  place-items: center;
  overflow: hidden;
  border: 1px solid #dbe3ef;
  border-radius: 12px;
  background: #f8fafc;
  color: #64748b;
  font: inherit;
  font-size: 13px;
  font-weight: 900;
  cursor: pointer;
}

.category-product-virtual-product-image-info-item img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.category-product-virtual-product-image-info-remove {
  position: absolute;
  top: 6px;
  right: 6px;
  display: grid;
  width: 28px;
  height: 28px;
  place-items: center;
  border: 1px solid rgba(226, 232, 240, 0.9);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.94);
  color: #ef4444;
  font: inherit;
  font-size: 18px;
  font-weight: 1000;
  line-height: 1;
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.12);
  cursor: pointer;
}

.category-product-virtual-product-image-info-add {
  display: grid;
  flex: 0 0 132px;
  width: 132px;
  height: 132px;
  place-items: center;
  align-content: center;
  gap: 8px;
  border: 1px dashed #bfdbfe;
  border-radius: 12px;
  background: #f8fbff;
  color: #1d4ed8;
  font: inherit;
  font-weight: 1000;
  cursor: pointer;
}

.category-product-virtual-product-image-info-add:hover {
  border-color: #60a5fa;
  background: #eff6ff;
}

.category-product-virtual-product-image-info-add span {
  font-size: 30px;
  line-height: 1;
}

.category-product-virtual-product-image-info-add em {
  font-size: 13px;
  font-style: normal;
}




.map-insert-virtual-btn { border-color: #c7d7fe !important; background: #eef4ff !important; color: #3157b7 !important; }
.category-map-virtual-insert-backdrop { position: fixed; inset: 0; z-index: 12000; display: grid; place-items: center; padding: 8px; background: rgba(15,23,42,.38); backdrop-filter: blur(2px); }
.category-map-virtual-insert-modal { position: relative; display: flex; flex-direction: column; width: calc(100vw - 16px); height: calc(100vh - 16px); height: calc(100dvh - 16px); overflow: hidden; border: 1px solid #dfe5ee; border-radius: 14px; background: #fff; box-shadow: 0 28px 80px rgba(15,23,42,.28); }
.category-map-virtual-insert-modal > header { display: flex; flex: 0 0 auto; align-items: flex-start; justify-content: space-between; gap: 16px; padding: 11px 16px; border-bottom: 1px solid #edf0f5; }
.category-map-virtual-insert-modal > header strong { font-size: 18px; color: #111827; }
.category-map-virtual-insert-modal > header p { margin: 2px 0 0; color: #667085; font-size: 12px; }
.category-map-virtual-insert-modal > header > button { width: 32px; height: 32px; border: 0; border-radius: 9px; background: #f2f4f7; color: #475467; font-size: 22px; cursor: pointer; }
.category-map-virtual-loading { padding: 50px 20px; color: #667085; text-align: center; }
.category-map-virtual-mode { display: grid; flex: 0 0 auto; grid-template-columns: 1fr 1fr; gap: 8px; padding: 9px 16px 0; }
.category-map-virtual-mode button { min-height: 34px; border: 1px solid #dbe5f5; border-radius: 9px; background: #f8fafc; color: #344054; font-weight: 900; cursor: pointer; }
.category-map-virtual-mode button.active { border-color: #84adff; background: #eaf2ff; color: #1849a9; }
.category-map-virtual-search { display: grid; flex: 0 0 auto; gap: 4px; padding: 8px 16px; }
.category-map-virtual-search span { color: #475467; font-size: 12px; font-weight: 900; }
.category-map-virtual-search input { min-height: 34px; border: 1px solid #d0d5dd; border-radius: 9px; padding: 0 10px; font-size: 13px; }
.category-map-virtual-search-results { position: absolute; z-index: 3; top: 202px; right: 20px; left: 20px; display: grid; max-height: 260px; overflow: auto; padding: 6px; border: 1px solid #d8e0ed; border-radius: 11px; background: #fff; box-shadow: 0 16px 36px rgba(15,23,42,.18); }
.category-map-virtual-search-results[hidden] { display: none; }
.category-map-virtual-search-results button { display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 12px; align-items: center; min-height: 38px; border: 0; border-radius: 8px; padding: 7px 10px; background: transparent; text-align: left; cursor: pointer; }
.category-map-virtual-search-results button:hover { background: #edf4ff; }
.category-map-virtual-search-results span { overflow: hidden; color: #172033; font-weight: 800; text-overflow: ellipsis; white-space: nowrap; }
.category-map-virtual-search-results em { color: #667085; font-size: 11px; font-style: normal; }
.category-map-virtual-search-results p { color: #98a2b3; text-align: center; }
.category-map-virtual-tree { display: grid; grid-template-columns: repeat(7,minmax(150px,1fr)); min-height: 330px; max-height: min(430px,46vh); overflow-x: auto; margin: 0 20px; border: 1px solid #dfe5ee; border-radius: 12px; background: #fff; }
.category-map-virtual-tree-column { min-width: 150px; overflow: hidden; border-right: 1px solid #e7ebf1; background: #fff; }
.category-map-virtual-tree-column:last-child { border-right: 0; }
.category-map-virtual-tree-column > header { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 42px; padding: 0 10px; border-bottom: 1px solid #e7ebf1; background: #f7f9fc; }
.category-map-virtual-tree-column > header strong { color: #344054; font-size: 13px; }
.category-map-virtual-tree-column > header small { color: #98a2b3; font-size: 10px; }
.category-map-virtual-tree-column > div { display: grid; align-content: start; gap: 4px; height: calc(min(430px,46vh) - 43px); overflow-y: auto; padding: 6px; }
.category-map-virtual-tree-column button { display: grid; grid-template-columns: minmax(0,1fr) auto 12px; align-items: center; gap: 5px; min-height: 38px; border: 1px solid transparent; border-radius: 8px; padding: 6px 7px; background: transparent; color: #172033; text-align: left; cursor: pointer; }
.category-map-virtual-tree-column button:hover { background: #f0f5ff; }
.category-map-virtual-tree-column button.active { border-color: #9dbbff; background: #e7f0ff; color: #1849a9; box-shadow: inset 3px 0 #477be5; }
.category-map-virtual-tree-column button span { overflow: hidden; font-size: 12px; font-weight: 850; text-overflow: ellipsis; white-space: nowrap; }
.category-map-virtual-tree-column button em { border-radius: 999px; padding: 2px 5px; background: #eef2f6; color: #667085; font-size: 9px; font-style: normal; white-space: nowrap; }
.category-map-virtual-tree-column button em.virtual { background: #f3e8ff; color: #7e22ce; }
.category-map-virtual-tree-column button b { color: #98a2b3; font-size: 18px; }
.category-map-virtual-tree-column p { margin: 24px 4px; color: #98a2b3; font-size: 11px; text-align: center; }
.category-map-virtual-panorama { flex: 1 1 auto; min-height: 0; overflow: auto; margin: 0 16px; border: 1px solid #dfe5ee; border-radius: 10px; background: #fff; }
.category-map-virtual-panorama table { width: 980px; min-width: 980px; border-collapse: separate; border-spacing: 0; table-layout: fixed; }
.category-map-virtual-panorama th { position: sticky; top: 0; z-index: 2; height: 36px; border-right: 1px solid #e4e7ec; border-bottom: 1px solid #d8dee9; padding: 0 10px; background: #f5f7fb; color: #475467; font-size: 12px; text-align: left; }
.category-map-virtual-panorama td { height: 38px; border-right: 1px solid #e4e7ec; border-bottom: 1px solid #e4e7ec; padding: 0; background: #fff; vertical-align: middle; transition: background .15s, box-shadow .15s; }
.category-map-virtual-panorama th:last-child,.category-map-virtual-panorama td:last-child { border-right: 0; }
.category-map-virtual-panorama td.muted { color: #c4cbd6; text-align: center; }
.category-map-virtual-panorama td button { display: grid; grid-template-columns: minmax(0,1fr) auto; align-items: center; gap: 5px; width: 100%; height: 100%; min-height: 38px; border: 0; padding: 5px 9px; background: transparent; color: #172033; text-align: left; cursor: pointer; }
.category-map-virtual-panorama td button:hover { background: #eef5ff; }
.category-map-virtual-panorama td button span { overflow: hidden; font-size: 12px; font-weight: 900; text-overflow: ellipsis; white-space: nowrap; }
.category-map-virtual-panorama td button em { border-radius: 999px; padding: 2px 5px; background: #f3e8ff; color: #7e22ce; font-size: 9px; font-style: normal; }
.category-map-virtual-panorama td.selected { background: #dbeafe; box-shadow: inset 0 0 0 2px #3b82f6; }
.category-map-virtual-panorama td.selected button { color: #1849a9; }
.category-map-virtual-panorama td.search-match { background: #fff7cc; box-shadow: inset 0 0 0 2px #f5b700; }
.category-map-virtual-result { flex: 0 0 auto; margin: 7px 16px 0; padding: 8px 10px; border-radius: 8px; background: #f2f4f7; color: #475467; font-size: 12px; }
.category-map-virtual-result.success { background: #ecfdf3; color: #067647; }.category-map-virtual-result.warning { background: #fffaeb; color: #b54708; }.category-map-virtual-result.error { background: #fef3f2; color: #b42318; }
.category-map-virtual-result > strong { display: block; margin-bottom: 5px; }
.category-map-virtual-result-list { display: flex; gap: 5px; overflow-x: auto; padding-bottom: 1px; }
.category-map-virtual-result-list span { display: inline-flex; flex: 0 0 auto; align-items: center; gap: 6px; border: 1px solid #a6f4c5; border-radius: 999px; padding: 4px 8px; background: #fff; }
.category-map-virtual-result-list span.invalid { border-color: #fecdca; background: #fff5f4; }
.category-map-virtual-result-list b { color: #344054; font-size: 11px; }.category-map-virtual-result-list em { color: #079455; font-size: 10px; font-style: normal; }.category-map-virtual-result-list .invalid em { color: #d92d20; }
.category-map-virtual-insert-modal > footer { display: flex; flex: 0 0 auto; justify-content: flex-end; gap: 8px; padding: 8px 16px 10px; }
.category-map-virtual-insert-modal > footer > span { margin-right: auto; align-self: center; color: #475467; font-size: 12px; font-weight: 900; }


@media (min-width: 1700px) {
  :root {
    --category-share-wrap-width: 300px;
    --category-share-wrap-height: 250px;
    --category-share-donut-size: 220px;
    --category-share-hole-inset: 62px;
  }

  .app-frame {
    grid-template-columns: 280px minmax(0, 1fr);
    gap: 18px;
    padding: 18px;
  }

  body.sidebar-collapsed .app-frame {
    grid-template-columns: 78px minmax(0, 1fr);
  }

  .sidebar,
  .page {
    border-radius: 22px;
  }

  .sidebar {
    height: calc(100vh - 36px);
    padding: 22px 20px;
  }

  .page {
    height: calc(100vh - 36px);
  }

  .content-surface {
    padding: 42px;
  }

  .section-content {
    padding: 24px 28px;
  }

  .section-content.online-selection-content {
    padding: 0;
  }

  .category-share-chart {
    padding: 18px;
  }

  .category-share-chart-combined {
    grid-template-columns: minmax(620px, 680px) minmax(640px, 1fr);
    gap: 16px;
  }

  .category-share-chart-visuals {
    grid-template-columns: repeat(2, minmax(300px, 312px));
    gap: 16px;
  }

  .category-share-chart-body {
    grid-template-columns: minmax(var(--category-share-wrap-width, 300px), 1fr) minmax(210px, 300px);
    gap: 24px;
  }

  .category-share-grid {
    gap: 18px;
  }
}

.row-actions {
  display: flex;
  flex-wrap: nowrap;
  gap: 8px;
  justify-content: flex-end;
}

.row-actions .ghost-btn {
  flex: 0 0 auto;
  min-width: 64px;
  min-height: 36px;
  padding: 0 12px;
}

@media (max-width: 1100px) {
  .app-frame {
    grid-template-columns: 250px minmax(0, 1fr);
  }

  .dashboard-grid,
  .chat-board {
    grid-template-columns: 1fr;
  }

  .keyword-analysis-grid {
    grid-template-columns: 1fr;
  }

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

  .section-tabs {
    grid-template-columns: repeat(3, minmax(118px, 1fr));
  }

  .search-rank-topbar {
    align-items: flex-start;
    flex-direction: column;
    min-height: 0;
    padding: 14px 18px;
  }

  .search-rank-category-switch,
  .search-rank-category-toggle {
    width: 100%;
  }

  .search-rank-period {
    align-items: flex-start;
    flex-direction: column;
  }

  .table-head {
    display: none;
  }

  .table-row {
    grid-template-columns: 1fr;
    align-items: start;
    padding: 18px 22px;
  }

  .price-band-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .jd-input-grid,
  .jd-calculator-results,
  .jd-breakdown-table {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .jd-breakdown-table div:nth-child(3n) {
    border-right: 1px solid var(--line);
  }

  .jd-breakdown-table div:nth-child(2n) {
    border-right: 0;
  }

  .jd-breakdown-table div:nth-last-child(-n + 3) {
    border-bottom: 1px solid var(--line);
  }

  .jd-breakdown-table div:nth-last-child(-n + 1) {
    border-bottom: 0;
  }

  .jd-config-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .annotation-import-card {
    grid-template-columns: 1fr;
  }

  .annotation-import-actions {
    flex-wrap: wrap;
  }

  .row-actions {
    justify-content: flex-start;
  }

  .import-toolbar,
  .import-rank-header {
    align-items: flex-start;
    flex-direction: column;
  }

  .import-summary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .price-band-row {
    grid-template-columns: 1fr;
  }

  .ranking-filters {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .keyword-seed-grid,
  .keyword-controls {
    grid-template-columns: 1fr;
  }

  .product-qa-summary-body {
    grid-template-columns: 1fr;
  }

  .product-qa-summary-card {
    height: clamp(380px, 58vh, 560px);
  }

  .ranking-combo-toolbar {
    align-items: stretch;
    flex-direction: column;
  }

  .ranking-combo-period,
  .ranking-combo-period .map-period-control {
    justify-content: flex-start;
  }

  .ranking-table-head,
  .ranking-table-row {
    grid-template-columns:
      110px 90px 86px 270px 150px 180px 210px 90px 130px 130px 150px;
  }
}

@media (max-width: 760px) {
  body {
    overflow: auto;
  }

  .keyword-condition-row {
    grid-template-columns: 1fr;
  }

  .jd-panel-header {
    align-items: stretch;
    flex-direction: column;
  }

  .jd-shop-select,
  .jd-input-grid,
  .jd-calculator-results,
  .jd-breakdown-table,
  .jd-config-row {
    grid-template-columns: 1fr;
  }

  .jd-shop-select {
    min-width: 0;
  }

  .jd-breakdown-table div,
  .jd-breakdown-table div:nth-child(2n),
  .jd-breakdown-table div:nth-child(3n),
  .jd-breakdown-table div:nth-last-child(-n + 3) {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .jd-breakdown-table div:last-child {
    border-bottom: 0;
  }

  .keyword-condition-joiner[hidden] {
    display: none;
  }

  .app-frame {
    display: block;
    height: auto;
    min-height: 100vh;
    overflow: visible;
    padding: 8px;
  }

  .sidebar {
    height: auto;
    min-height: 0;
    margin-bottom: 8px;
  }

  .page {
    height: auto;
    min-height: 0;
    overflow: visible;
  }

  .account-panel {
    display: none;
  }

  .menu-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .content-header {
    align-items: flex-start;
    flex-direction: column;
    min-height: 0;
    padding: 14px 18px;
  }

  .header-actions {
    width: 100%;
  }

  .header-category-actions {
    width: 100%;
    align-items: stretch;
    flex-direction: column;
    margin-right: 0;
  }

  .category-select.compact {
    min-width: 0;
    width: 100%;
  }

  .ghost-btn,
  .dark-btn {
    flex: 1;
  }

  .content-surface {
    padding: 18px;
  }

  .hero-panel {
    min-height: 560px;
  }

  .hero-title {
    font-size: 30px;
  }

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

  .selection-category-grid {
    grid-template-columns: 1fr;
  }

  .rank-row,
  .keyword-row,
  .qa-row {
    grid-template-columns: 1fr;
  }

  .section-tabs {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .online-selection-tabs-main,
  .online-selection-tabs-side {
    overflow-x: auto;
  }

  .online-selection-tabs-side .section-tab {
    min-width: 168px;
  }

  .search-rank-card {
    margin: 0 12px;
  }

  .search-rank-analysis-card,
  .search-rank-table-card {
    padding: 18px 16px;
  }

  .search-rank-category-switch {
    align-items: flex-start;
    flex-direction: column;
    gap: 10px;
  }

  .search-rank-category-toggle {
    align-items: flex-start;
    flex-wrap: wrap;
  }

  .search-rank-category-toggle-path {
    flex-basis: 100%;
  }

  .search-rank-category-toggle-caret {
    margin-left: 0;
  }

  .search-rank-period-buttons {
    width: 100%;
  }

  .search-rank-period-buttons button {
    flex: 1 1 0;
    min-width: 0;
  }

  .section-content-header {
    align-items: flex-start;
    flex-direction: column;
  }

  .category-controls {
    width: 100%;
    align-items: stretch;
    flex-direction: column;
  }

  .category-select {
    min-width: 0;
  }

  .section-tabs-title {
    align-items: flex-start;
    flex-direction: column;
  }

  .management-header {
    align-items: flex-start;
    flex-direction: column;
  }

  .import-controls {
    width: 100%;
    align-items: stretch;
    flex-direction: column;
  }

  .ranking-period-pull-btn {
    align-self: stretch;
  }

  .import-controls select,
  .import-controls input {
    width: 100%;
  }

  .import-summary {
    grid-template-columns: 1fr;
  }

  .upload-cells {
    grid-template-columns: 1fr;
  }

  .ranking-filters {
    grid-template-columns: 1fr;
  }

  .keyword-panel-title,
  .keyword-table-title {
    align-items: flex-start;
    flex-direction: column;
  }

  .keyword-seed-grid,
  .keyword-controls {
    grid-template-columns: 1fr;
  }

  .keyword-map-summary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .keyword-map-tools {
    grid-template-columns: 1fr;
  }

}
@media (max-width: 760px) {
  .category-management-panel-head {
    align-items: stretch;
  }

  .category-management-type-controls {
    flex-wrap: wrap;
    width: 100%;
  }

  .category-management-tools {
    flex-wrap: wrap;
    width: 100%;
  }

  .category-management-search {
    flex: 1 1 100%;
    width: 100%;
  }

  .category-management-guidance-popover {
    max-width: calc(100vw - 64px);
  }
}

@media (prefers-reduced-motion: reduce) {
  .category-management-type-frame,
  .category-management-tab,
  .category-management-guidance-trigger,
  .category-management-guidance-popover {
    transition: none;
  }
}

@media (prefers-reduced-transparency: reduce) {
  .category-management-guidance-popover,
  .category-management-guidance-popover::before {
    background: #171c28;
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
  }
}

@media (prefers-contrast: more) {
  .category-management-type-frame,
  .category-management-type-frame.is-active {
    border-color: #343b4a;
    box-shadow: none;
  }

  .category-management-guidance-trigger:focus-visible {
    outline-color: #3626d4;
  }

  .category-management-guidance-popover {
    border-color: #ffffff;
    background: #000000;
  }
}

.permission-editor-group.is-disabled {
  opacity: 0.55;
}

.permission-check.is-disabled {
  color: #98a2b3;
  background: #f2f4f7;
  cursor: not-allowed;
}
.listing-management-main-row.expanded > td {
  background: #f8f9fc;
  border-bottom-color: transparent;
}

.listing-row-expand {
  display: inline-grid;
  width: 34px;
  height: 34px;
  margin-right: 7px;
  place-items: center;
  padding: 0;
  border: 1px solid #dfe4ed;
  border-radius: 10px;
  background: #fff;
  color: #667085;
  font-weight: 800;
  line-height: 1;
  vertical-align: middle;
  cursor: pointer;
}

.listing-expand-cell .listing-row-expand {
  margin-right: 0;
}

.listing-row-expand:hover {
  border-color: #b8c1ce;
  background: #f8fafc;
  color: #344054;
}

.listing-row-expand-icon {
  display: grid;
  place-items: center;
  transition: transform 150ms ease;
}

.listing-row-expand-icon svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
}

.listing-row-expand.is-expanded .listing-row-expand-icon {
  transform: rotate(180deg);
}

@media (prefers-reduced-motion: reduce) {
  .listing-management-query,
  .listing-row-expand-icon {
    transition: none;
  }
}

.listing-project-detail-row > td {
  padding: 0 18px 18px !important;
  background: #f8f9fc;
}

.listing-project-detail {
  padding: 18px;
  border: 1px solid #e2e6ef;
  border-radius: 14px;
  background: #fff;
  text-align: left;
}

.listing-project-detail.legacy {
  color: #8993a7;
  font-weight: 600;
}

.listing-draft-publish-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-top: 12px;
  padding: 14px 16px;
  border: 1px solid #d7deea;
  border-radius: 12px;
  background: #fff;
}

.listing-draft-publish-bar > div {
  display: grid;
  gap: 3px;
}

.listing-draft-publish-bar strong {
  color: #1f2937;
}

.listing-draft-publish-bar span {
  color: #7b879a;
  font-size: 12px;
}

.listing-project-detail-summary {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}

.listing-project-detail-field {
  min-width: 0;
  padding: 12px 14px;
  border-radius: 10px;
  background: #f7f8fb;
}

.listing-project-detail-field span,
.listing-project-detail-field strong {
  display: block;
}

.listing-project-detail-field span {
  margin-bottom: 5px;
  color: #8a94a8;
  font-size: 12px;
  font-weight: 700;
}

.listing-project-detail-field strong {
  color: #202939;
  font-size: 14px;
  line-height: 1.6;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.listing-project-detail-media-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.listing-project-detail-section {
  min-width: 0;
  padding: 14px;
  border: 1px solid #edf0f5;
  border-radius: 12px;
}

.listing-project-detail-section h4 {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 0;
  color: #30394b;
  font-size: 14px;
}

.listing-project-detail-section h4 small {
  color: #98a2b3;
  font-size: 12px;
  font-weight: 600;
}

.listing-project-detail-images,
.listing-project-detail-files {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 12px;
}

.listing-project-detail-images a {
  display: grid;
  width: 92px;
  color: #59647a;
  font-size: 11px;
  text-decoration: none;
}

.listing-project-detail-images img {
  width: 92px;
  height: 72px;
  border: 1px solid #e3e7ef;
  border-radius: 8px;
  object-fit: cover;
  background: #f7f8fa;
}

.listing-project-detail-images a span {
  margin-top: 5px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.listing-project-detail-file,
.listing-project-detail-files a,
.listing-project-detail-files span {
  max-width: 100%;
  padding: 7px 10px;
  border-radius: 8px;
  background: #f3f5f9;
  color: #4d5870;
  font-size: 12px;
  text-decoration: none;
  overflow-wrap: anywhere;
}

.listing-project-detail-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 14px;
}

.listing-project-detail-head > div {
  display: grid;
  gap: 4px;
}

.listing-project-detail-head > div > strong {
  color: #1f2937;
  font-size: 16px;
}

.listing-project-detail-head > div > span {
  color: #8993a7;
  font-size: 12px;
}

.listing-project-direction-lock {
  margin: 10px 0 12px;
  border-top: 1px solid #e7eaf0;
}

.listing-project-direction-lock span {
  display: inline-block;
  margin-top: -10px;
  padding-right: 10px;
  background: #fff;
  color: #8993a7;
  font-size: 12px;
  font-weight: 700;
}

.listing-project-direction-lock.editable span {
  color: #16884b;
}

@media (max-width: 900px) {
  .listing-project-detail-summary,
  .listing-project-detail-media-grid {
    grid-template-columns: 1fr;
  }
}
.category-product-design-push-btn {
  width: 100%;
  margin: 0;
  padding: 7px 8px;
  border: 1px solid #9b87f5;
  border-radius: 8px;
  background: #f6f3ff;
  color: #6550c8;
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
}

.category-product-design-push-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.design-task-push-modal {
  width: min(620px, calc(100vw - 40px));
}

.design-task-assignee-list {
  display: grid;
  gap: 10px;
  max-height: 460px;
  margin: 18px 0;
  overflow-y: auto;
}

.design-task-assignee-list label {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 13px 15px;
  border: 1px solid #e1e5ed;
  border-radius: 11px;
  cursor: pointer;
}

.design-task-assignee-list label:has(input:checked) {
  border-color: #7864e6;
  background: #f6f3ff;
}

.design-task-assignee-list span {
  display: grid;
  gap: 3px;
}

.design-task-assignee-list small {
  color: #8b95a8;
}

/* Cache-version anchor for the shared-save status styles in listing_management/workspace.css. */
