/* 引入字体 */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

:root {
  color-scheme: light;

  /* ===== 供货商定价中心规范色阶 ===== */
  --brand-900: #044C03;
  --brand-800: #056B04;
  --brand-700: #078505;
  --brand-600: #09BA07;
  --brand-500: #35C233;
  --brand-400: #52D450;
  --brand-200: #C3F0BC;
  --brand-100: #E2F8DE;
  --brand-050: #F2FCEE;

  --ink-900: #1A2029;
  --ink-800: #2A3240;
  --ink-700: #48505E;
  --ink-600: #5F6672;
  --ink-500: #7B8492;
  --ink-300: #C9D0DA;
  --ink-200: #E6EAF0;
  --ink-100: #F2F4F7;

  --page-base: #F6F8FB;
  --surface-base: #FFFFFF;
  --surface-soft: #FBFCFE;
  --radius-control: 14px;
  --radius-card: 24px;
  --radius-pill: 999px;
  --shadow-card: 0 8px 24px rgba(20, 28, 39, 0.06);
  --shadow-floating: 0 16px 40px rgba(20, 28, 39, 0.10);
  --shadow-modal: 0 24px 64px rgba(20, 28, 39, 0.18);
  --focus-ring-brand: 0 0 0 4px rgba(9, 186, 7, 0.10);

  /* ===== 品牌色 ===== */
  --color-brand:        #09BA07;
  --color-brand-dark:   #07A005;
  --color-brand-subtle: rgba(9, 186, 7, 0.10);
  --color-brand-ghost:  rgba(9, 186, 7, 0.06);
  --color-brand-light:  #52D450;

  /* ===== AI 专属色 ===== */
  --color-ai-bubble:      #F0FBF0;
  --color-ai-grad-start:  #09BA07;
  --color-ai-grad-end:    #52D450;
  --color-user-bubble:    #F4F5F7;
  --color-stream-cursor:  #09BA07;
  --color-ai-overlay:     rgba(0,0,0,0.55);

  /* ===== 语义色（含 -bg / -text 三档）===== */
  --color-error:         #FA5151;
  --color-error-bg:      #FFF2F2;
  --color-error-text:    #D93025;

  --color-warning:       #F86D10;
  --color-warning-bg:    #FFF7F0;
  --color-warning-text:  #C95500;

  --color-info:          #3388FF;
  --color-info-bg:       #F0F7FF;
  --color-info-text:     #0057CC;

  --color-success:       #12B76A;
  --color-success-bg:    #ECFDF3;
  --color-success-text:  #027A48;

  /* ===== 文字色 ===== */
  --text-primary:   #1A2029;
  --text-secondary: #48505E;
  --text-tertiary:  #5F6672;
  --text-disabled:  rgba(0, 0, 0, 0.25);

  /* ===== 描边 ===== */
  --border-strong: rgba(26, 32, 41, 0.14);
  --border-weak:   rgba(26, 32, 41, 0.08);

  /* ===== 填充色 ===== */
  --fill-page:    #F6F8FB;
  --fill-card:    #FFFFFF;
  --fill-control: #FFFFFF;
  --fill-hover:   #F2F4F7;

  /* ===== 渐变 ===== */
  --gradient-ai:           linear-gradient(135deg, #09BA07 0%, #52D450 100%);
  --gradient-brand-banner: linear-gradient(90deg, #07A005 0%, #09BA07 50%, #52D450 100%);
  --gradient-stream:       linear-gradient(90deg, #09BA07, #52D450, #09BA07);

  /* ===== 字体 ===== */
  --font-sans:    'Inter', 'PingFang SC', 'Microsoft YaHei UI', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono:    'JetBrains Mono', 'Fira Code', 'SF Mono', Menlo, Consolas, 'Courier New', monospace;
  --font-numeric: 'Altinn-DIN', 'DIN Pro', 'Inter', sans-serif;

  /* ===== 字号 ===== */
  --text-display: clamp(2rem, 5vw, 3rem);        /* 32px - 48px */
  --text-h1:      clamp(1.5rem, 4vw, 2.25rem);   /* 24px - 36px */
  --text-h2:      clamp(1.25rem, 3vw, 1.75rem);  /* 20px - 28px */
  --text-h3:      clamp(1.125rem, 2.5vw, 1.375rem); /* 18px - 22px */
  --text-h4:      clamp(1rem, 2vw, 1.125rem);    /* 16px - 18px */
  --text-body-lg: clamp(0.875rem, 1.5vw, 1rem);  /* 14px - 16px */
  --text-body:    clamp(0.8125rem, 1.4vw, 0.875rem); /* 13px - 14px */
  --text-body-sm: clamp(0.75rem, 1.3vw, 0.8125rem);  /* 12px - 13px */
  --text-label:   clamp(0.75rem, 1.2vw, 0.8125rem);  /* 12px - 13px */
  --text-caption: clamp(0.75rem, 1.2vw, 0.8125rem);  /* 12px - 13px */

  /* ===== 数字字号 ===== */
  --text-num-display: clamp(1.75rem, 4.5vw, 2.625rem); /* 28px - 42px */
  --text-num-stat:    clamp(1.5rem, 4vw, 2.25rem);     /* 24px - 36px */
  --text-num-h2:      clamp(1.25rem, 3vw, 1.75rem);    /* 20px - 28px */
  --text-num-body:    clamp(0.875rem, 1.5vw, 1rem);    /* 14px - 16px */

  /* ===== 间距 ===== */
  --space-2xs:  2px;
  --space-xs:   4px;
  --space-sm:   clamp(6px, 1vw, 8px);
  --space-md:   clamp(8px, 1.5vw, 12px);
  --space-base: clamp(12px, 2vw, 16px);
  --space-lg:   clamp(16px, 2.5vw, 20px);
  --space-xl:   clamp(20px, 3vw, 24px);
  --space-2xl:  clamp(24px, 4vw, 32px);
  --space-3xl:  clamp(32px, 6vw, 48px);
  --space-4xl:  clamp(48px, 8vw, 64px);
  --space-5xl:  clamp(64px, 12vw, 96px);

  /* ===== 容器宽度 ===== */
  --container-chat:    760px;
  --container-content: 1024px;
  --container-layout:  1280px;
  --container-full:    1440px;
  --container-margin:  24px;

  /* ===== 圆角 ===== */
  --radius-none: 0;
  --radius-xs:   4px;
  --radius-sm:   6px;
  --radius-md:   8px;
  --radius-lg:   12px;
  --radius-xl:   16px;
  --radius-2xl:  24px;
  --radius-3xl:  32px;
  --radius-full: 9999px;

  /* ===== 阴影（双层叠加）===== */
  --shadow-xs:      0 1px 2px rgba(0,0,0,0.06), 0 1px 1px rgba(0,0,0,0.04);
  --shadow-sm:      0 2px 6px rgba(0,0,0,0.06), 0 1px 2px rgba(0,0,0,0.08);
  --shadow-md:      0 4px 14px rgba(0,0,0,0.08), 0 2px 4px rgba(0,0,0,0.06);
  --shadow-lg:      0 8px 24px rgba(0,0,0,0.10), 0 3px 8px rgba(0,0,0,0.07);
  --shadow-xl:      0 16px 40px rgba(0,0,0,0.12), 0 6px 14px rgba(0,0,0,0.08);
  --shadow-2xl:     0 24px 60px rgba(0,0,0,0.16), 0 10px 20px rgba(0,0,0,0.10);
  --shadow-brand:   0 4px 16px rgba(9,186,7,0.30), 0 1px 4px rgba(9,186,7,0.20);
  --shadow-ai-glow: 0 0 20px rgba(9,186,7,0.20), 0 0 6px rgba(9,186,7,0.30);
  --shadow-inset:   inset 0 1px 3px rgba(0,0,0,0.10);

  /* ===== 缓动 ===== */
  --ease-standard: cubic-bezier(0.4, 0, 0.2, 1);
  --ease-enter:    cubic-bezier(0.0, 0, 0.2, 1);
  --ease-exit:     cubic-bezier(0.4, 0, 1, 1);
  --ease-spring:   cubic-bezier(0.34, 1.56, 0.64, 1);
  --ease-ai:       cubic-bezier(0.25, 0.46, 0.45, 0.94);

  /* ===== 时长 ===== */
  --duration-instant: 100ms;
  --duration-fast:    150ms;
  --duration-normal:  200ms;
  --duration-slow:    300ms;
  --duration-slower:  400ms;
  --duration-stream:  600ms;

  /* ===== Skeleton ===== */
  --skeleton-base:    rgba(0, 0, 0, 0.08);
  --skeleton-shimmer: rgba(0, 0, 0, 0.04);

  /* ===== 断点 ===== */
  --bp-xs:  480px;
  --bp-sm:  768px;
  --bp-md:  1024px;
  --bp-lg:  1280px;
  --bp-xl:  1536px;

  /* compatibility aliases for existing styles */
  --bg: var(--fill-page);
  --bg-strong: #eff4ef;
  --panel: var(--surface-base);
  --panel-strong: var(--surface-base);
  --ink: var(--text-primary);
  --muted: var(--text-secondary);
  --line: var(--border-weak);
  --brand: var(--brand-700);
  --brand-2: var(--brand-600);
  --accent: var(--color-warning);
  --danger: var(--color-error);
  --shadow: var(--shadow-floating);

  --scrollbar-thumb: rgba(26, 32, 41, 0.22);
  --scrollbar-thumb-strong: rgba(26, 32, 41, 0.34);
  --scrollbar-track: transparent;
}

/* ===== 动效组件 ===== */
@keyframes cursor-blink {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0; }
}

.stream-cursor {
  display: inline-block;
  width: 2px;
  height: 1.1em;
  background: var(--color-stream-cursor);
  border-radius: 1px;
  opacity: 0.72;
  vertical-align: text-bottom;
}

.chat-stream-cursor-line {
  display: flex;
  align-items: center;
  min-height: 16px;
  margin-top: 6px;
}

@keyframes shimmer {
  0%   { background-position: -200% center; }
  100% { background-position: 200% center; }
}

.shimmer-bar {
  height: 4px;
  background: linear-gradient(
    90deg,
    rgba(9,186,7,0.15) 0%,
    #09BA07 50%,
    rgba(9,186,7,0.15) 100%
  );
  background-size: 50% 100%;
  animation: shimmer 1.6s ease infinite;
  border-radius: 2px;
}

@keyframes pulse-dot {
  0%, 80%, 100% { transform: scale(0.6); opacity: 0.4; }
  40%           { transform: scale(1.0); opacity: 1.0; }
}

@keyframes chat-thinking-spin {
  to { transform: rotate(360deg); }
}

@keyframes chat-thinking-breathe {
  0%, 100% { opacity: 1; }
  50%      { opacity: 0.62; }
}

.ai-thinking-dots span {
  display: inline-block;
  width: 8px;
  height: 8px;
  background: var(--color-brand);
  border-radius: 50%;
  animation: pulse-dot 1.4s ease-in-out infinite;
}

.ai-thinking-dots span:nth-child(2) { animation-delay: 0.2s; }
.ai-thinking-dots span:nth-child(3) { animation-delay: 0.4s; }

@keyframes token-fade {
  0%   { opacity: 0; transform: translateY(2px); }
  100% { opacity: 1; transform: translateY(0); }
}

.stream-token {
  animation: token-fade var(--duration-stream, 600ms) var(--ease-ai);
}

/* ===== Skeleton 骨架屏 ===== */
@keyframes skeleton-wave {
  0%   { background-position: -200px 0; }
  100% { background-position: calc(200px + 100%) 0; }
}

.skeleton {
  background: linear-gradient(
    90deg,
    var(--skeleton-base) 25%,
    var(--skeleton-shimmer) 50%,
    var(--skeleton-base) 75%
  );
  background-size: 400px 100%;
  animation: skeleton-wave 1.4s ease infinite;
  border-radius: var(--radius-md);
}

/* ===== 无障碍动效降级 ===== */
@layer base {
  @media (prefers-reduced-motion: reduce) {
    .stream-cursor,
    .ai-avatar-thinking,
    .skeleton,
    .card-enter,
    .stream-token,
    .chat-thinking-spinner,
    .chat-thinking-step.is-active span {
      animation: none !important;
      transition: none !important;
    }
    .stream-cursor { opacity: 1; }
    .page-transition { transition-duration: 1ms; }
  }
}

/* ===== 响应式容器宽度 ===== */
@media (max-width: 767px) {
  :root {
    --container-margin: 16px;
    --container-chat:    100%;
  }
}

@media (min-width: 768px) and (max-width: 1023px) {
  :root {
    --container-margin: 24px;
    --container-chat:    100%;
  }
}

@media (min-width: 1024px) {
  :root {
    --container-margin: 24px;
    --container-chat:    760px;
  }
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html,
body {
  margin: 0;
  height: 100%;
  min-height: 100%;
  color-scheme: light;
}

body {
  font-family: var(--font-sans);
  font-size: var(--text-body);
  line-height: 1.6;
  color: var(--text-primary);
  background:
    radial-gradient(circle at 0% 0%, rgba(9, 186, 7, 0.16), transparent 24%),
    radial-gradient(circle at 100% 0%, rgba(82, 212, 80, 0.12), transparent 20%),
    linear-gradient(180deg, var(--fill-page), var(--bg-strong));
  overflow: hidden;
}

/* 基础排版 */
h1 {
  font-size: var(--text-h1);
  font-weight: 600;
  line-height: 1.3;
  color: var(--text-primary);
}

h2 {
  font-size: var(--text-h2);
  font-weight: 600;
  line-height: 1.35;
  color: var(--text-primary);
}

h3 {
  font-size: var(--text-h3);
  font-weight: 500;
  line-height: 1.4;
  color: var(--text-primary);
}

h4 {
  font-size: var(--text-h4);
  font-weight: 500;
  line-height: 1.5;
  color: var(--text-primary);
}

p {
  font-size: var(--text-body);
  line-height: 1.6;
  color: var(--text-secondary);
}

/* 数字字体 */
.num {
  font-family: var(--font-numeric);
  font-variant-numeric: tabular-nums;
}

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

/* 按钮样式矩阵 */
button {
  border: none;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: transform var(--duration-fast) var(--ease-standard),
              box-shadow var(--duration-fast) var(--ease-standard),
              opacity var(--duration-fast) var(--ease-standard),
              background-color var(--duration-fast) var(--ease-standard);
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

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

button:focus {
  outline: none;
}

button:focus-visible {
  outline: 3px solid var(--color-brand);
  outline-offset: 2px;
}

button:disabled {
  opacity: 0.38;
  cursor: not-allowed;
  pointer-events: none;
  transform: none;
  box-shadow: none;
}

/* 按钮尺寸 */
.btn-xl {
  height: 52px;
  font-size: 17px;
  padding: 0 28px;
}

.btn-lg {
  height: 44px;
  font-size: 15px;
  padding: 0 24px;
}

.btn-md {
  height: 36px;
  font-size: 14px;
  padding: 0 20px;
}

.btn-sm {
  height: 30px;
  font-size: 13px;
  padding: 0 16px;
}

.btn-xs {
  height: 24px;
  font-size: 12px;
  padding: 0 12px;
}

/* 按钮变体 */
button[type="submit"],
.btn-primary {
  background: var(--color-brand);
  color: white;
  box-shadow: none;
}

button[type="submit"]:hover,
.btn-primary:hover {
  background: var(--color-brand-dark);
  box-shadow: none;
}

button[type="submit"]:active,
.btn-primary:active {
  transform: scale(0.98);
}

.btn-secondary {
  background: white;
  color: var(--color-brand);
  border: 1px solid var(--color-brand);
  box-shadow: var(--shadow-xs);
}

.btn-secondary:hover {
  background: var(--color-brand-subtle);
}

.btn-ghost {
  background: transparent;
  color: var(--text-primary);
  border: 1px solid var(--border-weak);
}

.btn-ghost:hover {
  background: var(--fill-hover);
}

.btn-danger {
  background: var(--color-error);
  color: white;
  box-shadow: var(--shadow-sm);
}

.btn-danger:hover {
  background: var(--color-error-text);
}

.btn-ai {
  background: var(--gradient-ai);
  color: white;
  box-shadow: var(--shadow-sm);
}

.btn-ai:hover {
  box-shadow: var(--shadow-ai-glow);
}

/* 链接按钮 */
.link-button {
  background: transparent;
  color: var(--color-brand);
  padding: 0;
  font-weight: 700;
  border-radius: 0;
}

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

/* 输入框样式 */
input,
textarea,
select {
  width: 100%;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-weak);
  background: var(--fill-control);
  padding: 12px 16px;
  color: var(--text-primary);
  transition: border-color var(--duration-fast) var(--ease-standard),
              box-shadow var(--duration-fast) var(--ease-standard),
              background-color var(--duration-fast) var(--ease-standard);
}

input:hover,
textarea:hover,
select:hover {
  border-color: var(--border-strong);
}

input:focus,
textarea:focus,
select:focus {
  outline: none;
  border-color: var(--color-brand);
  background: var(--fill-card);
  box-shadow: 0 0 0 3px var(--color-brand-subtle);
}

input:invalid,
textarea:invalid,
select:invalid {
  border-color: var(--color-error);
  background: var(--color-error-bg);
  box-shadow: 0 0 0 3px var(--color-error-bg);
}

input:disabled,
textarea:disabled,
select:disabled {
  border-color: var(--border-weak);
  background: var(--fill-page);
  cursor: not-allowed;
  opacity: 0.55;
}

textarea {
  resize: vertical;
  min-height: 112px;
  line-height: 1.6;
}

/* 页面布局 */
.page-shell {
  width: min(1400px, calc(100% - 32px));
  margin: 0 auto;
  padding: 16px 0 16px;
}

.hero {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 20px;
  padding: 12px 16px;
  border-radius: var(--radius-xl);
  background:
    linear-gradient(135deg, rgba(255, 250, 241, 0.95), rgba(236, 245, 239, 0.92)),
    var(--panel);
  border: 1px solid rgba(255, 255, 255, 0.8);
  box-shadow: var(--shadow-sm);
  transition: all var(--duration-normal) var(--ease-standard);
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(9, 186, 7, 0.08), transparent 70%);
  border-radius: var(--radius-2xl);
}

.hero::after {
  content: "";
  position: absolute;
  inset: auto -40px -40px auto;
  width: 180px;
  height: 180px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(201, 138, 10, 0.15), transparent 60%);
  animation: float 6s ease-in-out infinite;
}

@keyframes float {
  0%, 100% { transform: translateY(0) scale(1); }
  50% { transform: translateY(-8px) scale(1.05); }
}

.hero-copy {
  position: relative;
  z-index: 1;
}

.hero-copy h1 {
  margin: 4px 0 4px;
  font-size: clamp(20px, 3vw, 28px);
  line-height: 1.1;
  letter-spacing: -0.01em;
  max-width: 25ch;
  font-weight: 600;
  background: linear-gradient(135deg, var(--text-primary), var(--text-secondary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-copy p {
  max-width: 80ch;
  color: var(--text-secondary);
  line-height: 1.5;
  margin: 0;
  font-size: var(--text-body-sm);
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  border-radius: var(--radius-full);
  padding: 8px 14px;
  background: var(--color-brand-subtle);
  color: var(--color-brand);
  font-size: var(--text-label);
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  box-shadow: 0 2px 8px rgba(9, 186, 7, 0.2);
  transition: all var(--duration-fast) var(--ease-standard);
}

.hero-badge:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(9, 186, 7, 0.3);
}

.hero-side {
  display: flex;
  align-items: flex-start;
  justify-content: flex-end;
  align-self: start;
  min-width: 0;
  position: relative;
  z-index: 1;
}

.dashboard {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 16px;
  margin-top: 16px;
  animation: fadeInUp var(--duration-slow) var(--ease-enter);
  height: min(900px, calc(100svh - 120px));
  min-height: 700px;
  max-width: 1920px;
  margin-left: auto;
  margin-right: auto;
}

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

.panel,
.sub-panel {
  background: var(--panel);
  border: 1px solid rgba(255, 255, 255, 0.8);
  border-radius: var(--radius-2xl);
  box-shadow:
    0 4px 20px rgba(0, 0, 0, 0.08),
    0 1px 4px rgba(0, 0, 0, 0.06),
    inset 0 1px 0 rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(12px);
  transition: all var(--duration-fast) var(--ease-standard);
  overflow: hidden;
}

.panel:hover,
.sub-panel:hover {
  box-shadow:
    0 8px 32px rgba(0, 0, 0, 0.12),
    0 2px 8px rgba(0, 0, 0, 0.1),
    inset 0 1px 0 rgba(255, 255, 255, 0.9);
  transform: translateY(-2px);
  border-color: rgba(255, 255, 255, 0.95);
}

.panel {
  padding: 24px;
}

.panel-title h2,
.detail-header h2,
.sub-panel h3 {
  margin: 0;
}

.panel-title p,
.detail-header p {
  margin: 8px 0 0;
  color: var(--text-secondary);
  line-height: 1.7;
}

.settings-flyout {
  position: relative;
  justify-self: end;
}

.settings-icon-button {
  list-style: none;
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  border-radius: var(--radius-xl);
  background: rgba(255, 255, 255, 0.78);
  border: 1px solid var(--border-weak);
  cursor: pointer;
  transition: all var(--duration-fast) var(--ease-standard);
}

.settings-icon-button:hover {
  background: rgba(255, 255, 255, 0.9);
  box-shadow: var(--shadow-sm);
}

.settings-icon-button::-webkit-details-marker {
  display: none;
}

.settings-icon-button svg {
  width: 20px;
  height: 20px;
  fill: var(--text-primary);
}

.settings-flyout-panel {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  width: min(420px, calc(100vw - 40px));
  padding: 18px;
  border-radius: var(--radius-2xl);
  background: rgba(255, 252, 246, 0.96);
  border: 1px solid var(--border-weak);
  box-shadow: var(--shadow-xl);
  z-index: 20;
}

.settings-flyout-head {
  margin-bottom: 12px;
}

.settings-flyout-head div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.settings-flyout-head strong {
  font-size: 16px;
  font-weight: 600;
}

.settings-flyout-head span {
  color: var(--text-tertiary);
  font-size: var(--text-body-sm);
}

.settings-section {
  display: grid;
  gap: 12px;
  margin-bottom: 18px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--border-weak);
}

.account-flyout-panel .settings-section {
  gap: 14px;
  margin-bottom: 0;
  padding-bottom: 0;
  border-bottom: 0;
}

.account-flyout-panel #qjl-auth-summary {
  display: none;
}

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

.settings-section-head strong {
  font-size: 15px;
  font-weight: 600;
}

.settings-section-head span {
  color: var(--text-tertiary);
  font-size: var(--text-body-sm);
}

.account-card {
  display: grid;
  gap: 12px;
  padding: 14px 16px;
  border-radius: var(--radius-xl);
  background: rgba(255, 255, 255, 0.78);
  border: 1px solid var(--border-weak);
}

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

.homepage-card-avatar,
.homepage-menu-avatar {
  width: 42px !important;
  height: 42px !important;
  max-width: 42px;
  max-height: 42px;
  border-radius: 999px !important;
  overflow: hidden;
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #dfe6ee;
  color: var(--ink-700);
  font-size: 15px;
  font-weight: 700;
  line-height: 1;
}

.homepage-card-avatar img,
.homepage-menu-avatar img {
  width: 100% !important;
  height: 100% !important;
  max-width: 100% !important;
  max-height: 100% !important;
  object-fit: cover;
  border-radius: 999px !important;
  display: block;
}

.account-card .homepage-card-avatar {
  width: 48px !important;
  height: 48px !important;
  max-width: 48px;
  max-height: 48px;
  flex-basis: 48px;
}

.account-card .homepage-card-avatar > img {
  width: 48px !important;
  height: 48px !important;
  max-width: 48px !important;
  max-height: 48px !important;
  border-radius: 999px !important;
}

.account-card-homepage-copy {
  min-width: 0;
  display: grid;
  gap: 2px;
}

.account-card-homepage-copy strong {
  font-size: 15px;
  font-weight: 600;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.account-card-homepage-copy span,
.account-card-stats,
.account-card p {
  color: var(--text-secondary);
}

.account-card-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  font-size: 12px;
  line-height: 18px;
}

.account-card-stats span {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  padding: 2px 8px;
  border-radius: var(--radius-full);
  background: #F8FAFC;
  border: 1px solid rgba(226, 232, 240, 0.86);
  color: var(--ink-700);
  font-weight: 600;
}

.account-card p {
  margin: 0;
  line-height: 1.7;
}

#qjl-profile-summary {
  white-space: pre-line;
}

.qjl-openapi-auth-panel {
  display: grid;
  gap: 16px;
  padding: 18px;
  border-radius: 20px;
  border: 1px solid rgba(9, 186, 7, 0.14);
  background: linear-gradient(180deg, rgba(249, 254, 247, 0.96), rgba(255, 255, 255, 0.98));
}

.qjl-openapi-auth-head {
  display: grid;
  gap: 7px;
}

.qjl-openapi-auth-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-width: 0;
}

.qjl-openapi-auth-head strong {
  min-width: 0;
  color: var(--text-primary);
  font-size: 15px;
  font-weight: 700;
  line-height: 22px;
}

.qjl-openapi-auth-head p,
.qjl-openapi-auth-steps {
  margin: 0;
  color: var(--text-secondary);
  font-size: 13px;
  line-height: 1.62;
}

.qjl-openapi-auth-badge {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 2px 10px;
  border-radius: var(--radius-full);
  background: #fff;
  border: 1px solid var(--border-weak);
  color: var(--text-secondary);
  font-size: 12px;
  font-weight: 700;
}

.qjl-openapi-auth-badge[data-tone="success"] {
  background: var(--color-success-bg);
  border-color: rgba(18, 183, 106, 0.22);
  color: var(--color-success-text);
}

.qjl-openapi-auth-badge[data-tone="warning"] {
  background: var(--color-warning-bg);
  border-color: rgba(248, 109, 16, 0.22);
  color: var(--color-warning-text);
}

.qjl-openapi-auth-guide {
  display: grid;
  gap: 12px;
}

.qjl-openapi-auth-guide a {
  width: fit-content;
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 0 13px;
  border-radius: var(--radius-full);
  background: #fff;
  border: 1px solid rgba(9, 186, 7, 0.2);
  color: var(--brand-700);
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
}

.qjl-openapi-auth-guide a:hover {
  border-color: rgba(9, 186, 7, 0.42);
  background: rgba(242, 252, 238, 0.95);
}

.qjl-openapi-auth-steps {
  counter-reset: qjl-openapi-step;
  display: grid;
  gap: 8px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.qjl-openapi-auth-steps li {
  position: relative;
  min-height: 20px;
  padding-left: 28px;
}

.qjl-openapi-auth-steps li::before {
  position: absolute;
  top: 1px;
  left: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  border: 1px solid rgba(9, 186, 7, 0.18);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.92);
  color: var(--brand-700);
  font-size: 11px;
  font-weight: 700;
  line-height: 1;
  content: counter(qjl-openapi-step);
  counter-increment: qjl-openapi-step;
}

.qjl-openapi-auth-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: end;
  padding-top: 2px;
}

.qjl-openapi-auth-form label {
  min-width: 0;
  gap: 7px;
  color: var(--text-primary);
  font-size: 12px;
  line-height: 18px;
}

.qjl-openapi-auth-form input {
  min-width: 0;
  height: 40px;
  padding: 0 13px;
  border: 1px solid var(--border-weak);
  border-radius: 14px;
  background: #fff;
  color: var(--text-primary);
  font-size: 13px;
  font-weight: 500;
}

.qjl-openapi-auth-form input::placeholder {
  color: var(--text-tertiary);
  font-weight: 500;
}

.qjl-openapi-auth-form .btn-primary {
  min-width: 108px;
  min-height: 40px;
  height: 40px;
  padding: 0 16px;
  border-radius: 14px;
  font-size: 13px;
  white-space: nowrap;
}

.qjl-openapi-auth-status {
  padding: 9px 11px;
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.78);
  border: 1px solid var(--border-weak);
  color: var(--text-secondary);
  font-size: 12px;
  line-height: 1.55;
}

.qjl-openapi-auth-status[data-tone="success"] {
  background: var(--color-success-bg);
  border-color: rgba(18, 183, 106, 0.18);
  color: var(--color-success-text);
}

.qjl-openapi-auth-status[data-tone="error"] {
  background: var(--color-error-bg);
  border-color: rgba(250, 81, 81, 0.18);
  color: var(--color-error-text);
}

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

.account-card-actions {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 8px;
}

.account-card-inline-note {
  min-width: 0;
  color: var(--ink-600);
  font-size: 12px;
  line-height: 18px;
}

.account-card-inline-note[data-tone="success"] {
  color: var(--brand-700);
}

.account-card-action {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 36px;
  padding: 0 16px;
  border: 1px solid rgba(34, 197, 94, 0.28);
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(240, 253, 244, 0.98), rgba(220, 252, 231, 0.92));
  color: #166534;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.01em;
  box-shadow: 0 10px 24px rgba(34, 197, 94, 0.12);
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.account-card-action:hover {
  border-color: rgba(34, 197, 94, 0.44);
  box-shadow: 0 14px 28px rgba(34, 197, 94, 0.16);
  transform: translateY(-1px);
}

.account-card-action:focus-visible {
  outline: 2px solid rgba(34, 197, 94, 0.24);
  outline-offset: 2px;
}

.account-card-subsection {
  display: grid;
  gap: 10px;
  padding: 14px 16px;
  border: 1px solid rgba(226, 232, 240, 0.9);
  border-radius: 16px;
  background: linear-gradient(180deg, rgba(248, 250, 252, 0.96), rgba(241, 245, 249, 0.88));
}

.account-card-subsection-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.account-card-subsection-head strong {
  font-size: 14px;
  font-weight: 700;
  color: var(--ink-900);
}

.account-card-subsection-head span {
  color: var(--text-secondary);
  font-size: 12px;
  line-height: 18px;
}

.account-card-subsection-body {
  display: grid;
  gap: 12px;
}

.account-code-pill-wrap {
  display: grid;
  gap: 6px;
}

.account-code-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: fit-content;
  min-height: 40px;
  padding: 0 14px;
  border-radius: 999px;
  background: #ffffff;
  border: 1px solid rgba(148, 163, 184, 0.32);
  color: var(--ink-900);
  font-size: 18px;
  font-weight: 700;
  letter-spacing: 0.08em;
}

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tag {
  display: inline-flex;
  align-items: center;
  padding: 6px 10px;
  border-radius: var(--radius-full);
  background: var(--color-brand-subtle);
  color: var(--color-brand);
  font-size: var(--text-label);
  font-weight: 700;
}

.compact-actions {
  margin-top: -4px;
}

.stack-form,
.compare-form {
  display: grid;
  gap: 16px;
}

.compact-form {
  margin-top: 0;
}

.stack-form {
  margin-top: 18px;
}

.form-helper {
  color: var(--text-tertiary);
  font-size: var(--text-body-sm);
  line-height: 1.6;
}

label {
  display: grid;
  gap: 8px;
  font-weight: 600;
  font-size: var(--text-body);
}

/* 表单布局 */
.dual-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.compact-actions {
  margin-top: -4px;
}

/* 提示框样式 */
.callout,
.upload-link-card,
.empty-card,
.loading,
.compare-summary {
  border-radius: var(--radius-xl);
  padding: 16px 18px;
  background: rgba(255, 255, 255, 0.78);
  border: 1px solid var(--border-weak);
}

.callout {
  margin-top: 18px;
  color: var(--color-brand);
}

#supplier-note-upload-result[data-tone="info"] {
  border-color: rgba(9, 186, 7, 0.16);
  background: rgba(242, 252, 238, 0.9);
  color: var(--brand-800);
}

#supplier-note-upload-result[data-tone="success"] {
  border-color: rgba(18, 183, 106, 0.18);
  background: rgba(236, 253, 243, 0.98);
  color: var(--color-success-text);
}

#supplier-note-upload-result[data-tone="warning"] {
  border-color: rgba(245, 158, 11, 0.22);
  background: rgba(255, 251, 235, 0.96);
  color: #b45309;
}

#supplier-note-upload-result[data-tone="error"] {
  border-color: rgba(250, 81, 81, 0.2);
  background: rgba(255, 243, 243, 0.94);
  color: var(--color-error-text);
}

.supplier-note-upload-feedback {
  display: grid;
  gap: 10px;
}

.catalog-import-progress {
  gap: 12px;
  padding: 16px;
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(248, 250, 252, 0.96), rgba(255, 255, 255, 0.98));
}

.supplier-note-upload-feedback-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.supplier-note-upload-feedback-head strong {
  font-size: 15px;
  line-height: 1.4;
}

.supplier-note-upload-feedback-head span {
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.02em;
}

.catalog-import-progress .supplier-note-upload-feedback-head {
  align-items: flex-start;
}

.catalog-import-progress .supplier-note-upload-feedback-head strong {
  color: var(--ink-900);
  font-size: 16px;
  line-height: 1.45;
}

.catalog-import-progress .supplier-note-upload-feedback-head span {
  min-width: 48px;
  padding-top: 1px;
  color: var(--ink-800);
  font-size: 13px;
  line-height: 1.4;
  text-align: right;
}

.supplier-note-upload-feedback p,
.supplier-note-upload-feedback small {
  margin: 0;
  line-height: 1.7;
}

.supplier-note-upload-feedback small {
  opacity: 0.88;
}

.catalog-import-progress > p {
  color: var(--text-secondary);
  font-size: 13px;
  line-height: 1.6;
}

.supplier-import-progress-summary {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.supplier-import-progress-summary span {
  display: inline-flex;
  align-items: baseline;
  gap: 5px;
  min-height: 26px;
  padding: 0 9px;
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.76);
  color: var(--text-secondary);
  font-size: 12px;
}

.supplier-import-progress-summary span strong {
  color: var(--ink-900);
  font-size: 13px;
  line-height: 1;
}

.supplier-import-progress-list {
  display: grid;
  gap: 8px;
  padding-top: 4px;
}

.supplier-import-progress-item {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.96);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px 12px 16px;
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.04);
}

.supplier-import-progress-item::before {
  position: absolute;
  top: 12px;
  bottom: 12px;
  left: 0;
  width: 3px;
  border-radius: 0 999px 999px 0;
  background: rgba(100, 116, 139, 0.42);
  content: "";
}

.supplier-import-progress-item[data-state="imported"] {
  border-color: rgba(9, 186, 7, 0.2);
  background: rgba(252, 254, 252, 0.98);
}

.supplier-import-progress-item[data-state="failed"] {
  border-color: rgba(250, 81, 81, 0.18);
  background: rgba(255, 250, 250, 0.98);
}

.supplier-import-progress-item[data-state="parsing"],
.supplier-import-progress-item[data-state="reviewing"],
.supplier-import-progress-item[data-state="enhancing"],
.supplier-import-progress-item[data-state="importing"] {
  border-color: rgba(9, 186, 7, 0.22);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(250, 254, 250, 0.96));
}

.supplier-import-progress-item[data-state="imported"]::before,
.supplier-import-progress-item[data-state="parsing"]::before,
.supplier-import-progress-item[data-state="reviewing"]::before,
.supplier-import-progress-item[data-state="enhancing"]::before,
.supplier-import-progress-item[data-state="importing"]::before {
  background: var(--brand-600);
}

.supplier-import-progress-item[data-state="failed"]::before {
  background: var(--color-error);
}

.supplier-import-progress-item-main {
  min-width: 0;
  display: grid;
  gap: 4px;
}

.supplier-import-progress-item-main strong,
.supplier-import-progress-item-main span,
.supplier-import-progress-item-main p {
  display: block;
}

.supplier-import-progress-item-main strong {
  color: var(--ink-900);
  font-size: 14px;
  line-height: 1.5;
}

.supplier-import-progress-item-main span,
.supplier-import-progress-item-main p {
  margin: 0;
  color: var(--text-secondary);
  font-size: 12px;
  line-height: 1.6;
}

.supplier-import-progress-item-main p {
  color: var(--color-error-text);
}

.supplier-import-progress-item-side {
  flex: 0 0 auto;
  display: grid;
  align-self: center;
  justify-items: end;
  gap: 6px;
}

.supplier-import-progress-item-side small {
  color: var(--text-secondary);
  font-size: 12px;
}

.supplier-import-progress-item-badge {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 0 10px;
  border-radius: 999px;
  background: rgba(82, 94, 119, 0.1);
  color: var(--ink-700);
  font-size: 12px;
  font-weight: 700;
}

.supplier-import-progress-item[data-state="imported"] .supplier-import-progress-item-badge {
  background: rgba(9, 186, 7, 0.14);
  color: var(--brand-800);
}

.supplier-import-progress-item[data-state="parsing"] .supplier-import-progress-item-badge,
.supplier-import-progress-item[data-state="reviewing"] .supplier-import-progress-item-badge,
.supplier-import-progress-item[data-state="enhancing"] .supplier-import-progress-item-badge,
.supplier-import-progress-item[data-state="importing"] .supplier-import-progress-item-badge {
  background: rgba(9, 186, 7, 0.12);
  color: var(--brand-800);
}

.supplier-import-progress-item[data-state="failed"] .supplier-import-progress-item-badge {
  background: rgba(250, 81, 81, 0.12);
  color: var(--color-error-text);
}

