:root {
  color-scheme: light;
  --bg: #eef3f6;
  --surface: #ffffff;
  --surface-soft: #f6f9fb;
  --surface-strong: #101820;
  --line: #dbe4ed;
  --line-strong: #afbfce;
  --text: #111827;
  --muted: #5f7083;
  --faint: #91a0ae;
  --blue: #2d6cdf;
  --blue-soft: #e8f0ff;
  --green: #0b7b75;
  --green-soft: #dff7ef;
  --amber: #a76a05;
  --amber-soft: #fff4d9;
  --red: #b42318;
  --red-soft: #ffe6e2;
  --violet: #7357d8;
  --shadow: 0 14px 34px rgba(30, 41, 59, 0.08);
  --shadow-soft: 0 8px 20px rgba(30, 41, 59, 0.055);
  --ring: rgba(45, 108, 223, 0.18);
  --radius: 8px;
  --sidebar-width: 276px;
  --sans: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
    "Noto Sans CJK SC", sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
}

* {
  box-sizing: border-box;
  scrollbar-color: #b8c7d6 transparent;
  scrollbar-width: thin;
}

*::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

*::-webkit-scrollbar-thumb {
  border: 3px solid transparent;
  border-radius: 999px;
  background: #b8c7d6;
  background-clip: content-box;
}

*::-webkit-scrollbar-track {
  background: transparent;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 18px;
}

body {
  margin: 0;
  min-width: 320px;
  background:
    linear-gradient(180deg, rgba(45, 108, 223, 0.085), rgba(237, 243, 248, 0) 360px),
    linear-gradient(115deg, rgba(11, 123, 117, 0.055), rgba(255, 255, 255, 0) 580px),
    var(--bg);
  color: var(--text);
  font-family: var(--sans);
  letter-spacing: 0;
}

body::before {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(45, 108, 223, 0.032) 1px, transparent 1px),
    linear-gradient(90deg, rgba(45, 108, 223, 0.032) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.78), transparent 72%);
  content: "";
}

[hidden] {
  display: none !important;
}

button,
input,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

a {
  color: inherit;
  text-decoration: none;
}

input,
select {
  width: 100%;
  height: 44px;
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(180deg, #ffffff, #fbfdff);
  color: var(--text);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.95);
  padding: 10px 12px;
  line-height: 1.2;
  outline: none;
}

select {
  -webkit-appearance: none;
  appearance: none;
  background:
    linear-gradient(45deg, transparent 50%, var(--muted) 50%),
    linear-gradient(135deg, var(--muted) 50%, transparent 50%),
    linear-gradient(180deg, #ffffff, #fbfdff);
  background-position:
    calc(100% - 18px) 50%,
    calc(100% - 13px) 50%,
    0 0;
  background-repeat: no-repeat;
  background-size:
    5px 5px,
    5px 5px,
    100% 100%;
  padding-right: 38px;
}

select::-ms-expand {
  display: none;
}

input:focus,
select:focus,
button:focus-visible,
a:focus-visible {
  border-color: var(--blue);
  outline: 3px solid var(--ring);
  outline-offset: 2px;
}

label span {
  display: block;
  margin-bottom: 7px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 740;
}

.platform-gateway {
  display: grid;
  min-height: 100vh;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.7), rgba(238, 243, 246, 0.94)),
    var(--bg);
  padding: 32px;
  place-items: center;
}

.platform-gateway-panel {
  width: min(1120px, 100%);
  border: 1px solid rgba(217, 227, 238, 0.92);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.96);
  box-shadow: var(--shadow);
  padding: 28px;
}

.platform-gateway-header {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 18px;
  align-items: center;
  margin-bottom: 24px;
}

.brand-mark.platform-brand-mark {
  width: 56px;
  height: 56px;
  border-radius: 14px;
}

.platform-gateway-subtitle {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.6;
}

.platform-options {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.platform-option {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  min-height: 118px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(180deg, #ffffff, #f8fbfd);
  color: var(--text);
  padding: 18px;
  text-align: left;
  box-shadow: var(--shadow-soft);
  transition:
    border-color 150ms ease,
    box-shadow 150ms ease,
    transform 150ms ease;
}

.platform-option:not(:disabled):hover,
.platform-option.is-selected {
  border-color: rgba(11, 123, 117, 0.54);
  box-shadow: 0 16px 28px rgba(11, 123, 117, 0.12);
  transform: translateY(-1px);
}

.platform-option:disabled {
  cursor: not-allowed;
  opacity: 0.62;
}

.platform-logo {
  display: grid;
  width: 40px;
  height: 40px;
  place-items: center;
  border-radius: var(--radius);
  color: #ffffff;
  font-weight: 900;
}

.platform-logo.amazon {
  background: #111827;
}

.platform-logo.shopee {
  background: #d64c1f;
}

.platform-logo.tiktok {
  background: #0f172a;
}

.platform-logo.temu {
  background: #0b7b75;
}

.platform-option strong,
.platform-option small,
.platform-option em {
  display: block;
}

.platform-option strong {
  font-size: 17px;
}

.platform-option small {
  margin-top: 5px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.platform-option em {
  grid-column: 1 / -1;
  color: var(--green);
  font-size: 12px;
  font-style: normal;
  font-weight: 850;
}

.platform-option:disabled em {
  color: var(--faint);
}

.platform-gateway-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-top: 22px;
  border-top: 1px solid var(--line);
  padding-top: 18px;
}

.platform-gateway-footer span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 760;
}

.app-shell {
  display: grid;
  grid-template-columns: var(--sidebar-width) minmax(0, 1fr);
  min-height: 100vh;
}

.sidebar {
  position: sticky;
  top: 0;
  display: flex;
  flex-direction: column;
  gap: 16px;
  height: 100vh;
  border-right: 1px solid rgba(217, 227, 238, 0.84);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(247, 250, 253, 0.9)),
    #ffffff;
  padding: 20px;
  box-shadow: 10px 0 28px rgba(30, 41, 59, 0.04);
  backdrop-filter: blur(18px);
  overflow-y: auto;
  overscroll-behavior: contain;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 48px;
}

.brand-mark {
  display: block;
  flex: 0 0 42px;
  width: 42px;
  height: 42px;
  border-radius: 10px;
  background: transparent;
  box-shadow: 0 14px 30px rgba(16, 24, 32, 0.22);
  object-fit: contain;
}

.brand strong,
.brand small {
  display: block;
}

.brand strong {
  font-size: 18px;
}

.brand small {
  margin-top: 2px;
  color: var(--muted);
  font-size: 12px;
}

.side-nav {
  display: grid;
  gap: 11px;
}

.nav-group {
  display: grid;
  gap: 6px;
}

.nav-group-toggle {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  min-height: 38px;
  border: 1px solid rgba(188, 207, 226, 0.98);
  border-radius: var(--radius);
  background:
    linear-gradient(90deg, rgba(45, 108, 223, 0.12), rgba(11, 123, 117, 0.06)),
    #ffffff;
  color: var(--text);
  padding: 0 10px 0 16px;
  font-size: 14px;
  font-weight: 920;
  line-height: 1.2;
  text-align: left;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.8),
    0 8px 18px rgba(32, 64, 108, 0.05);
}

.nav-group-toggle::before {
  position: absolute;
  inset: 6px auto 6px 0;
  width: 4px;
  border-radius: 999px;
  background: linear-gradient(180deg, var(--blue), var(--green));
  content: "";
}

.nav-group-toggle:hover {
  border-color: rgba(45, 108, 223, 0.24);
  color: var(--blue);
}

