
:root {
  color-scheme: light;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --bg: #f5f7fb;
  --text: #111827;
  --muted: #64748b;
  --muted-strong: #334155;
  --primary: #101827;
  --primary-soft: #eef4ff;
  --surface-strong: #f8fafc;
  --radius: 8px;
  --shadow: 0 18px 48px rgba(15, 23, 42, 0.07);
  --shadow-soft: 0 10px 30px rgba(15, 23, 42, 0.055);
  --sidebar-bg: #0f172a;
  --sidebar-text: #a9b4c8;
  --sidebar-text-active: #ffffff;
  --sidebar-section-label: #697083;
  --sidebar-active-bg: #ffffff;
  --sidebar-active-border: #2563eb;
  --sidebar-hover-bg: rgba(255,255,255,0.075);
  --sidebar-width: 236px;
  --sidebar-collapsed-width: 76px;
  --content-bg: #f5f7fb;
  --surface: #ffffff;
  --surface-border: #e2e8f0;
  --text-primary: #111827;
  --text-muted: #6b7280;
  --accent: #2563eb;
  --accent-soft: rgba(37, 99, 235, 0.11);
  --success: #10b981;
  --warning: #f59e0b;
  --danger: #ef4444;
  --radius-sm: 6px;
  --radius-md: 8px;
  --radius-lg: 8px;
}

html[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0b1220;
  --text: #e6edf7;
  --muted: #95a3b8;
  --muted-strong: #c3cede;
  --primary: #f8fbff;
  --primary-soft: rgba(59, 130, 246, 0.16);
  --surface-strong: #111b2e;
  --shadow: 0 18px 52px rgba(0, 0, 0, 0.36);
  --shadow-soft: 0 12px 34px rgba(0, 0, 0, 0.30);
  --sidebar-bg: #08111f;
  --sidebar-text: #95a3b8;
  --sidebar-text-active: #ffffff;
  --sidebar-section-label: #667085;
  --sidebar-active-bg: linear-gradient(135deg, rgba(37, 99, 235, 0.98), rgba(20, 184, 166, 0.92));
  --sidebar-active-border: #7dd3fc;
  --sidebar-hover-bg: rgba(148, 163, 184, 0.12);
  --content-bg: #0b1220;
  --surface: #101a2c;
  --surface-border: rgba(148, 163, 184, 0.20);
  --text-primary: #e6edf7;
  --text-muted: #95a3b8;
  --accent: #60a5fa;
  --accent-soft: rgba(96, 165, 250, 0.16);
}

*, *::before, *::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

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