.supplier-note-upload-progress {
  position: relative;
  overflow: hidden;
  height: 7px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.07);
}

.supplier-note-upload-progress span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--brand-600), #41c46b);
  box-shadow: 0 0 0 1px rgba(9, 186, 7, 0.06), 0 8px 14px rgba(9, 186, 7, 0.16);
  transition: width 220ms ease;
}

.subtle-callout {
  margin-top: 0;
  margin-bottom: 16px;
  color: var(--text-primary);
}

/* 集合列表样式 */
.collection-list {
  display: grid;
  gap: 12px;
  margin-top: 18px;
}

.collection-item {
  width: 100%;
  text-align: left;
  padding: 16px;
  background: rgba(255, 255, 255, 0.74);
  border: 1px solid var(--border-weak);
  border-radius: var(--radius-xl);
  display: grid;
  gap: 12px;
  transition: all var(--duration-fast) var(--ease-standard);
}

.collection-item:hover {
  background: rgba(255, 255, 255, 0.9);
  box-shadow: var(--shadow-sm);
}

.collection-item strong,
.empty-card h3 {
  display: block;
  margin-bottom: 8px;
  font-weight: 600;
}

.collection-item span,
.empty-card p,
.compare-card p,
.compare-meta {
  color: var(--text-secondary);
}

.collection-item.active {
  border-color: var(--color-brand);
  background: linear-gradient(135deg, rgba(219, 233, 220, 0.85), rgba(255, 255, 255, 0.75));
  box-shadow: var(--shadow-sm);
}

.collection-stats {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  font-size: var(--text-body-sm);
  color: var(--text-tertiary);
}

/* 详情面板 */
.detail-panel {
  height: 100%;
  min-height: 0;
  min-width: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.empty-state {
  flex: 1;
  display: grid;
  place-items: center;
  text-align: center;
  color: var(--text-tertiary);
}

.chat-welcome {
  display: grid;
  gap: 14px;
  max-width: 520px;
}

.chat-welcome-badge {
  justify-self: center;
  display: inline-flex;
  align-items: center;
  padding: 8px 14px;
  border-radius: var(--radius-full);
  background: var(--color-brand-subtle);
  color: var(--color-brand);
  font-size: var(--text-label);
  font-weight: 700;
}

/* 工作区布局 */
.panel {
  display: flex;
  flex-direction: column;
  height: 100%;
  min-height: 0;
  overflow: hidden;
  transition: all var(--duration-fast) var(--ease-standard);
}

.panel.collapsed {
  flex-shrink: 1;
  min-height: 80px;
}

.panel.collapsed .panel-header {
  border-radius: var(--radius-2xl);
}

.panel-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border-weak);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.8), rgba(255, 255, 255, 0.6));
  border-radius: var(--radius-2xl) var(--radius-2xl) 0 0;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.9) inset;
  backdrop-filter: blur(8px);
  transition: all var(--duration-fast) var(--ease-standard);
}

.panel:hover .panel-header {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.9), rgba(255, 255, 255, 0.7));
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.95) inset;
}

.panel-header h3 {
  margin: 0;
  font-size: var(--text-h4);
  font-weight: 600;
}

.panel-collapse-button {
  background: transparent;
  border: none;
  padding: 8px;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all var(--duration-fast) var(--ease-standard);
  display: flex;
  align-items: center;
  justify-content: center;
}

.panel-collapse-button:hover {
  background: var(--fill-hover);
  transform: none;
  box-shadow: none;
}

.panel-content {
  flex: 1;
  padding: 20px;
  overflow: auto;
  min-height: 0;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.05));
  transition: all var(--duration-fast) var(--ease-standard);
}

.panel:hover .panel-content {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.15), rgba(255, 255, 255, 0.1));
}

.chat-shell {
  min-height: 0;
  height: 100%;
  position: relative;
}

.chat-shell::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(9, 186, 7, 0.04), transparent 70%);
  border-radius: var(--radius-2xl);
  pointer-events: none;
}

.chat-workspace {
  display: flex;
  flex-direction: column;
  gap: 14px;
  flex: 1;
  min-height: 0;
  min-width: 0;
  overflow: hidden;
  position: relative;
  z-index: 1;
  padding: 20px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.05));
  transition: all var(--duration-fast) var(--ease-standard);
}

.panel:hover .chat-workspace {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.15), rgba(255, 255, 255, 0.1));
}

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

.chat-topbar {
  flex: 0 0 auto;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border-weak);
}

.chat-topbar h2 {
  font-size: clamp(28px, 3.5vw, 40px);
  line-height: 1.08;
}

/* 代码样式 */
code {
  font-family: var(--font-mono);
  font-size: var(--text-body-sm);
  word-break: break-all;
  background: rgba(0,0,0,0.06);
  padding: 2px 6px;
  border-radius: var(--radius-xs);
}

/* 工作区卡片 */
.workspace-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-top: 0;
}

.workspace-card {
  padding: 16px 18px;
  border-radius: var(--radius-xl);
  background: rgba(255, 255, 255, 0.78);
  border: 1px solid var(--border-weak);
  transition: all var(--duration-fast) var(--ease-standard);
}

.workspace-card:hover {
  background: rgba(255, 255, 255, 0.9);
  box-shadow: var(--shadow-sm);
}

.workspace-card span {
  display: block;
  color: var(--text-tertiary);
  font-size: var(--text-body-sm);
  margin-bottom: 8px;
}

.workspace-card strong {
  font-size: var(--text-num-stat);
  line-height: 1.1;
  font-weight: 600;
}

/* 面板布局 */
.uploads-panel .panel-content {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.uploads-panel .table-wrap {
  flex: 1;
  min-height: 0;
}

.compare-panel .panel-content {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.compare-result {
  flex: 1;
  min-height: 0;
  overflow: auto;
  background: #FFFFFF;
}

/* 响应式布局优化 */
@media (max-width: 1536px) {
  .page-shell {
    width: min(1320px, calc(100% - 32px));
  }

  .dashboard {
    height: min(850px, calc(100svh - 130px));
  }
}

@media (max-width: 1280px) {
  .page-shell {
    width: min(1180px, calc(100% - 32px));
  }

  .dashboard {
    height: min(800px, calc(100svh - 140px));
  }

  .hero {
    gap: 16px;
  }

  .hero-copy h1 {
    font-size: clamp(20px, 3vw, 26px);
  }
}

@media (max-width: 1280px) {
  .dashboard {
    grid-template-columns: 1fr 1fr;
    grid-template-rows: auto auto;
    height: auto;
    min-height: 600px;
    gap: 14px;
  }

  .dashboard > .compare-panel {
    grid-column: 1 / -1;
  }
}

@media (max-width: 1024px) {
  .page-shell {
    width: min(980px, calc(100% - 24px));
  }

  .hero {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .hero-side {
    justify-content: flex-start;
  }

  .hero-copy h1 {
    font-size: clamp(20px, 4vw, 28px);
    max-width: none;
  }

  .hero-copy p {
    font-size: var(--text-body);
    max-width: none;
  }

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

  .compare-form {
    grid-template-columns: 1fr 1fr;
    gap: 12px;
  }

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

@media (max-width: 768px) {
  .page-shell {
    width: min(100% - 16px, 720px);
    padding: 12px 0 24px;
  }

  .hero {
    padding: 16px;
    gap: 14px;
    border-radius: var(--radius-xl);
  }

  .hero-copy h1 {
    font-size: clamp(20px, 5vw, 28px);
    margin: 4px 0 8px;
    line-height: 1.2;
  }

  .hero-copy p {
    font-size: var(--text-body);
    line-height: 1.5;
  }

  .hero-badge {
    padding: 6px 12px;
    font-size: 11px;
  }

  .dashboard {
    grid-template-columns: 1fr;
    grid-template-rows: auto auto auto;
    gap: 12px;
    margin-top: 12px;
  }

  .dashboard > .compare-panel {
    grid-column: 1;
  }

  .panel {
    border-radius: var(--radius-xl);
  }

  .panel-header {
    padding: 12px 16px;
    border-radius: var(--radius-xl) var(--radius-xl) 0 0;
  }

  .panel-header h3 {
    font-size: var(--text-h4);
  }

  .panel-content {
    padding: 16px;
  }

  .chat-workspace {
    padding: 16px;
    gap: 14px;
  }

  .chat-bubble {
    padding: 16px 20px;
    max-width: 100%;
  }

  .chat-composer {
    padding: 16px;
    border-radius: var(--radius-xl);
  }

  .chat-composer textarea {
    min-height: 100px;
  }

  .chat-composer-footer {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
  }

  .chat-composer-footer button {
    width: 100%;
  }

  .compare-form {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .dual-actions {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .workspace-strip {
    grid-template-columns: 1fr;
  }

  .settings-flyout-panel {
    left: 0;
    right: 0;
    width: calc(100vw - 32px);
    margin: 0 auto;
  }

  .header-actions {
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
  }

  .header-actions button {
    width: 100%;
  }

  table {
    min-width: 600px;
    font-size: var(--text-body-sm);
  }

  th, td {
    padding: 10px 8px;
  }
}

@media (max-width: 480px) {
  .page-shell {
    width: min(100% - 12px, 460px);
    padding: 8px 0 20px;
  }

  .hero {
    padding: 14px;
    gap: 12px;
  }

  .hero-copy h1 {
    font-size: clamp(18px, 6vw, 24px);
  }

  .hero-copy p {
    font-size: var(--text-body-sm);
  }

  .panel-header {
    padding: 10px 14px;
  }

  .panel-header h3 {
    font-size: var(--text-body-lg);
  }

  .panel-collapse-button {
    padding: 6px;
  }

  .panel-collapse-button svg {
    width: 16px;
    height: 16px;
  }

  .panel-content {
    padding: 14px;
  }

  .chat-workspace {
    padding: 14px;
    gap: 12px;
  }

  .chat-bubble {
    padding: 14px 18px;
  }

  .chat-composer {
    padding: 14px;
  }

  .chat-composer textarea {
    min-height: 90px;
  }

  .chat-suggestion-grid {
    grid-template-columns: 1fr;
  }

  .upload-entry-inline-head {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }

  .selection-toolbar {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }

  .settings-flyout-panel {
    width: calc(100vw - 24px);
    padding: 14px;
  }

  .settings-section-head {
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
  }

  .table-wrap {
    max-height: 300px;
  }

  table {
    min-width: 500px;
  }

  .compare-card-top {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }

  .price-badge {
    text-align: left;
    min-width: auto;
    width: 100%;
  }

  .offer-row {
    grid-template-columns: 1fr;
    gap: 8px;
  }
}

@media (max-width: 360px) {
  .page-shell {
    width: min(100% - 8px, 340px);
  }

  .hero {
    padding: 12px;
  }

  .hero-copy h1 {
    font-size: clamp(16px, 7vw, 20px);
  }

  .panel-header {
    padding: 8px 12px;
  }

  .panel-header h3 {
    font-size: var(--text-body);
  }

  .panel-content {
    padding: 12px;
  }

  .chat-composer {
    padding: 12px;
  }

  .chat-composer textarea {
    min-height: 80px;
  }

  .chat-bubble {
    padding: 12px 16px;
  }

  .btn-md {
    height: 32px;
    padding: 0 16px;
  }

  .btn-sm {
    height: 28px;
    padding: 0 12px;
  }
}

.sidebar-summary-panel {
  display: grid;
  gap: 16px;
}

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

.sub-panel {
  padding: 18px;
}

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

.header-actions {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.compact-stack-form {
  margin-top: 0;
}

/* 上传面板 */
.upload-entry-panel-inline {
  margin-bottom: 16px;
  padding: 18px;
  border-radius: var(--radius-2xl);
  background: rgba(255, 252, 246, 0.94);
  border: 1px solid var(--border-weak);
}

.upload-entry-inline-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 12px;
}

.upload-entry-inline-head strong {
  display: block;
  margin-bottom: 6px;
  font-size: var(--text-h4);
  font-weight: 600;
}

.upload-entry-inline-head span {
  color: var(--text-secondary);
  line-height: 1.7;
}

.selection-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
  color: var(--text-tertiary);
  font-size: var(--text-body-sm);
}

.checkbox-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
}

.checkbox-label input {
  width: 16px;
  height: 16px;
  margin: 0;
}

.uploads-footer {
  display: flex;
  justify-content: flex-end;
  margin-top: 14px;
  padding-top: 6px;
}

.panel-action-button {
  padding: 12px 18px;
  background: var(--gradient-ai);
  color: white;
  font-weight: 700;
  box-shadow: var(--shadow-sm);
  border-radius: var(--radius-md);
}

.panel-action-button:disabled {
  cursor: not-allowed;
  opacity: 0.38;
  transform: none;
  box-shadow: none;
}

/* 表格样式 */
.table-wrap {
  overflow: auto;
  -webkit-overflow-scrolling: touch;
}

.sidebar-table-wrap {
  flex: 1;
  min-height: 0;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--text-body);
  min-width: 720px;
}

th,
td {
  padding: 12px 10px;
  border-bottom: 1px solid var(--border-weak);
  text-align: left;
  white-space: nowrap;
  vertical-align: top;
}

th {
  color: var(--text-tertiary);
  font-weight: 600;
  position: sticky;
  top: 0;
  z-index: 2;
  background: rgba(255, 252, 246, 0.96);
  backdrop-filter: blur(10px);
}

.table-link {
  color: var(--color-brand);
  text-decoration: none;
  font-weight: 700;
}

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

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

.supplier-name-cell {
  max-width: 140px;
}

.catalog-link {
  max-width: 210px;
}

.batch-name-cell {
  max-width: 120px;
}

/* 比价表单 */
.compare-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 180px 140px;
  gap: 12px;
  margin-bottom: 16px;
}

.compare-panel-bottom {
  margin-top: 18px;
}

.compare-panel-bottom .sub-panel-header {
  margin-bottom: 16px;
}

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

.compare-cards {
  display: grid;
  gap: 14px;
}

/* 聊天面板 */
.chat-panel {
  display: flex;
  flex-direction: column;
  gap: 14px;
  flex: 1;
  min-height: 0;
  min-width: 0;
  overflow: hidden;
  padding: 0;
  background: transparent;
  border: none;
  box-shadow: none;
  backdrop-filter: none;
  position: relative;
  z-index: 1;
}

.chat-messages {
  display: grid;
  gap: 12px;
  min-height: 0;
  min-width: 0;
  flex: 1;
  overflow: auto;
  padding: 4px 6px 6px 0;
  scroll-behavior: smooth;
  scrollbar-width: thin;
  scrollbar-color: rgba(9, 186, 7, 0.3) rgba(0, 0, 0, 0.04);
}

.chat-messages::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

.chat-messages::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.04);
  border-radius: 3px;
}

.chat-messages::-webkit-scrollbar-thumb {
  background: rgba(9, 186, 7, 0.3);
  border-radius: 3px;
  transition: background var(--duration-fast) var(--ease-standard);
}

.chat-messages::-webkit-scrollbar-thumb:hover {
  background: rgba(9, 186, 7, 0.5);
}

.chat-selection-status {
  flex: 0 0 auto;
  min-width: 0;
  border-radius: var(--radius-xl);
  padding: 14px 16px;
  background: rgba(255, 255, 255, 0.74);
  border: 1px solid var(--border-weak);
  color: var(--text-primary);
  line-height: 1.65;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.chat-empty-state {
  margin: auto 0;
  display: grid;
  gap: 22px;
  justify-items: center;
  padding: 16px 0;
}

.chat-empty-copy {
  text-align: center;
  max-width: 520px;
}

.chat-empty-copy h3 {
  margin: 0 0 10px;
  font-size: var(--text-h3);
  letter-spacing: -0.03em;
}

.chat-empty-copy p {
  margin: 0;
  color: var(--text-secondary);
  line-height: 1.8;
}

.chat-suggestion-grid {
  width: min(720px, 100%);
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.chat-suggestion-button {
  text-align: left;
  padding: 18px;
  border-radius: var(--radius-xl);
  border: 1px solid var(--border-weak);
  background: rgba(255, 255, 255, 0.78);
  color: var(--text-primary);
  font-weight: 600;
  box-shadow: none;
  transition: all var(--duration-fast) var(--ease-standard);
}

.chat-suggestion-button:hover {
  border-color: var(--color-brand);
  background: rgba(255, 255, 255, 0.92);
  box-shadow: var(--shadow-sm);
}

/* 聊天气泡 */
.chat-bubble {
  max-width: min(88%, 760px);
  padding: 20px 24px;
  border-radius: 20px 20px 20px 6px;
  border: 1px solid var(--border-weak);
  background: var(--color-ai-bubble);
  transition: all var(--duration-fast) var(--ease-standard);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
  animation: bubbleSlideIn var(--duration-normal) var(--ease-enter);
}

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

.chat-bubble.user {
  margin-left: auto;
  border-radius: 20px 20px 6px 20px;
  background: var(--color-user-bubble);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.chat-bubble.assistant {
  margin-right: auto;
}

.chat-bubble:hover {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  transform: translateY(-1px);
}

.chat-content {
  line-height: 1.75;
  color: var(--text-primary);
  white-space: normal;
  overflow-wrap: anywhere;
  word-break: break-word;
}

/* 聊天输入框 */
.chat-composer {
  flex: 0 0 auto;
  display: grid;
  gap: 12px;
  width: 100%;
  min-width: 0;
  padding: 20px;
  border-radius: var(--radius-2xl);
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid var(--border-weak);
  box-shadow: 0 12px 32px rgba(28, 43, 36, 0.08);
  transition: all var(--duration-fast) var(--ease-standard);
  position: relative;
}

.chat-composer::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(9, 186, 7, 0.02), transparent 70%);
  border-radius: var(--radius-2xl);
  pointer-events: none;
}

.chat-composer:focus-within {
  box-shadow: 0 12px 32px rgba(28, 43, 36, 0.12), 0 0 0 3px var(--color-brand-subtle);
  border-color: var(--color-brand);
  transform: translateY(-2px);
}

.chat-composer textarea {
  width: 100%;
  min-height: 110px;
  resize: none;
  border: none;
  background: transparent;
  padding: 0;
  outline: none;
  box-shadow: none;
  font-size: var(--text-body);
  line-height: 1.6;
  position: relative;
  z-index: 1;
}

.chat-composer-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  position: relative;
  z-index: 1;
}

.chat-composer-hint {
  color: var(--text-tertiary);
  font-size: var(--text-body-sm);
  transition: color var(--duration-fast) var(--ease-standard);
}

.chat-composer:focus-within .chat-composer-hint {
  color: var(--text-secondary);
}

/* 比价卡片 */
.compare-card {
  padding: 18px;
  border-radius: var(--radius-2xl);
  background: rgba(255, 255, 255, 0.8);
  border: 1px solid var(--border-weak);
  transition: all var(--duration-fast) var(--ease-standard);
}

.compare-card:hover {
  background: rgba(255, 255, 255, 0.9);
  box-shadow: var(--shadow-sm);
}

.compare-card-top {
  display: flex;
  justify-content: space-between;
  gap: 18px;
}

.compare-card h4 {
  margin: 0 0 8px;
  font-size: var(--text-h4);
}

.price-badge {
  min-width: 112px;
  padding: 14px;
  border-radius: var(--radius-xl);
  background: linear-gradient(135deg, var(--color-brand-subtle), rgba(201, 138, 10, 0.12));
  text-align: right;
}

.price-badge strong {
  display: block;
  font-size: 26px;
  color: var(--color-brand);
  font-weight: 700;
}

.price-badge span {
  color: var(--text-tertiary);
  font-size: var(--text-body-sm);
}

.compare-meta {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  margin-top: 14px;
  font-size: var(--text-body-sm);
}

.offer-list {
  display: grid;
  gap: 10px;
  margin-top: 16px;
}

.detail-list-panel {
  display: grid;
  gap: 0;
}

.uploads-panel {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  min-height: 0;
  height: 100%;
  max-height: none;
}

.wrap-cell,
.product-table .wrap-cell {
  min-width: 180px;
  white-space: normal;
  word-break: break-word;
}

.offer-row {
  display: grid;
  grid-template-columns: 1.4fr 0.8fr 0.8fr 0.8fr;
  gap: 10px;
  align-items: center;
  padding: 12px 14px;
  border-radius: var(--radius-md);
  background: rgba(244, 239, 230, 0.74);
  transition: all var(--duration-fast) var(--ease-standard);
}

.offer-row:hover {
  background: rgba(244, 239, 230, 0.9);
}

.offer-row.best {
  background: linear-gradient(135deg, rgba(219, 233, 220, 0.94), rgba(255, 249, 235, 0.94));
  border: 1px solid var(--color-brand-subtle);
  box-shadow: var(--shadow-sm);
}

.slim {
  padding: 18px;
}

.loading {
  color: var(--text-tertiary);
}

/* Markdown 渲染规范 */
.chat-content h1,
.chat-content h2,
.chat-content h3,
.chat-content h4,
.chat-content h5,
.chat-content h6 {
  margin-top: 24px;
  margin-bottom: 8px;
  font-weight: 600;
}

.chat-content h1 {
  font-size: var(--text-h1);
  line-height: 1.3;
}

.chat-content h2 {
  font-size: var(--text-h2);
  line-height: 1.35;
}

.chat-content h3 {
  font-size: var(--text-h3);
  line-height: 1.4;
}

.chat-content h4,
.chat-content h5,
.chat-content h6 {
  font-size: 15px;
  line-height: 1.55;
}

.chat-content ul,
.chat-content ol {
  padding-left: 24px;
  margin: 12px 0;
}

.chat-content li {
  margin: 4px 0;
  line-height: 1.6;
}

.chat-content blockquote {
  border-left: 3px solid var(--color-brand);
  background: rgba(9,186,7,0.05);
  padding: 12px 16px;
  margin: 12px 0;
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
}

.chat-content code {
  background: rgba(0,0,0,0.06);
  border-radius: var(--radius-xs);
  padding: 2px 6px;
  font-size: var(--text-body-sm);
  font-family: var(--font-mono);
}

.chat-content pre {
  background: #1E1E1E;
  color: white;
  padding: 16px;
  border-radius: var(--radius-md);
  overflow-x: auto;
  margin: 12px 0;
}

.chat-content pre code {
  background: transparent;
  color: white;
  padding: 0;
}

.chat-content a {
  color: var(--color-brand);
  text-decoration: underline;
}

.chat-content a:hover {
  color: var(--color-brand-dark);
}

.chat-content table {
  width: 100%;
  border-collapse: collapse;
  margin: 12px 0;
  min-width: 100%;
}

.chat-content th,
.chat-content td {
  padding: 8px 12px;
  border: 1px solid var(--border-weak);
  text-align: left;
}

.chat-content th {
  background: var(--fill-page);
  font-weight: 600;
  position: static;
  backdrop-filter: none;
}

.chat-content hr {
  border: none;
  border-top: 1px solid var(--border-weak);
  margin: 24px 0;
}

@media (max-width: 1360px) {
  .hero {
    grid-template-columns: 1fr;
  }

  .dashboard {
    flex-direction: column;
  }

  .workspace-layout {
    height: auto;
    min-height: 0;
  }

  .detail-panel,
  .workspace-sidebar,
  .uploads-panel,
  .chat-panel {
    min-height: 0;
  }

  .workspace-sidebar {
    height: auto;
    overflow: visible;
    padding-right: 0;
    width: auto;
    max-width: none;
    min-width: 0;
    flex: 1 1 auto;
  }

  .uploads-panel {
    max-height: none;
  }

  .chat-shell {
    min-width: 0;
    flex: 1 1 auto;
  }

  .workspace-resizer {
    display: none;
  }

  .workspace-column-resizer {
    display: none;
  }

  .workspace-strip,
  .sidebar-workspace-strip {
    grid-template-columns: 1fr;
  }

  .hero-copy h1 {
    max-width: none;
  }

  .hero-copy p {
    max-width: none;
  }
}

@media (max-width: 960px) {
  .page-shell {
    width: min(100% - 24px, 1320px);
    padding-top: 22px;
  }

  .hero {
    padding: 24px;
    gap: 18px;
  }

  .panel,
  .sub-panel {
    border-radius: var(--radius-2xl);
  }

  .panel {
    padding: 20px;
  }

  .detail-header {
    flex-direction: column;
  }

  .workspace-strip,
  .sidebar-workspace-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .compare-form,
  .product-form {
    grid-template-columns: 1fr;
  }

  .settings-flyout-panel {
    width: min(460px, calc(100vw - 32px));
  }
}

@media (max-width: 768px) {
  .page-shell {
    width: min(100% - 16px, 1320px);
    padding-top: 14px;
    padding-bottom: 28px;
  }

  .hero,
  .panel {
    padding: 18px;
    border-radius: var(--radius-2xl);
  }

  .hero {
    gap: 16px;
  }

  .hero-copy h1 {
    font-size: clamp(28px, 10vw, 42px);
    line-height: 1.12;
    letter-spacing: -0.03em;
  }

  .hero-copy p {
    font-size: var(--text-body);
    line-height: 1.7;
  }

  .settings-icon-button {
    width: 42px;
    height: 42px;
    border-radius: var(--radius-xl);
  }

  .settings-flyout {
    justify-self: start;
  }

  .settings-flyout-panel {
    left: 0;
    right: auto;
    width: min(calc(100vw - 16px), 420px);
    padding: 16px;
  }

  .compare-form,
  .product-form,
  .dual-actions,
  .offer-row,
  .workspace-strip,
  .sidebar-workspace-strip {
    grid-template-columns: 1fr;
  }

  .panel,
  .sub-panel {
    border-radius: var(--radius-2xl);
  }

  .sub-panel {
    padding: 16px;
  }

  .sub-panel-header,
  .selection-toolbar,
  .settings-flyout-head div {
    align-items: flex-start;
    flex-direction: column;
  }

  .header-actions {
    justify-content: flex-start;
  }

  .upload-entry-inline-head {
    flex-direction: column;
    align-items: flex-start;
  }

  .selection-toolbar {
    gap: 8px;
  }

  .detail-header p,
  .panel-title p {
    font-size: var(--text-body);
  }

  .compare-card-top {
    flex-direction: column;
  }

  .price-badge {
    text-align: left;
  }

  .compare-card,
  .analysis-card,
  .chat-bubble {
    padding: 16px;
    border-radius: var(--radius-xl);
  }

  .chat-messages {
    min-height: 180px;
    max-height: 360px;
  }

  .chat-suggestion-grid {
    grid-template-columns: 1fr;
  }

  .chat-composer {
    padding: 14px;
    border-radius: var(--radius-2xl);
  }

  .chat-composer-footer {
    align-items: flex-end;
    flex-direction: row;
    flex-wrap: nowrap;
  }

  .chat-bubble {
    max-width: 100%;
  }

  .chat-composer textarea,
  textarea {
    min-height: 92px;
  }

  table {
    min-width: 620px;
    font-size: var(--text-body-sm);
  }

  th,
  td {
    padding: 10px 8px;
  }
}

@media (max-width: 520px) {
  .hero-badge {
    font-size: var(--text-label);
    letter-spacing: 0.04em;
    padding: 6px 10px;
  }

  .panel,
  .sub-panel {
    padding: 14px;
    border-radius: var(--radius-xl);
  }

  .callout,
  .empty-card,
  .loading,
  .compare-summary,
  .compare-card,
  .analysis-card,
  .chat-bubble,
  .workspace-card {
    border-radius: var(--radius-lg);
  }

  .workspace-card strong {
    font-size: 22px;
  }

  .settings-flyout-panel {
    width: calc(100vw - 20px);
  }

  .dual-actions {
    grid-template-columns: 1fr;
  }

  table {
    min-width: 560px;
  }
}

/* Figma workspace refresh */
body {
  margin: 0;
  min-height: 100vh;
  background: var(--page-base);
  color: var(--ink-900);
  font-family: "PingFang SC", "SF Pro Text", "Inter", "Microsoft YaHei UI", sans-serif;
}

.app-shell {
  height: 100vh;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.page-shell {
  width: 100%;
  max-width: none;
  padding: 0;
}

.hero {
  display: none;
}

.app-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  height: 57px;
  min-height: 57px;
  max-height: 57px;
  padding: 13px 20px 12px;
  background: var(--page-base);
  box-sizing: border-box;
}

.brand-block {
  display: flex;
  align-items: center;
  flex: 1 1 auto;
  gap: 10px;
  min-width: 0;
}

.brand-placeholder {
  width: 32px;
  height: 32px;
  flex: 0 0 auto;
  border-radius: 8px;
  background: #dfdfdf;
  display: block;
}

.brand-copy {
  flex: 1 1 auto;
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
}

.brand-title-row {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
}

.brand-title-row h1 {
  flex: 0 0 auto;
  margin: 0;
  font-size: 16px;
  line-height: 20px;
  font-weight: 600;
  color: var(--ink-900);
  white-space: nowrap;
}

.brand-title-row span {
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  font-size: 12px;
  line-height: 16px;
  color: var(--ink-600);
  white-space: nowrap;
  word-break: keep-all;
}

.workspace-stage,
.dashboard.workspace-layout {
  flex: 1;
  display: grid;
  grid-template-columns:
    minmax(340px, var(--workspace-uploads-width, 0.95fr))
    16px
    minmax(360px, var(--workspace-detail-width, 1.18fr))
    16px
    minmax(300px, var(--workspace-compare-width, 0.95fr));
  gap: 0;
  padding: 0 16px 16px;
  min-height: 0;
  align-items: stretch;
  background: var(--page-base);
  overflow: hidden;
}

.workspace-stage.is-uploads-collapsed,
.dashboard.workspace-layout.is-uploads-collapsed {
  grid-template-columns:
    52px
    16px
    minmax(360px, var(--workspace-detail-width, 1.18fr))
    16px
    minmax(300px, var(--workspace-compare-width, 0.95fr));
}

.workspace-tabbar {
  display: none;
}

.workspace-column-resizer {
  position: relative;
  width: 16px;
  min-width: 16px;
  height: 100%;
  border: 0;
  padding: 0;
  background: transparent;
  cursor: col-resize;
  align-self: stretch;
  justify-self: stretch;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 5;
}

.workspace-column-resizer::after {
  content: "";
  width: 6px;
  height: 56px;
  border-radius: 999px;
  background: rgba(17, 24, 39, 0.18);
  box-shadow: 0 6px 16px rgba(15, 23, 42, 0.12);
  opacity: 0;
  transform: scaleY(0.72);
  transition: opacity 140ms ease, transform 140ms ease, background-color 140ms ease;
}

.workspace-column-resizer:hover::after,
.workspace-column-resizer:focus-visible::after,
.workspace-stage.is-column-resizing .workspace-column-resizer::after {
  opacity: 1;
  transform: scaleY(1);
}

.workspace-column-resizer:hover::after,
.workspace-column-resizer:focus-visible::after {
  background: rgba(17, 191, 0, 0.55);
}

.workspace-stage.is-column-resizing {
  user-select: none;
  cursor: col-resize;
}

.workspace-stage.is-column-resizing .workspace-panel {
  pointer-events: none;
}

.workspace-stage.is-uploads-collapsed
  > .workspace-column-resizer[data-workspace-resizer="uploads-detail"] {
  opacity: 0;
  pointer-events: none;
}

.workspace-tab-button {
  min-height: 44px;
  border: 0;
  border-bottom: 2px solid transparent;
  background: transparent;
  color: var(--ink-700);
  border-radius: 0;
  box-shadow: none;
  font-size: 15px;
  line-height: 20px;
  font-weight: 600;
  cursor: pointer;
  transition: color 160ms ease, border-color 160ms ease, background-color 160ms ease;
}

.workspace-tab-button:hover {
  background: rgba(26, 32, 41, 0.04);
  color: var(--ink-900);
  transform: none;
  box-shadow: none;
}

.workspace-tab-button.is-active {
  color: var(--ink-900);
  border-bottom-color: var(--ink-700);
}

.workspace-tab-button:focus-visible {
  outline: none;
  box-shadow: inset 0 -2px 0 var(--ink-700), 0 0 0 4px rgba(26, 32, 41, 0.10);
}

.workspace-layout {
  --sidebar-width: initial;
}

.workspace-panel,
.panel {
  height: 100%;
  min-height: 0;
  background: var(--surface-base);
  border: 1px solid var(--border-weak);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-card);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.workspace-panel {
  padding: 0;
}

.workspace-panel:hover,
.panel:hover {
  box-shadow: var(--shadow-card);
  transform: none;
  border-color: var(--border-strong);
}

.workspace-panel:hover .workspace-panel-body,
.panel:hover .panel-content,
.panel:hover .chat-workspace {
  background: var(--surface-base);
  box-shadow: none;
}

.workspace-panel-head {
  min-height: 64px;
  padding: 18px 16px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--border-weak);
  flex: 0 0 auto;
}

.workspace-panel-head h3,
.panel-header h3 {
  margin: 0;
  font-size: 16px;
  line-height: 20px;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--ink-900);
}

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

.uploads-panel .workspace-panel-head {
  padding-right: 16px;
}

.uploads-panel .workspace-panel-head h3 {
  white-space: nowrap;
}

.uploads-panel .workspace-panel-actions {
  gap: 6px;
  flex: 0 0 auto;
}

.uploads-panel.is-collapsed .workspace-panel-head {
  justify-content: center;
  padding-inline: 8px;
}

.uploads-panel.is-collapsed .workspace-panel-head h3,
.uploads-panel.is-collapsed .catalog-major-heading,
.uploads-panel.is-collapsed .toolbar-button,
.uploads-panel.is-collapsed .toolbar-divider {
  display: none;
}

.uploads-panel.is-collapsed .workspace-panel-actions {
  width: 100%;
  justify-content: center;
  gap: 0;
}

.compare-panel-actions {
  gap: 0;
}

.toolbar-button,
.toolbar-icon-button {
  min-height: 36px;
  border: 0;
  background: transparent;
  color: var(--ink-700);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 6px 12px 6px 8px;
  border-radius: 12px;
  font-size: 13px;
  line-height: 20px;
  font-weight: 600;
  box-shadow: none;
  cursor: pointer;
  transition: background-color 140ms ease, color 140ms ease, box-shadow 140ms ease;
}

.uploads-panel .toolbar-button {
  white-space: nowrap;
  padding-inline: 8px;
}

.uploads-panel[data-catalog-major-active="selectionPool"] [data-catalog-major-action="sources"] {
  display: none !important;
}

.toolbar-button svg,
.toolbar-icon-button svg {
  width: 20px;
  height: 20px;
  flex: 0 0 auto;
}

.toolbar-button:hover,
.toolbar-icon-button:hover {
  background: var(--ink-100);
  color: var(--ink-900);
  transform: none;
  box-shadow: none;
}

.toolbar-icon-button {
  width: 36px;
  padding: 0;
}

.uploads-collapse-button {
  flex: 0 0 auto;
}

.workspace-stage.is-workspace-tab-mode .uploads-collapse-button {
  display: none;
}

.toolbar-icon-button:disabled,
.modal-icon-button:disabled {
  opacity: 0.64;
  color: var(--ink-500);
  background: transparent;
}

.chat-history-open-button,
.modal-history-button {
  width: 36px;
  min-width: 36px;
  padding: 0;
}

.toolbar-divider {
  width: 1px;
  height: 20px;
  background: var(--border-weak);
  flex: 0 0 auto;
}

.workspace-panel-body,
.panel-content,
.chat-workspace {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  background: var(--surface-base);
  padding: 0;
  overflow: hidden;
}

.uploads-panel.is-collapsed .workspace-panel-body {
  display: none;
}

.uploads-body {
  padding-top: 8px;
  overflow: hidden;
  overscroll-behavior: contain;
}

.uploads-body > .catalog-major-panel.is-active {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.uploads-body .catalog-source-tabs {
  flex: 0 0 auto;
  margin-bottom: 12px;
  padding-bottom: 4px;
}

.uploads-body .catalog-source-panel.is-active {
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.uploads-body [data-catalog-source-panel="history"].is-active {
  flex: 1 1 auto;
}

.uploads-body [data-catalog-source-panel="deliveries"].is-active {
  flex: 0 0 auto;
  max-height: 42%;
  overflow: auto;
}

.uploads-body .catalog-source-panel.is-active > .workspace-selection-toolbar {
  flex: 0 0 auto;
}

.uploads-body .catalog-source-panel.is-active > .workspace-table-wrap {
  flex: 1 1 auto;
  min-height: 0;
  overflow: auto;
  overscroll-behavior: auto;
}

.catalog-platform-link-bar {
  position: relative;
  z-index: 7;
  flex: 0 0 auto;
  padding: 12px 18px 16px;
  border-top: 1px solid var(--border-weak);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.76) 0%, #ffffff 42%),
    var(--surface-base);
}

.catalog-platform-link-actions {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.catalog-action-button {
  width: 100%;
  height: var(--compare-control-height, 44px);
  min-height: var(--compare-control-height, 44px);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-width: 0;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-control);
  background: #ffffff;
  color: var(--ink-800);
  box-shadow: none;
  cursor: pointer;
  font-size: 14px;
  line-height: 20px;
  font-weight: 600;
  padding: 0 14px;
  transition: background-color 140ms ease, border-color 140ms ease, color 140ms ease, box-shadow 140ms ease;
}

.catalog-action-button svg {
  width: 16px;
  height: 16px;
  flex: 0 0 auto;
}

.catalog-action-button span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.catalog-action-button.is-neutral:hover {
  border-color: #CAD2DF;
  background: #F8FAFC;
  color: var(--ink-900);
  box-shadow: none;
  transform: none;
}

.catalog-action-button.is-primary {
  border-color: var(--brand-600);
  background: var(--brand-600);
  color: #ffffff;
}

.catalog-action-button.is-primary:hover {
  background: var(--brand-700);
  border-color: var(--brand-700);
  box-shadow: none;
  transform: none;
}

.catalog-action-button:active {
  transform: none;
}

.catalog-action-button:disabled {
  cursor: not-allowed;
  border-color: #E2E8F0;
  background: #F8FAFC;
  color: #94A3B8;
  opacity: 1;
  box-shadow: none;
}

.catalog-action-button.is-primary:disabled {
  border-color: #DCEADF;
  background: #EAF6EA;
  color: #8AAF8A;
}

.catalog-platform-link-menu {
  position: absolute;
  left: 18px;
  right: 18px;
  bottom: calc(100% - 6px);
  display: grid;
  gap: 6px;
  padding: 8px;
  border: 1px solid var(--border-weak);
  border-radius: 16px;
  background: #ffffff;
  box-shadow: 0 16px 42px rgba(15, 23, 42, 0.16);
}

.catalog-platform-link-menu[hidden] {
  display: none;
}

.catalog-platform-link-menu button {
  min-height: 44px;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 10px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--ink-900);
  cursor: pointer;
  padding: 8px 12px;
  text-align: left;
  box-shadow: none;
  transition: background-color 140ms ease, color 140ms ease;
}