.nav-group.is-collapsed .nav-group-toggle {
  background: linear-gradient(180deg, #ffffff, #f8fbfd);
  color: var(--muted);
  box-shadow: none;
}

.nav-chevron {
  display: grid;
  width: 20px;
  height: 20px;
  place-items: center;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.82);
  color: var(--muted);
  font-size: 12px;
  line-height: 1;
  transition: transform 160ms ease;
}

.nav-group.is-collapsed .nav-chevron {
  transform: rotate(-90deg);
}

.nav-group-list {
  display: grid;
  gap: 4px;
  max-height: 260px;
  margin-left: 16px;
  border-left: 1px solid rgba(151, 169, 188, 0.5);
  padding-left: 10px;
  opacity: 1;
  overflow: hidden;
  transition:
    max-height 180ms ease,
    opacity 160ms ease;
}

.nav-group.is-collapsed .nav-group-list {
  max-height: 0;
  opacity: 0;
  pointer-events: none;
}

.side-nav a {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 38px;
  min-width: 0;
  border-radius: var(--radius);
  color: var(--muted);
  font-weight: 720;
  padding: 0 12px 0 13px;
  transition:
    background 150ms ease,
    color 150ms ease,
    transform 150ms ease;
}

.side-nav .nav-home-link {
  min-height: 42px;
  border: 1px solid rgba(188, 207, 226, 0.98);
  background:
    linear-gradient(90deg, rgba(16, 24, 32, 0.06), rgba(11, 123, 117, 0.05)),
    #ffffff;
  color: var(--text);
  font-size: 14px;
  font-weight: 900;
  box-shadow: 0 10px 22px rgba(32, 64, 108, 0.055);
}

.side-nav .nav-home-link .nav-icon {
  border-color: rgba(11, 123, 117, 0.24);
  background: var(--green-soft);
  color: var(--green);
}

.nav-group-list a {
  min-height: 33px;
  font-size: 13px;
  font-weight: 720;
}

.side-nav a > span:last-child {
  overflow: hidden;
  min-width: 0;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.nav-icon {
  display: grid;
  flex: 0 0 26px;
  width: 26px;
  height: 26px;
  place-items: center;
  border: 1px solid rgba(217, 227, 238, 0.9);
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.78);
  color: var(--faint);
  font-size: 12px;
  font-weight: 860;
  line-height: 1;
}

.side-nav a:hover,
.side-nav a.is-active {
  background: linear-gradient(90deg, rgba(45, 108, 223, 0.12), rgba(11, 123, 117, 0.06));
  color: var(--blue);
}

.side-nav a:hover .nav-icon,
.side-nav a.is-active .nav-icon {
  border-color: rgba(45, 108, 223, 0.24);
  background: #ffffff;
  color: var(--blue);
}

.side-nav a.is-active::before {
  position: absolute;
  left: 0;
  width: 3px;
  height: 22px;
  border-radius: 999px;
  background: linear-gradient(180deg, var(--blue), var(--green));
  content: "";
}

.side-card,
.panel,
.metric-card {
  border: 1px solid rgba(217, 227, 238, 0.9);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.94);
  box-shadow: var(--shadow);
}

.side-card {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(248, 251, 253, 0.94)),
    #ffffff;
  padding: 16px;
}

.side-card-title {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-bottom: 13px;
}

.status-dot {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 0 5px rgba(15, 118, 110, 0.12);
}

.status-dot-warning {
  background: #d97706;
  box-shadow: 0 0 0 5px rgba(217, 119, 6, 0.12);
}

.status-dot-danger {
  background: var(--red);
  box-shadow: 0 0 0 5px rgba(180, 35, 24, 0.12);
}

.compact-list {
  display: grid;
  gap: 11px;
  margin: 0;
}

.compact-list div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  min-width: 0;
  border-top: 1px solid rgba(217, 227, 238, 0.72);
  padding-top: 9px;
}

.compact-list div:first-child {
  border-top: 0;
  padding-top: 0;
}

.compact-list dt,
.compact-list dd {
  margin: 0;
  font-size: 12px;
}

.compact-list dt {
  color: var(--muted);
}

.compact-list dd {
  overflow: hidden;
  max-width: 132px;
  color: var(--text);
  font-weight: 760;
  text-align: right;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.checklist {
  display: grid;
  gap: 12px;
  margin-top: auto;
}

.checklist label {
  display: flex;
  align-items: center;
  gap: 9px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.checklist input {
  width: 15px;
  height: 15px;
  min-height: auto;
  accent-color: var(--green);
}

.checklist strong {
  color: var(--text);
}

.workspace {
  min-width: 0;
  width: 100%;
  max-width: none;
  margin: 0;
  padding: 18px 20px;
}

.module-stack {
  min-width: 0;
}

.module-view {
  --module-bg: var(--surface-soft);
  min-width: 0;
  border-radius: var(--radius);
  background: var(--module-bg, #f5f8fb);
  padding: 14px;
}

.module-view:not(.is-active),
.module-view[hidden] {
  display: none !important;
}

.module-view.is-active {
  display: block;
}

#dashboard {
  --module-bg: #eef6ff;
}

#home {
  --module-bg: #f0f7f5;
}

#connection {
  --module-bg: var(--module-home);
}

#profitAnalysis {
  --module-bg: #fff7e8;
}

#inventoryWarnings {
  --module-bg: var(--module-dashboard);
}

#actionCenter {
  --module-bg: var(--module-home);
}

#accessControl {
  --module-bg: var(--module-home);
}

#listingAdvisor {
  --module-bg: var(--module-dashboard);
}

#reviewInsights {
  --module-bg: var(--module-home);
}

#records {
  --module-bg: var(--surface-soft);
}

#contract {
  --module-bg: var(--surface-soft);
}

.module-view > :last-child {
  margin-bottom: 0;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 14px;
  border: 1px solid rgba(217, 227, 238, 0.86);
  border-radius: var(--radius);
  background:
    linear-gradient(115deg, rgba(255, 255, 255, 0.98), rgba(232, 240, 255, 0.58)),
    #ffffff;
  box-shadow: var(--shadow-soft);
  padding: 15px 18px;
}

.topbar-copy {
  min-width: 0;
}

.eyebrow {
  margin: 0 0 6px;
  color: var(--green);
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 780;
  text-transform: uppercase;
}

h1,
h2 {
  margin: 0;
  color: var(--text);
  line-height: 1.12;
}

h1 {
  font-size: 36px;
  letter-spacing: 0;
}

h2 {
  font-size: 19px;
}

.topbar-actions,
.form-actions,
.table-tools {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.button,
.icon-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 42px;
  border: 1px solid transparent;
  border-radius: var(--radius);
  padding: 0 13px;
  color: var(--text);
  font-weight: 780;
  white-space: nowrap;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.88);
  transition:
    background 150ms ease,
    border-color 150ms ease,
    box-shadow 150ms ease,
    transform 150ms ease;
}

.button span {
  display: grid;
  flex: 0 0 20px;
  width: 20px;
  height: 20px;
  place-items: center;
  border-radius: 6px;
  background: rgba(22, 32, 42, 0.1);
  font-size: 11px;
  font-weight: 860;
}