html[data-theme="dark"] body {
  background:
    radial-gradient(circle at 14% -12%, rgba(37, 99, 235, 0.18), transparent 30%),
    radial-gradient(circle at 88% 0%, rgba(20, 184, 166, 0.10), transparent 26%),
    linear-gradient(180deg, #08111f 0%, #0b1220 52%, #090f1c 100%);
}

img, svg {
  max-width: 100%;
  display: block;
}

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

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

button {
  cursor: pointer;
}

input, select, textarea {
  border: 1px solid var(--surface-border);
  border-radius: 10px;
  background: var(--surface);
  color: var(--text);
  padding: 12px 14px;
  outline: none;
}

html[data-theme="dark"] input,
html[data-theme="dark"] select,
html[data-theme="dark"] textarea {
  background: #0b1424 !important;
  color: #e6edf7 !important;
  border-color: rgba(148, 163, 184, 0.26) !important;
}

html[data-theme="dark"] input::placeholder,
html[data-theme="dark"] textarea::placeholder {
  color: #718099 !important;
}

input:focus, select:focus, textarea:focus {
  border-color: rgba(37, 99, 235, 0.45);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}

button, .button, .icon-button {
  border: 1px solid transparent;
  border-radius: 6px;
  min-height: 44px;
  padding: 0 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: background 0.2s ease, transform 0.15s ease, box-shadow 0.2s ease;
}

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

button:disabled, .button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

.app-shell {
  display: flex;
  min-height: 100vh;
  background: var(--bg);
  position: relative;
}

.sidebar {
  width: var(--sidebar-width);
  height: 100vh;
  background:
    linear-gradient(180deg, rgba(255,255,255,0.025), rgba(255,255,255,0)),
    var(--sidebar-bg);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0;
  left: 0;
  z-index: 40;
  overflow-y: hidden;
  overflow-x: hidden;
  scrollbar-width: thin;
  scrollbar-color: rgba(148,163,184,0.35) transparent;
  padding: 0;
  box-shadow: inset -1px 0 0 rgba(255,255,255,0.06);
  transition: width 0.2s ease, transform 0.25s ease, box-shadow 0.2s ease;
}

html[data-theme="dark"] .sidebar {
  box-shadow: inset -1px 0 0 rgba(148, 163, 184, 0.12), 16px 0 52px rgba(0, 0, 0, 0.24);
}

.sidebar-top {
  display: flex;
  flex-direction: column;
  min-height: 0;
  flex: 1;
}

/* Sidebar quick actions: visible, compact controls instead of browser-default buttons. */
.mc-sidebar-shortcuts {
  display: grid;
  gap: 6px;
  padding: 8px 10px 10px;
}
.mc-sidebar-shortcuts button,
.mc-sidebar-shortcuts a {
  box-sizing: border-box;
  width: 100%;
  min-height: 34px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border: 1px solid rgba(148,163,184,.18);
  border-radius: 8px;
  background: rgba(15,23,42,.34);
  color: var(--sidebar-text, #cbd5e1);
  font: inherit;
  font-size: 12px;
  text-decoration: none;
  cursor: pointer;
}
.mc-sidebar-shortcuts button:hover,
.mc-sidebar-shortcuts a:hover { background: rgba(59,130,246,.16); border-color: rgba(96,165,250,.38); color: #fff; }
.mc-sidebar-shortcuts kbd { margin-left: auto; font-size: 10px; color: var(--muted, #94a3b8); }
.mc-close-navigation { display: none; }

.sidebar nav {
  padding: 3px 10px 10px;
  overflow-y: auto;
  overflow-x: hidden;
  min-height: 0;
  flex: 1;
  scrollbar-width: thin;
  scrollbar-color: rgba(148,163,184,0.34) transparent;
}

.sidebar nav::-webkit-scrollbar {
  width: 3px;
}

.sidebar nav::-webkit-scrollbar-track {
  background: transparent;
}

.sidebar nav::-webkit-scrollbar-thumb {
  background: rgba(148,163,184,0.35);
  border-radius: 999px;
}

.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px 11px;
  border-bottom: 1px solid rgba(255,255,255,0.07);
  margin-bottom: 6px;
}

.brand-mark {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: #ffffff;
  color: white;
  display: grid;
  place-items: center;
  font-weight: 700;
  font-size: 0.82rem;
  box-shadow: 0 12px 26px rgba(37,99,235,0.28);
  flex-shrink: 0;
  overflow: hidden;
  padding: 3px;
}

.brand-mark img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.brand-name {
  color: white;
  font-weight: 750;
  font-size: 0.9rem;
  line-height: 1.12;
}

.brand-caption {
  color: var(--sidebar-text);
  font-size: 0.69rem;
  line-height: 1.25;
  margin-top: 2px;
}

.brand-copy {
  min-width: 0;
  flex: 1;
}

.sidebar-collapse-btn {
  width: 28px;
  min-height: 28px;
  height: 28px;
  padding: 0;
  border-radius: 8px;
  border: 1px solid rgba(255,255,255,0.08);
  background: rgba(255,255,255,0.045);
  color: var(--sidebar-text);
  flex-shrink: 0;
}

.sidebar-collapse-btn svg {
  width: 16px;
  height: 16px;
}

.sidebar-collapse-btn:hover {
  color: #ffffff;
  background: var(--sidebar-hover-bg);
  transform: none;
}

.sidebar-section-title {
  font-size: 0.58rem;
  color: var(--sidebar-section-label);
  text-transform: uppercase;
  letter-spacing: 0.14em;
  padding: 7px 8px 3px;
  font-weight: 800;
  line-height: 1;
}

.sidebar-link {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 4px 8px;
  border-radius: 8px;
  color: var(--sidebar-text);
  font-size: 0.81rem;
  font-weight: 680;
  transition: all 0.15s ease;
  border-left: 0;
  text-decoration: none;
  white-space: nowrap;
  overflow: hidden;
  min-height: 28px;
  margin: 0;
  line-height: 1.18;
}

.sidebar-link:hover {
  background: var(--sidebar-hover-bg);
  color: var(--sidebar-text-active);
}

.sidebar-link.active {
  background: var(--sidebar-active-bg);
  color: #111827;
  box-shadow: 0 10px 22px rgba(0,0,0,0.18);
}

html[data-theme="dark"] .sidebar-link.active {
  color: #ffffff;
  box-shadow: 0 12px 28px rgba(79, 70, 229, 0.32);
}

html[data-theme="dark"] .sidebar-link.active .link-icon {
  color: #ffffff !important;
}

.sidebar-link .link-icon {
  width: 24px;
  height: 24px;
  opacity: 0.74;
  flex-shrink: 0;
  display: grid;
  place-items: center;
  border-radius: 7px;
  background: rgba(255,255,255,0.035);
  transition: background 0.15s ease, color 0.15s ease, opacity 0.15s ease, transform 0.15s ease;
}

.sidebar-link .link-icon svg {
  width: 16px;
  height: 16px;
}

.sidebar-link.active .link-icon {
  opacity: 1;
  color: var(--sidebar-active-border);
  background: rgba(37, 99, 235, 0.12);
  transform: scale(1.03);
}

.soon-badge {
  margin-left: auto;
  font-size: 0.58rem;
  padding: 1px 5px;
  border-radius: 999px;
  background: rgba(255,255,255,0.08);
  color: var(--sidebar-text);
  font-weight: 600;
  flex-shrink: 0;
}

.sidebar-link .link-text {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  flex: 1;
}

.sidebar-footer {
  padding: 6px 10px 9px;
  border-top: 1px solid rgba(255,255,255,0.06);
  position: relative;
  background: var(--sidebar-bg);
  overflow: visible;
  display: flex;
  align-items: center;
  gap: 10px;
}

.sidebar-footer svg {
  flex-shrink: 0;
}

.sidebar-profile {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 8px;
  border-radius: 9px;
  cursor: pointer;
  transition: background 0.15s ease;
  overflow: hidden;
  width: 100%;
  border: 1px solid rgba(255,255,255,0.06);
  background: rgba(255,255,255,0.035);
}

.sidebar-profile:hover {
  background: var(--sidebar-hover-bg);
}

.profile-dropdown {
  background: #151821;
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 10px;
  margin: 0 4px 8px;
  overflow: hidden;
  width: calc(100% - 8px);
}

.dropdown-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  font-size: 0.78rem;
  color: var(--sidebar-text);
  text-decoration: none;
  cursor: pointer;
  transition: background 0.15s ease;
  width: 100%;
  border: none;
  background: none;
  font-family: inherit;
  text-align: left;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.dropdown-item:hover {
  background: var(--sidebar-hover-bg);
  color: white;
}

.dropdown-logout {
  color: #ef4444 !important;
}

.dropdown-logout:hover {
  background: rgba(239,68,68,0.1) !important;
}

.dropdown-divider {
  height: 1px;
  background: rgba(255,255,255,0.06);
  margin: 4px 0;
}

.sidebar-user {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0;
  border-radius: var(--radius-sm);
  cursor: pointer;
  flex: 1;
  min-width: 0;
  overflow: hidden;
}

.sidebar-avatar {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: #ffffff;
  color: white;
  display: grid;
  place-items: center;
  font-weight: 700;
  font-size: 0.72rem;
  flex-shrink: 0;
  overflow: hidden;
  padding: 3px;
}

.sidebar-avatar img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.user-name {
  color: white;
  font-size: 0.8rem;
  font-weight: 750;
  line-height: 1.1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.user-role {
  color: var(--sidebar-text);
  font-size: 0.68rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sidebar-profile-toggle {
  width: 20px;
  min-height: 20px;
  height: 20px;
  padding: 0;
  border: none;
  border-radius: 7px;
  background: transparent;
  color: var(--mc-muted, #52616a);
  line-height: 1;
  flex-shrink: 0;
}

.sidebar-profile:hover .sidebar-profile-toggle {
  background: rgba(255,255,255,0.08);
  color: #ffffff;
}

@media (min-width: 901px) {
  html.sidebar-collapsed {
    --sidebar-width: var(--sidebar-collapsed-width);
  }

  html.sidebar-collapsed .sidebar {
    width: var(--sidebar-collapsed-width);
  }

  html.sidebar-collapsed .sidebar-brand {
    justify-content: center;
    padding: 10px 8px 11px;
  }

  html.sidebar-collapsed .brand-copy,
  html.sidebar-collapsed .sidebar-section-title,
  html.sidebar-collapsed .link-text,
  html.sidebar-collapsed .soon-badge,
  html.sidebar-collapsed .sidebar-user,
  html.sidebar-collapsed .sidebar-profile-toggle {
    display: none;
  }

  html.sidebar-collapsed .brand-mark {
    width: 38px;
    height: 38px;
  }

  html.sidebar-collapsed .sidebar-collapse-btn {
    position: absolute;
    top: 44px;
    right: -12px;
    width: 26px;
    height: 26px;
    min-height: 26px;
    border-radius: 999px;
    background: #ffffff;
    color: #111827;
    border-color: rgba(15, 23, 42, 0.12);
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.18);
  }

  html[data-theme="dark"].sidebar-collapsed .sidebar-collapse-btn {
    background: #152033;
    color: #e6edf7;
    border-color: rgba(148, 163, 184, 0.24);
  }

  html.sidebar-collapsed .sidebar-collapse-btn svg {
    transform: rotate(180deg);
  }

  html.sidebar-collapsed .sidebar nav {
    padding: 14px 10px 10px;
  }

  html.sidebar-collapsed .sidebar-section {
    display: grid;
    gap: 5px;
    margin-bottom: 8px;
  }

  html.sidebar-collapsed .sidebar-link {
    position: relative;
    justify-content: center;
    gap: 0;
    min-height: 42px;
    padding: 0;
    border-radius: 12px;
    overflow: visible;
  }

  html.sidebar-collapsed .sidebar-link .link-icon {
    width: 32px;
    height: 32px;
    border-radius: 11px;
  }

  html.sidebar-collapsed .sidebar-link .link-icon svg {
    width: 18px;
    height: 18px;
  }

  html.sidebar-collapsed .sidebar-link::after {
    content: attr(data-label);
    position: fixed;
    left: calc(var(--sidebar-collapsed-width) + 10px);
    top: var(--tooltip-y, 0);
    transform: translateY(-50%) translateX(-4px);
    opacity: 0;
    pointer-events: none;
    white-space: nowrap;
    background: #111827;
    color: #ffffff;
    border-radius: 8px;
    padding: 7px 9px;
    font-size: 0.76rem;
    font-weight: 700;
    box-shadow: 0 16px 34px rgba(15, 23, 42, 0.24);
    transition: opacity 0.12s ease, transform 0.12s ease;
    z-index: 140;
  }

  html.sidebar-collapsed .sidebar-link:hover::after,
  html.sidebar-collapsed .sidebar-link:focus-visible::after {
    opacity: 1;
    transform: translateY(-50%) translateX(0);
  }

  html.sidebar-collapsed .sidebar-footer {
    justify-content: center;
    padding: 8px 10px 12px;
  }

  html.sidebar-collapsed .sidebar-profile {
    justify-content: center;
    padding: 6px;
    width: 44px;
    height: 44px;
    border-radius: 14px;
  }

  html.sidebar-collapsed .sidebar-avatar {
    width: 30px;
    height: 30px;
  }

  html.sidebar-collapsed .profile-dropdown {
    position: fixed !important;
    left: calc(var(--sidebar-collapsed-width) + 10px) !important;
    bottom: 14px !important;
    width: 220px !important;
  }
}

.page-shell {
  flex: 1;
  min-height: 100vh;
  margin-left: var(--sidebar-width);
  padding: 24px 28px;
  transition: margin-left 0.2s ease;
}

.page-header,
.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.page-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: var(--surface);
  padding: 24px 0;
  border-bottom: 1px solid var(--surface-border);
}

html[data-theme="dark"] .page-header {
  background: rgba(15, 23, 42, 0.84);
  border-bottom-color: rgba(148, 163, 184, 0.18);
}

.page-title {
  display: grid;
  gap: 10px;
}

.eyebrow {
  margin: 0;
  color: var(--mc-muted, #52616a);
  text-transform: uppercase;
  font-size: 0.78rem;
  letter-spacing: 0.18em;
}

.page-title h1,
.card-title {
  margin: 0;
  font-size: clamp(1.5rem, 2vw, 2.2rem);
  line-height: 1.1;
}

.subtitle,
.card-copy,
.listing-meta,
.summary-copy,
.form-note,
.hint-text {
  margin: 0;
  color: var(--muted);
  line-height: 1.6;
}

.header-actions,
.top-actions,
.filters,
.stats-row,
.action-row,
.button-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}

.button-primary {
  background: linear-gradient(135deg, #111827, #1e293b);
  border-color: transparent;
  color: white;
  box-shadow: 0 10px 22px rgba(15, 23, 42, 0.14);
}

.button-secondary {
  background: var(--surface-strong);
  color: var(--muted-strong);
  border-color: var(--surface-border);
}

.icon-button {
  background: var(--surface-strong);
  color: var(--muted-strong);
  width: 44px;
  height: 44px;
  padding: 0;
}

.topbar-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 14px;
  border: 1px solid var(--surface-border);
  background: var(--surface);
}

.mc-theme-toggle {
  position: fixed;
  top: 16px;
  right: 18px;
  z-index: 120;
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 4px;
  border-radius: 999px;
  border: 1px solid rgba(203, 213, 225, 0.72);
  background: rgba(255, 255, 255, 0.86);
  box-shadow: 0 14px 34px rgba(15, 23, 42, 0.14);
  backdrop-filter: blur(18px) saturate(1.15);
}

html[data-theme="dark"] .mc-theme-toggle {
  background: rgba(13, 22, 38, 0.88);
  border-color: rgba(148, 163, 184, 0.28);
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.36);
}

.mc-theme-option {
  width: 32px;
  height: 32px;
  min-height: 32px;
  padding: 0;
  border-radius: 999px;
  border: 1px solid transparent;
  background: transparent;
  color: #64748b;
  display: grid;
  place-items: center;
  transition: color 0.16s ease, background 0.16s ease, border-color 0.16s ease, transform 0.16s ease;
}

.mc-theme-option svg {
  width: 16px;
  height: 16px;
}

.mc-theme-option:hover {
  transform: none;
  color: #111827;
  background: rgba(15, 23, 42, 0.055);
}

html[data-theme="dark"] .mc-theme-option {
  color: #94a3b8;
}

html[data-theme="dark"] .mc-theme-option:hover {
  color: #f8fafc;
  background: rgba(255, 255, 255, 0.08);
}

.mc-theme-option.active {
  color: #ffffff;
  background: #111827;
  border-color: #111827;
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.22);
}

.mc-theme-option[data-theme-value="light"].active {
  color: #111827;
  background: #facc15;
  border-color: #facc15;
}

.mc-theme-option[data-theme-value="system"].active {
  color: #ffffff;
  background: #2563eb;
  border-color: #2563eb;
}

html[data-theme="dark"] .mc-theme-option[data-theme-value="dark"].active {
  color: #ffffff;
  background: linear-gradient(135deg, #2563eb, #14b8a6);
  border-color: transparent;
}

html[data-theme="dark"] .mc-theme-option[data-theme-value="light"].active {
  color: #111827;
  background: #facc15;
  border-color: #facc15;
}

html[data-theme="dark"] .mc-theme-option[data-theme-value="system"].active {
  color: #ffffff;
  background: #2563eb;
  border-color: #2563eb;
}

.card {
  background: var(--surface);
  border: 1px solid var(--surface-border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

html[data-theme="dark"] .card,
html[data-theme="dark"] .stat-card,
html[data-theme="dark"] .activity-item,
html[data-theme="dark"] .agent-card,
html[data-theme="dark"] .listing-card,
html[data-theme="dark"] .summary-card,
html[data-theme="dark"] .detail-panel,
html[data-theme="dark"] .sidebar-card,
html[data-theme="dark"] .panel,
html[data-theme="dark"] .panel-card,
html[data-theme="dark"] .table-card,
html[data-theme="dark"] .section-card,
html[data-theme="dark"] .content-card,
html[data-theme="dark"] .metric-card {
  background: linear-gradient(180deg, rgba(16, 26, 44, 0.96), rgba(13, 22, 38, 0.96)) !important;
  border-color: rgba(148, 163, 184, 0.20) !important;
  color: #e6edf7 !important;
  box-shadow: 0 18px 52px rgba(0, 0, 0, 0.30) !important;
}

html[data-theme="dark"] table,
html[data-theme="dark"] .table,
html[data-theme="dark"] .table-wrap,
html[data-theme="dark"] .data-table {
  color: #eef2ff;
}

html[data-theme="dark"] th,
html[data-theme="dark"] td {
  border-color: rgba(148, 163, 184, 0.16) !important;
}

html[data-theme="dark"] thead,
html[data-theme="dark"] .table-head {
  background: rgba(15, 23, 42, 0.9) !important;
}

.card-body,
.section-body {
  padding: 24px;
}

.stats-row {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 20px;
  margin-bottom: 24px;
}

.stat-card {
  background: var(--surface-strong);
  border: 1px solid var(--surface-border);
  border-radius: 18px;
  padding: 22px;
}

.stat-card small {
  display: block;
  color: var(--muted);
  margin-bottom: 10px;
  font-size: 0.78rem;
}

.stat-card strong {
  display: block;
  font-size: 1.8rem;
  color: var(--text);
}

.stat-card span {
  display: block;
  margin-top: 6px;
  color: var(--muted);
  font-size: 0.82rem;
}

.activity-list,
.agent-log,
.listing-cards,
.form-grid,
.summary-grid,
.summary-panel,
.filters {
  display: grid;
  gap: 18px;
}

.activity-item,
.agent-card,
.listing-card,
.summary-card,
.detail-panel,
.sidebar-card {
  background: var(--surface);
  border: 1px solid var(--surface-border);
  border-radius: 18px;
  padding: 18px;
  box-shadow: var(--shadow);
}

.activity-item {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 0;
  border-bottom: 1px solid var(--surface-border);
  box-shadow: none;
  border-radius: 0;
  background: transparent;
}

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

.activity-item .item-title {
  font-weight: 700;
  margin-bottom: 6px;
}

.activity-item .item-meta {
  color: var(--muted);
  font-size: 0.94rem;
}

.agent-log {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
  margin-top: 16px;
}

.agent-card {
  background: var(--surface);
  border: 1px solid var(--surface-border);
  border-radius: var(--radius-md);
  padding: 16px 20px;
}

.agent-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}

.agent-name {
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--text-primary);
}

.agent-status-badge {
  font-size: 0.72rem;
  padding: 2px 10px;
  border-radius: 999px;
  background: rgba(16,185,129,0.1);
  color: #10b981;
  font-weight: 600;
}

.agent-detail {
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-bottom: 6px;
}

.agent-model {
  font-size: 0.75rem;
  color: var(--accent);
  font-weight: 500;
}

.agent-activity-section {
  margin-top: 24px;
  padding: 24px;
}

.agent-activity-section h2 {
  margin: 0 0 4px;
}

.agent-activity-section > p {
  margin: 0 0 20px;
}

.filters {
  grid-template-columns: 1fr auto;
  align-items: center;
}

.filters input,
.filters select {
  width: 100%;
}

.table-card {
  overflow: hidden;
}

.recent-activity-section {
  margin-top: 32px;
  padding: 24px;
  background: var(--surface);
  border: 1px solid var(--surface-border);
  border-radius: var(--radius-lg);
}

.recent-activity-section .card-body {
  padding: 0;
}

.recent-activity-section table {
  width: 100%;
  border-collapse: collapse;
}

.recent-activity-section th {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 8px 12px;
  text-align: left;
  border-bottom: 1px solid var(--surface-border);
}

.recent-activity-section td {
  padding: 10px 12px;
  vertical-align: middle;
  border-bottom: 1px solid var(--surface-border);
  font-size: 0.85rem;
}

.recent-activity-section tr:last-child td {
  border-bottom: none;
}

.table-wrap {
  overflow-x: auto;
}

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

thead th {
  text-align: left;
  padding: 16px 14px;
  font-size: 0.85rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  border-bottom: 1px solid var(--surface-border);
}

tbody tr {
  border-bottom: 1px solid var(--surface-border);
  cursor: pointer;
}

tbody tr:hover {
  background: var(--surface-strong);
}

td {
  padding: 16px 14px;
  vertical-align: top;
}

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

.product-thumb {
  width: 46px;
  height: 46px;
  border-radius: 14px;
  object-fit: cover;
  background: var(--surface-strong);
}

.product-thumb.placeholder {
  display: grid;
  place-items: center;
  color: var(--primary);
  font-weight: 700;
}

.badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
  white-space: nowrap;
  flex-shrink: 0;
}

.badge.active {
  color: #134e8a;
  background: #dbeafe;
}

.badge.generated {
  color: #1e3a8a;
  background: #eef2ff;
}

.badge.draft {
  color: #57534e;
  background: #f4f4f5;
}

.badge.pending {
  color: #92400e;
  background: #ffedd5;
}

.marketplace-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 12px;
  border-radius: 999px;
  background: var(--surface-strong);
  color: var(--muted-strong);
  font-size: 0.83rem;
}

.pagination {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 16px 18px;
  border-top: 1px solid var(--surface-border);
}

.tab-button {
  border: 1px solid var(--surface-border);
  background: var(--surface);
  border-radius: 999px;
  padding: 10px 16px;
  color: var(--muted-strong);
}

.tab-button.active {
  background: var(--primary-soft);
  color: var(--primary);
  border-color: rgba(99, 102, 241, 0.2);
}

.listing-cards {
  display: none;
  grid-template-columns: 1fr;
}

.listing-card {
  display: grid;
  gap: 14px;
  padding: 18px;
}

.listing-card:hover {
  background: var(--surface-strong);
}

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

.listing-card-title {
  font-weight: 700;
}

.listing-card-meta {
  color: var(--muted);
  font-size: 0.92rem;
}

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

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

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

.field-label {
  font-size: 0.8rem;
  color: var(--muted);
  font-weight: 600;
}

.field-note {
  color: var(--muted);
  font-size: 0.87rem;
}

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

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

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

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

.upload-slot {
  position: relative;
  min-height: 140px;
  border: 1px dashed var(--surface-border);
  border-radius: 16px;
  background: var(--surface-strong);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  text-align: center;
}

.upload-slot.required {
  border-color: #fca5a5;
}

.upload-slot.required.missing {
  box-shadow: inset 0 0 0 1px rgba(239, 68, 68, 0.25);
}

.upload-slot input[type=file] {
  position: absolute;
  inset: 0;
  opacity: 0;
  width: 100%;
  height: 100%;
  cursor: pointer;
}

.upload-slot .slot-number {
  position: absolute;
  top: 14px;
  left: 14px;
  background: var(--surface);
  border-radius: 999px;
  padding: 4px 10px;
  font-size: 0.75rem;
  color: var(--muted);
  border: 1px solid var(--surface-border);
}

.upload-slot .slot-label {
  margin-top: 12px;
  color: var(--muted);
  font-size: 0.9rem;
}

.upload-slot .slot-state {
  margin-top: 10px;
  color: var(--primary);
  font-size: 0.82rem;
}

.upload-slot img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 16px;
}

.product-group,
.details-panel,
.summary-panel {
  display: grid;
  gap: 16px;
}

.summary-panel {
  max-width: 380px;
}

.summary-panel img {
  width: 100%;
  border-radius: 18px;
  object-fit: cover;
  min-height: 220px;
  background: var(--surface-strong);
}

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

.summary-item {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: var(--muted);
}

.summary-item strong {
  color: var(--text);
  font-weight: 600;
}

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

.tab-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 20px;
}

