
:root {
  color-scheme: light;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --bg: #f6f7fb;
  --text: #111827;
  --muted: #6b7280;
  --muted-strong: #374151;
  --primary: #111827;
  --primary-soft: #eef2ff;
  --surface-strong: #f9fafb;
  --radius: 8px;
  --shadow: 0 18px 48px rgba(15, 23, 42, 0.06);
  --shadow-soft: 0 10px 30px rgba(15, 23, 42, 0.05);
  --sidebar-bg: #10131a;
  --sidebar-text: #a7b0c0;
  --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: 248px;
  --content-bg: #f6f7fb;
  --surface: #ffffff;
  --surface-border: #e4e4e7;
  --text-primary: #111827;
  --text-muted: #6b7280;
  --accent: #2563eb;
  --accent-soft: rgba(37, 99, 235, 0.1);
  --success: #10b981;
  --warning: #f59e0b;
  --danger: #ef4444;
  --radius-sm: 6px;
  --radius-md: 8px;
  --radius-lg: 8px;
}

*, *::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);
}

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;
}

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);
}

.sidebar {
  width: var(--sidebar-width);
  min-height: 100vh;
  background: var(--sidebar-bg);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  z-index: 40;
  overflow-y: auto;
  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);
}

.sidebar nav {
  padding: 4px 10px 20px;
}

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

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

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

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

.brand-mark {
  width: 38px;
  height: 38px;
  border-radius: 8px;
  background: linear-gradient(135deg, #2563eb, #7c3aed);
  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;
}

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

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

.sidebar-section-title {
  font-size: 0.62rem;
  color: var(--sidebar-section-label);
  text-transform: uppercase;
  letter-spacing: 0.14em;
  padding: 13px 10px 6px;
  font-weight: 800;
}

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

.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);
}

.sidebar-link .link-icon {
  width: 17px;
  height: 17px;
  opacity: 0.7;
  flex-shrink: 0;
}

.sidebar-link.active .link-icon {
  opacity: 1;
  color: var(--sidebar-active-border);
}

.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: 10px;
  border-top: 1px solid rgba(255,255,255,0.06);
  position: sticky;
  bottom: 0;
  background: var(--sidebar-bg);
  overflow: hidden;
  display: flex;
  align-items: center;
  gap: 10px;
}

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

.sidebar-profile {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px;
  border-radius: 10px;
  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: 12px;
  margin: 0 4px 8px;
  overflow: hidden;
  width: calc(100% - 8px);
}

.dropdown-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 12px;
  font-size: 0.80rem;
  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: 34px;
  height: 34px;
  border-radius: 10px;
  background: linear-gradient(135deg, #2563eb, #4f46e5);
  color: white;
  display: grid;
  place-items: center;
  font-weight: 700;
  font-size: 0.8rem;
  flex-shrink: 0;
}

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

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

.sidebar-profile-toggle {
  width: 24px;
  min-height: 24px;
  height: 24px;
  padding: 0;
  border: none;
  border-radius: 7px;
  background: transparent;
  color: #8f98aa;
  line-height: 1;
  flex-shrink: 0;
}

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

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

.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);
}

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

.eyebrow {
  margin: 0;
  color: var(--primary);
  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: var(--primary);
  border-color: transparent;
  color: white;
}

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

.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);
}

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

.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: 1024px) {
  .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);
  }

  .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;
  }

  .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;
  }
}

/* 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;
  }
}