.button.primary {
  border-color: rgba(45, 108, 223, 0.9);
  background: linear-gradient(135deg, #2d6cdf, #3858d8);
  color: #ffffff;
  box-shadow: 0 14px 28px rgba(45, 108, 223, 0.22);
}

.button.primary span {
  background: rgba(255, 255, 255, 0.2);
}

.button.secondary {
  border-color: rgba(11, 123, 117, 0.45);
  background: linear-gradient(135deg, #0b7b75, #0b8f78);
  color: #ffffff;
  box-shadow: 0 14px 28px rgba(11, 123, 117, 0.18);
}

.button.secondary span {
  background: rgba(255, 255, 255, 0.2);
}

.button.ghost {
  border-color: rgba(217, 227, 238, 0.96);
  background: linear-gradient(180deg, #ffffff, #f7fafc);
}

.button:hover,
.icon-button:hover {
  border-color: rgba(45, 108, 223, 0.28);
  box-shadow: 0 12px 28px rgba(30, 41, 59, 0.1);
  transform: translateY(-1px);
}

.button:disabled {
  cursor: not-allowed;
  opacity: 0.62;
}

.file-button {
  position: relative;
  overflow: hidden;
}

.file-button input {
  position: absolute;
  inset: 0;
  cursor: pointer;
  opacity: 0;
}

.icon-button {
  width: 38px;
  height: 38px;
  min-height: 38px;
  border-color: var(--line);
  background: #ffffff;
  padding: 0;
}

.workspace-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(300px, 0.75fr);
  gap: 18px;
}

.panel {
  min-width: 0;
  padding: 18px;
}

.panel-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 18px;
}

.home-layout {
  display: grid;
  grid-template-columns: minmax(280px, 0.72fr) minmax(0, 1.28fr);
  gap: 18px;
  margin-bottom: 18px;
}

.home-profile-card,
.home-focus-card {
  min-height: 100%;
}

.home-profile-card {
  background:
    linear-gradient(145deg, rgba(11, 123, 117, 0.12), rgba(45, 108, 223, 0.05)),
    #ffffff;
}

.home-profile-header {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 14px;
  align-items: center;
}

.home-avatar {
  display: grid;
  width: 64px;
  height: 64px;
  place-items: center;
  border: 1px solid rgba(11, 123, 117, 0.22);
  border-radius: 18px;
  background:
    linear-gradient(135deg, rgba(16, 24, 32, 0.94), rgba(11, 123, 117, 0.88)),
    var(--surface-strong);
  color: #ffffff;
  font-size: 19px;
  font-weight: 920;
  box-shadow: 0 16px 30px rgba(16, 24, 32, 0.16);
}

.home-profile-header strong,
.home-profile-header span {
  display: block;
}

.home-profile-header strong {
  margin-top: 11px;
  color: var(--text);
  font-size: 22px;
  line-height: 1.12;
}

.home-profile-header span {
  margin-top: 5px;
  color: var(--muted);
  font-size: 13px;
}

.home-profile-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin: 18px 0 0;
}

.home-profile-list div {
  min-width: 0;
  border: 1px solid rgba(217, 227, 238, 0.86);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.72);
  padding: 11px;
}

.home-profile-list dt,
.home-profile-list dd {
  margin: 0;
}

.home-profile-list dt {
  color: var(--muted);
  font-size: 12px;
  font-weight: 760;
}

.home-profile-list dd {
  overflow: hidden;
  margin-top: 6px;
  color: var(--text);
  font-size: 14px;
  font-weight: 860;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.home-suggestion-list {
  display: grid;
  gap: 11px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.home-suggestion-list li {
  position: relative;
  display: grid;
  gap: 5px;
  min-height: 70px;
  border: 1px solid rgba(217, 227, 238, 0.9);
  border-left: 4px solid var(--blue);
  border-radius: var(--radius);
  background: linear-gradient(180deg, #ffffff, #f9fbfd);
  padding: 12px 13px;
}

.home-suggestion-list li.warning {
  border-left-color: var(--amber);
}

.home-suggestion-list li.danger {
  border-left-color: var(--red);
}

.home-suggestion-list li.success {
  border-left-color: var(--green);
}

.home-suggestion-list strong {
  color: var(--text);
  font-size: 14px;
}

.home-suggestion-list span {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.home-overview-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(150px, 1fr));
  gap: 14px;
  margin-bottom: 18px;
}

.home-mini-card {
  min-height: 104px;
}

.home-mini-card strong {
  overflow: hidden;
  font-size: 23px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.home-bottom-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 18px;
}

.home-shortcut-grid,
.home-recommend-grid {
  display: grid;
  gap: 12px;
}

.home-shortcut-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.home-shortcut,
.home-recommend-grid article {
  min-width: 0;
  border: 1px solid rgba(217, 227, 238, 0.9);
  border-radius: var(--radius);
  background: linear-gradient(180deg, #ffffff, #f8fbfd);
}

.home-shortcut {
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr);
  gap: 10px 12px;
  align-items: center;
  min-height: 86px;
  padding: 13px;
  transition:
    border-color 150ms ease,
    box-shadow 150ms ease,
    transform 150ms ease;
}

.home-shortcut:hover {
  border-color: rgba(45, 108, 223, 0.26);
  box-shadow: 0 12px 28px rgba(30, 41, 59, 0.09);
  transform: translateY(-1px);
}

.home-shortcut > span {
  display: grid;
  grid-row: span 2;
  width: 36px;
  height: 36px;
  place-items: center;
  border-radius: 10px;
  background: var(--blue-soft);
  color: var(--blue);
  font-weight: 900;
}

.home-shortcut strong,
.home-shortcut small,
.home-recommend-grid strong,
.home-recommend-grid span {
  display: block;
  min-width: 0;
}

.home-shortcut strong,
.home-recommend-grid strong {
  color: var(--text);
  font-size: 14px;
}

.home-shortcut small,
.home-recommend-grid span {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.42;
}

.home-recommend-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.home-recommend-grid article {
  display: grid;
  gap: 7px;
  min-height: 96px;
  padding: 13px;
}

.pill {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  border: 1px solid rgba(161, 98, 7, 0.28);
  border-radius: 999px;
  background: var(--amber-soft);
  color: var(--amber);
  padding: 0 10px;
  font-size: 12px;
  font-weight: 820;
  white-space: nowrap;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.65);
}

.pill.is-live {
  border-color: rgba(15, 118, 110, 0.32);
  background: var(--green-soft);
  color: var(--green);
}

.pill.is-error {
  border-color: rgba(180, 35, 24, 0.32);
  background: var(--red-soft);
  color: var(--red);
}

.connector-form {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.connector-form label:first-child {
  grid-column: span 2;
}

.form-actions {
  grid-column: 1 / -1;
  justify-content: flex-end;
  margin-top: 2px;
}

.pipeline {
  display: grid;
  gap: 13px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.pipeline li {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr);
  gap: 11px;
  align-items: start;
  min-height: 58px;
}

.pipeline li > span {
  display: grid;
  width: 28px;
  height: 28px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: #ffffff;
  box-shadow: 0 8px 18px rgba(30, 41, 59, 0.08);
}

.pipeline li > span::after {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--line-strong);
  content: "";
}

.pipeline li.is-ready > span {
  border-color: rgba(15, 118, 110, 0.35);
  background: var(--green-soft);
}

.pipeline li.is-ready > span::after {
  background: var(--green);
}

.pipeline li.is-error > span {
  border-color: rgba(180, 35, 24, 0.35);
  background: var(--red-soft);
}

.pipeline li.is-error > span::after {
  background: var(--red);
}

.pipeline strong,
.pipeline small {
  display: block;
}

.pipeline strong {
  margin-top: 3px;
  font-size: 14px;
}

.pipeline small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.metrics-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(136px, 1fr));
  gap: 14px;
  margin: 18px 0;
}

