:root {
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-title: 'Outfit', 'Inter', var(--font-sans);

  /* Light Theme Variables */
  --bg-h: 0; --bg-s: 0%; --bg-l: 100%; /* Pure White */
  --panel-h: 214; --panel-s: 20%; --panel-l: 94%; /* Soft slate grey */
  --ink-h: 217; --ink-s: 33%; --ink-l: 17%;
  --muted-h: 215; --muted-s: 16%; --muted-l: 47%;
  --line-h: 214; --line-s: 20%; --line-l: 88%;
  --accent-h: 221; --accent-s: 83%; --accent-l: 53%;
  --accent-dark-h: 224; --accent-dark-s: 76%; --accent-dark-l: 48%;
  --accent-soft-h: 214; --accent-soft-s: 20%; --accent-soft-l: 90%;
  --accent-wash: rgba(59, 130, 246, 0.07);

  --bg: hsl(var(--bg-h), var(--bg-s), var(--bg-l));
  --panel: hsl(var(--panel-h), var(--panel-s), var(--panel-l));
  --ink: hsl(var(--ink-h), var(--ink-s), var(--ink-l));
  --muted: hsl(var(--muted-h), var(--muted-s), var(--muted-l));
  --line: hsl(var(--line-h), var(--line-s), var(--line-l));
  --accent: hsl(var(--accent-h), var(--accent-s), var(--accent-l));
  --accent-dark: hsl(var(--accent-dark-h), var(--accent-dark-s), var(--accent-dark-l));
  --accent-soft: hsl(var(--accent-soft-h), var(--accent-soft-s), var(--accent-soft-l));

  --amber: #d97706;
  --blue: #2563eb;
  --red: #dc2626;
  --green: #10b981;

  --shadow-sm: 0 2px 8px rgba(30, 41, 59, 0.04);
  --shadow: 0 10px 30px -10px rgba(30, 41, 59, 0.08), 0 1px 3px rgba(30, 41, 59, 0.02);
  --shadow-lg: 0 20px 40px -15px rgba(30, 41, 59, 0.12), 0 1px 5px rgba(30, 41, 59, 0.03);
  --radius: 12px;
  --radius-lg: 16px;
  --transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);

  /* Primary Button / Active Elements (Light mode default) */
  --btn-primary-bg: linear-gradient(135deg, var(--accent), var(--accent-dark));
  --btn-primary-text: #ffffff;
  --btn-primary-shadow: 0 4px 12px rgba(59, 130, 246, 0.25);
  --brand-bg: linear-gradient(135deg, var(--accent), var(--accent-dark));
  --brand-color: #ffffff;
}

[data-theme="dark"] {
  /* Dark Theme Variables - Obsidian Black & Titanium Silver */
  --bg-h: 240; --bg-s: 10%; --bg-l: 3.5%; /* Zinc Obsidian #09090b */
  --panel-h: 240; --panel-s: 5%; --panel-l: 8.5%; /* Dark #161618 */
  --ink-h: 240; --ink-s: 5%; --ink-l: 96%; /* Bright Silver #f4f4f5 */
  --muted-h: 240; --muted-s: 5%; --muted-l: 64%; /* Cool Silver Gray #a1a1aa */
  --line-h: 240; --line-s: 6%; --line-l: 18%; /* Border #27272a */
  --accent-h: 240; --accent-s: 6%; --accent-l: 84%; /* Metallic Silver #d4d4d8 */
  --accent-dark-h: 240; --accent-dark-s: 5%; --accent-dark-l: 45%; /* Gray steel #71717a */
  --accent-soft-h: 240; --accent-soft-s: 6%; --accent-soft-l: 15%; /* Charcoal #27272a */
  --accent-wash: rgba(244, 244, 245, 0.08);

  --amber: #fbbf24;
  --blue: #60a5fa;
  --red: #f87171;
  --green: #34d399;

  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.4);
  --shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.55), 0 1px 3px rgba(0, 0, 0, 0.2);
  --shadow-lg: 0 20px 45px -15px rgba(0, 0, 0, 0.75), 0 1px 5px rgba(0, 0, 0, 0.3);

  /* Primary Button / Active Elements (Dark mode metal gradients) */
  --btn-primary-bg: linear-gradient(135deg, #ffffff, #a1a1aa); /* Titanium Silver Chrome Gradient */
  --btn-primary-text: #09090b;
  --btn-primary-shadow: rgba(255, 255, 255, 0.12);
  --brand-bg: linear-gradient(135deg, #ffffff, #a1a1aa);
  --brand-color: #09090b;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--panel);
  color: var(--ink);
  font-family: var(--font-sans);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  transition: background-color 0.3s ease, color 0.3s ease;
}

[hidden] {
  display: none !important;
}

/* Typography Customizations */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-title);
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--ink);
}