.catalog-platform-link-menu button:hover {
  background: var(--brand-050);
  color: var(--brand-800);
  transform: none;
  box-shadow: none;
}

.catalog-platform-link-menu button::before {
  content: "";
  width: 30px;
  height: 30px;
  flex: 0 0 30px;
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 9px;
  background: #ffffff;
  background-position: center;
  background-repeat: no-repeat;
  background-size: cover;
}

.catalog-platform-link-menu button[data-platform-link-action="ktt"]::before {
  background-image: url("/admin/assets/ktt-logo.png?v=20260513");
}

.catalog-platform-link-menu button[data-platform-link-action="qjl"]::before {
  background-image: url("/admin/assets/qjl-logo.png?v=20260513");
}

.catalog-platform-link-logo {
  display: none;
}

.catalog-platform-link-menu strong {
  font-size: 14px;
  line-height: 20px;
  font-weight: 500;
}

@media (max-width: 720px) {
  .catalog-platform-link-actions {
    grid-template-columns: 1fr;
  }
}

.minimalist-empty-state,
.empty-state {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 36px 24px;
  background: var(--surface-base);
}

.empty-state-copy {
  max-width: 360px;
  text-align: center;
  color: var(--ink-600);
}

.empty-state-copy strong {
  display: block;
  margin-bottom: 10px;
  color: var(--ink-900);
  font-size: 18px;
  line-height: 26px;
  font-weight: 600;
}

.empty-state-copy p {
  margin: 0;
  font-size: 14px;
  line-height: 22px;
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 0 0 auto;
  height: 32px;
  line-height: 0;
}

.settings-flyout,
.account-flyout {
  position: relative;
  display: flex;
  align-items: center;
  height: 32px;
  line-height: 0;
}

.settings-icon-button,
.account-avatar-button {
  width: 32px;
  height: 32px;
  border: 0;
  border-radius: 12px;
  background: transparent;
  color: var(--ink-700);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  line-height: 0;
  cursor: pointer;
  transition: background-color 140ms ease, color 140ms ease, box-shadow 140ms ease;
}

.settings-icon-button:hover,
.account-avatar-button:hover {
  background: var(--ink-100);
  color: var(--ink-900);
  transform: none;
  box-shadow: none;
}

.settings-icon-button::-webkit-details-marker,
.account-avatar-button::-webkit-details-marker {
  display: none;
}

.settings-icon-button svg {
  width: 20px;
  height: 20px;
}

.topbar-login-button {
  width: 56px;
  height: 32px;
  min-height: 32px;
  border: 0;
  border-radius: 999px;
  background: var(--brand-600);
  color: #ffffff;
  text-align: center;
  font-family: Inter, var(--font-sans);
  font-size: 12px;
  font-style: normal;
  font-weight: 400;
  line-height: normal;
  padding: 0;
  cursor: pointer;
  box-shadow: none;
  transition: background-color 140ms ease, opacity 140ms ease;
}

.topbar-login-button:hover {
  background: var(--brand-700);
  transform: none;
  box-shadow: none;
}

.topbar-login-button:disabled {
  cursor: default;
  opacity: 0.65;
}

.topbar-login-button[hidden] {
  display: none;
}

.topbar-ktt-import-button {
  height: 32px;
  min-height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 0 12px;
  border: 1px solid rgba(34, 197, 94, 0.24);
  border-radius: 999px;
  background: rgba(240, 253, 244, 0.92);
  color: #166534;
  font-size: 12px;
  font-weight: 650;
  line-height: 1;
  white-space: nowrap;
  cursor: pointer;
  transition: background-color 140ms ease, border-color 140ms ease, color 140ms ease;
}

.topbar-ktt-import-button svg {
  width: 16px;
  height: 16px;
  flex: 0 0 auto;
}

.topbar-ktt-import-button:hover {
  background: #dcfce7;
  border-color: rgba(22, 101, 52, 0.28);
  color: #14532d;
  transform: none;
  box-shadow: none;
}

.operation-report-entry {
  position: relative;
  display: flex;
  align-items: center;
  height: 32px;
  line-height: normal;
}

.operation-report-entry::after {
  content: "";
  position: absolute;
  top: 100%;
  right: 0;
  width: min(360px, calc(100vw - 24px));
  height: 14px;
  display: none;
}

.operation-report-entry[hidden] {
  display: none;
}

.operation-report-button {
  height: 32px;
  min-height: 32px;
  padding: 0 12px;
  border: 1px solid rgba(7, 133, 5, 0.18);
  border-radius: 999px;
  background: #ffffff;
  color: var(--brand-800);
  font-family: var(--font-sans);
  font-size: 12px;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
  white-space: nowrap;
  transition: background-color 140ms ease, border-color 140ms ease, color 140ms ease;
}

.operation-report-button:hover,
.operation-report-entry.is-menu-open .operation-report-button,
.operation-report-entry:focus-within .operation-report-button {
  border-color: rgba(7, 133, 5, 0.28);
  background: var(--brand-050);
  color: var(--brand-900);
}

.operation-report-menu {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  z-index: 1400;
  width: min(360px, calc(100vw - 24px));
  max-height: min(420px, calc(100dvh - 84px));
  display: none;
  grid-template-rows: auto minmax(0, 1fr);
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--border-weak);
  border-radius: 18px;
  background: #ffffff;
  box-shadow: var(--shadow-floating);
}

.operation-report-entry:hover .operation-report-menu,
.operation-report-entry:focus-within .operation-report-menu,
.operation-report-entry.is-menu-open .operation-report-menu {
  display: grid;
}

.operation-report-entry:hover::after,
.operation-report-entry:focus-within::after,
.operation-report-entry.is-menu-open::after {
  display: block;
}

body.operation-report-detail-open .operation-report-menu,
body.operation-report-detail-open .operation-report-entry::after {
  display: none !important;
}

.operation-report-menu-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 2px 2px 0;
}

.operation-report-menu-head strong {
  color: var(--ink-900);
  font-size: 13px;
  line-height: 18px;
}

.operation-report-menu-head span {
  min-width: 0;
  color: var(--ink-600);
  font-size: 12px;
  line-height: 18px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.operation-report-list {
  min-height: 0;
  overflow: auto;
  display: grid;
  gap: 8px;
  padding-right: 2px;
}

.operation-report-item {
  width: 100%;
  min-height: 58px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  border: 1px solid rgba(226, 232, 240, 0.96);
  border-radius: 14px;
  background: #ffffff;
  color: var(--ink-900);
  text-align: left;
  cursor: pointer;
  box-shadow: none;
}

.operation-report-item:hover {
  border-color: rgba(7, 133, 5, 0.24);
  background: var(--surface-soft);
  transform: none;
  box-shadow: none;
}

.operation-report-item span {
  min-width: 0;
  display: grid;
  gap: 3px;
}

.operation-report-item strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 13px;
  line-height: 18px;
}

.operation-report-item small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--ink-600);
  font-size: 12px;
  line-height: 16px;
}

.operation-report-status {
  flex: 0 0 auto;
  padding: 4px 8px;
  border-radius: 999px;
  background: var(--ink-100);
  color: var(--ink-700);
  font-size: 12px;
  font-style: normal;
  font-weight: 700;
  line-height: 16px;
}

.operation-report-status-success {
  background: var(--color-success-bg);
  color: var(--color-success-text);
}

.operation-report-status-partial,
.operation-report-status-generating {
  background: var(--color-warning-bg);
  color: var(--color-warning-text);
}

.operation-report-status-failed {
  background: var(--color-error-bg);
  color: var(--color-error-text);
}

.operation-report-empty {
  padding: 16px 12px;
  color: var(--ink-600);
  font-size: 13px;
  line-height: 20px;
}

.operation-report-empty.is-error {
  color: var(--color-error-text);
}

.account-avatar-button {
  padding: 0;
  list-style: none;
}

.account-avatar {
  width: 32px;
  height: 32px;
  border-radius: 999px;
  overflow: hidden;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #d9dee7;
  color: var(--ink-800);
  font-size: 13px;
  line-height: 1;
  font-weight: 600;
  flex: 0 0 auto;
}

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

.account-avatar-lg {
  width: 44px;
  height: 44px;
  font-size: 16px;
}

.app-tooltip {
  position: fixed;
  left: 0;
  top: 0;
  z-index: 3200;
  max-width: min(240px, calc(100vw - 16px));
  padding: 6px 10px;
  border-radius: 8px;
  background: rgba(32, 35, 41, 0.96);
  color: #ffffff;
  font-size: 12px;
  line-height: 16px;
  font-weight: 500;
  white-space: nowrap;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.22);
  pointer-events: none;
  opacity: 0;
  transform: translateY(-2px);
  transition: opacity 80ms ease, transform 80ms ease;
}

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

.settings-flyout-panel,
.account-flyout-panel {
  top: calc(100% + 10px);
  right: 0;
  width: 388px;
  padding: 18px;
  border: 1px solid var(--border-weak);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-floating);
  background: var(--surface-base);
  max-height: min(820px, calc(100dvh - 88px));
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-gutter: auto;
}

.account-flyout-panel {
  width: min(432px, calc(100vw - 24px));
  padding: 20px;
  border-radius: 24px;
  background: #ffffff;
  box-shadow: 0 24px 64px rgba(15, 23, 42, 0.16);
}

.settings-flyout-head strong,
.settings-section-head strong {
  color: var(--ink-900);
}

.settings-flyout-head span,
.settings-section-head span {
  color: var(--ink-600);
}

#settings-details .settings-flyout-panel {
  width: min(420px, calc(100vw - 24px));
  padding: 22px;
  border-radius: 24px;
  background: #ffffff;
  box-shadow: 0 24px 64px rgba(15, 23, 42, 0.14);
}

#settings-details .settings-flyout-head {
  margin-bottom: 18px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--border-weak);
}

#settings-details .settings-flyout-head div {
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

#settings-details .settings-flyout-head strong {
  font-size: 17px;
  line-height: 22px;
}

#settings-details .settings-flyout-head span {
  flex: 1 1 auto;
  min-width: 0;
  color: var(--ink-600);
  line-height: 20px;
  text-align: right;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#llm-config-form {
  gap: 16px;
  margin-top: 0;
}

#llm-config-form label {
  gap: 8px;
  color: var(--ink-600);
  font-size: 13px;
  line-height: 18px;
  font-weight: 650;
}

#llm-config-form input,
#llm-config-form select {
  min-height: 48px;
  border-radius: 14px;
  padding: 12px 14px;
  background: #ffffff;
}

#llm-config-form select {
  -webkit-appearance: none;
  appearance: none;
  padding-right: 42px;
  background-image: url("data:image/svg+xml,%3Csvg%20viewBox%3D%270%200%2024%2024%27%20xmlns%3D%27http%3A//www.w3.org/2000/svg%27%3E%3Cpath%20d%3D%27M7%2010l5%205%205-5%27%20fill%3D%27none%27%20stroke%3D%27%231A2029%27%20stroke-width%3D%272.2%27%20stroke-linecap%3D%27round%27%20stroke-linejoin%3D%27round%27/%3E%3C/svg%3E");
  background-position: right 16px center;
  background-repeat: no-repeat;
  background-size: 16px 16px;
}

#llm-config-form .dual-actions {
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 12px;
  margin-top: 2px;
}

#llm-config-form .btn-primary,
#llm-config-form .btn-ghost {
  min-height: 44px;
  height: 44px;
  border-radius: 14px;
  white-space: nowrap;
}

#llm-config-status {
  margin: 14px 0 0;
  padding: 12px 14px;
  border-radius: 14px;
  background: var(--surface-soft);
  color: var(--ink-700);
  font-size: 13px;
  line-height: 20px;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.account-flyout-head {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 18px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border-weak);
}

.account-flyout-copy {
  min-width: 0;
  display: grid;
  gap: 2px;
}

.account-flyout-copy strong {
  color: var(--ink-900);
  font-size: 16px;
  line-height: 22px;
  font-weight: 600;
}

.account-flyout-copy span {
  color: var(--ink-600);
  font-size: 13px;
  line-height: 20px;
  word-break: break-all;
}

.account-flyout-panel .settings-section-head {
  align-items: center;
  min-height: 20px;
}

.account-flyout-panel .settings-section-head strong {
  font-size: 14px;
  line-height: 20px;
}

.icon-action,
.textual-action,
.link-button {
  border: 0;
  background: transparent;
  color: var(--brand-700);
  font-size: 14px;
  line-height: 20px;
  cursor: pointer;
  padding: 0;
  border-radius: 0;
  box-shadow: none;
}

.icon-action:hover,
.textual-action:hover,
.link-button:hover {
  color: var(--brand-800);
  background: transparent;
  box-shadow: none;
  transform: none;
}

.workspace-selection-toolbar,
.selection-toolbar {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 12px;
  padding: 0;
  margin-bottom: 12px;
  border: 0;
  border-radius: 0;
  background: transparent;
}

.uploads-body .workspace-selection-toolbar {
  margin: 2px 18px 6px;
}

.checkbox-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  line-height: 20px;
  font-weight: 600;
  color: var(--ink-900);
}

.checkbox-label input {
  width: 16px;
  height: 16px;
  margin: 0;
  accent-color: var(--brand-700);
}

.workspace-table-wrap,
.table-wrap {
  flex: 1;
  min-height: 0;
  border: 0;
  border-radius: 0;
  overflow: auto;
  background: #ffffff;
  padding-bottom: 0;
}

.uploads-body .workspace-table-wrap {
  --upload-table-left-gutter: 18px;
  box-sizing: border-box;
  margin: 0;
  padding-left: var(--upload-table-left-gutter);
  padding-right: 0;
  scroll-padding-left: var(--upload-table-left-gutter);
}

.uploads-body .workspace-table-wrap > .empty-card {
  margin-left: 0;
  margin-right: var(--upload-table-left-gutter, 18px);
}

table {
  min-width: 900px;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 13px;
  line-height: 20px;
}

thead th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: var(--surface-soft);
}

.uploads-body thead th {
  background: var(--surface-soft);
}

th,
td {
  padding: 13px 12px;
  border-bottom: 1px solid var(--border-weak);
  color: var(--ink-900);
  vertical-align: top;
}

th {
  font-size: 12px;
  line-height: 18px;
  font-weight: 600;
  text-align: left;
  color: var(--ink-600);
  white-space: nowrap;
}

tbody tr:hover {
  background: #FAFBFD;
}

tbody tr:has(.upload-checkbox:checked) {
  background: var(--brand-050);
}

tbody tr:has(.upload-checkbox:checked):hover {
  background: #EAF9E7;
}

.uploads-footer {
  padding: 12px 18px 18px;
  display: flex;
  justify-content: flex-end;
}

.btn-primary,
.btn-ghost {
  min-height: 38px;
  border-radius: var(--radius-control);
  padding: 8px 16px;
  font-size: 14px;
  line-height: 20px;
  font-weight: 600;
  box-shadow: none;
  transition: background-color 140ms ease, border-color 140ms ease, color 140ms ease, box-shadow 140ms ease;
}

.btn-primary {
  border: 1px solid var(--brand-600);
  background: var(--brand-600);
  color: #ffffff;
  box-shadow: none;
}

.btn-primary:hover {
  background: var(--brand-700);
  border-color: var(--brand-700);
  transform: none;
  box-shadow: none;
}

.btn-primary:active {
  transform: none;
}

.btn-primary:disabled {
  border-color: #DCEADF;
  background: #EAF6EA;
  color: #8AAF8A;
  box-shadow: none;
}

.btn-ghost {
  background: #ffffff;
  border: 1px solid var(--border-weak);
  color: var(--ink-800);
}

.btn-ghost:hover {
  background: var(--surface-soft);
  border-color: var(--border-strong);
  transform: none;
  box-shadow: none;
}

.upload-entry-panel-inline,
.callout,
.account-card,
.chat-selection-status,
.compare-summary,
.compare-card,
.loading,
.empty-card {
  border: 1px solid var(--border-weak);
  border-radius: 16px;
  background: var(--surface-soft);
  box-shadow: none;
}

.upload-entry-panel-inline {
  padding: 16px;
}

.qjl-primary-actions {
  position: relative;
  grid-template-columns: minmax(0, 1fr);
}

.account-flyout-panel .account-card {
  gap: 14px;
  padding: 16px;
  border-radius: 20px;
  background: #ffffff;
  border-color: rgba(226, 232, 240, 0.96);
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}

.account-flyout-panel .account-card-homepage {
  align-items: flex-start;
  gap: 12px;
}

.account-flyout-panel .account-card-homepage-copy {
  gap: 4px;
  padding-top: 2px;
}

.account-flyout-panel .account-card-homepage-copy strong {
  font-size: 14px;
  line-height: 20px;
}

.account-flyout-panel .account-card-homepage-copy span {
  font-size: 12px;
  line-height: 18px;
}

.account-flyout-panel #qjl-profile-summary {
  color: var(--ink-700);
  font-size: 13px;
  line-height: 1.62;
}

.account-flyout-panel .tag-list {
  gap: 6px;
}

.account-flyout-panel .tag {
  min-height: 22px;
  padding: 3px 8px;
  font-size: 12px;
  line-height: 16px;
}

.account-flyout-panel .qjl-primary-actions {
  margin-top: 2px;
}

.account-flyout-panel .qjl-primary-actions .btn-primary {
  min-height: 40px;
  border-radius: 12px;
}

.account-flyout-panel .compact-actions {
  margin-top: 0;
  gap: 12px;
}

.account-flyout-panel .compact-actions .btn-ghost {
  min-height: 38px;
  border-radius: 14px;
}

.homepage-floating-menu {
  position: fixed;
  top: var(--homepage-menu-top, 72px);
  left: var(--homepage-menu-left, 24px);
  width: min(var(--homepage-menu-width, 320px), calc(100vw - 24px));
  max-height: min(var(--homepage-menu-max-height, 360px), calc(100dvh - 24px));
  display: none;
  grid-template-rows: auto minmax(0, 1fr);
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--border-weak);
  border-radius: 16px;
  background: var(--surface-base);
  box-shadow: var(--shadow-floating);
  z-index: 1300;
}

.homepage-floating-menu.is-open {
  display: grid;
}

.homepage-menu-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.homepage-menu-head strong {
  font-size: 13px;
  line-height: 18px;
  font-weight: 600;
  color: var(--ink-900);
}

.homepage-menu-head span {
  font-size: 12px;
  line-height: 16px;
  color: var(--ink-600);
}

.homepage-menu-list {
  min-height: 0;
  display: grid;
  gap: 8px;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-gutter: auto;
}

.homepage-menu-item {
  width: 100%;
  min-height: 64px;
  padding: 10px;
  border: 1px solid var(--border-weak);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.86);
  color: var(--ink-900);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  text-align: left;
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.04);
}

.homepage-menu-item:hover {
  background: #ffffff;
  border-color: rgba(17, 191, 0, 0.28);
  transform: none;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.08);
}

.homepage-menu-item.active-homepage {
  background: var(--brand-050);
  border-color: rgba(17, 191, 0, 0.35);
}

.homepage-menu-item.active-homepage:hover {
  background: var(--brand-050);
  border-color: rgba(17, 191, 0, 0.42);
}

.homepage-menu-item:disabled {
  cursor: default;
}

.homepage-menu-avatar {
  width: 38px !important;
  height: 38px !important;
  max-width: 38px;
  max-height: 38px;
  border-radius: 999px !important;
  font-size: 14px;
}

.homepage-menu-avatar > img {
  width: 38px !important;
  height: 38px !important;
  max-width: 38px !important;
  max-height: 38px !important;
  border-radius: 999px !important;
}

.homepage-menu-copy {
  min-width: 0;
  display: grid;
  gap: 3px;
  flex: 1 1 auto;
}

.homepage-menu-title {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  font-size: 13px;
  line-height: 18px;
  font-weight: 600;
  overflow: hidden;
}

.homepage-menu-title > span:first-child {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.homepage-current-badge {
  flex: 0 0 auto;
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--brand-600);
  color: #ffffff;
  font-size: 11px;
  line-height: 16px;
  font-weight: 700;
  box-shadow: 0 4px 10px rgba(9, 186, 7, 0.22);
}

.homepage-menu-copy .homepage-current-badge {
  color: #ffffff;
}

.homepage-menu-copy span {
  font-size: 12px;
  line-height: 16px;
  color: var(--ink-600);
  overflow-wrap: anywhere;
}

.homepage-menu-empty {
  padding: 8px 10px 2px;
  font-size: 12px;
  line-height: 16px;
  color: var(--ink-600);
}

.modal-shell {
  position: fixed;
  inset: 0;
  z-index: 1200;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.modal-shell.is-open {
  display: flex;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(20, 28, 39, 0.44);
  backdrop-filter: blur(6px);
}

.modal-card {
  position: relative;
  z-index: 1;
  width: min(680px, calc(100vw - 32px));
  max-height: calc(100vh - 48px);
  overflow: auto;
  background: var(--surface-base);
  border: 1px solid var(--border-weak);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-modal);
  padding: 24px;
}

.operation-report-detail-panel {
  z-index: 3600;
  justify-content: flex-end;
  align-items: stretch;
  padding: 0;
}

.operation-report-detail-drawer {
  position: relative;
  z-index: 1;
  width: min(1360px, calc(100vw - 32px));
  height: 100dvh;
  max-height: 100dvh;
  background: var(--surface-base);
  border-left: 1px solid var(--border-weak);
  box-shadow: -24px 0 56px rgba(20, 28, 39, 0.16);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.operation-report-detail-panel.is-expanded .operation-report-detail-drawer {
  width: 100vw;
  border-left: 0;
}

.operation-report-detail-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  padding: 22px clamp(24px, 3vw, 42px);
  border-bottom: 1px solid var(--border-weak);
  background: linear-gradient(135deg, rgba(242, 252, 238, 0.86), rgba(255, 255, 255, 1));
}

.operation-report-detail-head > div:first-child {
  min-width: 0;
}

.operation-report-detail-head strong {
  display: block;
  margin-bottom: 6px;
  color: var(--ink-900);
  font-size: 18px;
  line-height: 1.3;
}

.operation-report-detail-meta {
  color: var(--text-secondary);
  font-size: 13px;
  line-height: 1.6;
}

.operation-report-detail-actions {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 8px;
}

.operation-report-detail-icon-button {
  color: var(--ink-600);
}

.operation-report-detail-icon-button:hover {
  background: var(--ink-100);
  color: var(--ink-900);
}

.operation-report-detail-expand .operation-report-restore-icon,
.operation-report-detail-expand.is-expanded .operation-report-expand-icon {
  display: none;
}

.operation-report-detail-expand.is-expanded .operation-report-restore-icon {
  display: block;
}

.operation-report-detail-body {
  min-height: 0;
  flex: 1;
  padding: 26px clamp(24px, 3vw, 42px) 36px;
  overflow: auto;
  background: #ffffff;
  color: var(--ink-900);
  font-family: var(--font-sans);
  font-size: 14px;
  line-height: 1.72;
  word-break: break-word;
}

.operation-report-detail-body h2,
.operation-report-detail-body h3,
.operation-report-detail-body h4,
.operation-report-detail-body p,
.operation-report-detail-body ul,
.operation-report-detail-body ol {
  margin: 0;
}

.operation-report-detail-body h2 {
  margin-top: 4px;
  color: var(--ink-900);
  font-size: 18px;
  line-height: 1.35;
  font-weight: 700;
}

.operation-report-detail-body h3 {
  margin-top: 24px;
  padding-top: 16px;
  border-top: 1px solid var(--border-weak);
  color: var(--ink-900);
  font-size: 16px;
  line-height: 1.45;
  font-weight: 700;
}

.operation-report-detail-body h4 {
  margin-top: 18px;
  color: var(--ink-800);
  font-size: 14px;
  line-height: 1.5;
  font-weight: 700;
}

.operation-report-detail-body p {
  margin-top: 12px;
  color: var(--ink-800);
}

.operation-report-detail-body ul,
.operation-report-detail-body ol {
  margin-top: 10px;
  padding-left: 20px;
  color: var(--ink-800);
}

.operation-report-detail-body li + li {
  margin-top: 4px;
}

.operation-report-detail-body hr {
  margin: 18px 0 4px;
  border: 0;
  border-top: 1px solid var(--border-weak);
}

.operation-report-detail-body strong {
  color: var(--ink-900);
  font-weight: 700;
}

.operation-report-detail-body code {
  padding: 1px 5px;
  border-radius: 6px;
  background: var(--ink-100);
  color: var(--ink-800);
  font-family: var(--font-mono);
  font-size: 12px;
}

.operation-report-table-wrap {
  margin-top: 12px;
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
  border: 1px solid var(--border-weak);
  border-radius: 12px;
  background: #ffffff;
}

.operation-report-table-wrap table {
  width: 100%;
  min-width: 0;
  border-collapse: collapse;
  table-layout: fixed;
  overflow-wrap: anywhere;
  font-size: 13px;
  line-height: 1.55;
}

.operation-report-table-wrap.is-wide table {
  min-width: 0;
}

.operation-report-table-wrap th,
.operation-report-table-wrap td {
  max-width: 0;
  padding: 10px 12px;
  border-right: 1px solid var(--border-weak);
  border-bottom: 1px solid var(--border-weak);
  text-align: left;
  vertical-align: top;
  overflow-wrap: anywhere;
  word-break: break-word;
  white-space: normal;
}

.operation-report-table-wrap th:last-child,
.operation-report-table-wrap td:last-child {
  border-right: 0;
}

.operation-report-table-wrap tr:last-child td {
  border-bottom: 0;
}

.operation-report-table-wrap th {
  background: var(--surface-soft);
  color: var(--ink-900);
  font-weight: 700;
  white-space: normal;
}

.operation-report-table-wrap td {
  color: var(--ink-800);
}

.operation-report-table-wrap th *,
.operation-report-table-wrap td * {
  white-space: normal;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.chat-history-popover {
  position: fixed;
  z-index: 1300;
  display: none;
  width: min(380px, calc(100vw - 24px));
  max-width: calc(100vw - 24px);
  pointer-events: none;
}

.chat-history-popover.is-open {
  display: block;
  pointer-events: auto;
}

.chat-history-card {
  width: 100%;
  max-height: min(560px, var(--chat-history-max-height, calc(100vh - 96px)));
  padding: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  background: var(--surface-base);
  border: 1px solid var(--border-weak);
  border-radius: 16px;
  box-shadow: 0 18px 48px rgba(20, 28, 39, 0.18), 0 4px 16px rgba(20, 28, 39, 0.10);
}

.chat-history-head {
  align-items: center;
  padding: 12px 20px;
  border-bottom: 1px solid var(--border-weak);
}

.chat-history-head > div {
  display: flex;
  align-items: center;
  min-height: 36px;
}

.chat-history-head strong {
  display: inline-flex;
  align-items: center;
  min-height: 20px;
  line-height: 20px;
}

.chat-history-head .modal-icon-button {
  align-self: center;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.chat-history-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 16px 8px 16px 16px;
  min-width: 0;
  overflow-y: auto;
  overflow-x: hidden;
}

.chat-history-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-width: 0;
}

.chat-history-new-button {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
  min-height: 40px;
  border: 1px solid var(--border-weak);
  border-radius: 12px;
  background: var(--surface-base);
  color: var(--ink-900);
  font-size: 14px;
  font-weight: 650;
  cursor: pointer;
  transition: background-color 140ms ease, border-color 140ms ease, color 140ms ease, box-shadow 140ms ease, transform 140ms ease;
}

.chat-history-new-button:hover {
  background: var(--ink-050);
  border-color: var(--ink-300);
  box-shadow: 0 6px 16px rgba(20, 28, 39, 0.08);
  transform: translateY(-1px);
}

.chat-history-new-button:active {
  background: var(--ink-100);
  box-shadow: none;
  transform: translateY(0);
}

.chat-history-new-button:focus-visible {
  outline: 2px solid rgba(75, 85, 99, 0.24);
  outline-offset: 2px;
}

.chat-history-day {
  display: grid;
  gap: 8px;
  min-width: 0;
}

.chat-history-day-title {
  margin: 0;
  padding-inline: 4px;
  font-size: 12px;
  line-height: 18px;
  font-weight: 700;
  color: var(--ink-500);
}

.chat-history-items {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.chat-history-item {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  gap: 4px;
  justify-content: flex-start;
  align-items: flex-start;
  padding: 10px 16px;
  border: 1px solid rgba(26, 32, 41, 0.06);
  border-radius: 12px;
  background: #f7f8fa;
  color: var(--ink-800);
  text-align: left;
  cursor: pointer;
  transition: background-color 140ms ease, border-color 140ms ease, color 140ms ease, box-shadow 140ms ease, transform 140ms ease;
}

.chat-history-item:hover {
  background: #ffffff;
  border-color: var(--ink-200);
  color: var(--ink-900);
  box-shadow: 0 6px 16px rgba(20, 28, 39, 0.06);
  transform: translateY(-1px);
}

.chat-history-item:active {
  background: var(--ink-100);
  box-shadow: none;
  transform: translateY(0);
}

.chat-history-item:focus-visible {
  outline: 2px solid rgba(75, 85, 99, 0.24);
  outline-offset: 2px;
}

.chat-history-item.is-active {
  background: var(--brand-100);
  border-color: var(--brand-400);
  color: var(--brand-800);
  justify-content: flex-start;
  align-items: flex-start;
  text-align: left;
  box-shadow: 0 0 0 1px rgba(9, 186, 7, 0.08);
}

.chat-history-item.is-active:hover {
  background: #dff8da;
  border-color: var(--brand-500);
  box-shadow: 0 8px 20px rgba(9, 186, 7, 0.10), 0 0 0 1px rgba(9, 186, 7, 0.12);
}

.chat-history-head .modal-icon-button:hover {
  background: var(--ink-100);
  color: var(--ink-900);
}

.chat-history-item.is-active .chat-history-item-title {
  color: var(--brand-900);
  font-weight: 800;
}

.chat-history-item.is-active .chat-history-item-meta {
  color: var(--brand-800);
}

.chat-history-item-title {
  display: block;
  width: 100%;
  min-width: 0;
  text-align: left;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 14px;
  line-height: 20px;
  font-weight: 650;
}

.chat-history-item-meta {
  display: block;
  width: 100%;
  min-width: 0;
  text-align: left;
  font-size: 12px;
  line-height: 18px;
  color: var(--ink-500);
}

.chat-history-empty {
  padding: 18px 10px 8px;
  color: var(--ink-500);
  text-align: center;
  font-size: 13px;
  line-height: 20px;
}

.upload-modal-card {
  display: grid;
  gap: 16px;
}

.catalog-import-status-card {
  display: grid;
  gap: 16px;
  width: min(640px, calc(100vw - 32px));
  padding: 22px 24px;
  border-radius: 24px;
}

.catalog-import-status-head span {
  display: block;
  margin-top: 6px;
  color: var(--ink-500);
  font-size: 13px;
  line-height: 1.6;
}

.catalog-import-status-body {
  min-height: 0;
}

.compare-extension-install-card {
  display: grid;
  gap: 18px;
  width: min(620px, calc(100vw - 32px));
}

.compare-extension-install-head span {
  display: block;
  margin-top: 6px;
  color: var(--ink-500);
  font-size: 13px;
  line-height: 1.6;
}

.compare-extension-install-copy {
  display: grid;
  gap: 12px;
  color: var(--ink-700);
  line-height: 1.7;
}

.compare-extension-install-copy p {
  margin: 0;
}

.compare-extension-privacy-note {
  padding: 10px 12px;
  border: 1px solid rgba(22, 163, 74, 0.18);
  border-radius: var(--radius-control);
  background: rgba(240, 253, 244, 0.86);
  color: var(--ink-600);
  font-size: 13px;
  line-height: 1.6;
}

.compare-extension-install-steps {
  display: grid;
  gap: 8px;
  margin: 0;
  padding-left: 20px;
}

.compare-extension-install-steps code {
  padding: 2px 6px;
  border-radius: 8px;
  background: var(--surface-soft);
  color: var(--ink-900);
  font-size: 13px;
}

.compare-extension-install-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.compare-extension-install-status {
  min-height: 20px;
  margin: 0;
  color: var(--ink-500);
  font-size: 13px;
  line-height: 1.5;
}

.compare-extension-inline-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  margin: 14px 0;
}

.modal-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 0;
}

.modal-head > div {
  min-width: 0;
}

.modal-head strong,
.modal-head span {
  overflow-wrap: anywhere;
}

.upload-mode-switch {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  padding: 4px;
  border-radius: 16px;
  background: var(--surface-soft);
  border: 1px solid var(--border-weak);
}

.upload-mode-button {
  min-height: 40px;
  padding: 0 14px;
  border-radius: 12px;
  border: 0;
  background: transparent;
  color: var(--ink-700);
  font-size: 14px;
  line-height: 20px;
  font-weight: 600;
  box-shadow: none;
}

.upload-mode-button:hover {
  background: rgba(255, 255, 255, 0.72);
  color: var(--ink-900);
  box-shadow: none;
  transform: none;
}

.upload-mode-button.is-active {
  background: #ffffff;
  color: var(--brand-700);
  box-shadow: inset 0 0 0 1px rgba(10, 153, 60, 0.14);
}

.upload-link-card {
  display: grid;
  gap: 14px;
  border: 1px solid var(--border-weak);
  border-radius: 16px;
  background: var(--surface-soft);
  padding: 16px;
}

.upload-link-card-head {
  display: grid;
  gap: 4px;
}

.upload-link-card-head span {
  color: var(--ink-600);
  font-size: 13px;
  line-height: 20px;
}

.upload-link-field {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
}

.upload-link-field input[readonly] {
  background: #ffffff;
  color: var(--ink-900);
  font-size: 13px;
  line-height: 20px;
}

.upload-link-preview {
  justify-self: flex-start;
  color: var(--brand-700);
  font-size: 13px;
  line-height: 20px;
  font-weight: 600;
  text-decoration: none;
}

.upload-link-preview:hover {
  text-decoration: underline;
}

#upload-entry-panel input[type="file"] {
  min-height: 44px;
  padding: 7px 8px;
  color: var(--ink-600);
}

#upload-entry-panel input[type="file"]::file-selector-button,
#upload-entry-panel input[type="file"]::-webkit-file-upload-button {
  height: 30px;
  margin-right: 12px;
  padding: 0 12px;
  border: 0;
  border-radius: 999px;
  background: var(--brand-050);
  color: var(--brand-700);
  font-weight: 600;
  cursor: pointer;
}

.modal-close-button {
  flex: 0 0 auto;
  white-space: nowrap;
  color: var(--brand-700);
  font-weight: 600;
}

.modal-icon-button {
  flex: 0 0 auto;
  width: 36px;
  height: 36px;
  border-radius: 12px;
  color: var(--ink-700);
}

.modal-close-button:hover,
.modal-icon-button:hover {
  background: var(--surface-soft);
}

body.modal-open {
  overflow: hidden;
}

.callout,
.loading,
.empty-card,
.compare-summary {
  padding: 16px;
}

.stack-form,
.compare-form {
  display: grid;
  gap: 12px;
}

.stack-form label,
.compare-form label {
  display: grid;
  gap: 6px;
  font-size: 13px;
  line-height: 18px;
  color: var(--ink-600);
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid var(--border-weak);
  border-radius: var(--radius-control);
  background: #ffffff;
  color: var(--ink-900);
  padding: 12px 14px;
  font: inherit;
  box-shadow: none;
  font-size: 14px;
  line-height: 20px;
  transition: border-color 140ms ease, box-shadow 140ms ease, background-color 140ms ease;
}

input,
select {
  min-height: 44px;
}

textarea {
  min-height: 112px;
  resize: vertical;
}

input:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: var(--brand-700);
  box-shadow: var(--focus-ring-brand);
}