.tab-pill {
  padding: 10px 16px;
  border-radius: 999px;
  border: 1px solid var(--surface-border);
  background: var(--surface);
  color: var(--muted-strong);
}

.tab-pill.active {
  background: var(--primary-soft);
  border-color: rgba(99, 102, 241, 0.25);
  color: var(--primary);
}

.form-field-group {
  display: grid;
  gap: 16px;
}

.form-field-group textarea {
  min-height: 120px;
}

.sticky-actions {
  position: sticky;
  bottom: 0;
  left: 0;
  right: 0;
  background: rgba(246, 246, 247, 0.96);
  border-top: 1px solid var(--surface-border);
  padding: 16px 28px;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  z-index: 9;
}

.sticky-actions .button-primary,
.sticky-actions .button-secondary {
  min-width: 170px;
}

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

.input-group {
  display: grid;
  gap: 10px;
}

.password-field {
  position: relative;
}

.password-field button {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  border: none;
  background: transparent;
  color: var(--muted);
  padding: 8px;
  cursor: pointer;
}

.form-note {
  font-size: 0.88rem;
}

.center-card {
  min-height: calc(100vh - 120px);
  display: grid;
  place-items: center;
  padding: 40px 20px;
}

.center-card .card-body {
  max-width: 520px;
  text-align: center;
}