/* Scrollbar Styles */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

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

::-webkit-scrollbar-thumb {
  background: var(--line);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: hsl(var(--muted-h), var(--muted-s), var(--muted-l));
}

button,
input,
select,
textarea {
  font: inherit;
  transition: var(--transition);
}

button {
  border: 0;
  cursor: pointer;
  outline: none;
}

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

.mobile-sidebar-toggle {
  display: none;
}

/* Shell Layout */
.app-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  transition: var(--transition);
}

/* Sidebar Navigation */
.sidebar {
  position: sticky;
  top: 0;
  z-index: 30;
  width: 78px;
  height: 100vh;
  padding: 24px 14px;
  background: var(--panel);
  color: var(--ink);
  display: flex;
  flex-direction: column;
  gap: 32px;
  overflow: hidden;
  transition: width 0.22s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.22s ease;
}

.sidebar:hover {
  width: 260px;
  box-shadow: 10px 0 35px rgba(0, 0, 0, 0.05);
}

[data-theme="dark"] .sidebar:hover {
  box-shadow: 10px 0 45px rgba(0, 0, 0, 0.4);
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 42px;
  text-decoration: none;
  color: var(--ink);
}

.brand-mark {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  background: var(--brand-bg);
  color: var(--brand-color);
  font-family: var(--font-title);
  font-weight: 800;
  font-size: 20px;
  flex: 0 0 38px;
  box-shadow: 0 4px 10px var(--btn-primary-shadow);
}

.brand p {
  font-family: var(--font-title);
  font-weight: 800;
  font-size: 16px;
  margin: 0;
  white-space: nowrap;
}

.brand span {
  color: var(--muted);
  font-size: 12px;
  white-space: nowrap;
}

.brand > div:not(.brand-mark) {
  opacity: 0;
  transform: translateX(-20px);
  transition: opacity 0.2s ease, transform 0.28s cubic-bezier(0.34, 1.56, 0.64, 1) 0.05s;
  pointer-events: none;
  white-space: nowrap;
}

.sidebar:hover .brand > div:not(.brand-mark) {
  opacity: 1;
  transform: translateX(0);
  pointer-events: auto;
}

.nav {
  display: grid;
  gap: 8px;
}

.nav a,
.nav-button {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 44px;
  color: var(--muted);
  text-decoration: none;
  padding: 10px;
  border-radius: 10px;
  overflow: hidden;
  transition: var(--transition);
  background: transparent;
  width: 100%;
  text-align: left;
}

.nav a:hover,
.nav-button:hover {
  background: var(--accent-soft);
  color: var(--accent);
}

.nav a.active {
  background: var(--accent-wash);
  color: var(--accent);
  font-weight: 600;
}

.nav-icon {
  width: 24px;
  height: 24px;
  display: grid;
  place-items: center;
  flex: 0 0 24px;
  border-radius: 6px;
  color: currentColor;
}

.nav-svg {
  width: 20px;
  height: 20px;
}

.nav-label {
  white-space: nowrap;
  font-size: 14px;
  font-weight: 600;
  opacity: 0;
  transform: translateX(-20px);
  transition: opacity 0.2s ease, transform 0.28s cubic-bezier(0.34, 1.56, 0.64, 1) 0.05s;
  pointer-events: none;
}

.sidebar:hover .nav-label {
  opacity: 1;
  transform: translateX(0);
  pointer-events: auto;
}