input:hover,
select:hover,
textarea:hover {
  border-color: var(--border-strong);
}

input:invalid,
select:invalid,
textarea:invalid {
  border-color: var(--border-weak);
  background: #ffffff;
  box-shadow: none;
}

input[aria-invalid="true"],
select[aria-invalid="true"],
textarea[aria-invalid="true"] {
  border-color: var(--color-error);
  background: #FEF2F2;
  box-shadow: 0 0 0 4px rgba(239, 68, 68, 0.10);
}

input::placeholder,
textarea::placeholder {
  color: var(--ink-500);
}

input:disabled,
select:disabled,
textarea:disabled {
  background: #F5F7FA;
  color: var(--ink-500);
}

.compare-body {
  gap: 12px;
  padding: 0;
}

.compare-modal-shell {
  padding: 20px;
}

.compare-modal-card {
  padding: 0;
  width: min(1280px, calc(100vw - 40px));
  max-width: calc(100vw - 40px);
  height: calc(100vh - 40px);
  max-height: calc(100vh - 40px);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.compare-modal-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border-weak);
  flex: 0 0 auto;
}

.compare-modal-head strong {
  display: block;
  margin-bottom: 6px;
  font-size: 16px;
  line-height: 20px;
  font-weight: 600;
  color: var(--ink-900);
}

.compare-modal-head span {
  display: block;
  color: var(--ink-600);
  font-size: 13px;
  line-height: 20px;
}

.modal-head-actions {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex: 0 0 auto;
}

.compare-fullscreen-target {
  flex: 1;
  min-height: 0;
  display: flex;
  overflow: hidden;
}

.compare-fullscreen-target > .compare-body {
  height: 100%;
}

.detail-fullscreen-target > .detail-panel-body {
  height: 100%;
  min-width: 0;
}

.upload-preview-modal-shell {
  padding: 20px;
}

.upload-preview-card {
  padding: 0;
  width: calc(100vw - 40px);
  max-width: calc(100vw - 40px);
  height: calc(100vh - 40px);
  max-height: calc(100vh - 40px);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.upload-preview-head {
  align-items: center;
}

.upload-preview-download {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  white-space: nowrap;
}

.upload-preview-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 12px 20px;
  border-bottom: 1px solid var(--border-weak);
  background: rgba(246, 250, 245, 0.8);
  color: var(--ink-700);
  font-size: 13px;
  line-height: 20px;
}

.upload-preview-summary span {
  padding: 4px 10px;
  border-radius: var(--radius-pill);
  background: rgba(255, 255, 255, 0.82);
  border: 1px solid var(--border-weak);
}

.upload-preview-body {
  flex: 1;
  min-height: 0;
  overflow: hidden;
  background: var(--surface-base);
}

.upload-preview-body > .loading,
.upload-preview-body > .empty-card {
  margin: 20px;
}

.upload-preview-table-wrap {
  width: 100%;
  height: 100%;
  box-sizing: border-box;
  padding: 0 20px 16px;
  overflow: auto;
}

.ktt-import-modal-shell {
  padding: 20px;
}

.ktt-import-card {
  width: min(980px, calc(100vw - 40px));
  max-height: calc(100vh - 40px);
  padding: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.ktt-import-head {
  align-items: center;
}

.ktt-import-form {
  display: grid;
  gap: 12px;
  padding: 18px 20px;
  border-bottom: 1px solid var(--border-weak);
  background: rgba(249, 250, 251, 0.78);
}

.ktt-import-form label {
  display: grid;
  gap: 8px;
  color: var(--ink-800);
  font-size: 13px;
  font-weight: 650;
}

.ktt-import-form textarea {
  width: 100%;
  min-height: 118px;
  resize: vertical;
  box-sizing: border-box;
  border: 1px solid var(--border-weak);
  border-radius: 10px;
  background: var(--surface-base);
  color: var(--ink-900);
  padding: 12px 14px;
  font-size: 14px;
  line-height: 22px;
  outline: none;
}

.ktt-import-form textarea:focus {
  border-color: rgba(34, 197, 94, 0.55);
  box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.12);
}

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

.ktt-import-refresh {
  display: inline-flex !important;
  grid-template-columns: none !important;
  align-items: center;
  gap: 8px !important;
  color: var(--ink-600) !important;
  font-size: 13px !important;
  font-weight: 500 !important;
}

.ktt-import-status {
  margin: 14px 20px 0;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid var(--border-weak);
  background: var(--ink-050);
  color: var(--ink-700);
  font-size: 13px;
  line-height: 20px;
}

.ktt-import-status[data-tone="success"] {
  border-color: rgba(34, 197, 94, 0.24);
  background: rgba(240, 253, 244, 0.9);
  color: #166534;
}

.ktt-import-status[data-tone="error"] {
  border-color: rgba(239, 68, 68, 0.26);
  background: rgba(254, 242, 242, 0.92);
  color: #991b1b;
}

.ktt-import-status a {
  color: inherit;
  font-weight: 700;
}

.ktt-import-preview {
  flex: 1;
  min-height: 0;
  display: grid;
  gap: 16px;
  padding: 18px 20px 20px;
  overflow: auto;
  background: var(--surface-base);
}

.ktt-import-preview > .loading,
.ktt-import-preview > .empty-card {
  margin: 0;
}

.ktt-import-activity,
.ktt-import-products {
  display: grid;
  gap: 14px;
}

.ktt-import-section-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.ktt-import-section-head.compact {
  align-items: center;
}

.ktt-import-section-head h3 {
  margin: 2px 0 0;
  color: var(--ink-950);
  font-size: 18px;
  line-height: 26px;
  font-weight: 700;
}

.ktt-import-section-head p {
  margin: 4px 0 0;
  color: var(--ink-600);
  font-size: 13px;
  line-height: 20px;
}

.ktt-import-token {
  flex: 0 0 auto;
  padding: 6px 10px;
  border: 1px solid var(--border-weak);
  border-radius: 999px;
  color: var(--ink-600);
  background: var(--ink-050);
  font-size: 12px;
  line-height: 16px;
}

.ktt-import-metrics {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.ktt-import-metrics span,
.ktt-import-product-meta span,
.ktt-import-sku-summary span {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 3px 8px;
  border-radius: 999px;
  background: var(--ink-050);
  color: var(--ink-650);
  font-size: 12px;
  line-height: 18px;
}

.ktt-import-material-strip {
  display: flex;
  gap: 8px;
  min-width: 0;
  overflow-x: auto;
  padding-bottom: 2px;
}

.ktt-import-material-thumb,
.ktt-import-material-video,
.ktt-import-material-text,
.ktt-import-material-empty {
  flex: 0 0 auto;
  width: 72px;
  height: 72px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border-weak);
  border-radius: 8px;
  background: var(--ink-050);
  color: var(--ink-600);
  font-size: 12px;
  line-height: 16px;
  overflow: hidden;
}

.ktt-import-material-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.ktt-import-material-text {
  width: 180px;
  justify-content: flex-start;
  align-items: flex-start;
  padding: 9px;
  box-sizing: border-box;
  white-space: normal;
}

.ktt-import-material-empty {
  width: auto;
  height: auto;
  padding: 9px 12px;
}

.ktt-import-product {
  display: grid;
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--border-weak);
  border-radius: 10px;
  background: #ffffff;
}

.ktt-import-product.is-incomplete {
  border-color: rgba(239, 68, 68, 0.25);
  background: rgba(254, 242, 242, 0.45);
}

.ktt-import-product-main {
  display: grid;
  grid-template-columns: auto 72px minmax(0, 1fr);
  gap: 12px;
  align-items: flex-start;
}

.ktt-import-product-check {
  padding-top: 24px;
}

.ktt-import-product-image {
  width: 72px;
  height: 72px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border-radius: 8px;
  border: 1px solid var(--border-weak);
  background: var(--ink-050);
  color: var(--ink-500);
  font-size: 12px;
}

.ktt-import-product-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.ktt-import-product-copy {
  min-width: 0;
  display: grid;
  gap: 8px;
}

.ktt-import-product-title-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.ktt-import-product-title-row h4 {
  margin: 0;
  color: var(--ink-950);
  font-size: 15px;
  line-height: 22px;
  font-weight: 700;
}

.ktt-import-state {
  flex: 0 0 auto;
  padding: 4px 8px;
  border-radius: 999px;
  font-size: 12px;
  line-height: 16px;
  font-weight: 700;
}

.ktt-import-state.is-ready {
  background: rgba(220, 252, 231, 0.9);
  color: #166534;
}

.ktt-import-state.is-blocked {
  background: rgba(254, 226, 226, 0.9);
  color: #991b1b;
}

.ktt-import-product-meta,
.ktt-import-sku-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.ktt-import-warning-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.ktt-import-warning-list span {
  padding: 4px 8px;
  border-radius: 999px;
  background: rgba(255, 247, 237, 0.95);
  color: #9a3412;
  font-size: 12px;
  line-height: 16px;
}

.ktt-import-warning-list.is-severe span {
  background: rgba(254, 226, 226, 0.96);
  color: #991b1b;
}

.ktt-import-skus {
  border-top: 1px solid var(--border-weak);
  padding-top: 10px;
}

.ktt-import-skus summary {
  cursor: pointer;
  color: var(--ink-800);
  font-size: 13px;
  font-weight: 650;
}

.ktt-import-sku-grid {
  display: grid;
  gap: 6px;
  margin-top: 10px;
}

.ktt-import-sku-row {
  display: grid;
  grid-template-columns: 32px minmax(140px, 1fr) 96px 96px minmax(110px, 0.7fr);
  gap: 10px;
  align-items: center;
  padding: 8px 10px;
  border: 1px solid var(--border-weak);
  border-radius: 8px;
  color: var(--ink-700);
  font-size: 13px;
  line-height: 18px;
}

.ktt-import-sku-row strong {
  color: var(--ink-950);
}

.ktt-import-sku-image {
  width: 32px;
  height: 32px;
  display: inline-flex;
  border-radius: 6px;
  background: var(--ink-050);
  overflow: hidden;
}

.ktt-import-sku-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.ktt-import-footer {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  padding: 14px 20px;
  border-top: 1px solid var(--border-weak);
  background: rgba(249, 250, 251, 0.9);
}

@media (max-width: 720px) {
  .topbar-ktt-import-button span {
    display: none;
  }

  .topbar-ktt-import-button {
    width: 32px;
    padding: 0;
  }

  .ktt-import-card {
    width: calc(100vw - 24px);
    max-height: calc(100vh - 24px);
  }

  .ktt-import-section-head,
  .ktt-import-product-title-row {
    flex-direction: column;
    align-items: flex-start;
  }

  .ktt-import-product-main {
    grid-template-columns: auto 56px minmax(0, 1fr);
  }

  .ktt-import-product-image {
    width: 56px;
    height: 56px;
  }

  .ktt-import-sku-row {
    grid-template-columns: 32px minmax(120px, 1fr);
  }

  .ktt-import-sku-row strong,
  .ktt-import-sku-row span:nth-child(n+4) {
    grid-column: 2;
  }
}

.upload-preview-table {
  min-width: max(980px, 100%);
}

.upload-preview-table th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: #F5F7FA;
  color: var(--ink-700);
}

.upload-preview-table td {
  vertical-align: top;
  white-space: normal;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.upload-preview-image-cell {
  min-width: 128px;
  white-space: normal;
}

.upload-preview-table .product-image-thumb {
  width: 76px;
  height: 76px;
  border-radius: 10px;
}

.upload-preview-image-compare {
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.upload-preview-image-compare-thumb {
  display: inline-flex;
  padding: 0;
  cursor: pointer;
  background: var(--page-base);
}

.upload-preview-image-compare-thumb:hover {
  border-color: rgba(9, 186, 7, 0.55);
  box-shadow: 0 0 0 3px rgba(9, 186, 7, 0.10), var(--shadow-sm);
  transform: translateY(-1px);
}

.upload-preview-image-compare-thumb:focus-visible {
  outline: none;
  border-color: var(--brand-700);
  box-shadow: var(--focus-ring-brand), var(--shadow-sm);
}

.upload-preview-image-compare-button {
  min-width: 76px;
  height: 28px;
  padding: 0 10px;
  border: 1px solid rgba(9, 186, 7, 0.22);
  border-radius: var(--radius-pill);
  background: var(--brand-050);
  color: var(--brand-800);
  font-size: 12px;
  line-height: 18px;
  font-weight: 700;
  white-space: nowrap;
  box-shadow: none;
}

.upload-preview-image-compare-button:hover {
  border-color: rgba(9, 186, 7, 0.48);
  background: var(--brand-100);
  box-shadow: none;
  transform: translateY(-1px);
}

.upload-preview-image-compare-button:focus-visible {
  outline: none;
  box-shadow: var(--focus-ring-brand);
}

.upload-preview-external-link {
  display: inline-block;
  max-width: min(360px, 100%);
  vertical-align: top;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.upload-preview-link-separator {
  color: var(--ink-500);
}

.upload-preview-table th:first-child,
.upload-preview-table td:first-child {
  padding-left: 0;
}

.catalog-preview-button {
  border: 0;
  background: transparent;
  padding: 0;
  cursor: pointer;
  text-align: left;
  font: inherit;
}

.compare-form {
  grid-template-columns: repeat(auto-fit, minmax(min(180px, 100%), 1fr));
  gap: 12px;
  align-items: end;
  padding: 18px 18px 0;
}

.compare-form > :first-child {
  grid-column: 1 / -1;
}

.compare-form > * {
  min-width: 0;
}

.compare-form button {
  width: 100%;
  min-height: 44px;
}

.compare-result {
  flex: 1;
  min-height: 0;
  overflow: auto;
  padding: 0 18px 18px;
  background: #FFFFFF;
}

.compare-cards {
  display: grid;
  gap: 14px;
}

.compare-card {
  padding: 16px;
  background: var(--surface-soft);
  border-radius: 18px;
}

.external-compare-card .external-link {
  display: inline-flex;
  margin-top: 12px;
}

.external-compare-main {
  min-width: 0;
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.external-compare-copy {
  min-width: 0;
}

.external-compare-heading {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.external-compare-tag {
  padding: 4px 8px;
  font-size: 11px;
}

.external-compare-thumb {
  width: 100px;
  height: 100px;
  flex: 0 0 100px;
  overflow: hidden;
  border: 1px solid var(--border-weak);
  border-radius: 14px;
  background: var(--page-base);
}

.external-compare-thumb img,
.external-compare-thumb-fallback {
  width: 100%;
  height: 100%;
}

.external-compare-thumb img {
  display: block;
  object-fit: cover;
}

.external-compare-thumb-fallback {
  display: flex;
  align-items: center;
  justify-content: center;
  color: #8c93a1;
  font-size: 11px;
  line-height: 16px;
  text-align: center;
  padding: 8px;
}

.compare-card h4 {
  margin: 0 0 6px;
  font-size: 15px;
  line-height: 22px;
  font-weight: 600;
  color: var(--ink-900);
}

.compare-card p,
.compare-meta,
.offer-row {
  color: var(--ink-600);
  font-size: 13px;
  line-height: 20px;
}

.price-badge {
  min-width: 92px;
  border-radius: 14px;
  padding: 10px 12px;
  background: var(--brand-050);
  border: 1px solid rgba(9, 186, 7, 0.10);
}

.price-badge strong {
  display: block;
  color: var(--brand-700);
  font-size: 18px;
  line-height: 24px;
  font-weight: 700;
}

.price-badge span {
  display: block;
  margin-top: 2px;
  font-size: 12px;
  line-height: 16px;
}

.detail-panel .chat-workspace {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  padding: 0;
}

.ai-chat-tabs {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 4px;
  margin: 12px 18px 0;
  padding: 3px;
  border: 1px solid var(--border-weak);
  border-radius: 12px;
  background: #ffffff;
}

.ai-chat-tab {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 31px;
  padding: 0 10px;
  border: 1px solid transparent;
  border-radius: 9px;
  background: transparent;
  color: var(--ink-600);
  font-size: 13px;
  line-height: 18px;
  font-weight: 600;
  white-space: nowrap;
  cursor: pointer;
  transition: background-color 140ms ease, color 140ms ease, box-shadow 140ms ease;
}

.ai-chat-tab:hover {
  color: var(--ink-900);
  background: var(--surface-soft);
}

.ai-chat-tab:focus-visible {
  outline: none;
  box-shadow: var(--focus-ring-brand);
}

.ai-chat-tab.is-active {
  border-color: rgba(9, 186, 7, 0.16);
  background: rgba(9, 186, 7, 0.06);
  color: var(--brand-700);
  box-shadow: none;
}

.ai-chat-tab-label {
  display: inline-block;
  min-width: 0;
}

.ai-chat-tab-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 16px;
  padding: 0 5px;
  border: 1px solid rgba(217, 119, 6, 0.16);
  border-radius: var(--radius-pill);
  background: #fff7ed;
  color: #b45309;
  font-size: 10px;
  line-height: 15px;
  font-weight: 700;
}

.ai-chat-tab:not(.is-active) .ai-chat-tab-badge {
  border-color: rgba(26, 32, 41, 0.08);
  background: rgba(26, 32, 41, 0.04);
  color: var(--ink-500);
}

.ai-chat-tab-panel {
  flex: 1 1 auto;
  min-height: 0;
  display: none;
  flex-direction: column;
}

.ai-chat-tab-panel.is-active {
  display: flex;
}

.detail-panel-body {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
}

.workspace-chat-panel,
.chat-panel {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 0;
  background: #ffffff;
  overflow: hidden;
}

.rallycat-agent-panel {
  gap: 12px;
}

.rallycat-config-stack {
  display: none;
}

.rallycat-agent-status {
  flex: 0 0 auto;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 13px 14px;
  border: 1px solid var(--border-weak);
  border-radius: 16px;
  background: var(--surface-soft);
}

.rallycat-agent-status {
  background: linear-gradient(135deg, rgba(9, 186, 7, 0.045), rgba(255, 255, 255, 0.92) 60%);
}

.rallycat-agent-main {
  min-width: 0;
  display: grid;
  gap: 5px;
}

.rallycat-agent-badge {
  width: fit-content;
  max-width: 100%;
  padding: 2px 8px;
  border-radius: var(--radius-pill);
  background: rgba(9, 186, 7, 0.10);
  color: var(--brand-700);
  font-size: 12px;
  line-height: 17px;
  font-weight: 700;
}

.rallycat-agent-status strong {
  color: var(--ink-900);
  font-size: 15px;
  line-height: 21px;
  font-weight: 700;
}

.rallycat-agent-status span {
  color: var(--ink-500);
  font-size: 12px;
  line-height: 17px;
}

.rallycat-agent-messages {
  padding-inline: 18px;
}

.rallycat-empty {
  align-self: center;
  display: grid;
  gap: 8px;
  width: min(430px, 100%);
  margin: auto 0;
  padding: 24px;
  border: 1px solid var(--border-weak);
  border-radius: 16px;
  background: var(--surface-soft);
  text-align: center;
}

.rallycat-empty strong {
  color: var(--ink-900);
  font-size: 16px;
  line-height: 23px;
}

.rallycat-empty p {
  margin: 0;
  color: var(--ink-600);
  font-size: 13px;
  line-height: 20px;
}

.rallycat-empty-actions {
  display: flex;
  justify-content: center;
  margin-top: 4px;
}

.rallycat-empty.is-error {
  border-color: rgba(250, 81, 81, 0.18);
  background: var(--color-error-bg);
}

.rallycat-data-status {
  display: grid;
  gap: 8px;
  margin-top: 12px;
  padding: 10px;
  border: 1px solid rgba(9, 186, 7, 0.12);
  border-radius: 12px;
  background: rgba(247, 253, 247, 0.86);
}

.rallycat-data-status-head {
  display: flex;
  align-items: baseline;
  gap: 8px;
  min-width: 0;
}

.rallycat-data-status-head span {
  flex: 0 0 auto;
  color: var(--brand-700);
  font-size: 12px;
  line-height: 17px;
  font-weight: 700;
}

.rallycat-data-status-head strong {
  min-width: 0;
  color: var(--ink-800);
  font-size: 13px;
  line-height: 19px;
  font-weight: 700;
}

.rallycat-data-status-meta {
  color: var(--ink-500);
  font-size: 12px;
  line-height: 17px;
}

.rallycat-data-chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.rallycat-data-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 26px;
  padding: 3px 8px;
  border: 1px solid var(--border-weak);
  border-radius: var(--radius-pill);
  background: #ffffff;
  color: var(--ink-700);
  font-size: 12px;
  line-height: 17px;
}

.rallycat-data-chip b,
.rallycat-data-chip em {
  font-style: normal;
  font-weight: 700;
}

.rallycat-data-chip em {
  color: var(--ink-500);
}

.rallycat-data-chip.is-ok {
  border-color: rgba(9, 186, 7, 0.18);
  color: var(--brand-700);
}

.rallycat-data-chip.is-warn {
  border-color: rgba(250, 81, 81, 0.20);
  color: var(--color-error);
}

.rallycat-data-chip.is-empty {
  color: var(--ink-500);
}

.rallycat-data-missing {
  display: grid;
  gap: 6px;
}

.rallycat-data-missing-item {
  display: grid;
  gap: 3px;
  padding: 8px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.76);
}

.rallycat-data-missing-item span {
  width: fit-content;
  padding: 1px 6px;
  border-radius: var(--radius-pill);
  background: rgba(250, 81, 81, 0.08);
  color: var(--color-error);
  font-size: 11px;
  line-height: 16px;
  font-weight: 700;
}

.rallycat-data-missing-item strong {
  color: var(--ink-800);
  font-size: 13px;
  line-height: 18px;
}

.rallycat-data-missing-item p {
  margin: 0;
  color: var(--ink-600);
  font-size: 12px;
  line-height: 18px;
}

.rallycat-empty.is-error strong,
.rallycat-empty.is-error p {
  color: var(--color-error-text);
}

.rallycat-message-meta,
.rallycat-message-status {
  margin-top: 8px;
  color: var(--ink-500);
  font-size: 12px;
  line-height: 17px;
}

.rallycat-message-status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  width: fit-content;
  max-width: 100%;
  padding: 4px 8px;
  border-radius: 999px;
  background: rgba(9, 186, 7, 0.08);
  color: var(--brand-700);
  font-weight: 600;
}

.rallycat-message-status::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: currentColor;
  opacity: 0.72;
}

.rallycat-message-status.is-warn {
  background: rgba(245, 158, 11, 0.12);
  color: #9A5B00;
}

.rallycat-message.assistant {
  padding: 14px 16px;
  border: 1px solid rgba(9, 186, 7, 0.12);
  border-radius: 16px;
  background: rgba(242, 252, 238, 0.58);
}

.rallycat-message.assistant .chat-content {
  width: 100%;
}

.rallycat-progress-message {
  background: transparent;
  border-color: transparent;
  padding-top: 0;
}

.rallycat-agent-thinking {
  width: min(720px, 100%);
  margin-bottom: 12px;
  background: rgba(255, 255, 255, 0.82);
  border-color: rgba(9, 186, 7, 0.14);
}

.rallycat-agent-thinking.is-active {
  box-shadow: 0 10px 28px rgba(9, 186, 7, 0.06);
}

.rallycat-agent-thinking.is-complete {
  width: fit-content;
  min-width: min(260px, 100%);
}

.rallycat-agent-thinking .chat-thinking-summary {
  color: var(--ink-500);
}

.chat-composer-hint[data-tone="ok"] {
  color: var(--brand-700);
}

.chat-composer-hint[data-tone="warn"] {
  color: var(--color-error);
}

.rallycat-agent-composer .chat-composer-footer {
  justify-content: space-between;
}

.rallycat-agent-composer .chat-composer-hint {
  flex: 1 1 auto;
  min-width: 0;
  min-height: 32px;
  display: inline-flex;
  align-items: center;
  color: var(--ink-500);
  font-size: 12px;
  line-height: 18px;
}

.rallycat-agent-composer .btn-primary {
  margin-left: auto;
}

.chat-selection-status {
  display: block;
  margin: 16px 18px 0;
  font-size: 13px;
  line-height: 20px;
  color: var(--ink-800);
  background: var(--brand-050);
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid rgba(9, 186, 7, 0.08);
}

.chat-messages {
  flex: 1;
  min-height: 0;
  max-height: none;
  padding: 16px 18px 18px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  overflow: auto;
}

.chat-opening {
  width: min(920px, 100%);
  margin: auto;
  display: grid;
  gap: 18px;
  padding: 8px 0;
}

.chat-opening-copy {
  display: grid;
  gap: 9px;
}

.chat-opening h4 {
  margin: 0;
  color: var(--ink-900);
  font-size: 22px;
  line-height: 30px;
  font-weight: 800;
}

.chat-opening h4 span {
  display: block;
}

.chat-opening p {
  margin: 0;
  color: var(--ink-700);
  font-size: 14px;
  line-height: 22px;
}

.chat-starter-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 10px;
}

.chat-starter-button {
  min-height: 116px;
  padding: 14px;
  display: grid;
  align-content: start;
  gap: 9px;
  border-radius: 16px;
  border: 1px solid var(--border-weak);
  background: #fff;
  color: var(--ink-900);
  text-align: left;
  cursor: pointer;
  box-shadow: none;
  transition: border-color 160ms ease, background-color 160ms ease, transform 160ms ease;
}

.chat-starter-button:hover {
  border-color: var(--border-strong);
  background: var(--surface-soft);
  transform: translateY(-1px);
}

.chat-starter-button:focus-visible {
  outline: 2px solid rgba(75, 85, 99, 0.24);
  outline-offset: 2px;
}

.chat-starter-button.is-pending,
.chat-starter-button:disabled {
  cursor: wait;
  opacity: 0.72;
  transform: none;
}

.chat-starter-button span {
  color: var(--ink-500);
  font-size: 12px;
  line-height: 16px;
  font-weight: 400;
}

.chat-starter-button strong {
  color: var(--ink-900);
  font-size: 14px;
  line-height: 21px;
  font-weight: 400;
}

.chat-bubble {
  width: auto;
  max-width: none;
  padding: 15px 16px;
  border-radius: 18px;
  background: var(--surface-soft);
  border: 1px solid var(--border-weak);
  box-shadow: none;
  min-width: 0;
  overflow: visible;
}

.chat-bubble.user {
  align-self: flex-end;
  width: fit-content;
  max-width: min(72%, 560px);
  background: var(--color-user-bubble);
  border-color: rgba(26, 32, 41, 0.06);
  box-shadow: none;
}

.chat-bubble.assistant {
  align-self: stretch;
  width: auto;
  max-width: none;
  margin-right: 0;
  margin-left: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
}

.chat-bubble.user + .chat-bubble.assistant,
.chat-bubble.assistant + .chat-bubble.user {
  margin-top: 22px;
}

.chat-bubble:hover {
  box-shadow: none;
  transform: none;
}

.chat-bubble.user .chat-content {
  color: var(--ink-900);
}

.chat-bubble.assistant .chat-content {
  width: 100%;
  max-width: none;
}

.chat-content {
  font-size: 14px;
  line-height: 22px;
  color: var(--ink-900);
  min-width: 0;
  max-width: 100%;
  white-space: normal;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.chat-content > :first-child {
  margin-top: 0;
}

.chat-content > :last-child {
  margin-bottom: 0;
}

.chat-thinking {
  display: grid;
  gap: 10px;
  width: fit-content;
  max-width: 100%;
  margin: 0 0 12px;
  padding: 12px 13px;
  border: 1px solid var(--border-weak);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.72);
}

.chat-thinking.is-collapsed {
  margin-bottom: 10px;
  padding: 10px 12px;
}

.chat-thinking-header {
  width: 100%;
  min-width: 0;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  text-align: left;
}

button.chat-thinking-header {
  cursor: pointer;
}

button.chat-thinking-header:focus-visible {
  outline: 2px solid rgba(9, 186, 7, 0.36);
  outline-offset: 3px;
  border-radius: 10px;
}

.chat-thinking-title {
  color: var(--ink-900);
  font-weight: 700;
  white-space: nowrap;
}

.chat-thinking-summary {
  min-width: 0;
  color: var(--ink-700);
  overflow-wrap: anywhere;
}

.chat-thinking-chevron {
  width: 8px;
  height: 8px;
  align-self: center;
  border-right: 1.5px solid var(--ink-500);
  border-bottom: 1.5px solid var(--ink-500);
  transform: translateY(-1px) rotate(45deg);
  transform-origin: center;
  transition: transform var(--duration-fast) var(--ease-standard);
}

.chat-thinking:not(.is-collapsed) .chat-thinking-chevron {
  transform: translateY(1px) rotate(225deg);
}

.chat-content .chat-thinking-steps {
  display: grid;
  gap: 9px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.chat-content .chat-thinking-step {
  display: grid;
  grid-template-columns: 12px minmax(0, 1fr);
  align-items: center;
  gap: 8px;
  min-height: 20px;
  margin: 0;
  padding: 0;
  line-height: 20px;
  color: var(--ink-600);
}

.chat-content .chat-thinking-step.is-done {
  color: var(--ink-700);
}

.chat-content .chat-thinking-step.is-active {
  color: var(--ink-900);
  font-weight: 600;
}

.chat-content .chat-thinking-step.is-active span:last-child {
  animation: chat-thinking-breathe 1.6s ease-in-out infinite;
}

.chat-content .chat-thinking-step.is-pending {
  color: var(--ink-500);
}

.chat-content .chat-thinking-step.is-failed {
  color: var(--color-error);
}

.chat-thinking-spinner,
.chat-thinking-dot {
  justify-self: center;
  box-sizing: border-box;
  display: inline-block;
}

.chat-thinking-spinner {
  width: 14px;
  height: 14px;
  border: 2px solid rgba(9, 186, 7, 0.18);
  border-top-color: var(--brand-600);
  border-radius: 999px;
  animation: chat-thinking-spin 0.86s linear infinite;
}

.chat-thinking-dot {
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: rgba(17, 24, 39, 0.24);
}

.chat-thinking-step.is-done .chat-thinking-dot {
  background: var(--brand-600);
}

.chat-thinking-step.is-failed .chat-thinking-dot {
  width: 9px;
  height: 9px;
  background: var(--color-error);
}

.chat-answer {
  width: 100%;
  min-width: 0;
}

.chat-thinking + .chat-answer {
  margin-top: 10px;
}

.chat-answer > :first-child {
  margin-top: 0;
}

.chat-answer > :last-child {
  margin-bottom: 0;
}

.ktt-activity-card {
  margin-top: 14px;
  padding: 14px;
  border: 1px solid rgba(9, 186, 7, 0.16);
  border-radius: 12px;
  background: rgba(9, 186, 7, 0.04);
}

.ktt-activity-card.is-error {
  border-color: rgba(220, 38, 38, 0.18);
  background: rgba(220, 38, 38, 0.04);
}

.ktt-activity-main {
  display: flex;
  align-items: flex-start;
  gap: 14px;
}

.ktt-activity-copy {
  min-width: 0;
  display: grid;
  gap: 5px;
  flex: 1 1 auto;
}

.ktt-activity-copy strong {
  font-size: 15px;
  line-height: 21px;
  color: var(--ink-900);
}

.ktt-activity-copy small,
.ktt-activity-copy p {
  margin: 0;
  color: var(--ink-600);
}

.ktt-activity-copy a {
  width: fit-content;
  color: var(--brand-700);
  font-weight: 600;
  text-decoration: none;
}

.ktt-activity-copy a:hover {
  text-decoration: underline;
}

.ktt-activity-badge {
  width: fit-content;
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(9, 186, 7, 0.11);
  color: var(--brand-700);
  font-size: 12px;
  line-height: 18px;
  font-weight: 700;
}

.ktt-activity-card.is-error .ktt-activity-badge {
  background: rgba(220, 38, 38, 0.1);
  color: var(--color-error);
}

.ktt-activity-qrcode {
  width: 132px;
  height: 132px;
  object-fit: contain;
  flex: 0 0 auto;
  border-radius: 8px;
  border: 1px solid var(--border-weak);
  background: #fff;
}

.ktt-activity-warnings {
  margin: 12px 0 0;
  padding-left: 18px;
  color: var(--ink-600);
}

.detail-panel:hover {
  box-shadow: var(--shadow-card);
  border-color: var(--border-weak);
}

.detail-panel:hover .workspace-panel-body,
.detail-panel:hover .chat-workspace {
  background: var(--surface-base);
  box-shadow: none;
}

.chat-content h1,
.chat-content h2,
.chat-content h3,
.chat-content h4,
.chat-content h5,
.chat-content h6 {
  margin-top: 20px;
  margin-bottom: 10px;
  font-weight: 700;
  letter-spacing: -0.01em;
  overflow-wrap: anywhere;
}

.chat-content h1 {
  font-size: 24px;
  line-height: 1.4;
}

.chat-content h2 {
  font-size: 20px;
  line-height: 1.45;
}

.chat-content h3 {
  font-size: 17px;
  line-height: 1.5;
}

.chat-content h4,
.chat-content h5,
.chat-content h6 {
  font-size: 15px;
  line-height: 1.55;
}

.chat-content ul,
.chat-content ol {
  padding-left: 1.35em;
  margin: 10px 0;
}

.chat-content li {
  margin: 5px 0;
  line-height: 1.65;
}

.chat-content li > ul,
.chat-content li > ol {
  margin: 6px 0 0;
  padding-left: 1.3em;
}

.chat-table-scroll {
  width: 100%;
  max-width: 100%;
  overflow-x: auto;
  overflow-y: hidden;
  margin: 12px 0;
  padding-bottom: 4px;
  -webkit-overflow-scrolling: touch;
  scrollbar-gutter: auto;
  scrollbar-width: thin;
  scrollbar-color: rgba(9, 186, 7, 0.3) rgba(0, 0, 0, 0.04);
}

.chat-table-scroll::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

.chat-table-scroll::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.04);
  border-radius: 3px;
}

.chat-table-scroll::-webkit-scrollbar-thumb {
  background: rgba(9, 186, 7, 0.3);
  border-radius: 3px;
}

.chat-table-scroll::-webkit-scrollbar-thumb:hover {
  background: rgba(9, 186, 7, 0.5);
}

.panel-content,
.table-wrap,
.workspace-table-wrap,
.uploads-body,
.chat-messages,
.chat-content pre,
.compare-body,
.compare-result,
.chat-table-scroll,
.compare-platform-menu,
.compare-platform-table-wrap,
.catalog-source-tabs,
.selection-pool-tabs,
.selection-pool-list,
.modal-card,
.settings-flyout-panel,
.account-flyout-panel,
.chat-history-list,
.upload-preview-table-wrap,
.homepage-menu-list,
.supplier-layout,
.supplier-list-body,
.supplier-detail-body,
.supplier-note-detail-body {
  --scrollbar-current-thumb: transparent;
  scrollbar-width: thin;
  scrollbar-color: var(--scrollbar-current-thumb) var(--scrollbar-track);
}

.workspace-panel:is(:hover, :focus-within) :is(
  .panel-content,
  .table-wrap,
  .workspace-table-wrap,
  .uploads-body,
  .chat-messages,
  .chat-content pre,
  .compare-body,
  .compare-result,
  .chat-table-scroll,
  .compare-platform-table-wrap,
  .catalog-source-tabs,
  .selection-pool-tabs,
  .selection-pool-list,
  .supplier-layout,
  .supplier-list-body,
  .supplier-detail-body,
  .supplier-note-detail-body
),
.panel:is(:hover, :focus-within) :is(
  .panel-content,
  .table-wrap,
  .workspace-table-wrap,
  .chat-content pre,
  .chat-table-scroll
),
.modal-card:is(:hover, :focus-within),
.modal-card:is(:hover, :focus-within) :is(
  .chat-messages,
  .chat-content pre,
  .compare-body,
  .compare-result,
  .chat-table-scroll,
  .compare-platform-table-wrap,
  .chat-history-list,
  .upload-preview-table-wrap
),
.settings-flyout-panel:is(:hover, :focus-within),
.account-flyout-panel:is(:hover, :focus-within),
.chat-history-card:is(:hover, :focus-within) .chat-history-list,
.homepage-floating-menu:is(:hover, :focus-within) .homepage-menu-list,
.compare-platform-menu:is(:hover, :focus-within),
.chat-history-list:is(:hover, :focus-within),
.supplier-layout:is(:hover, :focus-within),
.catalog-source-tabs:is(:hover, :focus-within),
.selection-pool-tabs:is(:hover, :focus-within),
.selection-pool-list:is(:hover, :focus-within),
.chat-table-scroll:is(:hover, :focus-within),
.compare-platform-table-wrap:is(:hover, :focus-within) {
  --scrollbar-current-thumb: var(--scrollbar-thumb);
}

.panel-content::-webkit-scrollbar,
.table-wrap::-webkit-scrollbar,
.workspace-table-wrap::-webkit-scrollbar,
.uploads-body::-webkit-scrollbar,
.chat-messages::-webkit-scrollbar,
.chat-content pre::-webkit-scrollbar,
.compare-body::-webkit-scrollbar,
.compare-result::-webkit-scrollbar,
.chat-table-scroll::-webkit-scrollbar,
.compare-platform-menu::-webkit-scrollbar,
.compare-platform-table-wrap::-webkit-scrollbar,
.catalog-source-tabs::-webkit-scrollbar,
.selection-pool-tabs::-webkit-scrollbar,
.selection-pool-list::-webkit-scrollbar,
.modal-card::-webkit-scrollbar,
.settings-flyout-panel::-webkit-scrollbar,
.account-flyout-panel::-webkit-scrollbar,
.chat-history-list::-webkit-scrollbar,
.upload-preview-table-wrap::-webkit-scrollbar,
.homepage-menu-list::-webkit-scrollbar,
.supplier-layout::-webkit-scrollbar,
.supplier-list-body::-webkit-scrollbar,
.supplier-detail-body::-webkit-scrollbar,
.supplier-note-detail-body::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