.center-card .card-body h1 {
  margin-bottom: 16px;
}

.center-card .card-body p {
  margin-bottom: 24px;
}

.bottom-nav {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--surface);
  border-top: 1px solid var(--surface-border);
  padding: 8px 14px;
  gap: 6px;
  box-shadow: 0 -10px 30px rgba(15, 23, 42, 0.05);
  z-index: 30;
}

.bottom-nav .bottom-nav-item {
  flex: 1;
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 10px 0;
  border-radius: 16px;
  background: transparent;
  color: var(--muted);
  border: none;
  min-height: 56px;
}

.bottom-nav .bottom-nav-item.active,
.bottom-nav .bottom-nav-item:hover {
  background: var(--surface-strong);
  color: var(--primary);
}

.bottom-nav .nav-icon {
  width: 22px;
  height: 22px;
  display: grid;
  place-items: center;
}

.hamburger {
  border: none;
  background: none;
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  color: var(--muted-strong);
}

.hamburger .bar {
  width: 20px;
  height: 2px;
  background: currentColor;
  border-radius: 999px;
  box-shadow: 0 6px 0 0 currentColor, 0 -6px 0 0 currentColor;
}

.mobile-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.32);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s ease;
  z-index: 15;
}

.mobile-overlay.visible {
  opacity: 1;
  visibility: visible;
}

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

@media (max-width: 900px) {
  .page-shell {
    margin-left: 0;
    padding: 20px 18px 88px;
  }
}