.sidebar-account {
  position: relative;
  margin-top: auto;
}

.account-button {
  width: 100%;
  min-height: 48px;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 6px;
  border-radius: 8px;
  background: transparent;
  color: var(--ink);
  text-align: left;
  overflow: hidden;
}

.account-button:hover,
.account-button[aria-expanded="true"] {
  background: var(--accent-soft);
}

.account-avatar {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  flex: 0 0 32px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), var(--accent-dark));
  color: #ffffff;
  font-weight: 800;
  font-size: 14px;
}

.account-meta {
  display: grid;
  gap: 2px;
  white-space: nowrap;
  opacity: 0;
  transform: translateX(-20px);
  transition: opacity 0.2s ease, transform 0.28s cubic-bezier(0.34, 1.56, 0.64, 1) 0.05s;
  pointer-events: none;
}

.sidebar:hover .account-meta {
  opacity: 1;
  transform: translateX(0);
  pointer-events: auto;
}

.account-meta strong {
  font-size: 13px;
  font-weight: 600;
}

.account-meta small {
  color: var(--muted);
  font-size: 11px;
}

.account-menu {
  position: absolute;
  left: 0;
  bottom: calc(100% + 8px);
  min-width: 180px;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  box-shadow: var(--shadow-lg);
}

.account-menu button {
  width: 100%;
  min-height: 36px;
  padding: 0 12px;
  border-radius: 6px;
  background: transparent;
  color: var(--red);
  font-weight: 600;
  text-align: left;
}

.account-menu button:hover {
  background: rgba(220, 38, 38, 0.08);
}

/* Login Screen Layout */
.login-screen {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
  background: radial-gradient(circle at 10% 20%, var(--accent-wash) 0%, transparent 60%), var(--bg);
}

.login-card {
  width: min(440px, 100%);
  display: grid;
  gap: 28px;
  padding: 38px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--panel);
  box-shadow: var(--shadow-lg);
}

.login-brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.login-brand p {
  font-family: var(--font-title);
  font-weight: 900;
  font-size: 20px;
  margin: 0;
}

.login-brand span {
  color: var(--muted);
  font-size: 13px;
}

.login-card h1 {
  margin: 8px 0 0;
  font-size: 28px;
  letter-spacing: -0.03em;
}

.login-copy {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.6;
  margin: 8px 0 0;
}

.login-form {
  display: grid;
  gap: 18px;
}

.login-form .primary-button {
  min-height: 46px;
  font-size: 15px;
}

.login-error {
  min-height: 18px;
  margin: 0;
  color: var(--red);
  font-size: 13px;
  font-weight: 600;
}

/* Workspace main content */
.workspace {
  background: var(--bg);
  border-radius: 24px 0 0 0;
  border-left: 1px solid var(--line);
  border-top: 1px solid var(--line);
  padding: 32px;
  display: grid;
  gap: 28px;
  transition: var(--transition);
}

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
}

.topbar h1 {
  max-width: 820px;
  margin: 6px 0 0;
  font-size: clamp(24px, 2.5vw, 36px);
  line-height: 1.15;
  color: var(--ink);
}

.eyebrow {
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-size: 11px;
  font-weight: 700;
  font-family: var(--font-title);
}

/* Buttons */
.primary-button,
.secondary-button,
.ghost-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 0 18px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 14px;
  letter-spacing: -0.01em;
  transition: var(--transition);
}

.primary-button {
  color: var(--btn-primary-text);
  background: var(--btn-primary-bg);
  box-shadow: var(--btn-primary-shadow);
}

.primary-button:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 16px var(--btn-primary-shadow);
}

.secondary-button {
  color: var(--accent);
  background: var(--accent-soft);
  border: 1px solid transparent;
}

.secondary-button:hover {
  background: var(--accent-wash);
  border-color: var(--accent);
}

.ghost-button {
  color: var(--ink);
  background: var(--bg);
  border: 1px solid var(--line);
}

.ghost-button:hover {
  background: var(--line);
}

.danger-button {
  color: var(--red) !important;
}