.panel-content::-webkit-scrollbar-track,
.table-wrap::-webkit-scrollbar-track,
.workspace-table-wrap::-webkit-scrollbar-track,
.uploads-body::-webkit-scrollbar-track,
.chat-messages::-webkit-scrollbar-track,
.chat-content pre::-webkit-scrollbar-track,
.compare-body::-webkit-scrollbar-track,
.compare-result::-webkit-scrollbar-track,
.chat-table-scroll::-webkit-scrollbar-track,
.compare-platform-menu::-webkit-scrollbar-track,
.compare-platform-table-wrap::-webkit-scrollbar-track,
.catalog-source-tabs::-webkit-scrollbar-track,
.selection-pool-tabs::-webkit-scrollbar-track,
.selection-pool-list::-webkit-scrollbar-track,
.modal-card::-webkit-scrollbar-track,
.settings-flyout-panel::-webkit-scrollbar-track,
.account-flyout-panel::-webkit-scrollbar-track,
.chat-history-list::-webkit-scrollbar-track,
.upload-preview-table-wrap::-webkit-scrollbar-track,
.homepage-menu-list::-webkit-scrollbar-track,
.supplier-layout::-webkit-scrollbar-track,
.supplier-list-body::-webkit-scrollbar-track,
.supplier-detail-body::-webkit-scrollbar-track,
.supplier-note-detail-body::-webkit-scrollbar-track {
  background: var(--scrollbar-track);
}

.panel-content::-webkit-scrollbar-thumb,
.table-wrap::-webkit-scrollbar-thumb,
.workspace-table-wrap::-webkit-scrollbar-thumb,
.uploads-body::-webkit-scrollbar-thumb,
.chat-messages::-webkit-scrollbar-thumb,
.chat-content pre::-webkit-scrollbar-thumb,
.compare-body::-webkit-scrollbar-thumb,
.compare-result::-webkit-scrollbar-thumb,
.chat-table-scroll::-webkit-scrollbar-thumb,
.compare-platform-menu::-webkit-scrollbar-thumb,
.compare-platform-table-wrap::-webkit-scrollbar-thumb,
.catalog-source-tabs::-webkit-scrollbar-thumb,
.selection-pool-tabs::-webkit-scrollbar-thumb,
.selection-pool-list::-webkit-scrollbar-thumb,
.modal-card::-webkit-scrollbar-thumb,
.settings-flyout-panel::-webkit-scrollbar-thumb,
.account-flyout-panel::-webkit-scrollbar-thumb,
.chat-history-list::-webkit-scrollbar-thumb,
.upload-preview-table-wrap::-webkit-scrollbar-thumb,
.homepage-menu-list::-webkit-scrollbar-thumb,
.supplier-layout::-webkit-scrollbar-thumb,
.supplier-list-body::-webkit-scrollbar-thumb,
.supplier-detail-body::-webkit-scrollbar-thumb,
.supplier-note-detail-body::-webkit-scrollbar-thumb {
  border: 2px solid transparent;
  border-radius: var(--radius-pill);
  background-color: var(--scrollbar-current-thumb);
  background-clip: content-box;
}

.panel-content::-webkit-scrollbar-thumb:hover,
.table-wrap::-webkit-scrollbar-thumb:hover,
.workspace-table-wrap::-webkit-scrollbar-thumb:hover,
.uploads-body::-webkit-scrollbar-thumb:hover,
.chat-messages::-webkit-scrollbar-thumb:hover,
.chat-content pre::-webkit-scrollbar-thumb:hover,
.compare-body::-webkit-scrollbar-thumb:hover,
.compare-result::-webkit-scrollbar-thumb:hover,
.chat-table-scroll::-webkit-scrollbar-thumb:hover,
.compare-platform-menu::-webkit-scrollbar-thumb:hover,
.compare-platform-table-wrap::-webkit-scrollbar-thumb:hover,
.catalog-source-tabs::-webkit-scrollbar-thumb:hover,
.selection-pool-tabs::-webkit-scrollbar-thumb:hover,
.selection-pool-list::-webkit-scrollbar-thumb:hover,
.modal-card::-webkit-scrollbar-thumb:hover,
.settings-flyout-panel::-webkit-scrollbar-thumb:hover,
.account-flyout-panel::-webkit-scrollbar-thumb:hover,
.chat-history-list::-webkit-scrollbar-thumb:hover,
.upload-preview-table-wrap::-webkit-scrollbar-thumb:hover,
.homepage-menu-list::-webkit-scrollbar-thumb:hover,
.supplier-layout::-webkit-scrollbar-thumb:hover,
.supplier-list-body::-webkit-scrollbar-thumb:hover,
.supplier-detail-body::-webkit-scrollbar-thumb:hover,
.supplier-note-detail-body::-webkit-scrollbar-thumb:hover {
  background-color: var(--scrollbar-thumb-strong);
}

.chat-content table {
  width: max-content;
  min-width: 100%;
  margin: 0;
}

.chat-content th,
.chat-content td {
  min-width: 108px;
  max-width: 320px;
  white-space: normal;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.detail-fullscreen-target .chat-bubble.assistant .chat-content {
  width: 100%;
  max-width: none;
}

.detail-fullscreen-target .chat-bubble.assistant .chat-content > :not(.chat-table-scroll) {
  max-width: 980px;
}

.detail-fullscreen-target .chat-table-scroll {
  width: 100%;
  overflow-x: visible;
  padding-bottom: 0;
}

.detail-fullscreen-target .chat-content table {
  width: 100%;
  min-width: 0;
  table-layout: fixed;
}

.detail-fullscreen-target .chat-content th,
.detail-fullscreen-target .chat-content td {
  min-width: 0;
  max-width: none;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.detail-fullscreen-target .chat-content th:first-child,
.detail-fullscreen-target .chat-content td:first-child {
  width: 72px;
}

.chat-composer {
  margin: 0 18px 18px;
  width: auto;
  max-width: none;
  min-width: 0;
  display: grid;
  gap: 12px;
  padding: 14px 16px 12px;
  border: 1px solid var(--border-weak);
  border-radius: 20px;
  background: #ffffff;
  box-shadow: var(--shadow-card);
  position: relative;
  overflow: hidden;
  box-sizing: border-box;
  align-self: stretch;
  transition: border-color 140ms ease, box-shadow 140ms ease, background-color 140ms ease;
  transform: none;
}

.chat-composer::before {
  content: none;
}

.chat-composer:focus-within {
  border-color: var(--brand-700);
  box-shadow: var(--focus-ring-brand), var(--shadow-card);
  transform: none;
}

.chat-composer textarea,
.chat-composer textarea:hover,
.chat-composer textarea:focus,
.chat-composer textarea:focus-visible,
.chat-composer textarea:invalid,
.chat-composer textarea:disabled {
  min-height: calc(24px * 2 + 4px);
  max-height: calc(24px * 7.5 + 4px);
  resize: none;
  border: 0;
  border-radius: 0;
  background: transparent;
  padding: 2px 2px 0;
  box-shadow: none;
  outline: none;
  line-height: 24px;
  font-size: 14px;
  color: var(--ink-900);
  position: relative;
  z-index: 1;
  overflow-y: hidden;
  scrollbar-width: thin;
  scrollbar-color: rgba(26, 32, 41, 0.18) transparent;
}

.chat-composer textarea::placeholder {
  color: var(--ink-500);
}

.chat-composer-footer {
  display: flex;
  align-items: flex-end;
  justify-content: flex-start;
  flex-wrap: nowrap;
  gap: 12px;
  margin-top: 2px;
  padding-top: 0;
  border-top: 0;
  position: relative;
  z-index: 1;
}

.chat-analysis-dimensions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  min-width: 0;
  flex: 1 1 auto;
}

.chat-analysis-dimensions-label {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  margin-right: 2px;
  font-size: 12px;
  line-height: 18px;
  color: var(--ink-500);
}

.chat-dimension-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  width: auto;
  min-height: 32px;
  padding: 0 12px;
  border-radius: 999px;
  border: 1px solid rgba(26, 32, 41, 0.1);
  background: #ffffff;
  color: var(--ink-700);
  font-size: 13px;
  line-height: 18px;
  font-weight: 600;
  white-space: nowrap;
  transition: border-color 140ms ease, background-color 140ms ease, color 140ms ease, box-shadow 140ms ease;
}

.chat-composer-footer .chat-dimension-chip {
  width: auto;
}

.chat-dimension-chip:hover {
  border-color: rgba(9, 186, 7, 0.22);
  background: rgba(9, 186, 7, 0.05);
}

.chat-dimension-chip:focus-visible {
  outline: none;
  box-shadow: var(--focus-ring-brand);
}

.chat-dimension-chip.is-selected,
.chat-dimension-chip[aria-pressed="true"] {
  border-color: rgba(9, 186, 7, 0.26);
  background: rgba(9, 186, 7, 0.12);
  color: var(--brand-700);
}

.chat-composer .btn-primary {
  flex: 0 0 auto;
  align-self: flex-end;
  width: 36px;
  min-width: 36px;
  height: 36px;
  min-height: 36px;
  padding: 0;
  border-radius: 999px;
  border: 1px solid var(--brand-600);
  background: var(--brand-600);
  color: #ffffff;
  box-shadow: none;
}

.chat-composer .btn-primary:hover {
  background: var(--brand-700);
  border-color: var(--brand-700);
  box-shadow: none;
  transform: none;
}

.chat-composer .btn-primary:disabled {
  border-color: #DCEADF;
  background: #EAF6EA;
  color: #8AAF8A;
  opacity: 1;
  box-shadow: none;
  transform: none;
}

.chat-composer .btn-primary.is-stop {
  border-color: var(--brand-600);
  background: var(--brand-600);
  color: #ffffff;
}

.chat-composer .btn-primary.is-stop:hover,
.chat-composer .btn-primary.is-stop:focus-visible {
  border-color: var(--brand-700);
  background: var(--brand-700);
  color: #ffffff;
}

.chat-composer .btn-primary svg {
  width: 16px;
  height: 16px;
}

.chat-composer .btn-primary.is-pending svg {
  opacity: 0.72;
}

.detail-panel,
.compare-panel,
.uploads-panel {
  min-width: 0;
  min-height: 0;
}

.empty-card h3 {
  margin: 0 0 8px;
  font-size: 18px;
  line-height: 26px;
  font-weight: 600;
  color: var(--ink-900);
}

.empty-card p,
.compare-summary {
  font-size: 14px;
  line-height: 22px;
  color: var(--ink-600);
}

.compare-summary strong {
  color: var(--ink-900);
}

.table-link {
  color: var(--brand-700);
  font-weight: 600;
}

.table-link:hover {
  color: var(--brand-800);
  text-decoration: underline;
}

.toolbar-button:focus-visible,
.toolbar-icon-button:focus-visible,
.supplier-collection-item:focus-visible,
.supplier-note-upload-inline:focus-visible,
.supplier-qjl-push-inline:focus-visible,
.supplier-upload-note-chip:focus-visible,
.supplier-upload-note-delete:focus-visible,
.settings-icon-button:focus-visible,
.account-avatar-button:focus-visible,
.catalog-action-button:focus-visible,
.catalog-platform-link-trigger:focus-visible,
.catalog-platform-link-menu button:focus-visible,
.btn-primary:focus-visible,
.btn-ghost:focus-visible,
.link-button:focus-visible,
.table-link:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
.homepage-menu-item:focus-visible {
  outline: none;
  box-shadow: var(--focus-ring-brand);
}

input[type="checkbox"] {
  box-sizing: border-box;
  margin: 0;
  accent-color: var(--brand-700);
  cursor: pointer;
}

input[type="checkbox"]:focus {
  outline: none;
}

input[type="checkbox"]:focus-visible {
  outline: none;
  box-shadow: none;
}

input[type="checkbox"]:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

.checkbox-label,
.selection-pool-check {
  position: relative;
}

.checkbox-label::before,
.selection-pool-check::before {
  content: "";
  flex: 0 0 auto;
  width: 16px;
  height: 16px;
  box-sizing: border-box;
  border: 1px solid rgba(95, 102, 114, 0.36);
  border-radius: 4px;
  background-color: #fff;
  background-repeat: no-repeat;
  background-position: center;
  background-size: 12px 12px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.92);
  pointer-events: none;
  transition: border-color 140ms ease, background-color 140ms ease, box-shadow 140ms ease;
}

.checkbox-label > input[type="checkbox"],
.selection-pool-check > input[type="checkbox"] {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  margin: 0;
  cursor: pointer;
}

.checkbox-label:has(> input[type="checkbox"]:hover)::before,
.selection-pool-check:has(> input[type="checkbox"]:hover)::before {
  border-color: rgba(9, 186, 7, 0.42);
}

.checkbox-label:has(> input[type="checkbox"]:checked)::before,
.selection-pool-check:has(> input[type="checkbox"]:checked)::before {
  border-color: var(--brand-700);
  background-color: var(--brand-700);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 14 14'%3E%3Cpath d='M3 7.2 5.7 10 11 4.6' fill='none' stroke='%23ffffff' stroke-linecap='round' stroke-linejoin='round' stroke-width='2.2'/%3E%3C/svg%3E");
  box-shadow: none;
}

.checkbox-label:has(> input[type="checkbox"]:focus-visible)::before,
.selection-pool-check:has(> input[type="checkbox"]:focus-visible)::before {
  box-shadow: 0 0 0 2px rgba(9, 186, 7, 0.16);
}

.table-link {
  font-weight: 600;
}

.wrap-cell,
.product-table .wrap-cell {
  line-height: 20px;
  white-space: pre-line;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.product-image-cell {
  min-width: 120px;
}

.product-image-stack {
  position: relative;
  display: inline-flex;
  align-items: flex-start;
}

.product-image-thumb {
  display: block;
  width: 64px;
  height: 64px;
  overflow: hidden;
  border-radius: 14px;
  border: 1px solid var(--border-weak);
  background: var(--page-base);
  box-shadow: var(--shadow-sm);
}

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

.product-image-count {
  position: absolute;
  right: -8px;
  bottom: -8px;
  min-width: 24px;
  padding: 2px 6px;
  border-radius: 999px;
  background: rgba(27, 34, 48, 0.88);
  color: #fff;
  font-size: 11px;
  line-height: 16px;
  text-align: center;
  box-shadow: var(--shadow-sm);
}

.product-image-text {
  display: inline-block;
  max-width: 220px;
  color: var(--text-secondary);
  line-height: 20px;
  white-space: normal;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.product-image-placeholder {
  display: inline-flex;
  align-items: center;
  padding: 6px 10px;
  border-radius: var(--radius-pill);
  background: rgba(77, 139, 49, 0.1);
  color: #2f6f1f;
  font-size: 12px;
  line-height: 18px;
  white-space: nowrap;
}

.product-qjl-cell {
  min-width: 118px;
  text-align: center;
}

.product-qjl-status {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid transparent;
  font-size: 13px;
  line-height: 18px;
  font-weight: 600;
  white-space: nowrap;
}

.product-qjl-status[data-status="success"] {
  background: rgba(77, 139, 49, 0.12);
  border-color: rgba(77, 139, 49, 0.24);
  color: #2f6f1f;
}

.product-qjl-status[data-status="idle"] {
  background: rgba(82, 94, 119, 0.1);
  border-color: rgba(82, 94, 119, 0.18);
  color: var(--text-primary);
}

.product-qjl-status[data-status="failed"] {
  background: rgba(219, 68, 55, 0.12);
  border-color: rgba(219, 68, 55, 0.2);
  color: #b42318;
}

.product-qjl-status[data-status="non-product"] {
  background: rgba(245, 158, 11, 0.12);
  border-color: rgba(245, 158, 11, 0.24);
  color: #b45309;
}

.panel-header,
.header-actions,
.panel-collapse-button,
.chat-shell::before,
.chat-welcome {
  display: none !important;
}

@media (max-width: 1180px) {
  .workspace-stage,
  .dashboard.workspace-layout {
    grid-template-columns: 1fr;
    grid-template-rows: auto minmax(0, 1fr);
    gap: 12px;
    overflow: hidden;
  }

  .workspace-tabbar {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    align-items: stretch;
    min-height: 52px;
    margin: 0 -16px;
    padding: 0 16px;
    background: var(--page-base);
    border-bottom: 1px solid var(--border-weak);
  }

  .workspace-stage > .workspace-panel {
    grid-column: 1;
    grid-row: 2;
    display: none;
    height: 100%;
    min-height: 0;
  }

  .workspace-column-resizer {
    display: none;
  }

  .workspace-panel.is-workspace-tab-active {
    display: flex;
  }
}

@media (max-width: 960px) {
  .app-topbar {
    min-height: auto;
    padding: 12px 16px;
  }

  .brand-title-row {
    flex-direction: column;
    align-items: flex-start;
    gap: 2px;
  }

  .brand-title-row span {
    max-width: 100%;
    white-space: nowrap;
  }

  .workspace-stage,
  .dashboard.workspace-layout {
    grid-template-columns: 1fr;
    padding: 0 16px 16px;
    overflow: auto;
  }

  .workspace-panel,
  .panel {
    height: min(520px, calc(100vh - 100px));
    min-height: 320px;
  }

  .workspace-panel-head {
    padding-inline: 16px;
  }

  .workspace-panel-body,
  .panel-content,
  .chat-workspace {
    padding-inline: 0;
  }

  .workspace-chat-panel,
  .chat-panel {
    padding-inline: 0;
  }

  .chat-topbar {
    padding-inline: 16px;
  }

  .compare-form {
    grid-template-columns: 1fr;
    padding-inline: 16px;
  }

  .uploads-body .workspace-selection-toolbar,
  .compare-result,
  .chat-messages {
    padding-inline: 16px;
  }

  .catalog-source-tabs {
    margin-inline: 16px;
  }

  .uploads-body .workspace-table-wrap {
    --upload-table-left-gutter: 16px;
    margin-inline: 0;
    padding-left: var(--upload-table-left-gutter);
    scroll-padding-left: var(--upload-table-left-gutter);
  }

  .uploads-body .workspace-table-wrap > .empty-card {
    margin-left: 0;
    margin-right: var(--upload-table-left-gutter);
  }

  .upload-batches-table {
    margin-right: var(--upload-table-left-gutter);
  }

  .supplier-delivery-panel {
    padding-inline: 16px;
  }

  .chat-selection-status {
    margin-inline: 16px;
  }

  .ai-chat-tabs,
  .rallycat-config-stack {
    margin-inline: 16px;
  }

  .chat-composer {
    margin-inline: 16px;
  }

  .uploads-footer {
    padding-inline: 16px;
  }

  .settings-flyout-panel,
  .account-flyout-panel {
    width: min(360px, calc(100vw - 24px));
  }
}

@media (max-width: 640px) {
  .app-topbar {
    align-items: flex-start;
    height: auto;
    gap: 12px;
  }

  .brand-block {
    flex: 1;
  }

  .topbar-actions {
    align-self: flex-start;
  }

  .operation-report-menu {
    position: fixed;
    top: 64px;
    right: 12px;
    left: 12px;
    width: auto;
    max-height: min(420px, calc(100dvh - 84px));
  }

  .operation-report-detail-drawer {
    width: 100vw;
  }

  .operation-report-detail-head {
    flex-direction: column;
  }

  .operation-report-detail-actions {
    width: 100%;
    justify-content: space-between;
  }

  .operation-report-table-wrap table {
    min-width: 640px;
  }

  .operation-report-table-wrap {
    overflow-x: auto;
    scrollbar-gutter: stable;
  }

  .settings-flyout-panel,
  .account-flyout-panel {
    position: fixed;
    top: 76px;
    right: 12px;
    left: 12px;
    width: auto;
    max-height: calc(100dvh - 88px);
  }

  .rallycat-agent-status {
    flex-direction: column;
    align-items: stretch;
  }

  .rallycat-agent-status .btn-ghost {
    width: fit-content;
  }

  .account-flyout-panel {
    padding: 16px;
    border-radius: 22px;
  }

  .account-flyout-panel .account-card {
    padding: 14px;
  }

  .qjl-openapi-auth-form {
    grid-template-columns: 1fr;
  }

  .qjl-openapi-auth-form .btn-primary {
    width: 100%;
  }

  .supplier-qjl-push-summary,
  .supplier-qjl-preview-summary {
    grid-template-columns: 1fr;
  }

  .supplier-qjl-control-shell,
  .supplier-qjl-preview-shell {
    padding: 16px;
    border-radius: 20px;
  }

  .uploads-panel .workspace-panel-head,
  .detail-panel .workspace-panel-head,
  .compare-panel .workspace-panel-head {
    flex-direction: row;
    align-items: center;
    gap: 12px;
  }

  .uploads-panel .workspace-panel-head h3,
  .detail-panel .workspace-panel-head h3,
  .compare-panel .workspace-panel-head h3 {
    min-width: 0;
    flex: 1 1 auto;
  }

  .uploads-panel .workspace-panel-actions,
  .detail-panel .workspace-panel-actions,
  .compare-panel .workspace-panel-actions {
    width: auto;
    flex: 0 0 auto;
    justify-content: flex-end;
  }

  .uploads-panel .workspace-panel-actions {
    gap: 4px;
  }

  .uploads-panel .toolbar-button {
    min-width: 36px;
    padding-inline: 7px;
  }

  .workspace-panel-actions,
  .chat-composer-footer,
  .uploads-footer {
    width: 100%;
    justify-content: space-between;
  }

  .chat-bubble {
    max-width: 100%;
  }

  .chat-bubble.user {
    max-width: min(92%, 560px);
  }

  .chat-opening {
    gap: 14px;
  }

  .chat-opening h4 {
    font-size: 20px;
    line-height: 28px;
  }

  .chat-starter-grid {
    grid-template-columns: 1fr;
  }

  .chat-starter-button {
    min-height: 88px;
  }

  .chat-composer {
    margin-inline: 14px;
    padding: 11px 14px 10px;
    border-radius: 20px;
  }

  .chat-selection-status {
    margin-inline: 14px;
  }

  .uploads-body .workspace-selection-toolbar,
  .compare-form,
  .compare-result,
  .chat-messages,
  .uploads-footer {
    padding-inline: 14px;
  }

  .catalog-source-tabs {
    margin-inline: 14px;
  }

  .uploads-body .workspace-table-wrap {
    --upload-table-left-gutter: 14px;
    margin-inline: 0;
    padding-left: var(--upload-table-left-gutter);
    scroll-padding-left: var(--upload-table-left-gutter);
  }

  .uploads-body .workspace-table-wrap > .empty-card {
    margin-left: 0;
    margin-right: var(--upload-table-left-gutter);
  }

  .upload-batches-table {
    margin-right: var(--upload-table-left-gutter);
  }

  .supplier-delivery-panel {
    padding-inline: 14px;
  }

  .uploads-body .workspace-selection-toolbar {
    width: auto;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: flex-start !important;
    text-align: left;
    padding-inline: 0;
    margin-inline: 14px;
  }

  .uploads-body .workspace-selection-toolbar .checkbox-label {
    margin-right: auto;
  }

  .chat-composer textarea {
    min-height: calc(24px * 2 + 4px);
    max-height: calc(24px * 7.5 + 4px);
  }

  .chat-analysis-dimensions {
    gap: 8px 6px;
  }

  .chat-analysis-dimensions-label {
    width: auto;
    min-height: auto;
    margin-right: 0;
  }

  .chat-dimension-chip {
    min-height: 30px;
    padding-inline: 11px;
    font-size: 12px;
  }

  table {
    min-width: 720px;
  }

  .modal-shell {
    padding: 12px;
  }

  .modal-card {
    width: min(100vw - 24px, 680px);
    max-height: calc(100vh - 24px);
    border-radius: 20px;
    padding: 16px;
  }

  .upload-mode-switch,
  .upload-link-field {
    grid-template-columns: 1fr;
  }

  .catalog-import-status-card {
    width: min(100vw - 24px, 680px);
  }

  .supplier-import-progress-item {
    display: grid;
  }

  .supplier-import-progress-item-side {
    justify-items: start;
  }

.upload-link-field .btn-ghost {
  width: 100%;
}
}

.role-eyebrow {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 0 12px;
  border-radius: 999px;
  background: var(--brand-050);
  color: var(--brand-700);
  font-size: 12px;
  font-weight: 700;
}

.table-subcopy,
.collection-inline-meta {
  display: block;
  margin-top: 4px;
  color: var(--text-tertiary);
  font-size: 12px;
  line-height: 1.5;
}

.supplier-stage {
  flex: 1;
  min-height: 0;
  width: 100%;
  margin: 0;
  padding: 0 16px 16px;
  box-sizing: border-box;
  display: grid;
  gap: 16px;
  overflow: hidden;
}

.supplier-hero-band {
  display: grid;
  grid-template-columns: minmax(0, 1.7fr) minmax(320px, 1fr);
  gap: 20px;
  padding: 28px;
  border-radius: 24px;
  background: linear-gradient(135deg, rgba(242, 252, 238, 0.9), rgba(255, 255, 255, 1));
  border: 1px solid var(--border-weak);
  box-shadow: var(--shadow-card);
}

.supplier-hero-copy {
  display: grid;
  gap: 12px;
}

.supplier-hero-copy h2 {
  margin: 0;
  font-size: clamp(26px, 4vw, 34px);
  line-height: 1.18;
}

.supplier-hero-copy p {
  margin: 0;
  color: var(--text-secondary);
  line-height: 1.75;
}

.supplier-hero-metrics,
.shared-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.supplier-metric {
  display: grid;
  gap: 6px;
  padding: 18px 16px;
  border-radius: 18px;
  background: var(--fill-card);
  border: 1px solid var(--border-weak);
}

.supplier-metric strong {
  font-size: clamp(24px, 4vw, 32px);
  line-height: 1;
}

.supplier-metric span {
  color: var(--text-secondary);
  font-size: 13px;
}

.supplier-layout {
  display: grid;
  grid-template-columns:
    minmax(320px, var(--supplier-list-width, 560px))
    16px
    minmax(640px, 1fr);
  gap: 0;
  align-items: stretch;
  min-height: 0;
  overflow: hidden;
}

.supplier-layout.is-column-resizing {
  user-select: none;
  cursor: col-resize;
}

.supplier-layout.is-column-resizing .workspace-panel {
  pointer-events: none;
}

.supplier-layout.is-column-resizing .workspace-column-resizer::after {
  opacity: 1;
  transform: scaleY(1);
}

.supplier-column-resizer {
  display: flex;
}

.supplier-list-panel,
.supplier-detail-panel {
  min-width: 0;
}

.supplier-panel-title {
  display: grid;
  gap: 4px;
}

.supplier-panel-title h3 {
  margin: 0;
}

.supplier-panel-title span {
  color: var(--text-secondary);
  font-size: 13px;
}

.supplier-list-body,
.supplier-detail-body {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  background: var(--surface-base);
}

.supplier-list-body {
  padding: 16px;
  overflow: auto;
}

.supplier-detail-body {
  padding: 24px;
  overflow: auto;
}

.supplier-list-panel .workspace-panel-actions {
  gap: 6px;
}

#supplier-refresh {
  display: none;
}

.supplier-collection-list {
  display: grid;
  gap: 12px;
  width: min(100%, 720px);
  margin-inline: auto;
}

.supplier-collection-item {
  text-align: left;
  grid-template-columns: minmax(0, 1fr);
  align-items: stretch;
  cursor: pointer;
  gap: 14px;
}

.supplier-collection-main {
  display: grid;
  gap: 12px;
  min-width: 0;
}

.supplier-collection-item > div,
.supplier-collection-main {
  width: 100%;
  text-align: left;
}

.supplier-collection-item strong,
.supplier-collection-item span {
  text-align: left;
}

.supplier-collection-heading {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.supplier-collection-heading strong {
  margin-bottom: 0;
  font-size: 17px;
  line-height: 24px;
  color: var(--text-primary);
}

.supplier-collection-heading span {
  color: var(--text-secondary);
  line-height: 1.6;
}

.supplier-collection-stats {
  width: 100%;
  justify-content: flex-start;
  margin-top: 0;
  gap: 10px;
}

.supplier-collection-stat-pill {
  display: inline-flex;
  align-items: baseline;
  gap: 6px;
  padding: 7px 12px;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.16);
  background: rgba(255, 255, 255, 0.88);
  color: var(--text-secondary);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.82);
}

.supplier-collection-stat-pill strong {
  display: inline;
  margin-bottom: 0;
  font-size: 14px;
  line-height: 1;
  color: var(--text-primary);
}

.supplier-collection-stat-pill em {
  font-style: normal;
  font-size: 12px;
  line-height: 1;
  color: var(--text-secondary);
}

.supplier-collection-actions {
  width: 100% !important;
  min-width: 0;
  display: flex;
  justify-content: flex-start;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}

.supplier-note-upload-inline,
.supplier-qjl-push-inline {
  min-height: 38px;
  border: 1px solid rgba(9, 186, 7, 0.18);
  border-radius: 999px;
  background: rgba(242, 252, 238, 0.9);
  color: var(--brand-800);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px 14px;
  font-size: 13px;
  font-weight: 700;
  line-height: 1;
  white-space: nowrap;
  box-shadow: 0 8px 20px rgba(9, 186, 7, 0.08);
  cursor: pointer;
  transition: background-color 140ms ease, border-color 140ms ease, color 140ms ease, transform 140ms ease, box-shadow 140ms ease;
}

.supplier-note-upload-inline {
  border-color: rgba(9, 186, 7, 0.18);
  background: rgba(255, 255, 255, 0.94);
  box-shadow: none;
}

.supplier-qjl-push-inline {
  border-color: var(--brand-600);
  background: var(--brand-600);
  color: #fff;
  box-shadow: 0 10px 24px rgba(9, 186, 7, 0.18);
}

.supplier-note-upload-inline svg,
.supplier-qjl-push-inline svg {
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
}

.supplier-note-upload-inline:hover {
  background: rgba(242, 252, 238, 0.98);
  border-color: rgba(9, 186, 7, 0.32);
  color: var(--brand-800);
  transform: translateY(-1px);
  box-shadow: 0 8px 20px rgba(9, 186, 7, 0.12);
}

.supplier-qjl-push-inline:hover {
  background: var(--brand-700);
  border-color: var(--brand-700);
  transform: translateY(-1px);
  box-shadow: 0 12px 26px rgba(9, 186, 7, 0.22);
}

.supplier-collection-item.active .supplier-note-upload-inline,
.supplier-collection-item.active .supplier-qjl-push-inline {
  background: rgba(255, 255, 255, 0.96);
  border-color: rgba(9, 186, 7, 0.28);
}

.supplier-collection-item.active .supplier-qjl-push-inline {
  background: var(--brand-600);
  border-color: var(--brand-600);
  color: #fff;
}

.supplier-collection-item.active .supplier-note-upload-inline:hover {
  background: rgba(242, 252, 238, 0.98);
  border-color: rgba(9, 186, 7, 0.32);
  color: var(--brand-800);
}

.supplier-collection-item.active .supplier-qjl-push-inline:hover {
  background: var(--brand-700);
  border-color: var(--brand-700);
}

.supplier-detail-title {
  display: grid;
  gap: 4px;
}

.supplier-detail-title h3 {
  margin: 0;
}

.supplier-detail-title span {
  color: var(--text-secondary);
  font-size: 13px;
}

.supplier-detail-actions {
  flex: 0 0 auto;
}

.supplier-detail-content {
  display: grid;
  gap: 18px;
  flex: 1 1 auto;
  min-height: 0;
}

.supplier-share-modal-card {
  width: min(1120px, calc(100vw - 40px));
  display: grid;
  gap: 18px;
}

.supplier-send-modal-card {
  width: min(900px, calc(100vw - 40px));
}

.supplier-share-dialog-head {
  display: grid;
  gap: 4px;
}

.supplier-share-dialog-head span {
  color: var(--text-secondary);
  font-size: 13px;
  line-height: 1.6;
}

.supplier-share-strip {
  display: grid;
  gap: 16px;
  padding: 24px;
  border-radius: 20px;
  background: linear-gradient(135deg, rgba(242, 252, 238, 0.68), rgba(255, 255, 255, 1));
  border: 1px solid var(--border-weak);
}

.supplier-share-copy {
  display: grid;
  gap: 6px;
}

.supplier-share-copy span {
  color: var(--text-secondary);
  font-size: 13px;
}

.supplier-share-note-field,
.supplier-share-link-field {
  display: grid;
  gap: 8px;
}

.supplier-share-note-field span,
.supplier-share-link-field span {
  color: var(--text-primary);
  font-size: 13px;
  font-weight: 600;
}

.supplier-share-note-field textarea {
  min-height: 96px;
}

.supplier-share-story {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.supplier-share-story-item,
.supplier-share-metric,
.login-preview-item {
  display: grid;
  gap: 6px;
  padding: 14px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid var(--border-weak);
}

.supplier-share-story-item span,
.supplier-share-metric span,
.login-preview-item span {
  color: var(--text-secondary);
  font-size: 12px;
}

.supplier-share-story-item strong,
.supplier-share-metric strong,
.login-preview-item strong {
  line-height: 1.5;
}

.supplier-share-metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.supplier-share-actions {
  display: grid;
  grid-template-columns: repeat(3, auto);
  gap: 12px;
  align-items: center;
  justify-content: flex-start;
}

.supplier-send-strip {
  grid-template-columns: 1fr;
  gap: 18px;
}

.supplier-send-flow,
.supplier-send-analysis-shell,
.supplier-send-analysis {
  display: grid;
  gap: 16px;
  align-content: start;
}

.supplier-send-flow {
  min-width: 0;
}

.supplier-send-analysis-shell {
  padding: 16px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(148, 163, 184, 0.16);
}

.supplier-send-analysis-head {
  display: grid;
  gap: 6px;
}

.supplier-send-analysis-head strong {
  color: var(--ink-900);
  font-size: 14px;
  line-height: 1.5;
}

.supplier-send-analysis-head span {
  color: var(--text-secondary);
  font-size: 13px;
  line-height: 1.7;
}

.supplier-send-analysis-shell {
  background:
    radial-gradient(circle at top right, rgba(195, 240, 188, 0.18), transparent 36%),
    rgba(255, 255, 255, 0.94);
}

.supplier-send-analysis .supplier-delivery-report-card {
  box-shadow: none;
}

.supplier-send-analysis-empty {
  min-height: 220px;
  align-content: center;
}

.supplier-send-actions {
  grid-template-columns: auto;
}

.supplier-send-actions .btn-md {
  justify-content: center;
}

.supplier-share-link-field input[readonly] {
  width: 100%;
  min-height: 44px;
  border-radius: 14px;
  border: 1px solid var(--border-weak);
  background: var(--fill-card);
  padding: 0 14px;
  font: inherit;
}

.supplier-detail-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
  min-height: 0;
  align-content: start;
}

.supplier-detail-tabs {
  width: 100%;
  gap: 24px;
  flex-wrap: wrap;
  overflow: visible;
  padding: 0 0 2px;
  border-bottom: 1px solid rgba(148, 163, 184, 0.14);
}

.supplier-detail-tab {
  position: relative;
  flex: 0 0 auto;
  min-height: 38px;
  padding: 0 4px 12px;
  font-size: 0.96rem;
  font-weight: 600;
}

.supplier-detail-tab::after {
  content: "";
  position: absolute;
  top: 10px;
  right: -10px;
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: rgba(9, 186, 7, 0.24);
  opacity: 0;
  transform: scale(0.6);
  transition: opacity 160ms ease, transform 160ms ease, background-color 160ms ease;
}

.supplier-detail-tab[data-supplier-detail-tab="analysis"][data-has-content="true"]::after {
  opacity: 1;
  transform: scale(1);
}

.supplier-detail-tab.is-active::after {
  background: rgba(9, 186, 7, 0.72);
}

.supplier-detail-tab:hover {
  background: transparent;
}

.supplier-detail-tab[data-has-content="false"]::after {
  opacity: 0;
}

.supplier-detail-tab-panels {
  display: grid;
  gap: 16px;
  min-height: 0;
}

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

.supplier-subpanel {
  display: grid;
  gap: 12px;
  align-content: start;
  padding: 20px;
  border-radius: 20px;
  background: var(--fill-card);
  border: 1px solid var(--border-weak);
}

.supplier-subpanel-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
}

.supplier-subpanel-head span {
  color: var(--text-secondary);
  font-size: 13px;
}

.supplier-delivery-report-panel {
  gap: 16px;
  background:
    radial-gradient(circle at top right, rgba(195, 240, 188, 0.22), transparent 34%),
    var(--fill-card);
}

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

.supplier-delivery-report-filter {
  display: inline-flex;
  align-items: center;
  flex-wrap: nowrap;
  gap: 10px;
  color: var(--text-secondary);
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
}