.module-view > .metrics-grid:first-child {
  margin-top: 0;
}

.metric-card {
  position: relative;
  display: grid;
  gap: 7px;
  min-height: 112px;
  overflow: hidden;
  padding: 16px 15px 15px;
}

.metric-card::before {
  position: absolute;
  inset: 0 0 auto;
  height: 4px;
  background: linear-gradient(90deg, var(--blue), var(--green));
  content: "";
}

.metric-card:nth-child(2)::before,
.metric-card:nth-child(5)::before {
  background: linear-gradient(90deg, var(--amber), var(--blue));
}

.metric-card:nth-child(3)::before,
.metric-card:nth-child(6)::before {
  background: linear-gradient(90deg, var(--green), var(--violet));
}

.metric-card small {
  color: var(--muted);
  font-weight: 760;
}

.metric-card strong {
  font-size: 29px;
  line-height: 1.05;
}

.metric-card span {
  justify-self: start;
  border-radius: 999px;
  background: var(--surface-soft);
  color: var(--muted);
  padding: 5px 8px;
  font-size: 12px;
  font-weight: 760;
}

.metric-card span.is-good {
  background: var(--green-soft);
  color: var(--green);
}

.metric-card span.is-bad {
  background: var(--red-soft);
  color: var(--red);
}

.analytics-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.65fr) minmax(280px, 0.7fr) minmax(280px, 0.7fr);
  gap: 18px;
  margin-bottom: 18px;
}

.chart-wrap {
  position: relative;
  min-height: 280px;
  border: 1px solid rgba(217, 227, 238, 0.92);
  border-radius: var(--radius);
  background:
    linear-gradient(rgba(45, 108, 223, 0.055) 1px, transparent 1px),
    linear-gradient(90deg, rgba(45, 108, 223, 0.055) 1px, transparent 1px),
    linear-gradient(180deg, rgba(232, 240, 255, 0.72), rgba(255, 255, 255, 0.9)),
    #ffffff;
  background-size: 44px 44px;
  overflow: hidden;
}

canvas {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 280px;
}

.segmented {
  display: grid;
  grid-template-columns: repeat(3, minmax(58px, 1fr));
  min-height: 36px;
  border: 1px solid rgba(217, 227, 238, 0.96);
  border-radius: var(--radius);
  background: #edf3f8;
  overflow: hidden;
}

.segmented button {
  min-width: 0;
  border: 0;
  background: transparent;
  color: var(--muted);
  padding: 0 10px;
  font-size: 12px;
  font-weight: 780;
}

.segmented button.is-selected {
  background: #ffffff;
  color: var(--blue);
  box-shadow: 0 1px 8px rgba(30, 41, 59, 0.08);
}

.mix-list {
  display: grid;
  gap: 13px;
}

.mix-row {
  display: grid;
  gap: 7px;
}

.mix-row-top {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: var(--muted);
  font-size: 13px;
}

.mix-row-top strong {
  color: var(--text);
}

.mix-track {
  height: 10px;
  border-radius: 999px;
  background: #e8eef5;
  overflow: hidden;
}

.mix-bar {
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--green), var(--blue));
}

.mini-visual {
  position: relative;
  min-height: 128px;
  margin-top: 18px;
  border: 1px solid rgba(217, 227, 238, 0.92);
  border-radius: var(--radius);
  background:
    linear-gradient(135deg, rgba(11, 123, 117, 0.1), transparent 46%),
    linear-gradient(315deg, rgba(167, 106, 5, 0.11), transparent 48%),
    #ffffff;
  overflow: hidden;
}

.cube {
  position: absolute;
  width: 54px;
  height: 54px;
  border: 1px solid rgba(22, 32, 42, 0.12);
  border-radius: var(--radius);
  box-shadow: 0 12px 24px rgba(31, 41, 55, 0.12);
}

.cube-one {
  left: 22px;
  top: 22px;
  background: #dff7ef;
}

.cube-two {
  left: 94px;
  top: 48px;
  background: #e8f0ff;
}

.cube-three {
  right: 24px;
  top: 30px;
  background: #fff3d8;
}

.flow-line {
  position: absolute;
  right: 30px;
  bottom: 30px;
  left: 30px;
  height: 2px;
  background: repeating-linear-gradient(90deg, rgba(22, 32, 42, 0.22) 0 12px, transparent 12px 18px);
}

.insight-list {
  display: grid;
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.insight-list li {
  display: grid;
  grid-template-columns: 8px minmax(0, 1fr);
  gap: 10px;
  align-items: start;
  border: 1px solid rgba(217, 227, 238, 0.92);
  border-radius: var(--radius);
  background: linear-gradient(180deg, #ffffff, #fbfdff);
  padding: 12px;
}

.insight-list li::before {
  width: 8px;
  height: 100%;
  min-height: 36px;
  border-radius: 999px;
  background: var(--blue);
  content: "";
}

.insight-list li.warning::before {
  background: var(--amber);
}

.insight-list li.danger::before {
  background: var(--red);
}

.insight-list strong,
.insight-list span {
  display: block;
}

.insight-list strong {
  font-size: 14px;
}

.insight-list span {
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.4;
}

.data-status-banner {
  display: grid;
  gap: 6px;
  border: 1px solid var(--line);
  border-left: 4px solid var(--line-strong);
  border-radius: var(--radius);
  background: #ffffff;
  padding: 10px 12px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.data-status-banner strong {
  display: block;
  color: var(--text);
  font-size: 13px;
}

.data-status-banner span {
  display: block;
}

.data-status-banner.is-live {
  border-left-color: var(--green);
  background: var(--green-soft);
}

.data-status-banner.is-partial,
.data-status-banner.is-estimated,
.data-status-banner.is-import {
  border-left-color: var(--amber);
  background: var(--amber-soft);
}

.data-status-banner.is-unavailable {
  border-left-color: var(--red);
  background: var(--red-soft);
}

.decision-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(340px, 0.85fr);
  gap: 18px;
  margin-bottom: 18px;
}

.profit-panel,
.inventory-panel {
  background:
    linear-gradient(135deg, rgba(11, 123, 117, 0.055), transparent 38%),
    rgba(255, 255, 255, 0.96);
}

.profit-summary-grid,
.inventory-summary-grid,
.sentiment-summary {
  display: grid;
  gap: 12px;
}

.profit-summary-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-bottom: 16px;
}

.inventory-summary-grid,
.sentiment-summary {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-bottom: 14px;
}

.profit-summary-grid article,
.inventory-summary-grid article,
.sentiment-summary article {
  position: relative;
  display: grid;
  gap: 7px;
  min-height: 88px;
  overflow: hidden;
  border: 1px solid rgba(217, 227, 238, 0.92);
  border-radius: var(--radius);
  background: linear-gradient(180deg, #ffffff, #fbfdff);
  padding: 14px;
}

.profit-summary-grid article::before,
.inventory-summary-grid article::before,
.sentiment-summary article::before {
  position: absolute;
  inset: 0 auto 0 0;
  width: 4px;
  background: linear-gradient(180deg, var(--green), var(--blue));
  content: "";
}

.profit-summary-grid small,
.inventory-summary-grid small,
.sentiment-summary small {
  color: var(--muted);
  font-weight: 760;
}

.profit-summary-grid strong,
.inventory-summary-grid strong,
.sentiment-summary strong {
  color: var(--text);
  font-size: 24px;
  line-height: 1.1;
}

.cost-breakdown,
.inventory-list,
.issue-list,
.sku-profit-list {
  display: grid;
  gap: 10px;
}

.cost-breakdown {
  margin-bottom: 16px;
}

.cost-row,
.issue-row {
  display: grid;
  grid-template-columns: 118px minmax(0, 1fr) 92px;
  gap: 10px;
  align-items: center;
  color: var(--muted);
  font-size: 13px;
}

.cost-row strong,
.issue-row strong {
  color: var(--text);
}

.cost-track,
.issue-track,
.inventory-track {
  height: 10px;
  border-radius: 999px;
  background: #e7eef6;
  overflow: hidden;
}

.cost-fill,
.issue-fill,
.inventory-fill {
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--green), var(--blue));
}