.danger-button:hover {
  background: rgba(220, 38, 38, 0.08) !important;
  border-color: var(--red) !important;
}

/* Top Level Stepper Progress */
.workflow-strip {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 16px;
  position: relative;
}

/* 连线连接，横向布局 */
.workflow-step {
  display: flex;
  gap: 12px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px;
  background: var(--panel);
  position: relative;
  transition: var(--transition);
}

@media (min-width: 1121px) {
  .workflow-step:not(:last-child)::after {
    content: '';
    position: absolute;
    top: 50%;
    right: -11px;
    width: 6px;
    height: 2px;
    background: var(--line);
    transform: translateY(-50%);
    transition: var(--transition);
  }
  .workflow-step.active:not(:last-child)::after {
    background: var(--accent);
  }
}

.workflow-step > span {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--bg);
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
  flex: 0 0 auto;
  transition: var(--transition);
}

.workflow-step.active {
  border-color: var(--accent);
  background: var(--panel);
  box-shadow: var(--shadow);
}

.workflow-step.active > span {
  background: var(--accent);
  color: #ffffff;
  box-shadow: 0 0 0 4px var(--accent-wash);
}

.workflow-step strong {
  display: block;
  font-size: 14px;
  font-weight: 700;
}

.workflow-step p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.4;
}

/* Summary metrics row */
.metrics-row {
  display: grid;
  grid-template-columns: repeat(5, minmax(150px, 1fr));
  gap: 16px;
}

.metric {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow);
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}

.metric::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  height: 100%;
  background: var(--line);
  transition: var(--transition);
}

.metric:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

.metric:hover::after {
  background: var(--accent);
}

.metric span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
}

.metric strong {
  display: block;
  margin-top: 10px;
  font-size: 28px;
  font-family: var(--font-title);
  font-weight: 800;
  letter-spacing: -0.02em;
}

/* Main Grid Layout */
.section-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(340px, 0.8fr);
  gap: 24px;
}

.view-section,
.section-grid.view-section {
  display: none;
}

.view-section.active-view {
  display: block;
  animation: fadeIn 0.2s ease-out;
}

.section-grid.view-section.active-view {
  display: grid;
  animation: fadeIn 0.2s ease-out;
}

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

/* Panel Design */
.panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  padding: 24px;
  transition: var(--transition);
}

.panel-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  margin-bottom: 24px;
}

.panel-heading h2 {
  margin: 4px 0 0;
  font-size: 22px;
}

.compact-heading {
  margin-bottom: 16px;
}

.compact-heading h3 {
  margin: 4px 0 0;
  font-size: 18px;
}

/* Form Styles */
.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

label {
  display: grid;
  gap: 8px;
  color: var(--ink);
  font-size: 13px;
  font-weight: 600;
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  background: var(--panel);
  padding: 10px 14px;
  outline: none;
  font-size: 14px;
  transition: var(--transition);
}

textarea {
  resize: vertical;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-wash);
}

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

/* Data Sources Summary */
.source-summary {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px;
  margin-bottom: 20px;
  background: var(--accent-soft);
}

.source-summary strong {
  display: block;
  font-size: 15px;
}

.source-summary span {
  color: var(--muted);
  font-size: 13px;
}

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

.source-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px;
  background: var(--panel);
  transition: var(--transition);
}

.source-card.active {
  border-color: var(--accent);
  box-shadow: var(--shadow-lg);
  background: var(--accent-wash);
}

.source-card header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 12px;
}

.source-card h3 {
  margin: 0;
  font-size: 16px;
  font-weight: 700;
}

.source-card p {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

.source-score {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin: 14px 0;
}

.source-score div {
  border-radius: 8px;
  padding: 8px 12px;
  background: var(--bg);
}

.source-score span {
  color: var(--muted);
  font-size: 11px;
}

.source-score strong {
  display: block;
  margin-top: 4px;
  font-size: 14px;
}

.source-links {
  display: flex;
  gap: 12px;
  margin-top: 14px;
}

.source-links a {
  color: var(--accent);
  font-weight: 600;
  text-decoration: none;
  font-size: 13px;
}

.source-links a:hover {
  text-decoration: underline;
}

/* Creator Search Panel */
.product-search-panel {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px;
  margin-bottom: 20px;
  background: var(--bg);
}

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

.product-signal {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: var(--panel);
}

.product-signal span {
  display: block;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  margin-bottom: 4px;
}

.product-signal strong {
  display: block;
  color: var(--ink);
  font-size: 13px;
  line-height: 1.4;
}

.creator-strategy-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-top: 14px;
}