.supplier-delivery-report-filter span {
  white-space: nowrap;
}

.supplier-delivery-report-filter select {
  min-width: 180px;
  min-height: 38px;
  border: 1px solid rgba(148, 163, 184, 0.26);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.9);
  color: var(--text-primary);
  font: inherit;
  padding: 0 12px;
}

.supplier-delivery-report-filter select:focus-visible {
  outline: none;
  border-color: rgba(9, 186, 7, 0.26);
  box-shadow: 0 0 0 3px rgba(9, 186, 7, 0.12);
}

.supplier-delivery-report-summary {
  margin: 0;
  color: var(--text-secondary);
  font-size: 13px;
}

.supplier-delivery-report-list {
  display: grid;
  gap: 14px;
}

.supplier-delivery-report-grid {
  display: grid;
  gap: 14px;
}

.supplier-delivery-report-card {
  display: grid;
  gap: 16px;
  padding: 18px;
  border-radius: 18px;
  border: 1px solid rgba(148, 163, 184, 0.18);
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.05);
}

.supplier-delivery-report-card[data-tone="strong"] {
  border-color: rgba(9, 186, 7, 0.18);
  background:
    radial-gradient(circle at top left, rgba(9, 186, 7, 0.1), transparent 32%),
    rgba(255, 255, 255, 0.98);
}

.supplier-delivery-report-card[data-tone="steady"] {
  border-color: rgba(34, 197, 94, 0.18);
  background:
    radial-gradient(circle at top left, rgba(34, 197, 94, 0.08), transparent 30%),
    rgba(255, 255, 255, 0.98);
}

.supplier-delivery-report-card[data-tone="cautious"] {
  border-color: rgba(245, 158, 11, 0.22);
  background:
    radial-gradient(circle at top left, rgba(245, 158, 11, 0.08), transparent 30%),
    rgba(255, 255, 255, 0.98);
}

.supplier-delivery-report-card[data-tone="failed"] {
  border-color: rgba(250, 81, 81, 0.2);
  background:
    radial-gradient(circle at top left, rgba(250, 81, 81, 0.08), transparent 30%),
    rgba(255, 255, 255, 0.98);
}

.supplier-delivery-report-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.supplier-delivery-report-headline {
  display: grid;
  gap: 8px;
  min-width: 0;
}

.supplier-delivery-report-headline span,
.supplier-delivery-report-meta span,
.supplier-delivery-report-strip article span,
.supplier-delivery-report-chip span,
.supplier-delivery-report-empty-copy {
  color: var(--text-secondary);
  font-size: 12px;
  line-height: 1.6;
}

.supplier-delivery-report-headline strong {
  color: var(--ink-900);
  font-size: 16px;
  line-height: 1.6;
}

.supplier-delivery-report-head-actions {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
  margin-left: auto;
}

.supplier-delivery-report-status {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 32px;
  padding: 0 12px;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.18);
  background: rgba(248, 250, 252, 0.9);
  color: var(--text-secondary);
  font-size: 12px;
  font-weight: 600;
}

.supplier-delivery-report-status.is-ready {
  border-color: rgba(34, 197, 94, 0.22);
  background: rgba(240, 253, 244, 0.92);
  color: #166534;
}

.supplier-delivery-report-status.is-analyzing {
  border-color: rgba(9, 186, 7, 0.18);
  background: rgba(242, 252, 238, 0.92);
  color: var(--brand-800);
}

.supplier-delivery-report-status.is-pending {
  border-color: rgba(245, 158, 11, 0.2);
  background: rgba(255, 251, 235, 0.94);
  color: #b45309;
}

.supplier-delivery-report-status.is-failed {
  border-color: rgba(250, 81, 81, 0.2);
  background: rgba(255, 243, 243, 0.94);
  color: var(--color-error-text);
}

.supplier-delivery-report-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 32px;
  border: 1px solid rgba(9, 186, 7, 0.2);
  border-radius: 999px;
  background: rgba(240, 253, 244, 0.92);
  color: var(--brand-800);
  font: inherit;
  font-size: 12px;
  font-weight: 700;
  padding: 0 12px;
  cursor: pointer;
  transition: border-color 160ms ease, background-color 160ms ease, color 160ms ease, box-shadow 160ms ease;
}

.supplier-delivery-report-toggle:hover {
  border-color: rgba(9, 186, 7, 0.3);
  background: rgba(220, 252, 231, 0.98);
}

.supplier-delivery-report-toggle:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px rgba(9, 186, 7, 0.12);
}

.supplier-delivery-report-score {
  flex: 0 0 auto;
  display: grid;
  gap: 4px;
  min-width: 94px;
  padding: 12px 14px;
  border-radius: 16px;
  border: 1px solid rgba(9, 186, 7, 0.16);
  background: rgba(242, 252, 238, 0.92);
  text-align: right;
}

.supplier-delivery-report-card[data-tone="cautious"] .supplier-delivery-report-score {
  border-color: rgba(245, 158, 11, 0.22);
  background: rgba(255, 251, 235, 0.94);
}

.supplier-delivery-report-card[data-tone="failed"] .supplier-delivery-report-score {
  border-color: rgba(250, 81, 81, 0.2);
  background: rgba(255, 243, 243, 0.94);
}

.supplier-delivery-report-score span {
  color: var(--text-secondary);
  font-size: 12px;
}

.supplier-delivery-report-score strong {
  color: var(--brand-800);
  font-size: 26px;
  line-height: 1;
}

.supplier-delivery-report-card[data-tone="cautious"] .supplier-delivery-report-score strong {
  color: #b45309;
}

.supplier-delivery-report-card[data-tone="failed"] .supplier-delivery-report-score strong {
  color: var(--color-error-text);
}

.supplier-delivery-report-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
}

.supplier-delivery-report-content {
  padding: 16px;
  border-radius: 16px;
  border: 1px solid rgba(148, 163, 184, 0.16);
  background: rgba(248, 250, 252, 0.82);
}

.supplier-delivery-report-body {
  display: grid;
  gap: 12px;
}

.supplier-delivery-report-content h1,
.supplier-delivery-report-content h2,
.supplier-delivery-report-content h3 {
  letter-spacing: 0;
}

.supplier-delivery-report-error {
  margin: 0;
  color: var(--color-error-text);
  font-size: 12px;
  line-height: 1.7;
}

.supplier-delivery-report-strip,
.supplier-delivery-report-columns {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

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

.supplier-delivery-report-columns--compact {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.supplier-delivery-report-strip article,
.supplier-delivery-report-columns section {
  display: grid;
  gap: 8px;
  padding: 14px;
  border-radius: 16px;
  border: 1px solid rgba(148, 163, 184, 0.16);
  background: rgba(248, 250, 252, 0.82);
}

.supplier-delivery-report-strip article strong,
.supplier-delivery-report-columns section h4,
.supplier-delivery-report-chip strong {
  color: var(--ink-900);
}

.supplier-delivery-report-strip article strong {
  font-size: 15px;
  line-height: 1.45;
}

.supplier-delivery-report-strip article p {
  margin: 0;
  color: var(--text-secondary);
  font-size: 13px;
  line-height: 1.7;
}

.supplier-delivery-report-columns section h4 {
  margin: 0;
  font-size: 14px;
  line-height: 1.5;
}

.supplier-delivery-report-chip-list {
  display: grid;
  gap: 10px;
}

.supplier-delivery-report-chip {
  display: grid;
  gap: 4px;
  padding: 12px 14px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(148, 163, 184, 0.16);
}

.supplier-delivery-report-chip strong {
  font-size: 13px;
  line-height: 1.55;
}

.supplier-delivery-report-bullets {
  margin: 0;
  padding-left: 18px;
  display: grid;
  gap: 8px;
  color: var(--text-primary);
  font-size: 13px;
  line-height: 1.7;
}

.supplier-delivery-report-empty-copy {
  margin: 0;
}

.supplier-table-wrap table {
  min-width: 100%;
}

.login-page,
.shared-page {
  min-height: 100vh;
  background: var(--fill-page);
}

.shared-page {
  overflow-x: hidden;
  overflow-y: auto;
  scrollbar-gutter: auto;
}

.shared-page.shared-details-open {
  overflow: hidden;
}

.login-shell,
.shared-shell {
  width: min(1200px, calc(100% - 32px));
  margin: 0 auto;
  padding: 36px 0 48px;
}

.login-shell {
  width: min(640px, calc(100% - 32px));
  display: grid;
  place-items: center;
  min-height: 100vh;
}

.login-surface {
  width: 100%;
  display: grid;
  gap: 18px;
  padding: 28px;
  border-radius: 24px;
  background: var(--fill-card);
  border: 1px solid var(--border-weak);
  box-shadow: var(--shadow-card);
}

.login-copy {
  display: grid;
  gap: 12px;
}

.login-copy h1 {
  margin: 0;
  font-size: clamp(28px, 5vw, 36px);
  line-height: 1.15;
}

.login-copy p {
  margin: 0;
  color: var(--text-secondary);
  line-height: 1.75;
}

.login-preview-card,
.login-benefits-card {
  display: grid;
  gap: 12px;
  padding: 18px;
  border-radius: 18px;
  background: var(--surface-soft);
  border: 1px solid var(--border-weak);
}

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

.login-preview-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.login-benefits-list {
  margin: 0;
  padding-left: 18px;
  display: grid;
  gap: 10px;
  color: var(--text-secondary);
}

.login-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.login-status-bar {
  margin: 0;
  padding: 14px 16px;
  border-radius: 16px;
  border: 1px solid rgba(248, 109, 16, 0.24);
  background: linear-gradient(180deg, rgba(255, 247, 240, 0.98), rgba(255, 243, 232, 1));
  color: var(--color-warning-text);
  font-size: 14px;
  line-height: 1.65;
  font-weight: 600;
  box-shadow: none;
}

.login-status-bar[data-tone="success"] {
  border-color: rgba(18, 183, 106, 0.22);
  background: rgba(236, 253, 243, 0.98);
  color: var(--color-success-text);
}

.login-status-bar[data-tone="error"] {
  border-color: rgba(250, 81, 81, 0.2);
  background: rgba(255, 242, 242, 0.98);
  color: var(--color-error-text);
}

.login-footer {
  display: flex;
  justify-content: flex-end;
}

.shared-shell {
  display: grid;
  gap: 22px;
  min-height: 100vh;
  padding-bottom: 72px;
}

.shared-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.7fr) minmax(280px, 0.85fr);
  gap: 22px;
  align-items: stretch;
  padding: 30px;
  border-radius: 28px;
  background:
    radial-gradient(circle at top left, rgba(227, 247, 231, 0.95), rgba(227, 247, 231, 0) 42%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(250, 252, 255, 0.98));
  border: 1px solid rgba(160, 173, 196, 0.18);
  box-shadow: 0 22px 54px rgba(18, 32, 60, 0.08);
}

.shared-hero-copy {
  display: grid;
  gap: 16px;
  align-content: start;
}

.shared-hero-topline {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.shared-hero-copy h1 {
  margin: 0;
  font-size: clamp(30px, 4vw, 52px);
  line-height: 1.08;
  letter-spacing: -0.03em;
}

.shared-hero-copy p {
  margin: 0;
  color: var(--text-secondary);
  max-width: 760px;
  font-size: 16px;
  line-height: 1.8;
}

.shared-state-badge {
  display: inline-flex;
  align-items: center;
  padding: 8px 14px;
  border-radius: 999px;
  background: rgba(235, 247, 255, 0.92);
  color: #16539b;
  border: 1px solid rgba(22, 83, 155, 0.12);
  font-size: 13px;
  font-weight: 600;
}

.shared-state-badge[data-tone="success"] {
  background: rgba(235, 252, 242, 0.96);
  color: #0f8c4d;
  border-color: rgba(15, 140, 77, 0.12);
}

.shared-summary-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.shared-stat-chip {
  display: grid;
  gap: 6px;
  padding: 16px 18px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.88);
  border: 1px solid rgba(160, 173, 196, 0.18);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

.shared-stat-chip span {
  color: var(--text-secondary);
  font-size: 13px;
}

.shared-stat-chip strong {
  font-size: clamp(22px, 3vw, 34px);
  line-height: 1.05;
  letter-spacing: -0.02em;
}

.shared-note-inline,
.shared-story-card,
.shared-details-shell {
  display: grid;
  gap: 14px;
  padding: 20px;
  border-radius: 22px;
  background: var(--fill-card);
  border: 1px solid var(--border-weak);
  box-shadow: var(--shadow-card);
}

.shared-note-inline {
  gap: 10px;
  padding: 18px 20px;
  background: rgba(255, 255, 255, 0.82);
}

.shared-note-inline span {
  color: var(--text-secondary);
  font-size: 13px;
}

.shared-note-inline strong {
  font-size: 20px;
  line-height: 1.6;
}

.shared-hero-side {
  display: grid;
  gap: 14px;
  align-content: start;
  padding: 18px;
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(160, 173, 196, 0.16);
}

.shared-status-panel {
  margin: 0;
  padding: 15px 16px;
  border-radius: 18px;
  border: 1px solid rgba(74, 129, 201, 0.14);
  background: rgba(240, 247, 255, 0.95);
  color: #28578c;
  font-size: 14px;
  line-height: 1.7;
  font-weight: 600;
}

.shared-status-panel[data-tone="success"] {
  border-color: rgba(18, 183, 106, 0.16);
  background: rgba(238, 253, 244, 0.98);
  color: var(--color-success-text);
}

.shared-status-panel[data-tone="error"] {
  border-color: rgba(250, 81, 81, 0.18);
  background: rgba(255, 243, 243, 0.98);
  color: var(--color-danger-text);
}

.shared-hero-actions {
  display: grid;
  gap: 12px;
}

.shared-hero-actions .btn-md {
  width: 100%;
  justify-content: center;
}

.shared-side-tip {
  margin: 0;
  color: var(--text-secondary);
  font-size: 13px;
  line-height: 1.7;
}

.shared-story-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 0.92fr);
  gap: 18px;
}

.shared-story-card {
  align-content: start;
}

.shared-story-head,
.shared-impact-copy {
  display: grid;
  gap: 12px;
}

.shared-story-head h2,
.shared-impact-copy h2 {
  margin: 0;
  font-size: 30px;
  line-height: 1.18;
  letter-spacing: -0.02em;
}

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

.shared-story-item {
  display: grid;
  gap: 6px;
  padding: 16px 18px;
  border-radius: 18px;
  background: var(--surface-soft);
  border: 1px solid rgba(160, 173, 196, 0.12);
}

.shared-story-item span {
  color: var(--text-secondary);
  font-size: 13px;
  font-weight: 600;
}

.shared-story-item p {
  margin: 0;
  color: var(--text-primary);
  line-height: 1.75;
}

.shared-impact-card {
  align-items: start;
  background:
    linear-gradient(180deg, rgba(250, 253, 247, 0.98), rgba(255, 255, 255, 0.98)),
    var(--fill-card);
}

.shared-impact-copy p {
  margin: 0;
  color: var(--text-secondary);
  line-height: 1.8;
}

.shared-impact-list {
  margin: 0;
  padding-left: 20px;
  display: grid;
  gap: 12px;
  color: var(--text-secondary);
  line-height: 1.8;
}

.shared-details-modal {
  position: fixed;
  inset: 0;
  z-index: 120;
  display: grid;
  place-items: center;
  padding: 24px;
  overflow-y: auto;
}

.shared-details-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.42);
  backdrop-filter: blur(10px);
}

.shared-details-dialog {
  position: relative;
  z-index: 1;
  width: min(1160px, calc(100vw - 32px));
  max-height: min(88vh, 920px);
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  gap: 18px;
  padding: 24px;
  border-radius: 28px;
  background:
    radial-gradient(circle at top right, rgba(227, 247, 231, 0.72), rgba(227, 247, 231, 0) 34%),
    rgba(255, 255, 255, 0.98);
  border: 1px solid rgba(160, 173, 196, 0.18);
  box-shadow: 0 32px 72px rgba(15, 23, 42, 0.22);
  overflow: hidden;
}

.shared-details-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.shared-details-copy {
  display: grid;
  gap: 0;
}

.shared-details-copy strong {
  font-size: 26px;
  line-height: 1.2;
}

.shared-details-head span {
  color: var(--text-secondary);
  font-size: 13px;
  line-height: 1.75;
}

.shared-details-close {
  flex: 0 0 auto;
  min-width: 88px;
}

.shared-details-content {
  min-height: 0;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  gap: 16px;
}

.shared-details-tabs {
  display: flex;
  align-items: flex-end;
  gap: 22px;
  width: 100%;
  max-width: 100%;
  padding-bottom: 2px;
  border-bottom: 1px solid rgba(160, 173, 196, 0.18);
}

.shared-details-tab {
  position: relative;
  border: 0;
  background: transparent;
  color: var(--text-secondary);
  min-height: auto;
  padding: 0 2px 12px;
  border-radius: 0;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  transition: color 160ms ease;
}

.shared-details-tab::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -3px;
  height: 3px;
  border-radius: 999px;
  background: rgba(9, 186, 7, 0.76);
  transform: scaleX(0.3);
  opacity: 0;
  transition: transform 160ms ease, opacity 160ms ease;
}

.shared-details-tab:hover {
  color: var(--text-primary);
}

.shared-details-tab.is-active {
  color: #166534;
}

.shared-details-tab.is-active::after {
  transform: scaleX(1);
  opacity: 1;
}

.shared-details-panel {
  min-height: 0;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
}

.shared-details-panel .table-wrap,
.shared-details-panel .supplier-table-wrap {
  min-height: 0;
  height: 100%;
  overflow: auto;
}

@media (max-width: 1180px) {
  .supplier-layout,
  .shared-grid,
  .supplier-detail-grid,
  .supplier-send-strip,
  .supplier-hero-band,
  .shared-hero,
  .shared-story-grid {
    grid-template-columns: 1fr;
  }

  .supplier-layout {
    gap: 12px;
    overflow: auto;
  }

  .supplier-column-resizer {
    display: none;
  }

  .supplier-list-body,
  .supplier-detail-body {
    overflow: visible;
  }

  .supplier-share-modal-card {
    width: min(920px, calc(100vw - 32px));
  }

  .supplier-qjl-push-strip {
    grid-template-columns: 1fr;
  }

  .supplier-qjl-push-summary,
  .supplier-qjl-preview-summary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .shared-summary-strip {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 960px) {
  .topbar-actions {
    width: auto;
    justify-content: flex-end;
  }

  .supplier-delivery-report-columns,
  .supplier-delivery-report-strip,
  .supplier-delivery-report-columns--compact {
    grid-template-columns: 1fr;
  }

  #toggle-detail-fullscreen,
  #toggle-compare-fullscreen {
    display: none;
  }
}

@media (max-width: 768px) {
  .supplier-stage,
  .shared-shell {
    width: min(100%, calc(100% - 24px));
  }

  .supplier-collection-list {
    width: 100%;
  }

  .supplier-collection-actions {
    width: 100%;
  }

  .supplier-note-upload-inline,
  .supplier-qjl-push-inline {
    flex: 1 1 180px;
    justify-content: center;
  }

  .supplier-share-actions,
  .login-actions {
    grid-template-columns: 1fr;
  }

  .supplier-share-story,
  .supplier-share-metrics,
  .login-preview-list {
    grid-template-columns: 1fr;
  }

  .supplier-delivery-report-head {
    flex-direction: column;
  }

  .supplier-delivery-report-score {
    width: 100%;
    text-align: left;
  }

  .supplier-hero-band,
  .shared-hero,
  .login-surface {
    padding: 20px;
  }

  .shared-details-modal {
    padding: 12px;
  }

  .shared-details-dialog {
    width: min(100vw - 24px, 100%);
    max-height: min(92vh, 960px);
    padding: 18px;
    border-radius: 22px;
  }

  .shared-details-head {
    flex-direction: column;
    align-items: flex-start;
  }

  .shared-details-tabs {
    gap: 18px;
    flex-wrap: wrap;
  }

  .shared-details-tab {
    flex: 0 0 auto;
  }

  .shared-details-close {
    width: 100%;
    justify-content: center;
  }

  .supplier-detail-body {
    padding: 18px;
  }

  .supplier-detail-actions {
    width: auto;
  }

  .supplier-share-modal-card {
    width: min(100vw - 24px, 100%);
    padding: 20px;
  }

  .supplier-hero-metrics,
  .shared-summary-strip {
    grid-template-columns: 1fr;
  }

  .shared-story-head h2,
  .shared-impact-copy h2 {
    font-size: 24px;
  }
}

@media (max-width: 1180px) {
  .workspace-stage.is-workspace-tab-mode {
    grid-template-columns: 1fr;
    grid-template-rows: auto minmax(0, 1fr);
    overflow: hidden;
  }

  .workspace-stage.is-workspace-tab-mode > .workspace-column-resizer {
    display: none;
  }

  .workspace-stage.is-workspace-tab-mode > .workspace-panel {
    height: 100%;
    min-height: 0;
  }

  .workspace-stage.is-workspace-tab-mode > .workspace-panel:not(.is-workspace-tab-active) {
    display: none;
  }

  .workspace-stage.is-workspace-tab-mode > .workspace-panel.is-workspace-tab-active {
    display: flex;
  }
}

/* Compare workspace: aligned with supplier-pricing-design-spec.md */
.compare-body {
  background: #FFFFFF;
  container-type: inline-size;
  overflow-x: hidden;
  overflow-y: auto;
}

.compare-form {
  --compare-control-height: 44px;
  position: relative;
  top: 0;
  z-index: 5;
  grid-template-columns: minmax(240px, 1fr);
  gap: 12px;
  align-items: end;
  padding: 18px;
  background: rgba(255, 255, 255, 0.96);
  border-bottom: 1px solid var(--border-weak);
  box-shadow: 0 8px 24px rgba(20, 28, 39, 0.04);
  backdrop-filter: blur(10px);
}

.compare-source-chip {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  min-height: 48px;
  padding: 10px 14px;
  border: 1px solid rgba(9, 186, 7, 0.16);
  border-radius: 16px;
  background: var(--brand-050);
}

.compare-source-chip strong,
.compare-source-chip span {
  display: block;
}

.compare-source-chip strong {
  color: var(--ink-900);
  font-size: 14px;
  font-weight: 700;
  line-height: 20px;
}

.compare-source-chip span {
  color: var(--ink-600);
  font-size: 12px;
  line-height: 18px;
}

.compare-keyword-field {
  display: grid;
  gap: 7px;
  min-width: 0;
}

.compare-search-mode {
  grid-column: 1 / -1;
  display: inline-grid;
  grid-template-columns: repeat(2, max-content);
  width: fit-content;
  gap: 4px;
  padding: 4px;
  border: 1px solid var(--border-weak);
  border-radius: var(--radius-control);
  background: var(--surface-soft);
}

.compare-mode-button {
  min-height: 32px;
  padding: 0 12px;
  border: 0;
  border-radius: var(--radius-md);
  background: transparent;
  color: var(--ink-600);
  cursor: pointer;
  font: inherit;
  font-size: 13px;
  font-weight: 700;
  line-height: 18px;
}

.compare-search-mode .compare-mode-button {
  grid-column: auto;
  width: max-content;
  min-width: max-content;
  min-height: 32px;
  white-space: nowrap;
  word-break: keep-all;
}

.compare-mode-button:hover,
.compare-mode-button:focus-visible {
  color: var(--ink-900);
  background: var(--surface-base);
  outline: none;
}

.compare-mode-button.is-active {
  background: var(--brand-050);
  color: var(--brand-800);
  box-shadow: inset 0 0 0 1px rgba(9, 186, 7, 0.18);
}

.compare-keyword-field > span,
.compare-image-field > span {
  color: var(--ink-600);
  font-size: 12px;
  font-weight: 700;
  line-height: 16px;
}