@media (max-width: 900px) {
  .app-shell {
    flex-direction: column;
  }

  .sidebar {
    position: fixed;
    top: 0;
    left: 0;
    height: 100vh;
    transform: translateX(-100%);
    transition: transform 0.25s ease;
    width: min(292px, 86vw);
    box-shadow: 0 14px 40px rgba(15, 23, 42, 0.12);
  }

  .sidebar-collapse-btn {
    display: none;
  }

  .mc-close-navigation {
    display: block;
    margin: 0 10px 8px;
    width: calc(100% - 20px);
    padding: 8px 10px;
    border: 1px solid rgba(148,163,184,.22);
    border-radius: 8px;
    background: transparent;
    color: var(--sidebar-text, #cbd5e1);
    text-align: left;
    font: inherit;
    font-size: 12px;
    cursor: pointer;
  }

  .page-shell {
    padding-top: 16px;
    margin-left: 0 !important;
  }

  .mobile-overlay {
    display: block;
  }

  .bottom-nav {
    display: flex;
  }

  .page-header {
    padding-top: 18px;
    padding-bottom: 18px;
    padding-right: 118px;
  }

  .stats-row,
  .agent-log,
  .form-grid,
  .grid-2,
  .grid-3,
  .listing-card {
    grid-template-columns: 1fr;
  }

  .stats-row {
    grid-template-columns: 1fr;
  }

  .listing-cards {
    display: grid;
  }

  .table-wrap {
    display: none;
  }

  .page-shell {
    padding-bottom: 110px;
  }

  .sidebar-footer {
    display: flex;
  }

  .mc-theme-toggle {
    top: 12px;
    right: 12px;
    padding: 4px;
  }

  .mc-theme-option {
    width: 28px;
    height: 28px;
    min-height: 28px;
  }
}

@media (max-width: 560px) {
  .page-header {
    align-items: flex-start;
    padding-right: 0;
    padding-top: 56px;
  }

  .mc-theme-toggle {
    top: 10px;
    right: 10px;
  }
}

/* Market Connector Premium UI Pass */
html {
  background: #f6f7fb;
}

body {
  background:
    radial-gradient(circle at 18% -10%, rgba(37, 99, 235, 0.08), transparent 28%),
    linear-gradient(180deg, #fbfcff 0%, #f6f7fb 42%, #f3f4f8 100%);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

::selection {
  background: rgba(37, 99, 235, 0.16);
  color: #0f172a;
}

.page-shell {
  background: transparent;
}

.page-content,
.page-frame,
.home-wrap {
  animation: mcFadeUp 0.28s ease both;
}

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

.page-header {
  background: rgba(246, 247, 251, 0.88);
  backdrop-filter: blur(18px);
  border-bottom-color: rgba(209, 213, 219, 0.75);
}

.page-title h1,
.card-title,
.panel-title,
h1,
h2,
h3 {
  letter-spacing: 0;
}

.subtitle,
.card-copy,
.listing-meta,
.summary-copy,
.form-note,
.hint-text,
.table-caption,
.empty-state {
  color: #6b7280;
}

.card,
.table-card,
.panel,
.panel-card,
.activity-item,
.agent-card,
.listing-card,
.summary-card,
.detail-panel,
.sidebar-card,
.recent-activity-section,
.form-card,
.stats .card,
.cards .card {
  border: 1px solid rgba(209, 213, 219, 0.78);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: var(--shadow-soft);
}

.card:hover,
.table-card:hover,
.panel-card:hover,
.listing-card:hover,
.summary-card:hover,
.detail-panel:hover,
.sidebar-card:hover {
  border-color: rgba(37, 99, 235, 0.22);
  box-shadow: 0 18px 44px rgba(15, 23, 42, 0.08);
}

button,
.button,
.btn,
.button-primary,
.button-secondary,
.btn-primary,
.btn-secondary,
.btn-save,
.btn-ghost,
.modal-btn,
.home-btn {
  border-radius: 6px;
  font-weight: 800;
  transition: background 0.16s ease, border-color 0.16s ease, box-shadow 0.16s ease, transform 0.16s ease;
}

button:hover,
.button:hover,
.btn:hover,
.button-primary:hover,
.button-secondary:hover,
.btn-primary:hover,
.btn-secondary:hover,
.btn-save:hover,
.btn-ghost:hover,
.modal-btn:hover,
.home-btn:hover {
  transform: translateY(-1px);
}

.button-primary,
.btn-primary,
.btn-save,
.modal-btn.primary,
.home-btn.primary {
  background: #111827;
  border-color: #111827;
  color: #ffffff;
  box-shadow: 0 10px 22px rgba(17, 24, 39, 0.14);
}

.button-primary:hover,
.btn-primary:hover,
.btn-save:hover,
.modal-btn.primary:hover,
.home-btn.primary:hover {
  background: #0b1220;
  border-color: #0b1220;
  box-shadow: 0 14px 28px rgba(17, 24, 39, 0.18);
}

.button-secondary,
.btn-secondary,
.modal-btn.secondary,
.btn-ghost,
.modal-btn.ghost,
.home-btn:not(.primary) {
  background: #ffffff;
  border-color: #d1d5db;
  color: #111827;
}

.button-secondary:hover,
.btn-secondary:hover,
.modal-btn.secondary:hover,
.btn-ghost:hover,
.modal-btn.ghost:hover,
.home-btn:not(.primary):hover {
  background: #f9fafb;
  border-color: #9ca3af;
}

input,
select,
textarea,
.panel-input,
.inline-editor-input,
.ghost-input {
  border-radius: 6px;
  border-color: #d1d5db;
  background: #ffffff;
  color: #111827;
  box-shadow: none;
  transition: border-color 0.16s ease, box-shadow 0.16s ease, background 0.16s ease;
}

input:hover,
select:hover,
textarea:hover,
.panel-input:hover,
.inline-editor-input:hover,
.ghost-input:hover {
  border-color: #9ca3af;
}

input:focus,
select:focus,
textarea:focus,
.panel-input:focus,
.inline-editor-input:focus,
.ghost-input:focus {
  border-color: rgba(37, 99, 235, 0.55);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}

table {
  background: transparent;
}

thead th {
  background: #f9fafb;
  color: #6b7280;
  font-size: 0.75rem;
  font-weight: 900;
}

tbody tr {
  transition: background 0.14s ease;
}

tbody tr:hover {
  background: #f9fafb;
}

.badge,
.marketplace-pill,
.modal-badge,
.status-pill,
.agent-status-badge {
  border-radius: 999px;
  border: 1px solid rgba(209, 213, 219, 0.8);
}

.badge.active,
.agent-status-badge {
  color: #047857;
  background: #ecfdf5;
  border-color: #a7f3d0;
}

.badge.generated {
  color: #1d4ed8;
  background: #eff6ff;
  border-color: #bfdbfe;
}

.badge.pending {
  color: #92400e;
  background: #fffbeb;
  border-color: #fde68a;
}

.badge.draft {
  color: #4b5563;
  background: #f3f4f6;
  border-color: #e5e7eb;
}

.tab.active,
.nav-tab.active,
.review-tab.active,
.workflow-tab.active,
.listings-sub-tab.active,
.marketplace-tab.active,
.mp-tab.active,
.filter-chip.active {
  background: #111827 !important;
  border-color: #111827 !important;
  color: #ffffff !important;
  box-shadow: 0 10px 22px rgba(17, 24, 39, 0.14) !important;
}

.tab,
.nav-tab,
.review-tab,
.workflow-tab,
.listings-sub-tab,
.marketplace-tab,
.mp-tab,
.filter-chip {
  border-radius: 6px !important;
}

.section,
.review-panel,
.product-card,
.asset-card,
.slot-card,
.qa-panel,
.workflow-progress,
.variation-section,
.price-preview-card {
  border-radius: 8px !important;
}

.modal-backdrop,
.product-modal-overlay {
  backdrop-filter: blur(10px);
}

.modal,
.modal-box,
.product-modal {
  border-radius: 8px;
  border: 1px solid rgba(209, 213, 219, 0.78);
  background: #ffffff;
  color: #111827;
  box-shadow: 0 30px 90px rgba(15, 23, 42, 0.24);
}

.sticky-actions,
.bottom-nav {
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(18px);
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: 0.001ms !important;
  }
}

/* Launch polish: keep every app page readable under one Market Connector theme. */
:root {
  --mc-ink: #160f2f;
  --mc-purple: #6f35d5;
  --mc-purple-dark: #2d185f;
  --mc-mint: #38d9a9;
  --mc-blue: #2563eb;
  --mc-pink: #ff6fae;
}

.button-primary,
.btn-primary,
button.primary,
button[type="submit"],
.wallet-recharge-btn {
  background: var(--mc-purple-dark) !important;
  border-color: var(--mc-purple-dark) !important;
  color: #ffffff !important;
}

.button-primary:hover,
.btn-primary:hover,
button.primary:hover,
button[type="submit"]:hover,
.wallet-recharge-btn:hover {
  background: var(--mc-purple) !important;
  border-color: var(--mc-purple) !important;
}

.button-secondary,
.btn-secondary,
button.secondary {
  background: #ffffff !important;
  border: 1px solid #d8d5e5 !important;
  color: var(--mc-ink) !important;
}

html[data-theme="dark"] .button-secondary,
html[data-theme="dark"] .btn-secondary,
html[data-theme="dark"] button.secondary,
html[data-theme="dark"] .icon-button,
html[data-theme="dark"] .topbar-button {
  background: #111827 !important;
  border-color: rgba(148, 163, 184, 0.24) !important;
  color: #eef2ff !important;
}

.button-danger,
.btn-danger,
button.danger {
  background: #dc2626 !important;
  border-color: #dc2626 !important;
  color: #ffffff !important;
}

.page-shell {
  background:
    radial-gradient(circle at 8% 0%, rgba(111, 53, 213, 0.08), transparent 24%),
    linear-gradient(180deg, #fbfaff 0%, #f6f7fb 42%, #f3f4f8 100%);
}

html[data-theme="dark"] .page-shell {
  background:
    radial-gradient(circle at 8% 0%, rgba(139, 92, 246, 0.18), transparent 24%),
    radial-gradient(circle at 92% 6%, rgba(56, 189, 248, 0.10), transparent 22%),
    linear-gradient(180deg, #0b1020 0%, #0f172a 48%, #090d19 100%);
}

.page-header {
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(16px);
}

html[data-theme="dark"] .subtitle,
html[data-theme="dark"] .card-copy,
html[data-theme="dark"] .listing-meta,
html[data-theme="dark"] .summary-copy,
html[data-theme="dark"] .form-note,
html[data-theme="dark"] .hint-text,
html[data-theme="dark"] .muted,
html[data-theme="dark"] .text-muted {
  color: #9aa7bd !important;
}

html[data-theme="dark"] .eyebrow {
  color: #c4b5fd;
}

html[data-theme="dark"] .badge,
html[data-theme="dark"] .status-pill,
html[data-theme="dark"] .pill,
html[data-theme="dark"] .chip,
html[data-theme="dark"] .filter-chip {
  background: rgba(148, 163, 184, 0.13);
  border-color: rgba(148, 163, 184, 0.20);
  color: #e2e8f0;
}

html[data-theme="dark"] .modal,
html[data-theme="dark"] .modal-content,
html[data-theme="dark"] .modal-panel,
html[data-theme="dark"] .drawer,
html[data-theme="dark"] .dropdown,
html[data-theme="dark"] .menu,
html[data-theme="dark"] .profile-dropdown {
  background: #111827 !important;
  border-color: rgba(148, 163, 184, 0.20) !important;
  color: #eef2ff !important;
}

html[data-theme="dark"] .bottom-nav {
  background: rgba(15, 23, 42, 0.92);
  border-color: rgba(148, 163, 184, 0.20);
  box-shadow: 0 -18px 42px rgba(0, 0, 0, 0.28);
}

html[data-theme="dark"] .bottom-nav-item {
  color: #9aa7bd;
}

html[data-theme="dark"] .bottom-nav-item.active {
  color: #ffffff;
}

html[data-theme="dark"] a:not(.sidebar-link):not(.button):not(.btn-primary):not(.btn-secondary) {
  color: inherit;
}

html[data-theme="dark"] hr,
html[data-theme="dark"] .divider {
  border-color: rgba(148, 163, 184, 0.18) !important;
}

html[data-theme="dark"] ::selection {
  background: rgba(139, 92, 246, 0.45);
  color: #ffffff;
}

.card,
.stat-card,
.activity-item,
.agent-card,
.listing-card,
.summary-card,
.detail-panel,
.sidebar-card,
.panel,
.panel-card,
.table-card {
  border-color: #e5e1f0 !important;
  box-shadow: 0 14px 38px rgba(45, 24, 95, 0.06) !important;
}

input:focus,
select:focus,
textarea:focus,
.panel-input:focus,
.inline-editor-input:focus,
.ghost-input:focus {
  border-color: rgba(111, 53, 213, 0.55) !important;
  box-shadow: 0 0 0 3px rgba(111, 53, 213, 0.12) !important;
}

.sidebar-link.active .link-icon {
  color: var(--mc-purple) !important;
}

.tab.active,
.nav-tab.active,
.review-tab.active,
.workflow-tab.active,
.listings-sub-tab.active,
.marketplace-tab.active,
.mp-tab.active,
.filter-chip.active {
  background: var(--mc-purple-dark) !important;
  border-color: var(--mc-purple-dark) !important;
  color: #ffffff !important;
}

/* Production day/night quality pass */
:root {
  --mc-day-bg: #f6f8fc;
  --mc-day-card: #ffffff;
  --mc-day-border: #e2e8f0;
  --mc-day-text: #111827;
  --mc-night-bg: #0b1220;
  --mc-night-card: #101a2c;
  --mc-night-card-2: #0d1626;
  --mc-night-border: rgba(148, 163, 184, 0.20);
  --mc-night-text: #e6edf7;
}

.page-shell {
  background:
    radial-gradient(circle at 8% 0%, rgba(37, 99, 235, 0.08), transparent 24%),
    radial-gradient(circle at 92% 4%, rgba(20, 184, 166, 0.06), transparent 22%),
    linear-gradient(180deg, #fbfcff 0%, var(--mc-day-bg) 44%, #f2f5fa 100%) !important;
}

.card,
.stat-card,
.activity-item,
.agent-card,
.listing-card,
.summary-card,
.detail-panel,
.sidebar-card,
.panel,
.panel-card,
.table-card,
.section-card,
.content-card,
.metric-card,
.section,
.product-card,
.review-panel,
.expand-card,
.bp-section {
  border-color: var(--mc-day-border) !important;
  box-shadow: 0 16px 42px rgba(15, 23, 42, 0.07) !important;
}

html[data-theme="dark"] body {
  background:
    radial-gradient(circle at 14% -12%, rgba(37, 99, 235, 0.18), transparent 30%),
    radial-gradient(circle at 88% 0%, rgba(20, 184, 166, 0.11), transparent 26%),
    linear-gradient(180deg, #08111f 0%, var(--mc-night-bg) 52%, #090f1c 100%) !important;
}

html[data-theme="dark"] .page-shell,
html[data-theme="dark"] .app-shell,
html[data-theme="dark"] main,
html[data-theme="dark"] .main-content,
html[data-theme="dark"] .content,
html[data-theme="dark"] .dashboard-page,
html[data-theme="dark"] .inventory-page,
html[data-theme="dark"] .listings-page {
  background:
    radial-gradient(circle at 10% 0%, rgba(37, 99, 235, 0.16), transparent 24%),
    radial-gradient(circle at 96% 8%, rgba(20, 184, 166, 0.08), transparent 22%),
    linear-gradient(180deg, #08111f 0%, #0b1220 48%, #090f1c 100%) !important;
  color: var(--mc-night-text) !important;
}

html[data-theme="dark"] .page-header,
html[data-theme="dark"] .topbar,
html[data-theme="dark"] .toolbar,
html[data-theme="dark"] .navbar,
html[data-theme="dark"] .save-bar,
html[data-theme="dark"] .sticky-actions {
  background: rgba(13, 22, 38, 0.90) !important;
  border-color: var(--mc-night-border) !important;
  color: var(--mc-night-text) !important;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.20) !important;
  backdrop-filter: blur(18px);
}

html[data-theme="dark"] .card,
html[data-theme="dark"] .stat-card,
html[data-theme="dark"] .activity-item,
html[data-theme="dark"] .agent-card,
html[data-theme="dark"] .listing-card,
html[data-theme="dark"] .summary-card,
html[data-theme="dark"] .detail-panel,
html[data-theme="dark"] .sidebar-card,
html[data-theme="dark"] .panel,
html[data-theme="dark"] .panel-card,
html[data-theme="dark"] .table-card,
html[data-theme="dark"] .section-card,
html[data-theme="dark"] .content-card,
html[data-theme="dark"] .metric-card,
html[data-theme="dark"] .section,
html[data-theme="dark"] .product-card,
html[data-theme="dark"] .review-panel,
html[data-theme="dark"] .expand-card,
html[data-theme="dark"] .modal,
html[data-theme="dark"] .modal-box,
html[data-theme="dark"] .drawer,
html[data-theme="dark"] .bp-section {
  background: linear-gradient(180deg, rgba(16, 26, 44, 0.97), rgba(13, 22, 38, 0.97)) !important;
  border-color: var(--mc-night-border) !important;
  color: var(--mc-night-text) !important;
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.30) !important;
}

html[data-theme="dark"] .summary-card,
html[data-theme="dark"] .product-stat,
html[data-theme="dark"] .detail-item,
html[data-theme="dark"] .activity-card,
html[data-theme="dark"] .timeline-card,
html[data-theme="dark"] .breadcrumb-item,
html[data-theme="dark"] .image-thumb,
html[data-theme="dark"] .slot-card,
html[data-theme="dark"] .upload-slot,
html[data-theme="dark"] .modal-image-card,
html[data-theme="dark"] .qa-item,
html[data-theme="dark"] .asset-card,
html[data-theme="dark"] .timeline-item,
html[data-theme="dark"] .scan-finding {
  background: rgba(11, 20, 36, 0.88) !important;
  border-color: rgba(148, 163, 184, 0.18) !important;
  color: var(--mc-night-text) !important;
}

html[data-theme="dark"] h1,
html[data-theme="dark"] h2,
html[data-theme="dark"] h3,
html[data-theme="dark"] h4,
html[data-theme="dark"] .page-title,
html[data-theme="dark"] .card-title,
html[data-theme="dark"] .section-title,
html[data-theme="dark"] .item-title,
html[data-theme="dark"] .agent-name,
html[data-theme="dark"] .timeline-action,
html[data-theme="dark"] .summary-item strong,
html[data-theme="dark"] .product-stat strong,
html[data-theme="dark"] .product-card-title,
html[data-theme="dark"] .qa-item strong,
html[data-theme="dark"] .qa-item a,
html[data-theme="dark"] .asset-meta strong,
html[data-theme="dark"] .scan-finding strong,
html[data-theme="dark"] .bp-section-title,
html[data-theme="dark"] .card p,
html[data-theme="dark"] .panel-value,
html[data-theme="dark"] td {
  color: #f8fbff !important;
}

html[data-theme="dark"] p,
html[data-theme="dark"] small,
html[data-theme="dark"] label,
html[data-theme="dark"] .subtitle,
html[data-theme="dark"] .card-copy,
html[data-theme="dark"] .form-note,
html[data-theme="dark"] .field-label,
html[data-theme="dark"] .field-note,
html[data-theme="dark"] .hint-text,
html[data-theme="dark"] .item-meta,
html[data-theme="dark"] .listing-meta,
html[data-theme="dark"] .agent-detail,
html[data-theme="dark"] .muted,
html[data-theme="dark"] .text-muted,
html[data-theme="dark"] .slot-label,
html[data-theme="dark"] .summary-item {
  color: #95a3b8 !important;
}

html[data-theme="dark"] table,
html[data-theme="dark"] .list-table,
html[data-theme="dark"] .data-table {
  background: transparent !important;
  color: var(--mc-night-text) !important;
}

html[data-theme="dark"] thead,
html[data-theme="dark"] th,
html[data-theme="dark"] .table-head {
  background: rgba(11, 20, 36, 0.94) !important;
  color: #bfd0e8 !important;
  border-color: rgba(148, 163, 184, 0.18) !important;
}

html[data-theme="dark"] tr,
html[data-theme="dark"] td,
html[data-theme="dark"] .table-row {
  border-color: rgba(148, 163, 184, 0.16) !important;
}

html[data-theme="dark"] tbody tr:hover,
html[data-theme="dark"] .list-table tbody tr:hover,
html[data-theme="dark"] .listing-card:hover {
  background: rgba(37, 99, 235, 0.12) !important;
}

html[data-theme="dark"] input,
html[data-theme="dark"] select,
html[data-theme="dark"] textarea,
html[data-theme="dark"] .panel-input,
html[data-theme="dark"] .note-input,
html[data-theme="dark"] .detail-textarea {
  background: rgba(9, 17, 31, 0.94) !important;
  border-color: rgba(148, 163, 184, 0.26) !important;
  color: var(--mc-night-text) !important;
  box-shadow: none !important;
}

html[data-theme="dark"] input:focus,
html[data-theme="dark"] select:focus,
html[data-theme="dark"] textarea:focus {
  border-color: rgba(96, 165, 250, 0.72) !important;
  box-shadow: 0 0 0 3px rgba(96, 165, 250, 0.16) !important;
}

html[data-theme="dark"] .button-primary,
html[data-theme="dark"] .btn-primary,
html[data-theme="dark"] button.primary,
html[data-theme="dark"] button[type="submit"],
html[data-theme="dark"] .modal-btn.primary,
html[data-theme="dark"] .wallet-recharge-btn {
  background: linear-gradient(135deg, #2563eb, #14b8a6) !important;
  border-color: transparent !important;
  color: #ffffff !important;
  box-shadow: 0 14px 30px rgba(37, 99, 235, 0.24) !important;
}

html[data-theme="dark"] .button-secondary,
html[data-theme="dark"] .btn-secondary,
html[data-theme="dark"] button.secondary,
html[data-theme="dark"] .modal-btn.secondary,
html[data-theme="dark"] .modal-btn.ghost,
html[data-theme="dark"] .icon-button,
html[data-theme="dark"] .topbar-button,
html[data-theme="dark"] .tab-button,
html[data-theme="dark"] .tab-pill,
html[data-theme="dark"] .hub-tab,
html[data-theme="dark"] .listings-sub-tab,
html[data-theme="dark"] .review-tab,
html[data-theme="dark"] .workflow-tab,
html[data-theme="dark"] .bp-tab,
html[data-theme="dark"] .btn-ghost,
html[data-theme="dark"] .pagination button {
  background: rgba(15, 27, 46, 0.94) !important;
  border-color: rgba(148, 163, 184, 0.24) !important;
  color: #dbe7f7 !important;
}

html[data-theme="dark"] .tab.active,
html[data-theme="dark"] .nav-tab.active,
html[data-theme="dark"] .review-tab.active,
html[data-theme="dark"] .workflow-tab.active,
html[data-theme="dark"] .listings-sub-tab.active,
html[data-theme="dark"] .marketplace-tab.active,
html[data-theme="dark"] .mp-tab.active,
html[data-theme="dark"] .filter-chip.active,
html[data-theme="dark"] .tab-button.active,
html[data-theme="dark"] .tab-pill.active,
html[data-theme="dark"] .hub-tab.active,
html[data-theme="dark"] .bp-tab.active {
  background: linear-gradient(135deg, #2563eb, #14b8a6) !important;
  border-color: transparent !important;
  color: #ffffff !important;
}

html[data-theme="dark"] .badge.active,
html[data-theme="dark"] .status-active {
  background: rgba(34, 197, 94, 0.15) !important;
  color: #86efac !important;
}

html[data-theme="dark"] .badge.generated,
html[data-theme="dark"] .marketplace-pill {
  background: rgba(96, 165, 250, 0.15) !important;
  color: #bfdbfe !important;
}

html[data-theme="dark"] .badge.draft,
html[data-theme="dark"] .badge.pending {
  background: rgba(245, 158, 11, 0.16) !important;
  color: #fcd34d !important;
}

html[data-theme="dark"] .button-danger,
html[data-theme="dark"] .btn-danger,
html[data-theme="dark"] button.danger,
html[data-theme="dark"] .danger {
  background: rgba(239, 68, 68, 0.14) !important;
  border-color: rgba(248, 113, 113, 0.38) !important;
  color: #fecaca !important;
}

html[data-theme="dark"] .bottom-nav {
  background: rgba(11, 20, 36, 0.94) !important;
  border-color: rgba(148, 163, 184, 0.20) !important;
  box-shadow: 0 -12px 36px rgba(0, 0, 0, 0.32) !important;
}

html[data-theme="dark"] .bottom-nav .bottom-nav-item.active,
html[data-theme="dark"] .bottom-nav .bottom-nav-item:hover {
  background: rgba(37, 99, 235, 0.16) !important;
  color: #ffffff !important;
}

@media (max-width: 768px) {
  .mc-theme-toggle {
    top: 10px;
    right: 10px;
    transform: scale(0.94);
    transform-origin: top right;
  }
}

/* Launch theme hardening: keep mixed inline page styles readable in day/night mode. */
html[data-theme="dark"] {
  --panel: #101a2c;
  --panel-2: #0d1626;
  --surface-soft: rgba(148, 163, 184, 0.10);
  --input-bg: #09111f;
  --border: rgba(148, 163, 184, 0.22);
  --text-main: #f8fbff;
  --text-soft: #95a3b8;
}

html[data-theme="dark"] body,
html[data-theme="dark"] .page-shell,
html[data-theme="dark"] .page-content,
html[data-theme="dark"] .content-area,
html[data-theme="dark"] .app-main,
html[data-theme="dark"] .main-panel,
html[data-theme="dark"] .workspace,
html[data-theme="dark"] .crm-page,
html[data-theme="dark"] .orders-page,
html[data-theme="dark"] .agent-page,
html[data-theme="dark"] .wallet-page,
html[data-theme="dark"] .settings-page {
  background:
    radial-gradient(circle at 12% -8%, rgba(37, 99, 235, 0.17), transparent 28%),
    radial-gradient(circle at 92% 4%, rgba(20, 184, 166, 0.09), transparent 24%),
    linear-gradient(180deg, #08111f 0%, #0b1220 52%, #090f1c 100%) !important;
  color: #e6edf7 !important;
}

html[data-theme="dark"] [style*="background:#fff"],
html[data-theme="dark"] [style*="background: #fff"],
html[data-theme="dark"] [style*="background:white"],
html[data-theme="dark"] [style*="background: white"],
html[data-theme="dark"] [style*="background:#ffffff"],
html[data-theme="dark"] [style*="background: #ffffff"] {
  background: linear-gradient(180deg, rgba(16, 26, 44, 0.98), rgba(13, 22, 38, 0.98)) !important;
  color: #e6edf7 !important;
  border-color: rgba(148, 163, 184, 0.22) !important;
}

html[data-theme="dark"] [style*="background:#f8fafc"],
html[data-theme="dark"] [style*="background: #f8fafc"],
html[data-theme="dark"] [style*="background:#fafafa"],
html[data-theme="dark"] [style*="background: #fafafa"],
html[data-theme="dark"] [style*="background:#f9fafb"],
html[data-theme="dark"] [style*="background: #f9fafb"],
html[data-theme="dark"] [style*="background:#f3f4f6"],
html[data-theme="dark"] [style*="background: #f3f4f6"] {
  background: rgba(11, 20, 36, 0.88) !important;
  color: #dbe7f7 !important;
  border-color: rgba(148, 163, 184, 0.18) !important;
}

html[data-theme="dark"] .hero-card,
html[data-theme="dark"] .command-card,
html[data-theme="dark"] .workspace-card,
html[data-theme="dark"] .agent-hero,
html[data-theme="dark"] .mode-card,
html[data-theme="dark"] .upload-card,
html[data-theme="dark"] .upload-zone,
html[data-theme="dark"] .image-card,
html[data-theme="dark"] .slot-card .head,
html[data-theme="dark"] .asset-card .head,
html[data-theme="dark"] .listing-row,
html[data-theme="dark"] .order-row,
html[data-theme="dark"] .customer-card,
html[data-theme="dark"] .lead-card,
html[data-theme="dark"] .quote-card,
html[data-theme="dark"] .kanban-column,
html[data-theme="dark"] .detail-sidebar,
html[data-theme="dark"] .drawer-panel,
html[data-theme="dark"] .toast:not(.error):not(.success) {
  background: rgba(11, 20, 36, 0.90) !important;
  border-color: rgba(148, 163, 184, 0.20) !important;
  color: #e6edf7 !important;
}

html[data-theme="dark"] .slot-preview,
html[data-theme="dark"] .product-main-image,
html[data-theme="dark"] .preview-frame,
html[data-theme="dark"] .empty-state,
html[data-theme="dark"] .skeleton,
html[data-theme="dark"] .image-placeholder {
  background: #09111f !important;
  border-color: rgba(148, 163, 184, 0.20) !important;
}

html[data-theme="dark"] .btn-secondary,
html[data-theme="dark"] .button-secondary,
html[data-theme="dark"] .quick-link,
html[data-theme="dark"] .action-btn,
html[data-theme="dark"] .mode-option,
html[data-theme="dark"] .approve-toggle,
html[data-theme="dark"] .editable-chip {
  background: rgba(15, 27, 46, 0.96) !important;
  color: #dbe7f7 !important;
  border-color: rgba(148, 163, 184, 0.24) !important;
}

html[data-theme="dark"] .quick-link:hover,
html[data-theme="dark"] .action-btn:hover,
html[data-theme="dark"] .mode-option:hover,
html[data-theme="dark"] .approve-toggle:hover {
  background: rgba(37, 99, 235, 0.18) !important;
  color: #ffffff !important;
  border-color: rgba(96, 165, 250, 0.42) !important;
}

html[data-theme="dark"] .mode-option.active,
html[data-theme="dark"] .approve-toggle.on,
html[data-theme="dark"] .editable-chip.active {
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.96), rgba(20, 184, 166, 0.86)) !important;
  color: #ffffff !important;
  border-color: transparent !important;
}

html[data-theme="dark"] .slot-badge,
html[data-theme="dark"] .status-badge,
html[data-theme="dark"] .pill,
html[data-theme="dark"] .chip,
html[data-theme="dark"] .status-pill {
  background: rgba(96, 165, 250, 0.15) !important;
  color: #bfdbfe !important;
  border-color: rgba(96, 165, 250, 0.24) !important;
}

html[data-theme="dark"] .status-delivered,
html[data-theme="dark"] .status-active,
html[data-theme="dark"] .status-badge.approved,
html[data-theme="dark"] .slot-badge.enhanced,
html[data-theme="dark"] .slot-badge.uploaded {
  background: rgba(34, 197, 94, 0.16) !important;
  color: #86efac !important;
  border-color: rgba(134, 239, 172, 0.24) !important;
}

html[data-theme="dark"] .status-pending,
html[data-theme="dark"] .status-shipped,
html[data-theme="dark"] .slot-badge.needs_review,
html[data-theme="dark"] .slot-badge.uploading {
  background: rgba(245, 158, 11, 0.16) !important;
  color: #fcd34d !important;
  border-color: rgba(252, 211, 77, 0.24) !important;
}

html[data-theme="dark"] .status-failed,
html[data-theme="dark"] .slot-badge.failed,
html[data-theme="dark"] .error-card {
  background: rgba(239, 68, 68, 0.15) !important;
  color: #fecaca !important;
  border-color: rgba(248, 113, 113, 0.26) !important;
}

html[data-theme="dark"] hr,
html[data-theme="dark"] .divider,
html[data-theme="dark"] .dropdown-divider {
  border-color: rgba(148, 163, 184, 0.16) !important;
  background: rgba(148, 163, 184, 0.16) !important;
}

html[data-theme="dark"] ::selection {
  background: rgba(96, 165, 250, 0.34);
  color: #ffffff;
}

html[data-theme="light"] body,
html[data-theme="light"] .app-shell,
html[data-theme="light"] .page-shell,
html[data-theme="light"] .page-content {
  background: linear-gradient(180deg, #f8fafc 0%, #f3f6fb 48%, #eef3f8 100%);
}

html[data-theme="light"] .card,
html[data-theme="light"] .panel,
html[data-theme="light"] .section,
html[data-theme="light"] .stat-card,
html[data-theme="light"] .summary-card,
html[data-theme="light"] .table-card,
html[data-theme="light"] .content-card,
html[data-theme="light"] .product-card,
html[data-theme="light"] .modal,
html[data-theme="light"] .modal-box {
  border-color: rgba(15, 23, 42, 0.08);
  box-shadow: 0 14px 38px rgba(15, 23, 42, 0.06);
}

/* Final theme QA patch: Listing Agent and older inline pages must not leak
   hard-coded white panels into night mode. */
html[data-theme="dark"] .listing-agent-hero {
  background:
    radial-gradient(circle at 82% 18%, rgba(20, 184, 166, 0.24), transparent 34%),
    radial-gradient(circle at 10% -8%, rgba(37, 99, 235, 0.20), transparent 30%),
    linear-gradient(135deg, rgba(9, 17, 31, 0.98), rgba(13, 22, 38, 0.98) 52%, rgba(10, 53, 68, 0.94)) !important;
  border-color: rgba(96, 165, 250, 0.18) !important;
  color: #f8fbff !important;
}

html[data-theme="dark"] .workflow-progress,
html[data-theme="dark"] .photo-dropzone,
html[data-theme="dark"] .upload-empty-state,
html[data-theme="dark"] .create-workflow-shell .section,
html[data-theme="dark"] .product-details-section,
html[data-theme="dark"] .compact-ai-section,
html[data-theme="dark"] .completion-actions,
html[data-theme="dark"] .review-shell,
html[data-theme="dark"] .qa-panel,
html[data-theme="dark"] .bottom-action-bar {
  background: linear-gradient(180deg, rgba(16, 26, 44, 0.98), rgba(11, 20, 36, 0.98)) !important;
  border-color: rgba(148, 163, 184, 0.22) !important;
  color: #e6edf7 !important;
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.28) !important;
}

html[data-theme="dark"] .workflow-progress .progress-step,
html[data-theme="dark"] .workflow-progress .progress-step.is-todo,
html[data-theme="dark"] .create-workflow-shell .slot-card,
html[data-theme="dark"] .create-workflow-shell .slot-card .head,
html[data-theme="dark"] .create-workflow-shell .slot-card .body,
html[data-theme="dark"] .asset-card,
html[data-theme="dark"] .asset-card .head,
html[data-theme="dark"] .asset-card .body,
html[data-theme="dark"] .image-mode-card,
html[data-theme="dark"] .analysis-badge,
html[data-theme="dark"] .analysis-empty,
html[data-theme="dark"] .analysis-loading,
html[data-theme="dark"] .scan-finding,
html[data-theme="dark"] .ai-finding,
html[data-theme="dark"] .timeline-item,
html[data-theme="dark"] .qa-item,
html[data-theme="dark"] .product-stat,
html[data-theme="dark"] .review-panel,
html[data-theme="dark"] .meta-table,
html[data-theme="dark"] .image-thumb {
  background: rgba(9, 17, 31, 0.92) !important;
  border-color: rgba(148, 163, 184, 0.20) !important;
  color: #e6edf7 !important;
}

html[data-theme="dark"] .workflow-progress .progress-step.is-active,
html[data-theme="dark"] .image-mode-card.is-active {
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.22), rgba(20, 184, 166, 0.14)) !important;
  border-color: rgba(96, 165, 250, 0.46) !important;
  color: #ffffff !important;
  box-shadow: 0 18px 42px rgba(37, 99, 235, 0.16) !important;
}

html[data-theme="dark"] .workflow-progress .progress-step.is-complete {
  background: rgba(22, 101, 52, 0.16) !important;
  border-color: rgba(134, 239, 172, 0.28) !important;
}

html[data-theme="dark"] .dropzone-copy::after,
html[data-theme="dark"] .slot-placeholder,
html[data-theme="dark"] .slot-preview,
html[data-theme="dark"] .slot-empty,
html[data-theme="dark"] .preview-image,
html[data-theme="dark"] .product-main-image {
  background:
    radial-gradient(circle at 50% 42%, rgba(96, 165, 250, 0.16), transparent 28%),
    linear-gradient(180deg, rgba(15, 27, 46, 0.96), rgba(9, 17, 31, 0.96)) !important;
  border-color: rgba(148, 163, 184, 0.24) !important;
  color: #dbe7f7 !important;
}

html[data-theme="dark"] .slot-placeholder strong,
html[data-theme="dark"] .workflow-progress .step-label,
html[data-theme="dark"] .workflow-progress .progress-state,
html[data-theme="dark"] .image-mode-card strong,
html[data-theme="dark"] .dropzone-copy h3,
html[data-theme="dark"] .section-title-row h3,
html[data-theme="dark"] .create-workflow-shell .section h3,
html[data-theme="dark"] .slot-card .title,
html[data-theme="dark"] .asset-card .title {
  color: #f8fbff !important;
}

html[data-theme="dark"] .slot-placeholder span,
html[data-theme="dark"] .workflow-progress .step-note,
html[data-theme="dark"] .workflow-progress .step-index,
html[data-theme="dark"] .workflow-progress .progress-title,
html[data-theme="dark"] .image-mode-card span,
html[data-theme="dark"] .section-copy,
html[data-theme="dark"] .status-line,
html[data-theme="dark"] .slot-card .sub,
html[data-theme="dark"] .dropzone-copy p {
  color: #95a3b8 !important;
}

html[data-theme="dark"] .image-mode-note,
html[data-theme="dark"] #generateStatus,
html[data-theme="dark"] #enhanceStatus,
html[data-theme="dark"] #uploadStatus {
  background: rgba(9, 17, 31, 0.72) !important;
  border: 1px solid rgba(148, 163, 184, 0.18) !important;
  border-radius: 12px !important;
  color: #b8c7dc !important;
}

html[data-theme="dark"] .slot-plus {
  background: linear-gradient(135deg, #2563eb, #14b8a6) !important;
  color: #ffffff !important;
  box-shadow: 0 10px 26px rgba(37, 99, 235, 0.24) !important;
}

html[data-theme="light"] .workflow-progress,
html[data-theme="light"] .photo-dropzone,
html[data-theme="light"] .create-workflow-shell .section,
html[data-theme="light"] .product-details-section,
html[data-theme="light"] .compact-ai-section {
  background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%) !important;
  border-color: rgba(15, 23, 42, 0.08) !important;
}

html[data-theme="light"] .slot-card,
html[data-theme="light"] .workflow-progress .progress-step,
html[data-theme="light"] .image-mode-card {
  border-color: rgba(15, 23, 42, 0.10) !important;
}