.strategy-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: var(--panel);
}

.strategy-card h3 {
  margin: 0 0 6px;
  font-size: 13px;
  font-weight: 700;
}

.search-plan {
  margin-top: 14px;
  padding: 10px 14px;
  border-radius: 8px;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 13px;
  font-weight: 600;
}

.advanced-search {
  margin-top: 14px;
}

.advanced-search summary {
  cursor: pointer;
  color: var(--accent-dark);
  font-weight: 700;
  font-size: 14px;
}

.advanced-search .quality-grid {
  margin-top: 14px;
}

.quality-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(160px, 1fr));
  gap: 12px;
}

.checkbox-field span {
  display: flex;
  align-items: center;
  min-height: 42px;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 14px;
  background: var(--panel);
}

.checkbox-field input {
  width: auto;
}

/* Import panel */
.import-panel {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg);
  padding: 18px;
  margin-bottom: 20px;
}

.import-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 0.85fr);
  gap: 16px;
}

.manual-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

/* Card lists */
.card-list,
.draft-list,
.lead-board {
  display: grid;
  gap: 16px;
}

.product-card,
.lead-card,
.draft-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px;
  background: var(--panel);
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
}

.product-card:hover,
.lead-card:hover,
.draft-card:hover {
  box-shadow: var(--shadow);
  transform: translateY(-1px);
}

.product-card.active {
  border-color: var(--accent);
  background: var(--accent-wash);
}

.product-card h3,
.lead-card h3,
.draft-card h3 {
  margin: 0;
  font-size: 17px;
  font-weight: 700;
}

.product-card p,
.lead-card p,
.draft-card p {
  margin: 8px 0 0;
  color: var(--muted);
  line-height: 1.5;
  font-size: 13px;
}

.tag-row {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-top: 12px;
}

.tag,
.score-pill,
.status-pill {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
}

.tag {
  background: var(--bg);
  color: var(--muted);
  border: 1px solid var(--line);
}

.score-pill {
  background: var(--accent-soft);
  color: var(--accent);
}

.status-pill {
  background: var(--bg);
  color: var(--muted);
  border: 1px solid var(--line);
}

/* Distinct Status Badges */
.status-sent {
  background: rgba(37, 99, 235, 0.08) !important;
  color: #2563eb !important;
  border: 1px solid rgba(37, 99, 235, 0.2) !important;
}

.status-replied,
.status-partnered {
  background: rgba(16, 185, 129, 0.08) !important;
  color: #10b981 !important;
  border: 1px solid rgba(16, 185, 129, 0.2) !important;
}

.status-unfit {
  background: rgba(220, 38, 38, 0.08) !important;
  color: #dc2626 !important;
  border: 1px solid rgba(220, 38, 38, 0.2) !important;
}

.status-contact {
  background: rgba(217, 119, 6, 0.08) !important;
  color: #d97706 !important;
  border: 1px solid rgba(217, 119, 6, 0.2) !important;
}

.contact-warning {
  margin: 10px 0 0;
  color: var(--amber);
  font-size: 12px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 6px;
}

.contact-domain-row {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) auto;
  gap: 10px;
  margin-top: 12px;
}

.lead-actions,
.draft-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 16px;
}

/* Custom Platform Badges */
.platform-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 8px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 700;
}

.platform-youtube {
  background: rgba(239, 68, 68, 0.08);
  color: #ef4444;
}

.platform-tiktok {
  background: rgba(0, 0, 0, 0.05);
  color: #000000;
  border: 1px solid rgba(0, 0, 0, 0.1);
}