.compare-keyword-label {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.compare-keyword-label small {
  color: var(--ink-500);
  font-size: 12px;
  font-weight: 400;
  line-height: 16px;
}

.compare-keyword-field input,
.compare-image-drop,
.compare-platform-trigger,
.compare-form-actions button {
  height: var(--compare-control-height);
  min-height: var(--compare-control-height);
}

.compare-keyword-field input,
.compare-image-drop,
.compare-form-actions select {
  height: var(--compare-control-height);
  min-height: var(--compare-control-height);
  border-radius: var(--radius-control);
  border: 1px solid var(--border-weak);
  background: var(--surface-base);
  color: var(--ink-900);
  font-size: 13px;
  font-weight: 400;
  line-height: 20px;
  box-shadow: none;
  transition: border-color var(--duration-fast) var(--ease-standard),
    box-shadow var(--duration-fast) var(--ease-standard),
    background-color var(--duration-fast) var(--ease-standard);
}

.compare-keyword-field input::placeholder {
  color: var(--ink-500);
  opacity: 1;
}

.compare-keyword-field input {
  padding-block: 0;
}

.compare-keyword-field input:hover,
.compare-image-drop:hover,
.compare-form-actions select:hover {
  border-color: var(--border-strong);
  background: var(--surface-soft);
}

.compare-keyword-field input:focus,
.compare-image-field:focus-within .compare-image-drop,
.compare-form-actions select:focus {
  border-color: var(--brand-700);
  box-shadow: var(--focus-ring-brand);
}

.compare-image-field {
  display: grid;
  gap: 7px;
  min-width: 0;
}

.compare-image-field input[type="file"] {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.compare-image-drop {
  display: flex;
  position: relative;
  align-items: center;
  gap: 10px;
  padding: 5px 60px 5px 12px;
  color: var(--ink-900);
  cursor: pointer;
  font-size: 13px;
  line-height: 20px;
  transition: border-color var(--duration-fast) var(--ease-standard),
    box-shadow var(--duration-fast) var(--ease-standard),
    background-color var(--duration-fast) var(--ease-standard);
}

.compare-image-drop:has(img:not([hidden])) {
  padding-left: 7px;
}

.compare-image-drop img {
  display: block;
  flex: 0 0 32px;
  width: 32px;
  height: 32px;
  border-radius: var(--radius-sm);
  object-fit: cover;
  background: var(--surface-base);
}

.compare-image-drop span {
  display: block;
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
  color: var(--ink-500);
  font-size: 13px;
  font-weight: 400;
  line-height: 20px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.compare-image-drop:has(img:not([hidden])) span {
  color: var(--ink-900);
}

.compare-image-drop .compact-link {
  display: inline-flex;
  flex: 0 0 auto;
  position: absolute;
  top: 50%;
  right: 13px;
  width: auto;
  min-width: max-content;
  min-height: 28px;
  transform: translateY(-50%);
  align-items: center;
  justify-content: center;
}

.compare-platform-picker {
  grid-column: 1 / -1;
  position: relative;
  z-index: 20;
  --compare-platform-accent: var(--brand-700);
  --compare-platform-accent-soft: rgba(9, 186, 7, 0.18);
  --compare-platform-hover: var(--brand-050);
}

.compare-platform-trigger {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
  padding: 5px 42px 5px 13px;
  border: 1px solid var(--border-weak);
  border-radius: var(--radius-control);
  background: var(--surface-base);
  color: var(--ink-900);
  cursor: pointer;
  transition: border-color var(--duration-fast) var(--ease-standard),
    box-shadow var(--duration-fast) var(--ease-standard),
    background-color var(--duration-fast) var(--ease-standard);
}

.compare-platform-trigger:hover {
  border-color: var(--border-strong);
  background: var(--surface-soft);
}

.compare-platform-picker.is-open .compare-platform-trigger {
  border-color: var(--compare-platform-accent);
  background: var(--surface-base);
  box-shadow: var(--focus-ring-brand);
}

.compare-platform-trigger:focus-visible {
  outline: none;
  border-color: var(--compare-platform-accent);
  box-shadow: var(--focus-ring-brand);
}

.compare-platform-values {
  display: flex;
  flex: 1;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  min-width: 0;
}

.compare-platform-tag {
  display: inline-flex;
  align-items: center;
  max-width: 100%;
  min-height: 26px;
  gap: 5px;
  padding: 2px 6px 2px 10px;
  border: 1px solid var(--compare-platform-accent-soft);
  border-radius: var(--radius-md);
  background: var(--brand-050);
  color: var(--brand-800);
  font-size: 13px;
  font-weight: 700;
  line-height: 20px;
  white-space: nowrap;
  word-break: keep-all;
}

.compare-platform-tag .compare-platform-tag-remove {
  display: inline-grid;
  place-items: center;
  flex: 0 0 16px;
  width: 16px;
  min-width: 16px;
  height: 16px;
  min-height: 16px;
  padding: 0;
  border: 0;
  border-radius: var(--radius-full);
  background: transparent;
  color: var(--brand-700);
  cursor: pointer;
  font-size: 12px;
  line-height: 1;
}

.compare-platform-tag .compare-platform-tag-remove:hover,
.compare-platform-tag .compare-platform-tag-remove:focus-visible {
  color: var(--brand-900);
  background: rgba(9, 186, 7, 0.12);
  outline: none;
}

.compare-platform-placeholder {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  color: var(--ink-500);
  font-size: 13px;
  line-height: 20px;
}

.compare-platform-arrow {
  position: absolute;
  right: 12px;
  top: 50%;
  width: 16px;
  height: 16px;
  color: var(--ink-300);
  transform: translateY(-50%);
  pointer-events: none;
}

.compare-platform-picker.is-open .compare-platform-arrow {
  color: var(--compare-platform-accent);
}

.compare-platform-menu {
  position: fixed;
  top: var(--compare-platform-menu-top, 0);
  left: var(--compare-platform-menu-left, 0);
  width: var(--compare-platform-menu-width, auto);
  z-index: 1300;
  --compare-platform-accent: var(--brand-700);
  --compare-platform-hover: var(--brand-050);
  display: grid;
  gap: 4px;
  max-height: 218px;
  overflow-y: auto;
  border: 1px solid var(--border-weak);
  border-radius: var(--radius-control);
  background: var(--surface-base);
  box-shadow: var(--shadow-floating);
  padding: 6px;
}

.compare-platform-menu .compare-platform-option {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 18px;
  align-items: center;
  width: 100%;
  min-height: 38px;
  gap: 12px;
  padding: 8px 10px 8px 12px;
  border: 0;
  border-radius: var(--radius-md);
  background: transparent;
  color: var(--ink-800);
  cursor: pointer;
  font: inherit;
  font-size: 14px;
  line-height: 20px;
  text-align: left;
}

.compare-platform-option:hover,
.compare-platform-option:focus-visible,
.compare-platform-option.is-selected {
  background: var(--compare-platform-hover);
  transform: none;
  outline: none;
}

.compare-platform-option:focus-visible {
  box-shadow: inset 0 0 0 1px var(--compare-platform-accent);
}

.compare-platform-option.is-selected {
  color: var(--brand-800);
  font-weight: 700;
}

.compare-platform-option.is-disabled {
  color: var(--ink-400);
  cursor: not-allowed;
  opacity: 0.52;
}

.compare-platform-option.is-disabled:hover,
.compare-platform-option.is-disabled:focus-visible {
  background: transparent;
  box-shadow: none;
}

.compare-platform-option svg {
  width: 16px;
  height: 16px;
  color: var(--compare-platform-accent);
  opacity: 0;
}

.compare-platform-option.is-selected svg {
  opacity: 1;
}

.compare-form-actions {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
  align-items: center;
}

.compare-extension-update-button {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  max-width: 100%;
  padding: 7px 12px;
  border: 1px solid rgba(245, 158, 11, 0.42);
  border-radius: var(--radius-control);
  background: #FFFBEB;
  color: #92400E;
  cursor: pointer;
  font: inherit;
  font-size: 12px;
  font-weight: 700;
  line-height: 18px;
  overflow-wrap: anywhere;
  transition: background-color var(--duration-fast) var(--ease-standard),
    border-color var(--duration-fast) var(--ease-standard),
    color var(--duration-fast) var(--ease-standard);
}

.compare-extension-update-button::before {
  content: "";
  flex: 0 0 auto;
  width: 8px;
  height: 8px;
  margin-right: 8px;
  border-radius: var(--radius-full);
  background: #F59E0B;
  box-shadow: 0 0 0 4px rgba(245, 158, 11, 0.14);
}

.compare-extension-update-button:hover,
.compare-extension-update-button:focus-visible {
  border-color: rgba(217, 119, 6, 0.62);
  background: #FEF3C7;
  color: #78350F;
  outline: none;
  transform: none;
  box-shadow: none;
}

.compare-stop-button {
  border-color: rgba(220, 38, 38, 0.22);
  background: #FFF5F5;
  color: #B42318;
}

.compare-stop-button:hover,
.compare-stop-button:focus-visible {
  border-color: rgba(220, 38, 38, 0.44);
  background: #FFE4E6;
  color: #991B1B;
  box-shadow: none;
}

.compare-form-actions button {
  border-radius: var(--radius-control);
  white-space: nowrap;
}

.compare-form-actions .compare-extension-update-button {
  white-space: normal;
}

.compare-local-helper-card code {
  display: block;
  margin: 10px 0;
  padding: 10px 12px;
  border-radius: 10px;
  background: #111827;
  color: #E5E7EB;
  font-size: 12px;
  line-height: 18px;
  white-space: normal;
  overflow-wrap: anywhere;
}

.compare-local-status {
  --compare-local-accent-rgb: 9, 186, 7;
  --compare-local-accent-color: var(--brand-700);
  display: grid;
  grid-template-columns: minmax(0, 1fr) 30px;
  align-items: center;
  gap: 12px;
  min-height: 76px;
  padding: 12px 14px;
  border: 1px solid var(--border-weak);
  border-radius: 14px;
  background: var(--surface-base);
  box-shadow: 0 8px 24px rgba(20, 28, 39, 0.04);
}

.compare-local-status span,
.compare-local-status p,
.compare-local-status small {
  display: block;
}

.compare-local-status span {
  color: var(--ink-600);
  font-size: 12px;
  font-weight: 700;
  line-height: 16px;
}

.compare-local-status strong {
  color: var(--ink-900);
  font-size: 16px;
  line-height: 24px;
}

.compare-local-status p {
  margin: 2px 0 0;
  color: var(--ink-700);
  font-size: 13px;
  line-height: 18px;
}

.compare-local-status small {
  margin-top: 2px;
  color: var(--ink-500);
  font-size: 12px;
  line-height: 17px;
  overflow-wrap: anywhere;
}

.compare-local-status-indicator {
  position: relative;
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
}

.compare-local-status-spinner {
  width: 24px;
  height: 24px;
  border: 3px solid rgba(var(--compare-local-accent-rgb), 0.14);
  border-top-color: var(--compare-local-accent-color);
  border-radius: var(--radius-full);
  animation: compare-local-spin 860ms linear infinite;
}

.compare-local-status-pulse {
  position: absolute;
  width: 8px;
  height: 8px;
  border-radius: var(--radius-full);
  background: var(--compare-local-accent-color);
  box-shadow: 0 0 0 0 rgba(var(--compare-local-accent-rgb), 0.22);
  animation: compare-local-pulse 1.25s ease-out infinite;
}

.compare-local-status.is-loading {
  background:
    linear-gradient(90deg, rgba(var(--compare-local-accent-rgb), 0), rgba(var(--compare-local-accent-rgb), 0.06), rgba(var(--compare-local-accent-rgb), 0)) 0 100% / 220% 3px no-repeat,
    var(--surface-base);
  animation: compare-local-sheen 1.8s ease-in-out infinite;
}

.compare-local-status.needs-action {
  --compare-local-accent-rgb: 245, 158, 11;
  --compare-local-accent-color: #F59E0B;
  border-color: rgba(245, 158, 11, 0.38);
  background: #FFFBEB;
}

.compare-batch-shell {
  display: grid;
  gap: 10px;
}

.compare-batch-tabs {
  display: flex;
  align-items: stretch;
  gap: 8px;
  overflow-x: auto;
  padding: 0 2px 6px;
  scrollbar-width: thin;
}

.compare-batch-tab {
  flex: 0 0 168px;
  min-width: 168px;
  display: grid;
  grid-template-rows: auto auto;
  align-items: center;
  row-gap: 2px;
  min-height: 56px;
  padding: 8px 10px;
  border: 1px solid var(--border-weak);
  border-radius: 12px;
  background: var(--surface-base);
  color: var(--ink-700);
  text-align: left;
  cursor: pointer;
  transition: background-color var(--duration-fast) var(--ease-standard),
    border-color var(--duration-fast) var(--ease-standard),
    transform var(--duration-fast) var(--ease-standard);
}

.compare-batch-tab:hover,
.compare-batch-tab:focus-visible {
  border-color: var(--border-strong);
  background: #FAFBFD;
}

.compare-batch-tab:active {
  transform: translateY(1px);
}

.compare-batch-tab.is-active {
  border-color: rgba(9, 186, 7, 0.34);
  background: var(--brand-050);
  color: var(--brand-800);
  box-shadow: 0 0 0 2px rgba(9, 186, 7, 0.08);
}

.compare-batch-tab strong,
.compare-batch-meta,
.compare-batch-tab small {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.compare-batch-tab strong {
  color: inherit;
  font-size: 13px;
  font-weight: 700;
  line-height: 18px;
}

.compare-batch-tab small {
  color: var(--ink-600);
  font-size: 11px;
  font-weight: 600;
  line-height: 16px;
}

.compare-batch-meta {
  display: flex;
  align-items: center;
  gap: 5px;
}

.compare-batch-state {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  min-height: 18px;
  padding: 0 6px;
  border-radius: var(--radius-full);
  background: rgba(9, 186, 7, 0.1);
  color: var(--brand-800);
  font-size: 11px;
  font-weight: 800;
  line-height: 16px;
}

.compare-batch-tab[data-status="running"] .compare-batch-state {
  background: rgba(37, 99, 235, 0.1);
  color: #1D4ED8;
}

.compare-batch-tab[data-status="needs-action"] .compare-batch-state {
  background: rgba(245, 158, 11, 0.13);
  color: #B45309;
}

.compare-batch-tab[data-status="failed"] .compare-batch-state {
  background: rgba(220, 38, 38, 0.1);
  color: #B91C1C;
}

.compare-batch-tab[data-status="stopped"] .compare-batch-state {
  background: rgba(100, 116, 139, 0.12);
  color: var(--ink-600);
}

.compare-batch-panel {
  display: grid;
  gap: 12px;
  min-width: 0;
}

.compare-batch-message-card {
  border-style: dashed;
}

@keyframes compare-local-spin {
  to {
    transform: rotate(360deg);
  }
}

@keyframes compare-local-pulse {
  0% {
    box-shadow: 0 0 0 0 rgba(var(--compare-local-accent-rgb), 0.24);
  }
  70% {
    box-shadow: 0 0 0 9px rgba(var(--compare-local-accent-rgb), 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(var(--compare-local-accent-rgb), 0);
  }
}

@keyframes compare-local-sheen {
  0% {
    background-position: 120% 100%, 0 0;
  }
  100% {
    background-position: -120% 100%, 0 0;
  }
}

@container (min-width: 760px) {
  .compare-form {
    grid-template-columns: minmax(0, 1fr) minmax(280px, 0.9fr);
  }

  .compare-platform-picker {
    grid-column: auto;
  }

  .compare-form-actions {
    grid-column: 1 / -1;
  }

  .compare-form-actions button {
    grid-column: auto;
    width: auto;
  }
}

@container (min-width: 1120px) {
  .compare-form {
    grid-template-columns:
      minmax(320px, 1.1fr)
      minmax(280px, 0.9fr)
      max-content;
  }

  .compare-platform-picker {
    grid-column: auto;
  }

  .compare-form-actions {
    grid-column: auto;
  }

  .compare-form-actions button {
    grid-column: auto;
    width: auto;
  }
}

.compare-result {
  display: grid;
  flex: 0 0 auto;
  align-content: start;
  gap: 12px;
  min-height: auto;
  overflow: visible;
  padding: 2px 18px 18px;
}

.compare-insight-bar {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 0;
  overflow: hidden;
  border: 1px solid var(--border-weak);
  border-radius: 12px;
  background: var(--surface-base);
  box-shadow: 0 6px 18px rgba(20, 28, 39, 0.035);
}

.compare-insight-bar > div {
  position: relative;
  display: grid;
  align-content: center;
  min-height: 60px;
  gap: 3px;
  padding: 10px 14px;
  overflow: hidden;
  border-right: 1px solid var(--border-weak);
  background: transparent;
  box-shadow: none;
}

.compare-insight-bar > div:last-child {
  border-right: 0;
}

.compare-insight-bar > div::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 2px;
  background: rgba(9, 186, 7, 0.52);
}

.compare-insight-bar span,
.compare-insight-bar small {
  color: var(--ink-600);
  font-size: 12px;
  line-height: 16px;
}

.compare-insight-bar span {
  font-weight: 700;
}

.compare-insight-bar strong {
  color: var(--ink-900);
  font-family: var(--font-numeric);
  font-size: 20px;
  font-variant-numeric: tabular-nums;
  font-weight: 700;
  line-height: 1.15;
  overflow-wrap: anywhere;
}

.compare-decision-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.compare-decision-strip > div,
.compare-platform-table-wrap,
.compare-review-details {
  border: 1px solid var(--border-weak);
  background: var(--surface-base);
  box-shadow: var(--shadow-card);
}

.compare-decision-strip > div {
  position: relative;
  display: grid;
  align-content: start;
  gap: 5px;
  min-height: 104px;
  padding: 16px;
  overflow: hidden;
  border-radius: 16px;
}

.compare-decision-strip > div::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 3px;
  background: transparent;
}

.compare-decision-strip > div:nth-child(2)::before,
.compare-decision-strip > div:nth-child(3)::before {
  background: linear-gradient(90deg, rgba(9, 186, 7, 0.68), rgba(82, 212, 80, 0.14));
}

.compare-decision-strip span,
.compare-decision-strip small {
  color: var(--ink-600);
  font-size: 12px;
  line-height: 18px;
}

.compare-decision-strip span {
  font-weight: 700;
}

.compare-decision-strip strong {
  color: var(--ink-900);
  font-family: var(--font-numeric);
  font-size: 24px;
  font-variant-numeric: tabular-nums;
  font-weight: 700;
  line-height: 1.15;
  overflow-wrap: anywhere;
}

.compare-decision-strip small {
  overflow-wrap: anywhere;
}

.compare-risk-list,
.compare-match-reasons {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.compare-risk-list {
  padding: 2px 0;
}

.compare-risk-list span,
.compare-match-reasons span,
.compare-status-pill {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 4px 10px;
  border-radius: var(--radius-pill);
  background: #FFF7E6;
  color: #B45309;
  font-size: 12px;
  font-weight: 600;
  line-height: 16px;
}

.compare-match-reasons span {
  background: var(--brand-050);
  color: var(--brand-700);
}

.compare-status-pill[data-status="ok"] {
  background: var(--color-success-bg);
  color: var(--color-success-text);
}

.compare-status-pill[data-status="empty"] {
  background: var(--ink-100);
  color: var(--ink-600);
}

.compare-status-pill[data-status="error"] {
  background: var(--color-error-bg);
  color: var(--color-error-text);
}

.compare-status-pill[data-status="need_verification"] {
  background: #FFF7E6;
  color: #B45309;
}

.compare-platform-table-wrap {
  overflow-x: auto;
  border-radius: 16px;
}

.compare-platform-details {
  border: 1px solid var(--border-weak);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.58);
  box-shadow: none;
  overflow: hidden;
}

.compare-platform-details summary {
  display: flex;
  position: relative;
  align-items: center;
  min-height: 40px;
  gap: 12px;
  padding: 0 54px 0 12px;
  color: var(--ink-900);
  cursor: pointer;
  font-size: 14px;
  font-weight: 700;
  list-style: none;
}

.compare-platform-details summary::-webkit-details-marker {
  display: none;
}

.compare-platform-details summary small {
  margin-left: auto;
  color: var(--ink-600);
  font-size: 12px;
  font-weight: 600;
  line-height: 18px;
}

.compare-platform-details summary::after,
.compare-review-details summary::after,
.compare-review-more summary::after {
  content: "";
  position: absolute;
  top: 50%;
  right: 12px;
  width: 32px;
  height: 28px;
  transform: translateY(-50%);
  padding: 0;
  border-radius: var(--radius-pill);
  background-color: var(--ink-100);
  background-image: url("data:image/svg+xml,%3Csvg%20viewBox%3D%270%200%2024%2024%27%20xmlns%3D%27http%3A//www.w3.org/2000/svg%27%3E%3Cpath%20d%3D%27M7%2010l5%205%205-5%27%20fill%3D%27none%27%20stroke%3D%27%2364758B%27%20stroke-width%3D%272.2%27%20stroke-linecap%3D%27round%27%20stroke-linejoin%3D%27round%27/%3E%3C/svg%3E");
  background-position: center;
  background-repeat: no-repeat;
  background-size: 15px 15px;
}

.compare-platform-details[open] summary::after,
.compare-review-details[open] summary::after,
.compare-review-more[open] summary::after {
  background-image: url("data:image/svg+xml,%3Csvg%20viewBox%3D%270%200%2024%2024%27%20xmlns%3D%27http%3A//www.w3.org/2000/svg%27%3E%3Cpath%20d%3D%27M7%2014l5-5%205%205%27%20fill%3D%27none%27%20stroke%3D%27%2364758B%27%20stroke-width%3D%272.2%27%20stroke-linecap%3D%27round%27%20stroke-linejoin%3D%27round%27/%3E%3C/svg%3E");
}

.compare-platform-details .compare-platform-table-wrap {
  border: 0;
  border-top: 1px solid var(--border-weak);
  border-radius: 0;
  box-shadow: none;
}

.compare-platform-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 720px;
}

.compare-platform-table th,
.compare-platform-table td {
  padding: 11px 14px;
  border-bottom: 1px solid var(--border-weak);
  color: var(--ink-700);
  font-size: 13px;
  line-height: 20px;
  text-align: left;
  vertical-align: middle;
}

.compare-platform-table th {
  height: 40px;
  background: #FAFBFD;
  color: var(--ink-600);
  font-size: 12px;
  font-weight: 700;
}

.compare-platform-table tr:last-child td {
  border-bottom: 0;
}

.compare-platform-table tbody tr {
  transition: background-color var(--duration-fast) var(--ease-standard);
}

.compare-platform-table tbody tr:hover {
  background: #FAFBFD;
}

.compare-platform-table td strong {
  color: var(--ink-900);
  font-weight: 700;
}

.compare-section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  padding-top: 2px;
}

.compare-section-head h4 {
  margin: 0;
  color: var(--ink-900);
  font-size: 16px;
  font-weight: 700;
  line-height: 22px;
}

.compare-section-head span {
  color: var(--ink-600);
  font-size: 12px;
  line-height: 18px;
}

.compare-cards {
  gap: 12px;
}

.aggregate-compare-cards {
  gap: 12px;
}

.compare-card.external-compare-card {
  padding: 14px;
  border: 1px solid var(--border-weak);
  border-radius: 16px;
  background: var(--surface-base);
  box-shadow: 0 8px 24px rgba(20, 28, 39, 0.04);
  transition: border-color var(--duration-fast) var(--ease-standard),
    box-shadow var(--duration-fast) var(--ease-standard),
    transform var(--duration-fast) var(--ease-standard);
}

.compare-card.external-compare-card:hover {
  border-color: var(--border-strong);
  box-shadow: var(--shadow-card);
  transform: translateY(-1px);
}

.external-compare-card .compare-card-top {
  gap: 14px;
}

.external-compare-main {
  min-width: 0;
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.external-compare-copy {
  min-width: 0;
}

.external-compare-heading {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  flex-wrap: wrap;
}

.external-compare-heading h4 {
  flex: 1 1 220px;
  min-width: 0;
  color: var(--ink-900);
  font-size: 14px;
  line-height: 21px;
  overflow-wrap: anywhere;
}

.external-compare-title-link {
  color: inherit;
  text-decoration: none;
  border-radius: 6px;
  transition: color var(--duration-fast) var(--ease-standard),
    box-shadow var(--duration-fast) var(--ease-standard);
}

.external-compare-title-link:hover {
  color: var(--brand-700);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.external-compare-title-link:focus-visible {
  outline: none;
  box-shadow: var(--focus-ring-brand);
}

.external-compare-copy p {
  color: var(--ink-600);
  line-height: 20px;
}

.external-compare-tag {
  min-height: 24px;
  padding: 3px 8px;
  border-radius: var(--radius-pill);
  background: var(--brand-050);
  color: var(--brand-700);
  font-size: 11px;
  font-weight: 700;
}

.external-compare-thumb {
  display: block;
  width: 100px;
  height: 100px;
  flex: 0 0 100px;
  overflow: hidden;
  border: 1px solid var(--border-weak);
  border-radius: 14px;
  background: var(--surface-soft);
}

.external-compare-thumb-link {
  cursor: pointer;
  transition: border-color var(--duration-fast) var(--ease-standard),
    box-shadow var(--duration-fast) var(--ease-standard),
    transform var(--duration-fast) var(--ease-standard);
}

.external-compare-thumb-link:hover {
  border-color: rgba(9, 186, 7, 0.32);
  box-shadow: 0 8px 18px rgba(20, 28, 39, 0.10);
  transform: translateY(-1px);
}

.external-compare-thumb-link:active {
  transform: translateY(0);
}

.external-compare-thumb-link:focus-visible {
  outline: none;
  border-color: rgba(9, 186, 7, 0.44);
  box-shadow: var(--focus-ring-brand);
}

.external-compare-thumb img,
.external-compare-thumb-fallback {
  width: 100%;
  height: 100%;
}

.external-compare-thumb img {
  object-fit: cover;
}

.external-compare-thumb-fallback {
  display: grid;
  place-items: center;
  color: var(--ink-500);
  font-size: 12px;
  line-height: 16px;
  text-align: center;
}

.external-compare-card .price-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 118px;
  padding: 9px 12px;
  border: 1px solid rgba(250, 81, 81, 0.16);
  border-radius: 14px;
  background: var(--color-error-bg);
  color: var(--color-error-text);
  text-align: center;
}

.external-compare-card .price-badge strong {
  color: var(--color-error-text);
  font-family: var(--font-numeric);
  font-size: 20px;
  font-variant-numeric: tabular-nums;
  line-height: 1.1;
}

.external-compare-card .price-badge span {
  color: var(--ink-600);
  font-size: 11px;
  line-height: 16px;
}

.external-compare-card .compare-meta {
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px solid var(--border-weak);
}

.external-compare-card .external-link {
  display: inline-flex;
  margin-top: 12px;
  color: var(--brand-700);
}

.compare-review-details {
  padding: 0;
  overflow: hidden;
  border-radius: 16px;
}

.compare-review-details summary {
  display: flex;
  position: relative;
  align-items: center;
  min-height: 48px;
  padding: 0 56px 0 16px;
  cursor: pointer;
  color: var(--ink-900);
  font-size: 14px;
  font-weight: 700;
  list-style: none;
}

.compare-review-details summary::-webkit-details-marker {
  display: none;
}

.compare-review-details .compare-cards {
  padding: 0 12px 12px;
}

.compare-inline-note {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  padding: 10px 12px;
  border: 1px solid var(--border-weak);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.64);
  color: var(--ink-700);
}

.compare-inline-note strong {
  flex: 0 0 auto;
  color: var(--ink-900);
  font-size: 14px;
  line-height: 20px;
}

.compare-inline-note span {
  min-width: 0;
  color: var(--ink-600);
  font-size: 13px;
  line-height: 20px;
}

.compare-review-list {
  display: grid;
  gap: 10px;
}

.compare-review-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  padding: 0 2px;
}

.compare-review-head h4 {
  margin: 0;
  color: var(--ink-900);
  font-size: 15px;
  font-weight: 700;
  line-height: 22px;
}

.compare-review-head span {
  color: var(--ink-600);
  font-size: 12px;
  line-height: 18px;
}

.compare-list {
  display: grid;
  gap: 0;
  overflow: hidden;
  border: 1px solid var(--border-weak);
  border-radius: 12px;
  background: var(--surface-base);
}

.compare-list .compare-card.external-compare-card {
  display: grid;
  gap: 8px;
  padding: 12px 14px;
  border: 0;
  border-bottom: 1px solid var(--border-weak);
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  transition: background-color var(--duration-fast) var(--ease-standard);
}

.compare-list .compare-card.external-compare-card:last-child {
  border-bottom: 0;
}

.compare-list .compare-card.external-compare-card:hover {
  background: #FAFBFD;
  box-shadow: none;
  transform: none;
}

.compare-list .external-compare-card .compare-card-top {
  align-items: center;
  gap: 12px;
}

.compare-list .external-compare-thumb {
  width: 100px;
  height: 100px;
  flex-basis: 100px;
  border-radius: 10px;
}

.compare-list .external-compare-heading h4 {
  flex: 1 1 260px;
  font-size: 14px;
  line-height: 20px;
}

.compare-list .external-compare-copy p {
  margin-top: 2px;
  font-size: 12px;
  line-height: 18px;
}

.compare-list .external-compare-card .price-badge {
  box-sizing: border-box;
  min-width: 90px;
  padding: 7px 12px;
  border: 0;
  border-radius: 10px;
  background: var(--color-error-bg);
}

.compare-list .external-compare-card .price-badge strong {
  display: block;
  width: 100%;
  font-size: 18px;
  text-align: center;
}

.compare-list .external-compare-card .compare-meta {
  margin-top: 0;
  padding-top: 0;
  border-top: 0;
}

.compare-list .compare-match-reasons {
  gap: 6px;
}

.compare-list .compare-match-reasons span {
  min-height: 22px;
  padding: 3px 8px;
  font-size: 11px;
  line-height: 14px;
}

.compare-list .external-compare-card .external-link {
  display: inline-flex;
  margin-top: 0;
}

.compare-review-more {
  overflow: hidden;
  border: 1px dashed var(--border-weak);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.48);
}

.compare-review-more summary {
  display: flex;
  position: relative;
  align-items: center;
  min-height: 42px;
  padding: 0 54px 0 12px;
  color: var(--ink-700);
  cursor: pointer;
  font-size: 13px;
  font-weight: 700;
  list-style: none;
}

.compare-review-more summary::-webkit-details-marker {
  display: none;
}

.compare-review-more .compare-list {
  margin: 0 10px 10px;
}

.representative-product-list,
.batch-compare-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.upload-batches-table {
  margin-right: var(--upload-table-left-gutter, 18px);
  min-width: 1560px;
}

.upload-batches-table thead th {
  position: sticky;
  top: 0;
  z-index: 4;
  height: 24px;
  padding-top: 4px;
  padding-bottom: 4px;
  background: var(--surface-soft);
  box-shadow: 0 1px 0 var(--border-weak);
  line-height: 16px;
  vertical-align: middle;
}

.upload-batches-table th:first-child,
.upload-batches-table td:first-child {
  --upload-sticky-cell-bg: #ffffff;
  position: sticky;
  left: 0;
  width: 72px;
  min-width: 72px;
  max-width: 72px;
  background: var(--upload-sticky-cell-bg);
  box-shadow:
    calc(var(--upload-table-left-gutter, 18px) * -1) 0 0 0 var(--upload-sticky-cell-bg),
    1px 0 0 var(--border-weak);
}

.upload-batches-table thead th:first-child {
  --upload-sticky-cell-bg: var(--surface-soft);
  z-index: 6;
  box-shadow:
    calc(var(--upload-table-left-gutter, 18px) * -1) 0 0 0 var(--upload-sticky-cell-bg),
    1px 0 0 var(--border-weak),
    0 1px 0 var(--border-weak);
}

.upload-batches-table tbody td:first-child {
  z-index: 3;
}

.upload-batches-table tbody tr:hover > td:first-child {
  --upload-sticky-cell-bg: #FAFBFD;
}

.upload-batches-table tbody tr:has(.upload-checkbox:checked) > td:first-child {
  --upload-sticky-cell-bg: var(--brand-050);
}

.upload-batches-table tbody tr:has(.upload-checkbox:checked):hover > td:first-child {
  --upload-sticky-cell-bg: #EAF9E7;
}

.upload-batches-table .upload-select-column,
.upload-batches-table .upload-select-cell {
  text-align: center;
  vertical-align: middle;
}

.upload-select-all-label,
.upload-row-select-label {
  width: 16px;
  min-height: 20px;
  justify-content: center;
  gap: 0;
  margin: 0 auto;
}

.upload-batches-table .batch-compare-column,
.upload-batches-table .batch-compare-cell {
  width: 420px;
  min-width: 420px;
}

.upload-batches-table .upload-actions-column,
.upload-batches-table .upload-actions-cell {
  width: 72px;
  min-width: 72px;
  text-align: left;
}

.upload-delete-button {
  min-height: 26px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--color-danger-text);
  font-size: 0.82rem;
  font-weight: 500;
  line-height: 1.2;
  cursor: pointer;
}

.upload-delete-button:hover {
  color: var(--color-error);
  text-decoration: underline;
}

.upload-delete-button:disabled {
  cursor: wait;
  opacity: 0.62;
}

.representative-product-list {
  flex-direction: column;
  align-items: flex-start;
  color: var(--text-primary);
  font-weight: 400;
  line-height: 1.45;
  overflow: visible;
}

.representative-product-list span,
.representative-product-fallback {
  display: block;
  max-width: 260px;
  color: var(--text-primary);
  font-weight: 400;
  white-space: normal;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.representative-product-list:not(.is-expanded) {
  max-height: 152px;
  overflow: hidden;
}

.representative-product-list:not(.is-expanded) span,
.representative-product-fallback {
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.representative-product-fallback {
  line-height: 1.45;
  -webkit-line-clamp: 4;
}

.representative-product-list.is-expanded {
  max-height: 220px;
  overflow-y: auto;
  padding-right: 4px;
}

.batch-compare-actions {
  flex-direction: column;
  align-items: flex-start;
  min-width: 380px;
  max-width: 420px;
  overflow: visible;
}

.batch-compare-button {
  width: 100%;
  height: auto;
  min-height: 30px;
  max-width: 390px;
  padding: 5px 10px;
  align-items: flex-start;
  justify-content: flex-start;
  color: var(--text-primary);
  font-weight: 400;
  line-height: 1.35;
  white-space: normal;
  text-align: left;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.batch-compare-actions.is-expanded {
  max-height: 232px;
  overflow-y: auto;
  padding-right: 4px;
}

.upload-product-expand-button {
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  min-height: 24px;
  padding: 4px 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--text-secondary);
  font-size: 0.78rem;
  font-weight: 600;
  line-height: 1.2;
  cursor: pointer;
  text-align: left;
}

.representative-product-list .upload-product-expand-button {
  margin-top: 2px;
}

.upload-product-expand-button:hover {
  color: var(--accent);
  background: transparent;
  text-decoration: underline;
}

.inline-loading-state {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--text-secondary);
  font-size: 0.88rem;
  line-height: 1.35;
  white-space: normal;
}

.inline-loading-spinner {
  width: 14px;
  height: 14px;
  flex: 0 0 auto;
  border: 2px solid var(--border-weak);
  border-top-color: var(--brand-700);
  border-radius: 999px;
  animation: inline-loading-spin 800ms linear infinite;
}

.upload-analysis-pending-row td {
  background: rgba(255, 252, 246, 0.66);
}

@keyframes inline-loading-spin {
  to {
    transform: rotate(360deg);
  }
}

.compact-link {
  min-height: 28px;
  padding: 0;
  white-space: normal;
  text-align: left;
}

.catalog-major-heading {
  display: flex;
  align-items: center;
  min-width: 0;
  flex: 1 1 auto;
}

.catalog-major-tabs {
  display: inline-flex;
  align-items: flex-end;
  gap: 20px;
  min-height: 38px;
  padding: 0 2px;
  background: transparent;
  border: 0;
  border-radius: 0;
  box-shadow: none;
}

.catalog-major-tab {
  position: relative;
  min-height: 34px;
  border: 0;
  border-radius: 0;
  padding: 0 0 10px;
  background: transparent;
  color: var(--text-secondary);
  font-size: 0.92rem;
  font-weight: 500;
  white-space: nowrap;
  cursor: pointer;
  transition: color 160ms ease;
}

.catalog-major-tab::before {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -1px;
  width: 2em;
  height: 2px;
  border-radius: 999px;
  background: var(--color-brand);
  opacity: 0;
  transform: translateX(-50%) scaleX(0.55);
  transform-origin: center;
  transition: opacity 160ms ease, transform 160ms ease;
}

.catalog-major-tab:hover {
  color: var(--text-primary);
}

.catalog-major-tab.is-active {
  color: var(--text-primary);
  font-weight: 700;
  background: transparent;
  box-shadow: none;
}

.catalog-major-tab.is-active::before {
  opacity: 1;
  transform: translateX(-50%) scaleX(1);
}

.catalog-major-tab:focus-visible {
  outline: none;
  color: var(--text-primary);
  box-shadow: none;
}

.catalog-major-tab:focus-visible::before {
  opacity: 1;
  transform: translateX(-50%) scaleX(1);
}

.catalog-major-panel[hidden] {
  display: none;
}

.selection-pool-panel {
  display: grid;
  gap: 10px;
  padding: 0 18px 18px;
}

.selection-pool-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.selection-pool-status {
  color: var(--text-secondary);
  font-size: 0.86rem;
  line-height: 1.5;
}

.selection-pool-loading-card {
  width: fit-content;
  max-width: 100%;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 54px;
  padding: 0 16px;
  border: 1px solid var(--border-weak);
  border-radius: 14px;
  background: var(--surface-soft);
  color: var(--text-secondary);
  font-size: 0.88rem;
  line-height: 1.4;
}

.selection-pool-loading-card .inline-loading-spinner {
  width: 15px;
  height: 15px;
}

.upload-source-loading-card {
  max-width: calc(100% - var(--upload-table-left-gutter, 18px));
  margin-right: var(--upload-table-left-gutter, 18px);
}

.compact-toolbar-button {
  min-height: 30px;
  padding-inline: 10px;
}

.toolbar-button.is-loading {
  cursor: progress;
}

.selection-pool-tabs {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 8px;
  overflow-x: auto;
  padding: 4px 0 8px;
  scrollbar-width: thin;
}

.selection-pool-tab {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 32px;
  border: 1px solid var(--border-weak);
  border-radius: 8px;
  background: var(--fill-card);
  color: var(--text-secondary);
  padding: 0 10px;
  font-size: 0.86rem;
  font-weight: 500;
  white-space: nowrap;
  cursor: pointer;
  transition: background-color 160ms ease, border-color 160ms ease, color 160ms ease, box-shadow 160ms ease;
}

.selection-pool-tab span:last-child {
  color: var(--text-tertiary);
  font-size: 0.78rem;
  font-weight: inherit;
}

.selection-pool-tab.is-active {
  border-color: var(--brand-400);
  background: var(--brand-100);
  color: var(--brand-800);
  font-weight: 700;
  box-shadow: 0 0 0 1px rgba(9, 186, 7, 0.08);
}

.selection-pool-tab.is-active span:last-child {
  color: inherit;
}

.selection-pool-tab:focus-visible {
  outline: 2px solid rgba(9, 186, 7, 0.24);
  outline-offset: 2px;
}

.selection-pool-tab.is-active:focus-visible {
  outline: none;
  box-shadow: 0 0 0 1px rgba(9, 186, 7, 0.08), inset 0 0 0 1px rgba(255, 255, 255, 0.7);
}

.selection-pool-list {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 12px;
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  margin-right: -14px;
  padding-right: 0;
  scrollbar-gutter: auto;
}

.selection-pool-product {
  --selection-pool-media-size: 96px;
  flex: 0 0 auto;
  display: grid;
  grid-template-columns: 28px var(--selection-pool-media-size) minmax(0, 1fr);
  align-items: start;
  gap: 16px;
  border: 1px solid var(--border-weak);
  border-radius: 12px;
  background: var(--fill-card);
  padding: 14px 16px;
  min-height: 126px;
  height: auto;
  overflow: visible;
}

.selection-pool-product.is-focused {
  border-color: rgba(9, 186, 7, 0.24);
  box-shadow: 0 0 0 3px rgba(9, 186, 7, 0.08);
}

.selection-pool-product.is-selected {
  border-color: rgba(9, 186, 7, 0.22);
  background: var(--brand-050);
  box-shadow: none;
}

.selection-pool-product.is-selected:hover {
  background: #EAF9E7;
}

.selection-pool-product.is-selected.is-focused {
  border-color: rgba(9, 186, 7, 0.32);
  box-shadow: 0 0 0 3px rgba(9, 186, 7, 0.10);
}

.selection-pool-product.is-sold-out {
  background: var(--fill-muted);
}

.selection-pool-product.is-sold-out .selection-pool-media,
.selection-pool-product.is-sold-out .selection-pool-info {
  opacity: 0.5;
}

.selection-pool-check {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  align-self: start;
  justify-self: center;
  width: 20px;
  height: var(--selection-pool-media-size);
  margin-top: 0;
}

.selection-pool-check input {
  width: 16px;
  height: 16px;
  margin: 0;
  accent-color: var(--brand-700);
}

.selection-pool-media {
  position: relative;
  width: var(--selection-pool-media-size);
  height: var(--selection-pool-media-size);
  align-self: start;
  justify-self: center;
}

.selection-pool-thumb {
  width: 100%;
  height: 100%;
  border: 1px solid var(--border-weak);
  border-radius: 12px;
  background: var(--fill-muted);
  color: var(--text-tertiary);
  overflow: hidden;
  padding: 0;
}

.selection-pool-focus-button {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
  border-radius: 12px;
  background: transparent;
  padding: 0;
  cursor: pointer;
  transform: none;
}

.selection-pool-focus-button:hover,
.selection-pool-focus-button:focus-visible {
  background: rgba(9, 186, 7, 0.06);
  transform: none;
}

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

.selection-pool-thumb span {
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  font-size: 0.88rem;
  font-weight: 700;
  white-space: nowrap;
}

.selection-pool-info {
  display: flex;
  flex-direction: column;
  gap: 9px;
  align-self: start;
  min-width: 0;
  min-height: 0;
  height: auto;
  overflow: visible;
  padding-top: 1px;
}

.selection-pool-info strong {
  color: var(--text-primary);
  font-size: 1rem;
  line-height: 1.35;
  overflow: visible;
  text-overflow: clip;
  white-space: normal;
  overflow-wrap: anywhere;
}

.selection-pool-info span {
  color: var(--text-secondary);
  font-size: 0.86rem;
  line-height: 1.45;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.selection-pool-info em {
  color: var(--text-tertiary);
  font-style: normal;
  margin-left: 8px;
}

.selection-pool-soldout-badge {
  display: inline-flex;
  align-items: center;
  min-height: 18px;
  margin-left: 8px;
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  padding: 0 6px;
  background: var(--ink-100);
  color: var(--text-secondary);
  font-size: 0.72rem;
  font-weight: 700;
  vertical-align: 1px;
}

.selection-pool-facts {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px 14px;
  min-width: 0;
}

.selection-pool-fact {
  display: inline-flex;
  align-items: baseline;
  gap: 6px;
  min-width: 0;
  color: var(--text-secondary);
  font-size: 0.86rem;
  line-height: 1.3;
}

.selection-pool-fact b {
  color: var(--ink-600);
  font-weight: 400;
  white-space: nowrap;
}

.selection-pool-fact em {
  color: var(--ink-900);
  font-style: normal;
  font-weight: 400;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.selection-pool-fact.is-group-count b {
  color: var(--color-error-text);
  font-weight: 400;
}

.selection-pool-fact.is-group-count em {
  color: var(--color-error-text);
  font-weight: 400;
}

.selection-pool-fact.is-price b,
.selection-pool-fact.is-price em {
  color: var(--ink-900);
}

.selection-pool-fact.is-shipping-template {
  flex: 1 1 220px;
  max-width: 100%;
}

.selection-pool-fact.is-shipping-template em {
  white-space: normal;
}

.selection-pool-actions {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  flex-wrap: wrap;
  gap: 6px 16px;
  min-width: 0;
  margin-top: 0;
  padding-bottom: 0;
  line-height: 1;
  position: static;
}

.selection-pool-actions .compact-link {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  height: auto;
  color: var(--brand-700);
  font-size: 0.9rem;
  font-weight: 400;
  line-height: 1.2;
  text-align: left;
}

@media (max-width: 1180px) {
  .selection-pool-product {
    --selection-pool-media-size: 88px;
    grid-template-columns: 28px var(--selection-pool-media-size) minmax(0, 1fr);
    min-height: 118px;
  }

  .selection-pool-facts {
    gap: 7px 14px;
  }
}

@media (max-width: 720px) {
  .catalog-major-heading {
    align-items: flex-start;
    flex-direction: column;
    gap: 8px;
  }

  .selection-pool-product {
    --selection-pool-media-size: 76px;
    grid-template-columns: 24px var(--selection-pool-media-size) minmax(0, 1fr);
    gap: 12px;
    padding: 12px;
    min-height: 102px;
  }

  .selection-pool-facts {
    gap: 6px 12px;
  }

  .selection-pool-check {
    width: 20px;
  }

}

.catalog-source-tabs {
  display: flex;
  align-items: center;
  gap: 8px;
  overflow-x: auto;
  padding: 2px 0 8px;
  margin: 0 18px 8px;
  border-bottom: 0;
  scrollbar-width: thin;
}

.catalog-source-tab {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 2px;
  min-height: 32px;
  border: 1px solid var(--border-weak);
  border-radius: 8px;
  padding: 0 10px;
  background: var(--fill-card);
  color: var(--text-secondary);
  font-size: 0.86rem;
  font-weight: 500;
  text-align: center;
  white-space: nowrap;
  cursor: pointer;
  transition: background-color 160ms ease, border-color 160ms ease, color 160ms ease, box-shadow 160ms ease;
}

.catalog-source-tab::before {
  content: none;
}

.catalog-source-tab-count {
  color: inherit;
  font-size: inherit;
  font-weight: inherit;
  white-space: nowrap;
}

.catalog-source-tab:hover {
  color: var(--text-primary);
  border-color: var(--border-strong);
  background: var(--surface-soft);
}

.catalog-source-tab.is-active {
  border-color: var(--brand-400);
  background: var(--brand-100);
  color: var(--brand-800);
  font-weight: 700;
  box-shadow: 0 0 0 1px rgba(9, 186, 7, 0.08);
}

.catalog-source-tab:focus-visible {
  outline: 2px solid rgba(9, 186, 7, 0.24);
  outline-offset: 2px;
}

.catalog-source-tab.is-active:focus-visible {
  outline: none;
  box-shadow: 0 0 0 1px rgba(9, 186, 7, 0.08), inset 0 0 0 1px rgba(255, 255, 255, 0.7);
}

.catalog-source-panel {
  flex: 0 0 auto;
  min-height: 0;
}

.catalog-source-panel[hidden] {
  display: none;
}

.supplier-delivery-panel {
  margin-top: 0;
  padding: 0 18px 18px;
}

.supplier-delivery-head,
.supplier-delivery-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
}

.supplier-delivery-head strong,
.supplier-delivery-card-head strong {
  display: block;
  color: var(--text-primary);
}

.supplier-delivery-head span,
.supplier-delivery-card-head span,
.supplier-delivery-note {
  color: var(--text-secondary);
  font-size: 0.86rem;
}

.supplier-delivery-list {
  display: grid;
  gap: 0.85rem;
  margin-top: 0;
}

.supplier-delivery-card {
  border: 1px solid var(--border-weak);
  border-radius: 18px;
  background: var(--fill-card);
  padding: 0.95rem;
}

.selection-delivery-card {
  display: grid;
  gap: 12px;
}

.selection-delivery-select {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: start;
  gap: 10px;
  min-width: 0;
}

.selection-delivery-select input {
  margin-top: 3px;
}

.selection-delivery-select strong,
.selection-delivery-select small {
  display: block;
  min-width: 0;
}

.selection-delivery-select small {
  margin-top: 4px;
  color: var(--text-secondary);
  font-size: 12px;
  line-height: 1.45;
}

.selection-delivery-meta-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.selection-delivery-products {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  max-height: none;
  overflow: visible;
}

.selection-delivery-products span {
  border: 1px solid var(--border-weak);
  border-radius: var(--radius-pill);
  background: var(--surface-soft);
  color: var(--text-secondary);
  padding: 5px 9px;
  font-size: 12px;
  line-height: 1.35;
}

.supplier-delivery-count {
  white-space: nowrap;
}

.supplier-delivery-message {
  margin: 0.75rem 0;
  color: var(--text-primary);
  line-height: 1.6;
}

.supplier-delivery-analysis {
  margin: 0.75rem 0 0;
  padding: 16px;
  border-radius: 16px;
  border: 1px solid rgba(148, 163, 184, 0.16);
  background: rgba(248, 250, 252, 0.82);
  display: grid;
  gap: 12px;
}

.supplier-delivery-analysis-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.supplier-delivery-analysis-head strong {
  color: var(--text-primary);
}

.supplier-delivery-analysis-status {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 28px;
  padding: 0 12px;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.18);
  background: rgba(255, 255, 255, 0.86);
  color: var(--text-secondary);
  font-size: 12px;
  font-weight: 700;
}

.supplier-delivery-analysis-status.is-ready {
  border-color: rgba(34, 197, 94, 0.22);
  background: rgba(240, 253, 244, 0.92);
  color: #166534;
}

.supplier-delivery-analysis-status.is-pending {
  border-color: rgba(245, 158, 11, 0.2);
  background: rgba(255, 251, 235, 0.94);
  color: #b45309;
}

.supplier-delivery-analysis-status.is-failed {
  border-color: rgba(250, 81, 81, 0.2);
  background: rgba(255, 243, 243, 0.94);
  color: var(--color-error-text);
}

.supplier-delivery-analysis-summary,
.supplier-delivery-analysis-empty,
.supplier-delivery-analysis-error {
  margin: 0;
}

.supplier-delivery-analysis-summary,
.supplier-delivery-analysis-empty {
  color: var(--text-primary);
  line-height: 1.65;
}

.supplier-delivery-analysis-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
  color: var(--text-secondary);
  font-size: 12px;
}

.supplier-delivery-analysis-content {
  padding: 0;
  border: 0;
  background: transparent;
}

.supplier-delivery-analysis-content h1,
.supplier-delivery-analysis-content h2,
.supplier-delivery-analysis-content h3 {
  letter-spacing: 0;
}

.supplier-delivery-analysis-error {
  color: var(--color-error-text);
  font-size: 12px;
  line-height: 1.7;
}