.cost-row.warning .cost-fill,
.issue-row.warning .issue-fill,
.inventory-row.warning .inventory-fill {
  background: linear-gradient(90deg, var(--amber), var(--blue));
}

.cost-row.danger .cost-fill,
.issue-row.danger .issue-fill,
.inventory-row.danger .inventory-fill {
  background: linear-gradient(90deg, var(--red), var(--amber));
}

.mini-table {
  border: 1px solid rgba(217, 227, 238, 0.92);
  border-radius: var(--radius);
  background: linear-gradient(180deg, #ffffff, #fbfdff);
  padding: 14px;
}

.mini-table-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.mini-table-head span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 760;
}

.sku-profit-row,
.inventory-row {
  display: grid;
  gap: 8px;
  border: 1px solid rgba(217, 227, 238, 0.92);
  border-radius: var(--radius);
  background: #ffffff;
  padding: 12px;
}

.sku-profit-row-top,
.inventory-row-top {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.sku-profit-row-top strong,
.inventory-row-top strong {
  color: var(--text);
}

.sku-profit-row-top span,
.inventory-row-top span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 760;
  text-align: right;
}

.sku-profit-meta,
.inventory-meta {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  color: var(--muted);
  font-size: 12px;
}

.sku-profit-meta span,
.inventory-meta span {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  border-radius: 999px;
  background: #f1f6fb;
  padding: 0 8px;
  font-weight: 760;
}

.inventory-panel .file-button {
  flex: 0 0 auto;
}

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

.inventory-status.healthy {
  background: var(--green-soft);
  color: var(--green);
}

.inventory-status.warning {
  background: var(--amber-soft);
  color: var(--amber);
}

.inventory-status.danger {
  background: var(--red-soft);
  color: var(--red);
}

.automation-grid {
  display: grid;
  grid-template-columns: minmax(360px, 0.9fr) minmax(0, 1.1fr);
  gap: 18px;
  margin-bottom: 18px;
}

.action-panel,
.listing-panel {
  background:
    linear-gradient(135deg, rgba(167, 106, 5, 0.065), transparent 34%),
    rgba(255, 255, 255, 0.96);
}

.listing-panel {
  background:
    linear-gradient(135deg, rgba(45, 108, 223, 0.055), transparent 34%),
    rgba(255, 255, 255, 0.96);
}

.action-summary-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 9px;
  margin-bottom: 10px;
}

.action-summary-grid article {
  position: relative;
  display: grid;
  gap: 5px;
  min-height: 72px;
  overflow: hidden;
  border: 1px solid rgba(217, 227, 238, 0.92);
  border-radius: var(--radius);
  background: linear-gradient(180deg, #ffffff, #fbfdff);
  padding: 11px 12px;
}

.action-summary-grid article::before {
  position: absolute;
  inset: 0 auto 0 0;
  width: 4px;
  background: linear-gradient(180deg, var(--amber), var(--blue));
  content: "";
}

.action-summary-grid small {
  color: var(--muted);
  font-weight: 760;
}

.action-summary-grid strong {
  overflow: hidden;
  color: var(--text);
  font-size: 22px;
  line-height: 1.1;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.action-list {
  display: grid;
  gap: 7px;
}

.action-task {
  display: grid;
  gap: 6px;
  border: 1px solid rgba(217, 227, 238, 0.94);
  border-radius: var(--radius);
  background: linear-gradient(180deg, #ffffff, #fbfdff);
  padding: 10px 12px;
  box-shadow: 0 6px 14px rgba(30, 41, 59, 0.035);
}

.action-task.high {
  border-color: rgba(180, 35, 24, 0.24);
}

.action-task.medium {
  border-color: rgba(167, 106, 5, 0.24);
}

.action-task-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.action-task-title {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.action-task-title strong {
  overflow: hidden;
  color: var(--text);
  font-size: 14px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.action-task-title span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 760;
}

.priority-chip {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  min-height: 22px;
  border-radius: 999px;
  background: var(--surface-soft);
  color: var(--muted);
  padding: 0 8px;
  font-size: 12px;
  font-weight: 820;
  white-space: nowrap;
}

.priority-chip.high {
  background: var(--red-soft);
  color: var(--red);
}

.priority-chip.medium {
  background: var(--amber-soft);
  color: var(--amber);
}

.priority-chip.low {
  background: var(--green-soft);
  color: var(--green);
}

.action-task p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.38;
}

.action-task-action {
  display: inline-flex;
  justify-self: start;
  align-items: center;
  min-height: 24px;
  border-radius: 999px;
  background: #eef5ff;
  color: var(--blue);
  padding: 0 9px;
  font-size: 12px;
  font-weight: 820;
}

.access-panel {
  margin-bottom: 18px;
  background:
    linear-gradient(135deg, rgba(11, 123, 117, 0.07), transparent 34%),
    rgba(255, 255, 255, 0.96);
}

.access-summary-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 14px;
}

.access-summary-grid article {
  position: relative;
  display: grid;
  gap: 8px;
  min-height: 88px;
  overflow: hidden;
  border: 1px solid rgba(217, 227, 238, 0.92);
  border-radius: var(--radius);
  background: linear-gradient(180deg, #ffffff, #fbfdff);
  padding: 14px 14px 13px;
}

.access-summary-grid article::before {
  position: absolute;
  inset: 0 auto 0 0;
  width: 4px;
  background: linear-gradient(180deg, var(--green), var(--blue));
  content: "";
}

.access-summary-grid small {
  color: var(--muted);
  font-weight: 760;
}

.access-summary-grid strong {
  display: block;
  overflow: hidden;
  color: var(--text);
  font-size: 22px;
  line-height: 1.12;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.access-notice {
  margin-bottom: 14px;
  border: 1px solid rgba(37, 99, 235, 0.16);
  border-radius: var(--radius);
  background: #eff6ff;
  color: #1d4ed8;
  padding: 11px 13px;
  font-size: 13px;
  font-weight: 760;
  line-height: 1.5;
}

.access-notice.warning {
  border-color: rgba(179, 84, 0, 0.2);
  background: rgba(255, 246, 230, 0.92);
  color: #7b4615;
}

.access-notice[hidden] {
  display: none;
}

.access-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.18fr) minmax(360px, 0.82fr);
  gap: 16px;
  align-items: start;
}

.access-card {
  min-width: 0;
  border: 1px solid rgba(217, 227, 238, 0.92);
  border-radius: var(--radius);
  background: linear-gradient(180deg, #ffffff, #fbfdff);
  padding: 16px;
  box-shadow: 0 8px 22px rgba(30, 41, 59, 0.045);
}

.access-card .subheading {
  align-items: center;
  min-height: 44px;
  margin-bottom: 14px;
  border-bottom: 1px solid rgba(217, 227, 238, 0.78);
  padding-bottom: 12px;
}

.access-user-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  align-items: end;
  margin-bottom: 16px;
  border: 1px dashed rgba(11, 123, 117, 0.28);
  border-radius: var(--radius);
  background: linear-gradient(180deg, rgba(237, 248, 245, 0.64), rgba(255, 255, 255, 0.9));
  padding: 12px;
}

.access-user-form .button {
  grid-column: 1 / -1;
}

.access-list-shell {
  display: grid;
  gap: 10px;
}

.access-list-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 820;
  text-transform: uppercase;
}

.access-user-list {
  display: grid;
  gap: 10px;
}

.access-user-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(108px, 0.38fr) minmax(96px, 0.32fr);
  gap: 12px;
  align-items: center;
  border: 1px solid rgba(217, 227, 238, 0.92);
  border-radius: var(--radius);
  background:
    linear-gradient(90deg, rgba(45, 108, 223, 0.055), transparent 28%),
    #ffffff;
  padding: 12px 12px 12px 14px;
  transition:
    border-color 150ms ease,
    box-shadow 150ms ease;
}