[data-theme="dark"] .platform-tiktok {
  background: rgba(255, 255, 255, 0.05);
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.platform-instagram {
  background: linear-gradient(135deg, rgba(253, 224, 71, 0.15), rgba(244, 63, 94, 0.15));
  color: #db2777;
}

/* Tables styling */
.creator-table-wrap {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  box-shadow: var(--shadow);
  overflow-x: auto;
}

.data-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  min-width: 960px;
  color: var(--ink);
}

.data-table th,
.data-table td {
  padding: 16px 14px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: middle;
  font-size: 14px;
}

.data-table th {
  background: var(--bg);
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  white-space: nowrap;
}

.data-table tbody tr {
  transition: var(--transition);
}

.data-table tbody tr:hover {
  background: var(--accent-wash);
}

.data-table tbody tr:last-child td {
  border-bottom: 0;
}

.creator-cell {
  display: flex;
  align-items: center;
  gap: 12px;
}

.avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  color: #ffffff;
  font-weight: 800;
  font-size: 14px;
  background: linear-gradient(135deg, var(--accent), var(--accent-dark));
}

.creator-name {
  margin: 0;
  font-weight: 700;
  white-space: nowrap;
  font-size: 14px;
}

.creator-handle {
  color: var(--muted);
  font-size: 12px;
  font-family: var(--font-title);
}

.reason-list {
  margin: 6px 0 0;
  padding-left: 16px;
  color: var(--muted);
  font-size: 12px;
}

.reason-list li {
  margin: 2px 0;
}

.mini-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 28px;
  border-radius: 6px;
  padding: 0 10px;
  background: var(--bg);
  color: var(--ink);
  font-weight: 600;
  font-size: 12px;
  text-decoration: none;
  border: 1px solid var(--line);
  transition: var(--transition);
}

.mini-button:hover {
  background: var(--accent-soft);
  color: var(--accent);
  border-color: var(--accent);
}

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

.checkbox-label input {
  width: auto;
}

.draft-body {
  width: 100%;
  min-height: 180px;
  margin-top: 12px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 13px;
  line-height: 1.6;
}

.draft-body[readonly] {
  background: var(--bg);
  color: var(--ink);
  opacity: 0.85;
}

/* Advanced Visual Conversion Funnel */
.report-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}