.supplier-delivery-products {
  margin-top: 0.75rem;
  max-height: 320px;
}

.supplier-note-list,
.supplier-note-card-list {
  display: grid;
  gap: 0.75rem;
}

.supplier-upload-note-list {
  min-width: 180px;
  max-width: 280px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.supplier-upload-note-item {
  position: relative;
  display: inline-flex;
  max-width: 100%;
}

.supplier-upload-note-chip {
  max-width: 100%;
  border: 1px solid rgba(9, 186, 7, 0.18);
  border-radius: 999px;
  background: var(--brand-050);
  color: var(--brand-800);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 21px 5px 9px;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.2;
  cursor: pointer;
  transition: background-color 140ms ease, border-color 140ms ease, color 140ms ease;
}

.supplier-upload-note-chip--view {
  padding-right: 9px;
}

.supplier-upload-note-chip:hover {
  background: var(--brand-600);
  border-color: var(--brand-600);
  color: #fff;
}

.supplier-upload-note-chip span {
  max-width: 150px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.supplier-upload-note-chip small {
  font-size: 11px;
  font-weight: 700;
  opacity: 0.76;
}

.supplier-upload-note-delete {
  position: absolute;
  top: -5px;
  right: -5px;
  width: 18px;
  height: 18px;
  border: 1px solid rgba(250, 81, 81, 0.26);
  border-radius: 999px;
  background: #fff;
  color: var(--color-error-text);
  display: inline-grid;
  place-items: center;
  padding: 0;
  font-size: 14px;
  font-weight: 800;
  line-height: 1;
  box-shadow: 0 6px 16px rgba(250, 81, 81, 0.18);
  cursor: pointer;
  opacity: 0;
  pointer-events: none;
  transform: scale(0.82);
  transition: opacity 140ms ease, transform 140ms ease, background-color 140ms ease, color 140ms ease;
}

.supplier-upload-note-item:hover .supplier-upload-note-delete,
.supplier-upload-note-item:focus-within .supplier-upload-note-delete {
  opacity: 1;
  pointer-events: auto;
  transform: scale(1);
}

.supplier-upload-note-delete:hover {
  background: var(--color-error-text);
  color: #fff;
}

.supplier-upload-note-empty {
  color: var(--text-tertiary);
  font-size: 12px;
}

.selection-supplier-note-list {
  min-width: 0;
}

.selection-note-detail-modal-shell {
  padding: 20px;
}

.selection-note-detail-card {
  width: min(760px, calc(100vw - 40px));
  max-height: calc(100vh - 40px);
  padding: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.selection-note-detail-head {
  align-items: center;
}

.selection-note-detail-body {
  min-height: 0;
  flex: 1;
  overflow: auto;
  display: grid;
  align-content: start;
  gap: 16px;
  padding: 20px 24px 28px;
  background: var(--surface-base);
}

.selection-note-detail-body > .loading,
.selection-note-detail-body > .empty-card {
  margin: 0;
}

.product-note-cell {
  min-width: 200px;
}

.supplier-note-detail-panel {
  justify-content: flex-end;
  align-items: stretch;
  padding: 0;
}

.supplier-note-detail-backdrop {
  background: rgba(20, 28, 39, 0.34);
}

.supplier-note-detail-drawer {
  position: relative;
  z-index: 1;
  width: min(520px, 100vw);
  height: 100%;
  background: var(--surface-base);
  border-left: 1px solid var(--border-weak);
  box-shadow: -24px 0 56px rgba(20, 28, 39, 0.16);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.supplier-note-detail-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  padding: 22px 24px;
  border-bottom: 1px solid var(--border-weak);
  background: linear-gradient(135deg, rgba(242, 252, 238, 0.86), rgba(255, 255, 255, 1));
}

.supplier-note-detail-head strong {
  display: block;
  margin-bottom: 6px;
  font-size: 18px;
  line-height: 1.3;
  color: var(--ink-900);
}

.supplier-note-detail-head span {
  color: var(--text-secondary);
  font-size: 13px;
  line-height: 1.6;
}

.supplier-note-detail-body {
  min-height: 0;
  flex: 1;
  overflow: auto;
  display: grid;
  align-content: start;
  gap: 16px;
  padding: 20px 24px 28px;
}

.supplier-note-detail-state,
.supplier-note-detail-summary,
.supplier-note-rich-document,
.supplier-note-section-card {
  border: 1px solid var(--border-weak);
  border-radius: 18px;
  background: var(--surface-soft);
  padding: 16px;
}

.supplier-note-detail-state strong,
.supplier-note-detail-summary span,
.supplier-note-section-card span {
  display: block;
  color: var(--brand-800);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.02em;
}

.supplier-note-detail-state p,
.supplier-note-detail-summary p,
.supplier-note-section-card p {
  margin: 8px 0 0;
  color: var(--text-secondary);
  font-size: 13px;
  line-height: 1.75;
  white-space: pre-wrap;
}

.supplier-note-detail-state.error {
  border-color: rgba(250, 81, 81, 0.22);
  background: var(--color-error-bg);
}

.supplier-note-detail-state.error strong {
  color: var(--color-error-text);
}

.supplier-note-linked-products {
  margin-top: 10px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

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

.supplier-note-section-header span {
  margin: 0;
}

.supplier-note-link-trigger {
  flex: 0 0 auto;
  white-space: nowrap;
}

.supplier-note-link-helper {
  margin-top: 10px;
}

.supplier-note-manual-link-list {
  margin-top: 12px;
  display: grid;
  gap: 10px;
}

.supplier-note-manual-link-item {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: start;
  gap: 12px;
  padding: 12px 14px;
  border: 1px solid var(--border-weak);
  border-radius: 14px;
  background: var(--surface-base);
  cursor: pointer;
  transition: border-color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.supplier-note-manual-link-item:hover {
  border-color: rgba(9, 186, 7, 0.2);
  box-shadow: var(--shadow-sm);
}

.supplier-note-manual-link-item.is-selected {
  border-color: rgba(9, 186, 7, 0.28);
  background: var(--brand-050);
}

.supplier-note-manual-link-item input {
  margin-top: 3px;
}

.supplier-note-manual-link-copy {
  min-width: 0;
  display: grid;
  gap: 4px;
}

.supplier-note-manual-link-copy strong {
  color: var(--ink-900);
  font-size: 14px;
  font-weight: 700;
  line-height: 1.4;
}

.supplier-note-manual-link-copy small {
  color: var(--text-secondary);
  font-size: 12px;
  line-height: 1.6;
}

.supplier-note-manual-link-empty {
  margin-top: 10px;
}

.supplier-note-linked-product {
  border: 1px solid rgba(9, 186, 7, 0.18);
  border-radius: 999px;
  background: var(--brand-050);
  color: var(--brand-800);
  display: inline-flex;
  align-items: center;
  max-width: 100%;
  padding: 6px 10px;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.3;
}

.supplier-note-section-list {
  display: grid;
  gap: 12px;
}

.supplier-note-section-list h4 {
  margin: 0;
  color: var(--ink-900);
  font-size: 14px;
}

.supplier-note-rich-document {
  display: grid;
  gap: 12px;
}

.supplier-note-link-modal-card {
  width: min(900px, calc(100vw - 40px));
  padding: 0;
  display: grid;
  gap: 0;
  overflow: hidden;
}

.supplier-note-link-modal-card .modal-head {
  padding: 24px 24px 0;
}

.supplier-note-link-modal-card .modal-head > div {
  padding-right: 12px;
}

.supplier-note-link-body {
  padding: 0 24px 24px;
  display: grid;
  gap: 16px;
}

.supplier-note-link-toolbar {
  display: flex;
  align-items: center;
  gap: 12px;
}

.supplier-note-link-search {
  min-width: 0;
  flex: 1;
}

.supplier-note-link-search input {
  width: 100%;
}

.supplier-note-link-toggle {
  flex: 0 0 auto;
  white-space: nowrap;
}

.supplier-note-link-toggle[aria-pressed="true"] {
  background: var(--brand-050);
  border-color: rgba(9, 186, 7, 0.24);
  color: var(--brand-800);
}

.supplier-note-link-search-meta {
  margin-top: -4px;
  color: var(--text-secondary);
  font-size: 12px;
  line-height: 1.6;
}

.supplier-note-link-selection,
.supplier-note-link-results,
.supplier-note-link-footer {
  border: 1px solid var(--border-weak);
  border-radius: 18px;
  background: var(--surface-soft);
}

.supplier-note-link-selection,
.supplier-note-link-results {
  padding: 16px;
}

.supplier-note-link-selection-head,
.supplier-note-link-results-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 12px;
}

.supplier-note-link-selection-head strong,
.supplier-note-link-results-head strong {
  color: var(--ink-900);
  font-size: 14px;
  line-height: 1.4;
}

.supplier-note-link-selection-head span,
.supplier-note-link-results-head span {
  color: var(--text-secondary);
  font-size: 12px;
  line-height: 1.6;
}

.supplier-note-link-selected-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.supplier-note-link-selected-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  max-width: 100%;
  border: 1px solid rgba(9, 186, 7, 0.18);
  border-radius: 999px;
  background: rgba(9, 186, 7, 0.08);
  color: var(--brand-800);
  padding: 6px 8px 6px 10px;
}

.supplier-note-link-selected-chip span {
  max-width: 280px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.3;
}

.supplier-note-link-selected-chip button {
  border: 0;
  background: transparent;
  color: inherit;
  padding: 0;
  font-size: 16px;
  line-height: 1;
  cursor: pointer;
}

.supplier-note-link-selected-empty {
  color: var(--text-secondary);
  font-size: 13px;
  line-height: 1.7;
}

.supplier-note-link-result-list {
  display: grid;
  gap: 10px;
  max-height: 360px;
  overflow: auto;
  padding-right: 4px;
}

.supplier-note-link-product-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: flex-start;
  gap: 12px;
  padding: 12px 14px;
  border: 1px solid var(--border-weak);
  border-radius: 14px;
  background: #fff;
  cursor: pointer;
  transition: border-color 140ms ease, background-color 140ms ease, box-shadow 140ms ease;
}

.supplier-note-link-product-row:hover {
  border-color: rgba(9, 186, 7, 0.24);
  background: rgba(9, 186, 7, 0.03);
}

.supplier-note-link-product-row input[type="checkbox"] {
  appearance: none;
  -webkit-appearance: none;
  width: 18px;
  height: 18px;
  margin: 0;
  align-self: center;
  flex: 0 0 auto;
  border: 1px solid rgba(9, 186, 7, 0.18);
  border-radius: 6px;
  background: linear-gradient(180deg, #ffffff 0%, #f7fcf6 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.96), 0 1px 2px rgba(15, 23, 42, 0.04);
  cursor: pointer;
  transition: border-color 140ms ease, background-color 140ms ease, box-shadow 140ms ease;
}

.supplier-note-link-product-row input[type="checkbox"]:hover {
  border-color: rgba(9, 186, 7, 0.3);
  background: linear-gradient(180deg, #fbfffa 0%, #f1faef 100%);
}

.supplier-note-link-product-row input[type="checkbox"]:focus-visible {
  outline: none;
  box-shadow: 0 0 0 2px rgba(9, 186, 7, 0.16), inset 0 1px 0 rgba(255, 255, 255, 0.96);
}

.supplier-note-link-product-row input[type="checkbox"]:checked {
  border-color: rgba(9, 186, 7, 0.3);
  background-color: #e1f6db;
  background-image:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 14 14'%3E%3Cpath d='M3 7.2 5.7 10 11 4.6' fill='none' stroke='%230f8a2d' stroke-linecap='round' stroke-linejoin='round' stroke-width='2'/%3E%3C/svg%3E"),
    linear-gradient(180deg, #f2fceb 0%, #e1f6db 100%);
  background-repeat: no-repeat, no-repeat;
  background-position: center, center;
  background-size: 11px 11px, 100% 100%;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.72), 0 1px 2px rgba(15, 23, 42, 0.04);
}

.supplier-note-link-product-row input[type="checkbox"]:checked:hover {
  border-color: rgba(9, 186, 7, 0.38);
  background-color: #d8f1d0;
  background-image:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 14 14'%3E%3Cpath d='M3 7.2 5.7 10 11 4.6' fill='none' stroke='%230f8a2d' stroke-linecap='round' stroke-linejoin='round' stroke-width='2'/%3E%3C/svg%3E"),
    linear-gradient(180deg, #edfbe7 0%, #d8f1d0 100%);
  background-repeat: no-repeat, no-repeat;
  background-position: center, center;
  background-size: 11px 11px, 100% 100%;
}

.supplier-note-link-product-copy {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.supplier-note-link-product-copy strong {
  color: var(--ink-900);
  font-size: 14px;
  line-height: 1.45;
  word-break: break-word;
}

.supplier-note-link-product-copy span {
  color: var(--text-secondary);
  font-size: 12px;
  line-height: 1.6;
  word-break: break-word;
}

.supplier-note-link-product-side {
  display: grid;
  justify-items: end;
  gap: 6px;
  color: var(--text-secondary);
  font-size: 12px;
  line-height: 1.4;
}

.supplier-note-link-product-side strong {
  color: var(--ink-900);
  font-size: 13px;
}

.supplier-note-link-product-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 24px;
  padding: 0 10px;
  border-radius: 999px;
  background: rgba(9, 186, 7, 0.10);
  color: var(--brand-800);
  font-size: 11px;
  font-weight: 700;
}

.supplier-note-link-empty {
  color: var(--text-secondary);
  font-size: 13px;
  line-height: 1.7;
}

.supplier-note-link-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 16px 18px;
}

.supplier-note-link-footer span {
  color: var(--text-secondary);
  font-size: 12px;
  line-height: 1.6;
}

.supplier-note-link-footer-actions {
  display: flex;
  gap: 12px;
}

@media (max-width: 768px) {
  .supplier-note-link-modal-card {
    width: min(100vw - 24px, 100%);
  }

  .supplier-note-link-body {
    padding: 0 16px 16px;
  }

  .supplier-note-section-header,
  .supplier-note-link-toolbar,
  .supplier-note-link-selection-head,
  .supplier-note-link-results-head,
  .supplier-note-link-footer {
    grid-template-columns: 1fr;
    flex-direction: column;
    align-items: stretch;
  }

  .supplier-note-link-toggle,
  .supplier-note-link-footer-actions {
    width: 100%;
  }

  .supplier-note-link-footer-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .supplier-note-link-product-row {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .supplier-note-link-product-side {
    grid-column: 2;
    justify-items: start;
  }
}

.supplier-note-rich-document h4 {
  margin: 0;
  color: var(--ink-900);
  font-size: 14px;
}

.supplier-note-rich-content {
  display: grid;
  gap: 10px;
  color: var(--text-secondary);
  font-size: 13px;
  line-height: 1.75;
}

.supplier-note-rich-content p {
  margin: 0;
  white-space: pre-wrap;
}

.selection-wecom-note-rich-content {
  gap: 14px;
}

.selection-wecom-note-media-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(132px, 1fr));
  gap: 12px;
}

.selection-wecom-note-media-item {
  display: block;
  overflow: hidden;
  border-radius: 12px;
  border: 1px solid var(--border-weak);
  background: var(--surface-base);
}

.selection-wecom-note-media-item img {
  display: block;
  width: 100%;
  aspect-ratio: 1;
  height: auto;
  object-fit: cover;
}

.supplier-note-rich-image {
  margin: 8px 0;
  display: grid;
  gap: 6px;
}

.supplier-note-rich-image img {
  display: block;
  max-width: 100%;
  height: auto;
  border-radius: 14px;
  border: 1px solid var(--border-weak);
  background: var(--surface-base);
  box-shadow: var(--shadow-sm);
}

.supplier-note-rich-video {
  margin: 8px 0;
  display: grid;
  gap: 6px;
}

.supplier-note-rich-video video {
  display: block;
  width: 100%;
  max-height: 420px;
  border-radius: 14px;
  background: #0f172a;
  box-shadow: 0 14px 36px rgba(15, 23, 42, 0.14);
}

.supplier-qjl-push-modal-card {
  width: min(1020px, calc(100vw - 40px));
}

.supplier-qjl-auth-editor-card {
  width: min(560px, calc(100vw - 40px));
}


.supplier-qjl-push-strip {
  display: grid;
  grid-template-columns: minmax(320px, 392px) minmax(0, 1fr);
  gap: 16px;
  align-items: start;
}

.supplier-qjl-control-shell,
.supplier-qjl-preview-shell {
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 24px;
  box-shadow: 0 24px 54px rgba(15, 23, 42, 0.06);
}

.supplier-qjl-control-shell {
  padding: 20px;
  background:
    radial-gradient(circle at top left, rgba(195, 240, 188, 0.54), transparent 40%),
    linear-gradient(180deg, rgba(248, 250, 252, 0.98), rgba(255, 255, 255, 0.98));
}

.supplier-qjl-preview-shell {
  padding: 18px;
  background:
    radial-gradient(circle at top right, rgba(226, 248, 222, 0.46), transparent 30%),
    linear-gradient(180deg, rgba(248, 250, 252, 0.98), rgba(255, 255, 255, 0.98));
}

.supplier-qjl-status-bar {
  padding: 14px 16px;
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 18px;
  background: rgba(248, 250, 252, 0.96);
  color: var(--ink-700);
}

.supplier-qjl-status-bar[data-tone="neutral"],
.supplier-qjl-status-bar[data-tone="info"] {
  border-color: rgba(9, 186, 7, 0.16);
  background: rgba(242, 252, 238, 0.9);
  color: var(--brand-800);
}

.supplier-qjl-status-bar[data-tone="success"] {
  border-color: rgba(9, 186, 7, 0.18);
  background: rgba(242, 252, 238, 0.9);
  color: var(--brand-800);
}

.supplier-qjl-status-bar[data-tone="error"] {
  border-color: rgba(250, 81, 81, 0.18);
  background: rgba(255, 243, 243, 0.94);
  color: var(--color-error-text);
}

.supplier-qjl-status-bar a {
  color: inherit;
  font-weight: 700;
  text-decoration: underline;
}

.supplier-qjl-control-head {
  display: grid;
  gap: 8px;
}

.supplier-qjl-control-kicker {
  display: inline-flex;
  width: fit-content;
  align-items: center;
  min-height: 28px;
  padding: 0 12px;
  border-radius: 999px;
  background: rgba(9, 186, 7, 0.1);
  color: var(--brand-800);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
}

.supplier-qjl-control-head strong,
.supplier-qjl-preview-head strong {
  color: var(--ink-900);
  font-size: 18px;
  line-height: 1.3;
}

.supplier-qjl-control-head p,
.supplier-qjl-preview-head span {
  margin: 0;
  color: var(--text-secondary);
  font-size: 13px;
  line-height: 1.6;
}

.supplier-qjl-push-summary {
  margin-top: 18px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.supplier-qjl-push-summary article,
.supplier-qjl-preview-summary article {
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.7);
}

.supplier-qjl-push-summary article {
  padding: 14px;
}

.supplier-qjl-summary-card--catalog {
  grid-column: 1 / -1;
  min-height: 112px;
  align-content: start;
  background:
    radial-gradient(circle at top right, rgba(195, 240, 188, 0.5), transparent 44%),
    rgba(255, 255, 255, 0.96);
}

.supplier-qjl-summary-card--pending {
  border-color: rgba(9, 186, 7, 0.16);
  background: rgba(242, 252, 238, 0.88);
}

.supplier-qjl-push-summary span,
.supplier-qjl-preview-summary span {
  display: block;
  color: var(--text-secondary);
  font-size: 12px;
}

.supplier-qjl-push-summary strong,
.supplier-qjl-preview-summary strong {
  display: block;
  margin-top: 5px;
}

.supplier-qjl-push-summary strong {
  color: var(--ink-900);
  font-size: 16px;
  line-height: 1.4;
}

.supplier-qjl-summary-card--catalog strong {
  margin-top: 8px;
  font-size: 28px;
  line-height: 1.2;
  letter-spacing: 0;
}

.supplier-qjl-summary-card--pending strong {
  color: var(--brand-800);
}

.supplier-qjl-push-summary small {
  display: block;
  margin-top: 10px;
  color: var(--text-secondary);
  font-size: 12px;
  line-height: 1.6;
}

.supplier-qjl-auth-panel {
  margin-top: 18px;
  display: grid;
  gap: 14px;
  padding: 16px;
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.84);
}

.supplier-qjl-auth-editor-shell {
  margin-top: 0;
}


.supplier-qjl-auth-panel-head {
  display: grid;
  gap: 4px;
}

.supplier-qjl-auth-panel-head strong {
  color: var(--ink-900);
  font-size: 15px;
  line-height: 1.4;
}

.supplier-qjl-auth-panel-head span,
.supplier-qjl-auth-panel-actions span {
  color: var(--text-secondary);
  font-size: 12px;
  line-height: 1.6;
}

.supplier-qjl-auth-panel-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 12px;
}

.supplier-qjl-auth-platform-link {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 0 12px;
  border-radius: 999px;
  border: 1px solid rgba(9, 186, 7, 0.18);
  background: rgba(242, 252, 238, 0.94);
  color: var(--brand-800);
  font-size: 12px;
  font-weight: 700;
  text-decoration: none;
}

.supplier-qjl-auth-platform-link:hover {
  background: rgba(226, 248, 222, 0.98);
  border-color: rgba(9, 186, 7, 0.28);
}

.supplier-qjl-auth-state-note {
  padding: 12px 14px;
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 16px;
  background: rgba(242, 252, 238, 0.82);
  color: var(--brand-800);
  font-size: 12px;
  line-height: 1.6;
}

.supplier-qjl-auth-state-note[data-tone="success"] {
  border-color: rgba(9, 186, 7, 0.16);
  background: rgba(242, 252, 238, 0.9);
  color: var(--brand-800);
}

.supplier-qjl-auth-state-note[data-tone="warning"] {
  border-color: rgba(248, 109, 16, 0.2);
  background: rgba(255, 247, 240, 0.92);
  color: var(--color-warning-text);
}



















.supplier-qjl-push-form {
  margin-top: 0;
}

.supplier-qjl-secret-hint {
  color: var(--text-tertiary);
  font-size: 12px;
  line-height: 1.6;
}

.supplier-qjl-secret-hint a {
  color: var(--brand-700);
  font-weight: 600;
  text-decoration: none;
}

.supplier-qjl-secret-hint a:hover {
  color: var(--brand-800);
  text-decoration: underline;
}

.supplier-qjl-readonly-state {
  margin-top: 18px;
  display: grid;
  gap: 8px;
  padding: 16px;
  border: 1px solid rgba(9, 186, 7, 0.16);
  border-radius: 18px;
  background:
    radial-gradient(circle at top left, rgba(9, 186, 7, 0.12), transparent 36%),
    linear-gradient(180deg, rgba(242, 252, 238, 0.98), rgba(255, 255, 255, 0.98));
}

.supplier-qjl-readonly-state span {
  color: var(--brand-800);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.02em;
}

.supplier-qjl-readonly-state strong {
  color: var(--ink-900);
  font-size: 17px;
  line-height: 1.35;
}

.supplier-qjl-readonly-state p {
  margin: 0;
  color: var(--text-secondary);
  font-size: 13px;
  line-height: 1.7;
}

.supplier-qjl-push-actions {
  margin-top: 6px;
}

.supplier-qjl-push-actions .btn-primary {
  width: 100%;
  justify-content: center;
  min-height: 46px;
  box-shadow: 0 16px 30px rgba(9, 186, 7, 0.16);
}

.supplier-qjl-preview-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 14px;
  border-bottom: 1px solid rgba(148, 163, 184, 0.14);
}

.supplier-qjl-push-preview {
  min-height: 320px;
  display: grid;
  gap: 14px;
  padding-top: 14px;
}

.supplier-qjl-preview-state,
.supplier-qjl-empty-state,
.supplier-qjl-warning-list,
.supplier-qjl-goods-card,
.supplier-qjl-preview-summary article {
  border: 1px solid var(--border-weak);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.9);
}

.supplier-qjl-preview-state,
.supplier-qjl-empty-state,
.supplier-qjl-warning-list,
.supplier-qjl-goods-card {
  padding: 14px;
}

.supplier-qjl-preview-state[data-tone="success"] {
  border-color: rgba(9, 186, 7, 0.16);
  background:
    radial-gradient(circle at top left, rgba(9, 186, 7, 0.12), transparent 34%),
    rgba(255, 255, 255, 0.96);
}

.supplier-qjl-preview-state[data-tone="warning"] {
  border-color: rgba(245, 158, 11, 0.26);
  background:
    radial-gradient(circle at top left, rgba(245, 158, 11, 0.12), transparent 34%),
    rgba(255, 255, 255, 0.96);
}

.supplier-qjl-preview-state[data-tone="info"] {
  border-color: rgba(9, 186, 7, 0.18);
  background:
    radial-gradient(circle at top left, rgba(9, 186, 7, 0.12), transparent 34%),
    rgba(255, 255, 255, 0.96);
}

.supplier-qjl-preview-state strong,
.supplier-qjl-empty-state strong,
.supplier-qjl-goods-card strong {
  display: block;
  color: var(--ink-900);
}

.supplier-qjl-preview-state p,
.supplier-qjl-empty-state p,
.supplier-qjl-warning-list p,
.supplier-qjl-goods-card p,
.supplier-qjl-goods-card span {
  margin: 6px 0 0;
  color: var(--text-secondary);
  font-size: 13px;
  line-height: 1.65;
}

.supplier-qjl-progress-bar {
  position: relative;
  height: 10px;
  margin-top: 12px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.18);
}

.supplier-qjl-progress-bar span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--brand-700), var(--brand-500));
  transition: width 220ms ease;
}

.supplier-qjl-progress-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 8px;
  color: var(--text-secondary);
  font-size: 12px;
  line-height: 18px;
}

.supplier-qjl-preview-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.supplier-qjl-preview-summary article {
  padding: 12px 14px;
  background: linear-gradient(135deg, rgba(242, 252, 238, 0.96), rgba(255, 255, 255, 0.98));
}

.supplier-qjl-preview-summary strong {
  color: var(--brand-800);
  font-size: 18px;
}

.supplier-qjl-progress-list {
  display: grid;
  gap: 10px;
}

.supplier-qjl-progress-item {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  border: 1px solid var(--border-weak);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.92);
}

.supplier-qjl-progress-item[data-state="running"] {
  border-color: rgba(9, 186, 7, 0.18);
  background: rgba(242, 252, 238, 0.92);
}

.supplier-qjl-progress-item[data-state="success"] {
  border-color: rgba(9, 186, 7, 0.18);
  background: rgba(242, 252, 238, 0.92);
}

.supplier-qjl-progress-item[data-state="failed"] {
  border-color: rgba(250, 81, 81, 0.2);
  background: rgba(255, 242, 242, 0.92);
}

.supplier-qjl-progress-item[data-state="non_product"] {
  border-color: rgba(245, 158, 11, 0.24);
  background: rgba(255, 251, 235, 0.94);
}

.supplier-qjl-progress-item-main {
  min-width: 0;
  display: grid;
  gap: 4px;
}

.supplier-qjl-progress-item-main strong,
.supplier-qjl-progress-item-main span,
.supplier-qjl-progress-item-main p {
  display: block;
}

.supplier-qjl-progress-item-main strong {
  color: var(--ink-900);
  font-size: 14px;
  line-height: 20px;
}

.supplier-qjl-progress-item-main span,
.supplier-qjl-progress-item-main p {
  color: var(--text-secondary);
  font-size: 12px;
  line-height: 18px;
}

.supplier-qjl-progress-item-main p {
  margin: 0;
  color: var(--color-error-text);
}

.supplier-qjl-progress-item-badge {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 12px;
  border-radius: 999px;
  background: rgba(82, 94, 119, 0.12);
  color: var(--ink-700);
  font-size: 12px;
  font-weight: 700;
}

.supplier-qjl-progress-item[data-state="running"] .supplier-qjl-progress-item-badge {
  background: rgba(9, 186, 7, 0.14);
  color: var(--brand-800);
}

.supplier-qjl-progress-item[data-state="success"] .supplier-qjl-progress-item-badge {
  background: rgba(9, 186, 7, 0.14);
  color: var(--brand-800);
}

.supplier-qjl-progress-item[data-state="failed"] .supplier-qjl-progress-item-badge {
  background: rgba(250, 81, 81, 0.12);
  color: var(--color-error-text);
}

.supplier-qjl-progress-item[data-state="non_product"] .supplier-qjl-progress-item-badge {
  background: rgba(245, 158, 11, 0.14);
  color: #b45309;
}

.supplier-qjl-empty-state {
  min-height: 180px;
  display: grid;
  align-content: center;
  justify-items: start;
  gap: 6px;
  border-style: dashed;
  border-color: rgba(148, 163, 184, 0.32);
  background:
    radial-gradient(circle at top left, rgba(195, 240, 188, 0.4), transparent 40%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(248, 250, 252, 0.96));
}

.supplier-qjl-empty-badge {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 12px;
  border-radius: 999px;
  background: rgba(9, 186, 7, 0.1);
  color: var(--brand-800);
  font-size: 12px;
  font-weight: 700;
}

.supplier-qjl-warning-list {
  border-color: rgba(245, 158, 11, 0.28);
  background: rgba(255, 251, 235, 0.84);
}

.supplier-qjl-warning-list p {
  color: #92400e;
}

.supplier-qjl-goods-list {
  display: grid;
  gap: 10px;
}

.supplier-qjl-goods-card {
  display: grid;
  gap: 4px;
}

.supplier-qjl-goods-card.is-error {
  border-color: rgba(250, 81, 81, 0.24);
  background: var(--color-error-bg);
}

.supplier-qjl-goods-card.is-error p {
  color: var(--color-error-text);
}

.supplier-note-rich-table {
  width: 100%;
  border-collapse: collapse;
  overflow: hidden;
  border-radius: 12px;
  background: var(--surface-base);
}

.supplier-note-rich-table td {
  border: 1px solid var(--border-weak);
  padding: 8px;
  vertical-align: top;
}

.supplier-note-section-card strong {
  display: block;
  margin-top: 6px;
  color: var(--ink-900);
  font-size: 14px;
}

.supplier-note-card {
  border: 1px solid var(--border-weak);
  border-radius: 16px;
  padding: 0.85rem;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.96), rgba(242, 252, 238, 0.7));
}

.supplier-note-card strong,
.supplier-note-card span {
  display: block;
}

.supplier-note-card span,
.supplier-note-card p,
.supplier-note-meta {
  color: var(--text-secondary);
  font-size: 0.84rem;
}

.supplier-note-card p {
  margin: 0.55rem 0;
  line-height: 1.55;
}

.supplier-note-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.supplier-note-meta span,
.delivery-product-note {
  border-radius: 999px;
  padding: 3px 8px;
  background: var(--brand-100);
  color: var(--brand-800);
}

.delivery-product-name {
  display: block;
}

.delivery-product-notes {
  display: grid;
  gap: 4px;
  margin-top: 6px;
}

.delivery-product-note {
  display: inline-block;
  width: fit-content;
  max-width: 100%;
  white-space: normal;
  line-height: 1.45;
  font-size: 0.76rem;
}

@media (max-width: 900px) {
  .compare-form {
    position: static;
    padding: 14px;
  }

  .compare-form-actions,
  .compare-insight-bar,
  .compare-decision-strip {
    grid-template-columns: 1fr;
  }

  .compare-insight-bar > div {
    border-right: 0;
    border-bottom: 1px solid var(--border-weak);
  }

  .compare-insight-bar > div:last-child {
    border-bottom: 0;
  }

  .compare-platform-details summary {
    align-items: flex-start;
    flex-direction: column;
    gap: 4px;
    padding: 10px 54px 10px 14px;
  }

  .compare-platform-details summary small {
    margin-left: 0;
  }

  .compare-result {
    padding: 10px 14px 14px;
  }

  .compare-section-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .compare-inline-note,
  .compare-review-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .compare-platform-table {
    min-width: 640px;
  }

  .external-compare-card .compare-card-top {
    align-items: stretch;
    flex-direction: column;
  }

  .external-compare-card .price-badge {
    width: 100%;
    text-align: left;
  }
}
.supplier-wecom-note-section {
  display: grid;
  gap: 16px;
  min-height: 0;
}

#supplier-detail-panel-notes {
  min-height: 0;
  display: flex;
  flex-direction: column;
}

#supplier-detail-panel-notes .supplier-wecom-note-section {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  min-height: 0;
  overflow: hidden;
}

#supplier-detail-panel-notes .supplier-wecom-note-list {
  flex: 1 1 auto;
  min-height: 0;
  overflow: auto;
  padding-right: 4px;
}

.supplier-module-shell {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: 16px;
  height: calc(100vh - 120px);
  min-height: calc(100vh - 120px);
}

.supplier-module-shell.is-collapsed {
  grid-template-columns: 72px minmax(0, 1fr);
}

.supplier-module-nav {
  border: 1px solid rgba(26, 43, 29, 0.08);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.9);
  padding: 14px;
  display: grid;
  align-content: start;
  gap: 14px;
  position: sticky;
  top: 16px;
  height: fit-content;
}

.supplier-module-nav-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.supplier-module-nav-head strong {
  font-size: 0.95rem;
}

.supplier-module-nav-toggle {
  min-width: 40px;
  width: 40px;
  justify-content: center;
}

.supplier-module-nav-list {
  display: grid;
  gap: 8px;
}

.supplier-module-tab {
  width: 100%;
  border: 1px solid rgba(26, 43, 29, 0.08);
  border-radius: 8px;
  background: rgba(248, 250, 247, 0.96);
  color: rgba(26, 43, 29, 0.86);
  padding: 12px 14px;
  text-align: left;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
  transition: border-color 0.18s ease, background 0.18s ease, color 0.18s ease, transform 0.18s ease;
}

.supplier-module-tab:hover {
  border-color: rgba(55, 141, 78, 0.28);
  background: rgba(239, 247, 240, 0.98);
}

.supplier-module-tab.is-active {
  border-color: rgba(55, 141, 78, 0.36);
  background: rgba(232, 245, 234, 0.98);
  color: rgba(19, 81, 38, 0.96);
}

.supplier-module-panels {
  min-width: 0;
  min-height: 0;
  display: grid;
}

.supplier-module-panel {
  min-width: 0;
  min-height: 0;
  display: flex;
  overflow: hidden;
}

.supplier-note-manager-panel {
  min-height: 0;
  height: 100%;
}

.supplier-wecom-note-inbox-body {
  display: grid;
  gap: 14px;
  min-height: 0;
  flex: 1 1 auto;
  overflow: auto;
  padding-right: 4px;
}

.supplier-note-manager-panel .supplier-detail-body {
  overflow: hidden;
}

.supplier-module-shell.is-collapsed .supplier-module-nav {
  padding-inline: 10px;
}

.supplier-module-shell.is-collapsed .supplier-module-nav-head strong,
.supplier-module-shell.is-collapsed .supplier-module-tab span {
  display: none;
}

.supplier-module-shell.is-collapsed .supplier-module-tab {
  padding-inline: 10px;
  min-height: 44px;
  text-align: center;
}

.supplier-wecom-note-list {
  display: grid;
  gap: 12px;
}

.supplier-wecom-note-card {
  border: 1px solid rgba(26, 43, 29, 0.08);
  border-radius: 8px;
  padding: 14px;
  background: rgba(255, 255, 255, 0.86);
  display: grid;
  gap: 10px;
}

.supplier-wecom-note-card.is-selected {
  border-color: rgba(55, 141, 78, 0.35);
  box-shadow: 0 0 0 1px rgba(55, 141, 78, 0.08) inset;
}

.supplier-wecom-note-card-head,
.supplier-wecom-note-card-meta,
.supplier-wecom-note-card-actions,
.supplier-wecom-note-thumbs {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.supplier-wecom-note-card-head {
  justify-content: space-between;
}

.supplier-wecom-note-card p {
  margin: 0;
  color: rgba(26, 43, 29, 0.74);
  line-height: 1.6;
}

.supplier-wecom-note-card-meta {
  color: rgba(26, 43, 29, 0.56);
  font-size: 12px;
}

.supplier-wecom-note-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
  padding-top: 6px;
  border-top: 1px solid rgba(26, 43, 29, 0.08);
}

.supplier-wecom-note-card-meta-end {
  justify-content: flex-end;
}

.supplier-wecom-note-thumbs img,
.supplier-note-rich-content img {
  width: 72px;
  height: 72px;
  object-fit: cover;
  border-radius: 8px;
  border: 1px solid rgba(26, 43, 29, 0.08);
}

.selection-wecom-note-media-item img {
  width: 100%;
  height: auto;
  aspect-ratio: 1;
  object-fit: cover;
  border: 0;
  border-radius: 0;
}

@media (max-width: 1080px) {
  .supplier-module-shell,
  .supplier-module-shell.is-collapsed {
    grid-template-columns: 1fr;
    height: auto;
    min-height: 0;
  }

  .supplier-module-nav {
    position: static;
  }

  .supplier-module-nav-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .supplier-module-shell.is-collapsed .supplier-module-nav-head strong,
  .supplier-module-shell.is-collapsed .supplier-module-tab span {
    display: block;
  }

  .supplier-module-shell.is-collapsed .supplier-module-tab {
    text-align: left;
    padding-inline: 14px;
  }
}