.access-user-row:hover {
  border-color: rgba(11, 123, 117, 0.26);
  box-shadow: 0 10px 24px rgba(30, 41, 59, 0.065);
}

.access-user-main {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.access-user-name-line {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.access-user-name-line strong,
.access-role-name {
  display: block;
  overflow: hidden;
  color: var(--text);
  font-size: 14px;
  font-weight: 900;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.access-user-main > span {
  display: block;
  overflow: hidden;
  color: var(--muted);
  font-size: 12px;
  font-weight: 720;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.access-status {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  min-height: 22px;
  border-radius: 999px;
  padding: 0 8px;
  font-size: 11px;
  font-weight: 820;
}

.access-status.active {
  background: var(--green-soft);
  color: var(--green);
}

.access-status.disabled {
  background: var(--surface-soft);
  color: var(--muted);
}

.access-user-meta,
.access-role-meta {
  display: flex;
  gap: 7px;
  flex-wrap: wrap;
}

.access-user-meta span,
.access-role-meta span {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  border-radius: 999px;
  background: #f1f6fb;
  color: var(--muted);
  padding: 0 8px;
  font-size: 12px;
  font-weight: 760;
}

.access-user-actions {
  display: flex;
  grid-column: 1 / -1;
  gap: 8px;
  justify-content: flex-end;
  border-top: 1px solid rgba(217, 227, 238, 0.72);
  padding-top: 10px;
}

.access-user-actions .button {
  min-height: 36px;
  padding: 0 10px;
  font-size: 12px;
}

.access-user-actions .button span {
  width: 18px;
  height: 18px;
  flex-basis: 18px;
  font-size: 10px;
}

.access-role-overview {
  display: grid;
  gap: 12px;
  margin-bottom: 14px;
  border: 1px solid rgba(11, 123, 117, 0.18);
  border-radius: var(--radius);
  background: linear-gradient(180deg, #f0fbf8, #ffffff);
  padding: 14px;
}

.access-role-copy {
  display: grid;
  gap: 5px;
}

.access-role-copy strong {
  color: var(--text);
  font-size: 18px;
}

.access-role-copy span {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.permission-checklist {
  display: grid;
  gap: 12px;
  margin-bottom: 14px;
}

.permission-group {
  display: grid;
  gap: 9px;
  border-top: 1px solid rgba(217, 227, 238, 0.82);
  padding-top: 12px;
}

.permission-group:first-child {
  border-top: 0;
  padding-top: 0;
}

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

.permission-group-heading strong {
  color: var(--text);
  font-size: 14px;
}

.permission-group-heading span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 760;
}

.permission-group-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px;
}

.permission-check {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  min-height: 58px;
  border: 1px solid rgba(217, 227, 238, 0.92);
  border-radius: var(--radius);
  background: #ffffff;
  padding: 10px;
}

.permission-check input {
  width: 16px;
  height: 16px;
  min-height: auto;
  margin-top: 2px;
  accent-color: var(--green);
}

.permission-check strong {
  display: block;
  color: var(--text);
  font-size: 13px;
  line-height: 1.3;
}

.permission-check span {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 720;
  overflow-wrap: anywhere;
}

.access-role-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border-top: 1px solid rgba(217, 227, 238, 0.82);
  padding-top: 14px;
}

.access-role-footer > span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 760;
}

.listing-keywords {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  min-height: 40px;
  margin-bottom: 14px;
}

.listing-keyword-chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 34px;
  border: 1px solid rgba(11, 123, 117, 0.2);
  border-radius: 999px;
  background: linear-gradient(180deg, #ecfbf7, #dff7ef);
  color: var(--green);
  padding: 0 11px;
  font-weight: 820;
}

.listing-keyword-chip small {
  color: var(--muted);
  font-weight: 760;
}

.listing-advice-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}

.listing-advice-grid article {
  min-width: 0;
  border: 1px solid rgba(217, 227, 238, 0.92);
  border-radius: var(--radius);
  background: linear-gradient(180deg, #ffffff, #fbfdff);
  padding: 14px;
}

.listing-advice-grid h3 {
  margin: 0 0 10px;
  color: var(--text);
  font-size: 15px;
}

.listing-advice-grid ul {
  display: grid;
  gap: 9px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.listing-advice-grid li {
  position: relative;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.48;
  overflow-wrap: anywhere;
  padding-left: 15px;
}

.listing-advice-grid li::before {
  position: absolute;
  left: 0;
  top: 0.6em;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--blue);
  content: "";
}

.product-finder-panel {
  margin-bottom: 18px;
  background:
    linear-gradient(135deg, rgba(15, 118, 110, 0.07), transparent 38%),
    rgba(255, 255, 255, 0.96);
}

.product-sales-form {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) minmax(150px, 0.28fr) minmax(140px, 0.25fr) auto;
  gap: 14px;
  align-items: end;
  margin-bottom: 16px;
}

.product-sales-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}