.report-card {
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 24px;
  background: var(--panel);
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.report-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.report-card h3 {
  margin: 0;
  font-size: 18px;
}

.report-platforms-badge {
  font-size: 11px;
  color: var(--muted);
  background: var(--bg);
  padding: 4px 10px;
  border-radius: 6px;
  border: 1px solid var(--line);
  font-weight: 600;
}

.report-top-stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.report-stat-pill {
  padding: 12px;
  border-radius: 8px;
  background: var(--bg);
  border: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.pill-label {
  color: var(--muted);
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
}

.pill-value {
  font-size: 20px;
  font-family: var(--font-title);
  color: var(--ink);
  font-weight: 800;
}

.report-funnel {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.funnel-row {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.funnel-label-group {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
}

.funnel-name {
  font-weight: 600;
  color: var(--ink);
}

.funnel-pct {
  font-family: var(--font-title);
  font-weight: 700;
  color: var(--accent);
}

.funnel-bar-bg {
  height: 8px;
  background: var(--bg);
  border-radius: 999px;
  overflow: hidden;
  border: 1px solid var(--line);
}

.funnel-bar {
  height: 100%;
  border-radius: 999px;
  width: 0;
  transition: width 0.8s cubic-bezier(0.4, 0, 0.2, 1);
  animation: funnel-fill 0.8s ease forwards;
}

.bar-open {
  background: linear-gradient(90deg, #818cf8, #6366f1);
}

.bar-click {
  background: linear-gradient(90deg, #60a5fa, #3b82f6);
}

.bar-reply {
  background: linear-gradient(90deg, #c084fc, #a855f7);
}

.bar-partner {
  background: linear-gradient(90deg, #34d399, #10b981);
}

@keyframes funnel-fill {
  from { width: 0; }
}

/* Empty states */
.empty-state {
  border: 2px dashed var(--line);
  border-radius: var(--radius);
  padding: 32px;
  text-align: center;
  color: var(--muted);
  background: var(--panel);
}

.empty-state strong {
  color: var(--ink);
  font-size: 16px;
  display: block;
  margin-bottom: 6px;
}

.empty-state p {
  margin: 0;
  font-size: 13px;
  line-height: 1.5;
}

/* Settings Drawer styles */
.settings-drawer {
  position: fixed;
  inset: 0;
  z-index: 90;
  pointer-events: none;
  visibility: hidden;
}

.settings-drawer.open {
  pointer-events: auto;
  visibility: visible;
}

.drawer-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.4);
  backdrop-filter: blur(4px);
  opacity: 0;
  transition: opacity 0.2s ease;
}

.settings-drawer.open .drawer-backdrop {
  opacity: 1;
}

.drawer-panel {
  position: absolute;
  top: 0;
  right: 0;
  width: min(560px, 100vw);
  height: 100%;
  overflow-y: auto;
  background: var(--panel);
  border-left: 1px solid var(--line);
  box-shadow: -15px 0 45px rgba(0, 0, 0, 0.1);
  padding: 32px;
  transform: translateX(100%);
  transition: transform 0.28s cubic-bezier(0.4, 0, 0.2, 1);
}

.settings-drawer.open .drawer-panel {
  transform: translateX(0);
}

.drawer-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 24px;
}

.drawer-heading h2 {
  margin: 4px 0 0;
  font-size: 22px;
}

.drawer-divider {
  border: 0;
  border-top: 1px solid var(--line);
  margin: 24px 0;
}

.icon-button {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--bg);
  color: var(--ink);
  font-size: 20px;
  display: grid;
  place-items: center;
  transition: var(--transition);
  border: 1px solid var(--line);
}

.icon-button:hover {
  background: var(--line);
}

.drawer-note {
  margin-top: 16px;
  padding: 14px;
  border-radius: 8px;
  background: rgba(217, 119, 6, 0.06);
  border: 1px solid rgba(217, 119, 6, 0.15);
  color: var(--amber);
  font-size: 13px;
  line-height: 1.5;
}

.drawer-note strong {
  display: block;
  margin-bottom: 4px;
}

.drawer-note p {
  margin: 0;
}

.drawer-status {
  min-height: 38px;
  margin-top: 16px;
  padding: 10px 14px;
  border-radius: 8px;
  background: var(--bg);
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
  border: 1px solid var(--line);
}

.drawer-status.ok {
  background: rgba(16, 185, 129, 0.06);
  color: var(--green);
  border-color: rgba(16, 185, 129, 0.15);
}

.drawer-status.error {
  background: rgba(220, 38, 38, 0.06);
  color: var(--red);
  border-color: rgba(220, 38, 38, 0.15);
}

/* API Grid */
.api-grid {
  display: grid;
  grid-template-columns: minmax(240px, 1.3fr) minmax(200px, 1fr) repeat(4, minmax(130px, 0.7fr));
  gap: 12px;
  align-items: end;
}

.drawer-grid {
  grid-template-columns: 1fr !important;
}

.api-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 16px;
}

.api-status {
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
}

.api-status.ok {
  color: var(--green);
}

.api-status.error {
  color: var(--red);
}

/* Responsive Customizations */
@media (max-width: 1120px) {
  body.sidebar-open {
    overflow: hidden;
  }

  .app-shell {
    grid-template-columns: 1fr;
    padding-top: 60px;
  }

  .mobile-sidebar-toggle {
    position: fixed;
    top: 12px;
    right: 16px;
    z-index: 80;
    width: 40px;
    height: 40px;
    display: grid;
    place-items: center;
    gap: 4px;
    padding: 10px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--panel);
    box-shadow: var(--shadow);
  }

  .mobile-sidebar-toggle span {
    width: 20px;
    height: 2px;
    border-radius: 2px;
    background: var(--ink);
    transition: var(--transition);
  }

  body.sidebar-open .mobile-sidebar-toggle span:nth-child(1) {
    transform: translateY(6px) rotate(45deg);
  }

  body.sidebar-open .mobile-sidebar-toggle span:nth-child(2) {
    opacity: 0;
  }

  body.sidebar-open .mobile-sidebar-toggle span:nth-child(3) {
    transform: translateY(-6px) rotate(-45deg);
  }

  .sidebar {
    position: fixed;
    inset: 0;
    z-index: 70;
    width: min(100vw, 300px);
    height: 100vh;
    padding: 24px;
    transform: translateX(-100%);
    box-shadow: 15px 0 45px rgba(0, 0, 0, 0.15);
    transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  }

  .sidebar:hover {
    width: min(100vw, 300px);
  }

  body.sidebar-open .sidebar {
    transform: translateX(0);
  }

  .nav-label,
  .brand > div:not(.brand-mark),
  .account-meta {
    opacity: 1;
    transform: none;
    pointer-events: auto;
  }

  .section-grid,
  .report-grid,
  .metrics-row,
  .workflow-strip,
  .source-grid,
  .import-grid,
  .quality-grid,
  .api-grid {
    grid-template-columns: 1fr;
  }

  .topbar {
    display: grid;
    gap: 12px;
  }
}

@media (max-width: 720px) {
  .workspace,
  .sidebar {
    padding: 20px;
  }

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

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

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

/* Product Form Tab Layout */
.form-tabs {
  display: flex;
  gap: 12px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 20px;
  padding-bottom: 4px;
}

.form-tab-btn {
  background: transparent;
  border: none;
  padding: 8px 16px;
  color: var(--muted);
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  position: relative;
  transition: var(--transition);
}

.form-tab-btn:hover {
  color: var(--ink);
}

.form-tab-btn.active {
  color: var(--ink);
}

.form-tab-btn.active::after {
  content: '';
  position: absolute;
  bottom: -5px;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--btn-primary-bg);
  border-radius: 99px;
}

.form-tab-content {
  display: none;
  animation: fadeIn 0.2s ease forwards;
}

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

/* Helper Tooltips */
.label-help {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 14px;
  height: 14px;
  font-size: 10px;
  color: var(--muted);
  cursor: help;
  margin-left: 4px;
  opacity: 0.6;
  transition: opacity 0.2s ease;
}

.label-help:hover {
  opacity: 1;
  color: var(--accent);
}

/* Batch Action Bar */
.batch-action-bar {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 12px 20px;
  margin-bottom: 16px;
  animation: slideDown 0.22s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

.batch-action-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}

.batch-selected-count {
  font-size: 14px;
  color: var(--ink);
}

.batch-selected-count strong {
  color: var(--accent);
  font-weight: 700;
  font-size: 16px;
}

/* Creator Detail Drawer Styling */
.creator-detail-content {
  display: grid;
  gap: 24px;
  margin-top: 16px;
}

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

.detail-section h3 {
  font-size: 14px;
  font-weight: 700;
  color: var(--ink);
  border-left: 3px solid var(--accent);
  padding-left: 8px;
  margin: 0 0 2px 0;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

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

.detail-card {
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
}

.detail-card strong {
  display: block;
  font-size: 16px;
  margin-top: 2px;
  color: var(--ink);
}

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

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

.reasons-list li {
  font-size: 13px;
  padding-left: 18px;
  position: relative;
  line-height: 1.4;
  color: var(--ink);
}

.reasons-list li::before {
  content: '✓';
  color: var(--green);
  position: absolute;
  left: 0;
  font-weight: bold;
}

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

.video-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 14px;
  font-size: 13px;
  gap: 16px;
}

.video-item-title {
  font-weight: 500;
  color: var(--ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.video-item-meta {
  color: var(--muted);
  font-size: 12px;
  flex-shrink: 0;
}

/* Warnings and Overlaps */
.badge-warning {
  background: rgba(245, 158, 11, 0.08) !important;
  color: #f59e0b !important;
  border: 1px solid rgba(245, 158, 11, 0.2) !important;
}

.overlap-warning-text {
  color: #f59e0b;
  font-size: 11px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 4px;
  margin-top: 4px;
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