.product-sales-summary article {
  position: relative;
  min-height: 94px;
  overflow: hidden;
  border: 1px solid rgba(217, 227, 238, 0.92);
  border-radius: var(--radius);
  background: linear-gradient(180deg, #ffffff, #fbfdff);
  padding: 14px;
}

.product-sales-summary article::before {
  position: absolute;
  inset: 0 auto 0 0;
  width: 4px;
  background: linear-gradient(180deg, var(--green), var(--blue));
  content: "";
}

.product-sales-summary small {
  color: var(--muted);
  font-weight: 760;
}

.product-sales-summary strong {
  display: block;
  margin-top: 10px;
  overflow: hidden;
  color: var(--text);
  font-size: 22px;
  line-height: 1.12;
  text-overflow: ellipsis;
  white-space: nowrap;
}

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

.product-sales-card {
  min-width: 0;
  overflow: hidden;
  border: 1px solid rgba(217, 227, 238, 0.92);
  border-radius: var(--radius);
  background: #ffffff;
  box-shadow: 0 14px 34px rgba(15, 23, 42, 0.06);
}

.product-sales-image {
  width: 100%;
  aspect-ratio: 4 / 3;
  background: #eef5f7;
  object-fit: cover;
}

.product-sales-body {
  display: grid;
  gap: 10px;
  padding: 14px;
}

.product-sales-rank {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.rank-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 36px;
  height: 28px;
  border-radius: 999px;
  background: #e0f2fe;
  color: var(--blue);
  font-size: 13px;
  font-weight: 900;
}

.sales-number {
  color: var(--green);
  font-size: 20px;
  font-weight: 900;
}

.product-sales-title {
  display: -webkit-box;
  min-height: 42px;
  margin: 0;
  overflow: hidden;
  color: var(--text);
  font-size: 15px;
  line-height: 1.38;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.product-sales-meta,
.product-sales-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 760;
}

.product-sales-stats span {
  border-radius: 999px;
  background: #f3f7fa;
  padding: 6px 9px;
}

.product-sales-empty {
  grid-column: 1 / -1;
  border: 1px dashed rgba(148, 163, 184, 0.45);
  border-radius: var(--radius);
  color: var(--muted);
  padding: 28px;
  text-align: center;
}

.review-panel {
  margin-bottom: 18px;
  background:
    linear-gradient(135deg, rgba(45, 108, 223, 0.055), transparent 36%),
    rgba(255, 255, 255, 0.96);
}

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

.review-search-form {
  display: grid;
  grid-template-columns: minmax(240px, 1fr) minmax(150px, 0.36fr) minmax(180px, 0.42fr) minmax(130px, 0.3fr) auto;
  gap: 14px;
  align-items: end;
  margin-bottom: 16px;
}

.review-source-note {
  margin: -2px 0 16px;
  border: 1px solid rgba(46, 125, 50, 0.18);
  border-radius: var(--radius);
  background: rgba(46, 125, 50, 0.08);
  color: #285737;
  padding: 11px 13px;
  font-size: 13px;
  font-weight: 760;
  line-height: 1.5;
}

.review-source-note.warning {
  border-color: rgba(179, 84, 0, 0.2);
  background: rgba(255, 246, 230, 0.92);
  color: #7b4615;
}

.review-source-note[hidden] {
  display: none;
}

.review-summary-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}

.review-summary-grid article,
.review-card {
  border: 1px solid rgba(217, 227, 238, 0.92);
  border-radius: var(--radius);
  background: linear-gradient(180deg, #ffffff, #fbfdff);
}

.review-summary-grid article {
  position: relative;
  display: grid;
  gap: 7px;
  min-height: 96px;
  overflow: hidden;
  padding: 14px;
}

.review-summary-grid article::before {
  position: absolute;
  inset: 0 auto 0 0;
  width: 4px;
  background: linear-gradient(180deg, var(--blue), var(--green));
  content: "";
}

.review-summary-grid small {
  color: var(--muted);
  font-weight: 760;
}

.review-summary-grid strong {
  overflow: hidden;
  color: var(--text);
  font-size: 22px;
  line-height: 1.12;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#reviewProductMetric {
  display: -webkit-box;
  font-size: 20px;
  line-height: 1.18;
  white-space: normal;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.review-grid {
  display: grid;
  grid-template-columns: minmax(260px, 0.72fr) minmax(320px, 1fr);
  gap: 16px;
}

.review-card {
  min-width: 0;
  padding: 16px;
}

.review-list-card {
  grid-column: 1 / -1;
}

.sentiment-card {
  grid-column: 1 / -1;
}

.subheading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.subheading h3 {
  margin: 0;
  font-size: 16px;
  line-height: 1.2;
}

.subheading > span {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  border-radius: 999px;
  background: var(--surface-soft);
  color: var(--muted);
  padding: 0 9px;
  font-size: 12px;
  font-weight: 760;
  white-space: nowrap;
}

.subheading label {
  min-width: 150px;
}

.rating-bars {
  display: grid;
  gap: 12px;
}

.rating-row {
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr) 72px;
  gap: 10px;
  align-items: center;
  color: var(--muted);
  font-size: 13px;
}

.rating-row strong {
  color: var(--text);
}

.rating-track {
  height: 12px;
  border-radius: 999px;
  background: #e7eef6;
  overflow: hidden;
}

.rating-fill {
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, #0b7b75, #2d6cdf);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.32) inset;
}

.star-filter {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.star-filter button {
  min-height: 30px;
  border: 1px solid rgba(217, 227, 238, 0.96);
  border-radius: 999px;
  background: linear-gradient(180deg, #ffffff, #f7fafc);
  color: var(--muted);
  padding: 0 10px;
  font-size: 12px;
  font-weight: 780;
}

.star-filter button.is-selected {
  border-color: rgba(37, 99, 235, 0.28);
  background: var(--blue-soft);
  color: var(--blue);
}

.keyword-cloud {
  display: flex;
  align-content: flex-start;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  min-height: 188px;
}

.keyword-chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 34px;
  border: 1px solid rgba(45, 108, 223, 0.18);
  border-radius: 999px;
  background: linear-gradient(180deg, #eef5ff, #e6f0ff);
  color: var(--blue);
  padding: 0 11px;
  box-shadow: 0 8px 16px rgba(45, 108, 223, 0.08);
  font-weight: 800;
}

.keyword-chip small {
  color: var(--muted);
  font-weight: 760;
}

.review-list {
  display: grid;
  gap: 10px;
  max-height: 390px;
  overflow: auto;
  padding-right: 4px;
}

.review-item {
  display: grid;
  gap: 7px;
  border: 1px solid rgba(217, 227, 238, 0.92);
  border-radius: var(--radius);
  background: linear-gradient(180deg, #ffffff, #fbfdff);
  padding: 12px;
  transition:
    border-color 150ms ease,
    box-shadow 150ms ease,
    transform 150ms ease;
}

.review-item:hover {
  border-color: rgba(45, 108, 223, 0.24);
  box-shadow: 0 12px 26px rgba(30, 41, 59, 0.08);
  transform: translateY(-1px);
}

.review-item-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.review-stars {
  color: var(--amber);
  font-size: 13px;
  font-weight: 900;
  white-space: nowrap;
}

.review-item strong {
  overflow: hidden;
  color: var(--text);
  font-size: 14px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.review-item p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.48;
}

.review-meta {
  color: var(--faint);
  font-size: 12px;
}

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

.table-panel,
.contract-panel {
  margin-bottom: 18px;
}

.table-heading {
  align-items: flex-end;
}

.table-tools label {
  min-width: 160px;
}

.table-tools label:first-child {
  min-width: 230px;
}

.table-wrap {
  overflow: auto;
  border: 1px solid rgba(217, 227, 238, 0.92);
  border-radius: var(--radius);
  background: #ffffff;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

table {
  width: 100%;
  min-width: 1030px;
  border-collapse: collapse;
}

th,
td {
  border-bottom: 1px solid var(--line);
  padding: 12px;
  text-align: left;
  vertical-align: middle;
}

th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: #f5f8fb;
  color: var(--muted);
  font-size: 12px;
  font-weight: 820;
}

th:first-child,
td:first-child {
  position: sticky;
  left: 0;
  z-index: 2;
  box-shadow: 1px 0 0 var(--line);
}

th:first-child {
  z-index: 3;
}

td:first-child {
  background: #ffffff;
}

tbody tr:hover td:first-child {
  background: #f2f6ff;
}

td {
  color: var(--text);
  font-size: 13px;
}

tbody tr:hover {
  background: rgba(232, 240, 255, 0.46);
}

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

td .sku {
  display: block;
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 760;
}

td .asin {
  display: block;
  margin-top: 3px;
  color: var(--faint);
  font-family: var(--mono);
  font-size: 11px;
}

.channel-chip {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  border-radius: 999px;
  background: #eef5ff;
  color: var(--blue);
  padding: 0 8px;
  font-size: 12px;
  font-weight: 760;
}

.contract-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(260px, 0.7fr);
  gap: 16px;
}

pre {
  overflow: auto;
  min-height: 280px;
  max-height: 480px;
  margin: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #101820;
  color: #e8f0f7;
  padding: 16px;
}

code {
  font-family: var(--mono);
  font-size: 12px;
  line-height: 1.65;
}

.contract-notes {
  display: grid;
  gap: 12px;
  align-content: start;
}

.contract-notes article {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #ffffff;
  padding: 14px;
}

.contract-notes strong {
  display: block;
  margin-bottom: 6px;
}

.contract-notes p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
}

.toast {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 20;
  max-width: min(420px, calc(100vw - 32px));
  border: 1px solid rgba(22, 32, 42, 0.14);
  border-radius: var(--radius);
  background: #101820;
  color: #ffffff;
  padding: 12px 14px;
  box-shadow: 0 22px 48px rgba(16, 24, 32, 0.22);
  line-height: 1.45;
  opacity: 0;
  pointer-events: none;
  transform: translateY(10px);
  transition:
    opacity 160ms ease,
    transform 160ms ease;
}

.toast.is-visible {
  opacity: 1;
  transform: translateY(0);
}

@media (max-width: 1240px) {
  .platform-options {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .app-shell {
    grid-template-columns: 248px minmax(0, 1fr);
  }

  .connector-form {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

  .analytics-grid {
    grid-template-columns: minmax(0, 1fr) minmax(280px, 0.8fr);
  }

  .insight-panel {
    grid-column: 1 / -1;
  }

  .decision-grid,
  .automation-grid,
  .access-grid,
  .home-layout,
  .home-bottom-grid {
    grid-template-columns: 1fr;
  }

  .home-overview-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .profit-summary-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .review-search-form,
  .product-sales-form,
  .access-user-form,
  .product-sales-summary,
  .access-summary-grid,
  .review-summary-grid,
  .review-grid,
  .product-sales-results {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .product-sales-form .button,
  .access-user-form .button,
  .review-search-form .button,
  .review-list-card {
    grid-column: 1 / -1;
  }

  .access-list-head {
    grid-template-columns: minmax(0, 1fr);
  }

  .access-list-head span:last-child {
    display: none;
  }
}

@media (max-width: 920px) {
  html {
    scroll-padding-top: 104px;
  }

  .platform-gateway {
    padding: 18px;
  }

  .app-shell {
    display: block;
  }

  .sidebar {
    position: sticky;
    z-index: 15;
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 10px 12px;
    height: auto;
    border-right: 0;
    border-bottom: 1px solid rgba(217, 227, 238, 0.92);
    background: rgba(255, 255, 255, 0.94);
    box-shadow: 0 10px 24px rgba(30, 41, 59, 0.08);
    padding: 12px 16px 10px;
  }

  .brand {
    grid-column: 1 / -1;
    min-height: 38px;
  }

  .brand-mark {
    flex-basis: 36px;
    width: 36px;
    height: 36px;
    border-radius: 9px;
  }

  .brand strong {
    font-size: 16px;
  }

  .brand small {
    display: none;
  }

  .side-nav {
    grid-column: 1 / -1;
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding-bottom: 4px;
  }

  .nav-group {
    display: flex;
    flex: 0 0 auto;
    gap: 8px;
  }

  .nav-group-toggle {
    display: none;
  }

  .nav-group-list,
  .nav-group.is-collapsed .nav-group-list {
    display: flex;
    gap: 8px;
    max-height: none;
    margin-left: 0;
    border-left: 0;
    padding-left: 0;
    opacity: 1;
    overflow: visible;
    pointer-events: auto;
  }

  .side-nav a {
    flex: 0 0 auto;
    min-height: 38px;
    padding: 0 11px;
  }

  .nav-icon {
    width: 24px;
    height: 24px;
  }

  .side-card {
    display: none;
  }

  .checklist {
    margin-top: 0;
  }

  .topbar,
  .workspace-grid,
  .analytics-grid,
  .decision-grid,
  .automation-grid,
  .review-search-form,
  .review-summary-grid,
  .review-grid,
  .contract-grid {
    display: grid;
    grid-template-columns: 1fr;
  }

  .topbar {
    padding: 18px;
  }

  h1 {
    font-size: 34px;
  }

  .topbar-actions,
  .form-actions,
  .review-actions {
    justify-content: flex-start;
  }

  .table-heading {
    display: grid;
  }
}

@media (max-width: 640px) {
  .platform-gateway-panel {
    padding: 18px;
  }

  .platform-gateway-header,
  .platform-options,
  .platform-gateway-footer {
    grid-template-columns: 1fr;
  }

  .platform-gateway-header,
  .platform-gateway-footer {
    display: grid;
  }

  .brand-mark.platform-brand-mark {
    width: 46px;
    height: 46px;
    border-radius: 12px;
  }

  .platform-option {
    min-height: 96px;
  }

  .workspace,
  .sidebar {
    padding: 14px;
  }

  .workspace {
    padding-top: 12px;
  }

  .sidebar {
    padding-bottom: 10px;
  }

  h1 {
    font-size: 30px;
    line-height: 1.08;
  }

  .topbar {
    padding: 14px;
  }

  .panel {
    padding: 14px;
  }

  .metric-card strong {
    font-size: 25px;
  }

  .connector-form,
  .product-sales-form,
  .access-user-form,
  .access-user-row,
  .access-list-head,
  .product-sales-summary,
  .access-summary-grid,
  .profit-summary-grid,
  .inventory-summary-grid,
  .action-summary-grid,
  .sentiment-summary,
  .home-profile-list,
  .home-overview-grid,
  .home-shortcut-grid,
  .home-recommend-grid,
  .product-sales-results,
  .permission-checklist,
  .permission-group-list {
    grid-template-columns: 1fr;
  }

  .metrics-grid,
  .review-summary-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .connector-form label:first-child {
    grid-column: auto;
  }

  .panel-heading {
    display: grid;
  }

  .topbar-actions,
  .table-tools,
  .review-actions {
    display: grid;
    width: 100%;
    justify-content: stretch;
  }

  .form-actions {
    justify-content: stretch;
  }

  .topbar-actions {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .topbar-actions .button.secondary {
    grid-column: 1 / -1;
  }

  .button,
  .file-button,
  .table-tools label,
  .product-sales-form .button,
  .review-search-form .button {
    width: 100%;
  }

  .subheading {
    display: grid;
  }

  .star-filter {
    justify-content: flex-start;
  }

  .cost-row,
  .issue-row {
    grid-template-columns: 1fr;
  }

  .sku-profit-row-top,
  .inventory-row-top,
  .action-task-header,
  .access-user-name-line,
  .access-role-footer {
    display: grid;
  }

  .sku-profit-row-top span,
  .inventory-row-top span {
    text-align: left;
  }

  .action-task-title strong {
    white-space: normal;
  }

  .access-user-actions {
    justify-content: stretch;
  }

  .access-user-actions .button,
  .access-role-footer .button {
    width: 100%;
  }

  .segmented {
    width: 100%;
  }

  .chart-wrap,
  canvas {
    min-height: 240px;
  }

  table {
    min-width: 960px;
  }
}

@media (max-width: 360px) {
  .metrics-grid,
  .review-summary-grid {
    grid-template-columns: 1fr;
  }

  .brand {
    gap: 9px;
  }

  .side-nav a {
    gap: 8px;
  }

  .topbar-actions,
  .form-actions,
  .review-actions {
    gap: 8px;
  }
}
