:root {
  color-scheme: light dark;
  font-family:
    "Inter",
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
  background-color: #0f172a;
  color: #e2e8f0;
}

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

header {
  background: #1e293b;
  border-bottom: 1px solid #334155;
  padding: 1rem 2rem 0.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

header h1 {
  margin: 0;
  font-size: 1.5rem;
}

.header-row {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.header-row #refresh-active {
  margin-left: auto;
}

.top-actions {
  display: flex;
  gap: 0.5rem;
}

button {
  background: #2563eb;
  border: none;
  color: white;
  padding: 0.5rem 1rem;
  border-radius: 0.4rem;
  cursor: pointer;
  font-weight: 600;
}

button:hover {
  background: #1d4ed8;
}

.is-hidden {
  display: none !important;
}

.hidden {
  display: none !important;
}

main {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
  padding: 0.75rem 1.5rem 1.5rem;
}

.products-layout {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 1.25rem;
}

.product-filters {
  background: #1e293b;
  border: 1px solid #334155;
  border-radius: 0.75rem;
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.product-category-section {
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  width: 100%;
}

.product-filters-title {
  margin: 0 0 0.4rem;
  font-size: 1.1rem;
}

.product-category-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.4rem;
  width: 100%;
}

.product-category-label {
  margin: 0;
  font-size: 0.95rem;
  font-weight: 600;
  color: #cbd5f5;
}

.product-category-tree {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  font-size: 0.88rem;
  overflow: visible;
  width: 100%;
}

.product-price-filter {
  margin-top: 1rem;
  /* border/radius/background REMOVED */
  width: 100%;
  /* Force full width */
  padding: 0.25rem 0 1.5rem 0;
  /* Changed padding to add space at bottom */
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
}

.product-price-filter h4 {
  margin: 0 0 0.5rem 0;
  /* Align left with other filters */
  font-size: 0.95rem;
  color: #cbd5f5;
}

.price-slider {
  position: relative;
  height: 2.2rem;
  overflow: visible;
  margin: 0 10px;
  /* Thumb edges flush with container */
  width: auto;
  --min-percent: 0%;
  --max-percent: 100%;
}

.price-slider::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 0;
  width: 100%;
  height: 2px;
  /* Thinner track */
  transform: translateY(-50%);
  background: linear-gradient(to right,
      #0f172a 0%,
      #0f172a var(--min-percent),
      #0f172a var(--min-percent),
      #0f172a var(--max-percent),
      #0f172a var(--max-percent),
      #0f172a 100%);
  border-radius: 999px;
  pointer-events: none;
}

.price-slider input[type="range"] {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  background: transparent;
  pointer-events: none;
  background: none;
  /* Fix unexpected borders/sizing */
  border: none;
  box-sizing: border-box;
  padding: 0;
  -webkit-appearance: none;
  appearance: none;
  -webkit-appearance: none;
}

.price-slider input.range-min {
  z-index: 3;
}

.price-slider input.range-max {
  direction: rtl;
  z-index: 2;
}

.price-slider input[type="range"]::-webkit-slider-thumb {
  pointer-events: all;
  appearance: none;
  -webkit-appearance: none;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #ffffff;
  border: 2px solid #0f172a;
  cursor: grab;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
  /* Center thumb on track if needed, usually auto-centers with flex, but here we cover full height */
}

/* Firefox adjustments */
.price-slider input[type="range"]::-moz-range-thumb {
  pointer-events: all;
  appearance: none;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #ffffff;
  border: 2px solid #0f172a;
  cursor: grab;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

.price-slider input[type="range"]::-webkit-slider-runnable-track {
  background: transparent;
  height: 100%;
  appearance: none;
}

.price-slider-display {
  display: flex;
  justify-content: space-between;
  gap: 0.5rem;
  font-size: 0.9rem;
  white-space: nowrap;
  color: #cbd5f5;
  width: auto;
  margin: 0 10px;
  /* Align with slider */
}

.price-slider-display span {
  flex: 1;
  background: rgba(15, 23, 42, 0.3);
  border: none;
  /* Clean look */
  border-radius: 999px;
  padding: 0.35rem 0.75rem;
  text-align: center;
  font-weight: 500;
  color: #e2e8f0;
}

.product-category-tree>details {
  border: 1px solid rgba(51, 65, 85, 0.6);
  border-radius: 0.55rem;
  background: rgba(15, 23, 42, 0.45);
  padding: 0.4rem 0.55rem;
  width: 100%;
  box-sizing: border-box;
}

.product-category-tree details details {
  margin-top: 0.35rem;
}

.product-category-tree summary {
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.15rem 0.2rem;
  border-radius: 0.4rem;
  color: #e2e8f0;
  outline: none;
}

.product-category-tree summary.is-hidden {
  display: none;
}

.product-category-tree summary::before {
  content: "▸";
  width: 0.9rem;
  color: #64748b;
  transition: transform 0.15s ease;
  font-size: 0.75rem;
}

.product-category-tree summary.has-children::before {
  visibility: visible;
}

.product-category-tree summary:not(.has-children)::before {
  content: "";
  width: 0.55rem;
}

.product-category-tree details[open]>summary::before {
  transform: rotate(90deg);
  color: #bfdbfe;
}

.product-category-tree summary:hover {
  color: #cbd5f5;
}

.product-category-tree summary.active {
  background: rgba(37, 99, 235, 0.2);
  color: #bfdbfe;
}

.product-category-tree summary:focus {
  outline: 2px solid #2563eb;
  outline-offset: 4px;
}

.product-category-tree .product-category-children {
  margin-top: 0.25rem;
  margin-left: 0.45rem;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.secondary-button.small {
  padding: 0.25rem 0.5rem;
  font-size: 0.75rem;
}

.pagination {
  margin-top: 0.75rem;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  color: #cbd5f5;
}

.pagination button {
  background: rgba(37, 99, 235, 0.2);
  border: 1px solid rgba(59, 130, 246, 0.4);
  color: #bfdbfe;
  border-radius: 0.5rem;
  padding: 0.3rem 0.65rem;
  font-size: 0.85rem;
  cursor: pointer;
}

.pagination button:hover {
  background: rgba(37, 99, 235, 0.35);
}

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

.pagination span {
  font-size: 0.85rem;
}

.filter-field {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.filter-field span {
  font-size: 0.85rem;
  color: #94a3b8;
}

.filter-dynamic {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.filter-dynamic section {
  border-top: 1px solid #334155;
  padding-top: 0.75rem;
}

.filter-dynamic h4 {
  margin: 0 0 0.5rem;
  font-size: 0.95rem;
}

.filter-dynamic label {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.9rem;
}

.filter-reset {
  align-self: flex-start;
  background: transparent;
  border: 1px solid #334155;
  color: #e2e8f0;
  padding: 0.4rem 0.9rem;
  border-radius: 0.4rem;
}

.filter-reset:hover {
  background: #334155;
}

.product-results {
  display: flex;
  flex-direction: column;
  background: #1e293b;
  border: 1px solid #334155;
  border-radius: 0.75rem;
}

.product-results .panel-header {
  border-bottom: 1px solid #334155;
}

.product-results .panel-header form {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  align-items: center;
}

.product-results .panel-header form input[type="text"],
.product-results .panel-header form select {
  background: #101c32;
  border: 1px solid #1f2a3d;
  border-radius: 0.6rem;
  color: #f8fafc;
  padding: 0.55rem 0.8rem;
}

.product-results .panel-header form .product-sort-select {
  min-width: 12rem;
}

.product-results .panel-header form button {
  padding: 0.55rem 1.1rem;
}

.product-table-sortable {
  white-space: nowrap;
}

.table-sort-button {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  background: transparent;
  border: none;
  color: inherit;
  font: inherit;
  cursor: pointer;
  padding: 0;
}

.table-sort-button:focus-visible {
  outline: 2px solid #38bdf8;
  outline-offset: 2px;
}

.table-sort-button .sort-indicator {
  width: 0.65rem;
  height: 0.65rem;
  display: inline-block;
  color: #94a3b8;
  position: relative;
}

.table-sort-button[data-sort-direction="asc"] .sort-indicator::before,
.table-sort-button[data-sort-direction="desc"] .sort-indicator::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  margin: auto;
  width: 0;
  height: 0;
  border-left: 0.3rem solid transparent;
  border-right: 0.3rem solid transparent;
}

.table-sort-button[data-sort-direction="asc"] .sort-indicator::before {
  border-bottom: 0.4rem solid #38bdf8;
  top: 0.05rem;
}

.table-sort-button[data-sort-direction="desc"] .sort-indicator::before {
  border-top: 0.4rem solid #38bdf8;
  bottom: 0.05rem;
}

.product-question-panel {
  border-bottom: 1px solid #334155;
  padding: 1rem 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  background: rgba(15, 23, 42, 0.45);
}

.product-question-form {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem;
}

.product-question-form input[type="text"] {
  flex: 1 1 360px;
  min-width: 260px;
  background: #101c32;
  border: 1px solid #1f2a3d;
  border-radius: 0.65rem;
  color: #f8fafc;
  padding: 0.55rem 0.85rem;
}

.product-question-form input[type="text"]:focus {
  outline: 2px solid rgba(59, 130, 246, 0.6);
  outline-offset: 0;
}

.product-question-actions {
  display: inline-flex;
  gap: 0.55rem;
  align-items: center;
}

.product-question-actions .secondary-button {
  background: transparent;
  border: 1px solid #334155;
  color: #e2e8f0;
  padding: 0.55rem 1rem;
  border-radius: 0.6rem;
}

.product-question-actions .secondary-button:hover {
  background: #334155;
}

.product-question-results {
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
  padding: 0.9rem 1rem;
  border-radius: 0.75rem;
  border: 1px solid rgba(59, 130, 246, 0.15);
  background: rgba(15, 23, 42, 0.35);
}

.product-question-summary {
  margin: 0;
  font-size: 0.9rem;
  color: #cbd5f5;
}

.product-question-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.product-question-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.65rem;
  align-items: center;
  padding: 0.65rem 0.75rem;
  border-radius: 0.65rem;
  background: rgba(15, 23, 42, 0.45);
  border: 1px solid rgba(59, 130, 246, 0.2);
}

.product-question-info {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.product-question-item button {
  background: transparent;
  border: none;
  color: #bfdbfe;
  font-weight: 600;
  text-align: left;
  padding: 0;
  cursor: pointer;
}

.product-question-item button:hover {
  color: #f8fafc;
  text-decoration: underline;
}

.product-question-price {
  font-weight: 600;
  color: #f8fafc;
}

.product-question-sku {
  font-size: 0.78rem;
  color: #94a3b8;
}

.product-question-matches {
  grid-column: 1 / -1;
  margin: 0;
  font-size: 0.78rem;
  color: #94a3b8;
}

.panel-header-buttons {
  display: inline-flex;
  gap: 0.5rem;
  align-items: center;
}

.panel-header-buttons .secondary-button {
  background: transparent;
  border: 1px solid #334155;
  color: #e2e8f0;
  padding: 0.55rem 1rem;
  border-radius: 0.6rem;
}

.panel-header-buttons .secondary-button:hover {
  background: #334155;
}

.inline-checkbox {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.9rem;
  color: #cbd5f5;
}

.inline-checkbox input[type="checkbox"] {
  accent-color: #2563eb;
}

#product-filter-brand-input {
  min-width: 180px;
}

#product-filter-supplier {
  min-width: 150px;
}

#product-filter-search {
  min-width: 220px;
  flex: 1 1 240px;
}

#product-filter-specs {
  min-width: 200px;
  flex: 1 1 200px;
}

.product-results .panel-body {
  flex: 1;
  overflow-x: auto;
}

.product-results .panel-body table {
  width: 100%;
  border-collapse: collapse;
}

.tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.tab-group {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.25rem 0.4rem;
  border-radius: 0.6rem;
  background: rgba(15, 23, 42, 0.35);
}

.tab-group::before {
  content: "Category";
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #94a3b8;
  margin-right: 0.2rem;
}

.tab-button {
  background: #1e293b;
  border: 1px solid #334155;
  border-radius: 0.6rem;
  padding: 0.65rem 1rem;
  font-weight: 600;
  color: inherit;
  transition:
    background 0.2s ease,
    transform 0.1s ease;
}

.tab-button:hover {
  background: #0f172a;
  transform: translateY(-1px);
}

.tab-button.active {
  background: #2563eb;
  border-color: #2563eb;
  box-shadow: 0 0 0 2px #1d4ed8;
}

.tab-panel {
  background: #1e293b;
  border: 1px solid #334155;
  border-radius: 0.75rem;
  display: none;
  flex-direction: column;
  min-height: 360px;
}

.tab-panel.active {
  display: flex;
}

.tab-panel[data-tab-panel="products"] {
  background: transparent;
  border: none;
  padding: 0;
}

.tab-panel[data-tab-panel="products"].active {
  display: block;
}

.panel-header {
  padding: 1rem 1.5rem;
  border-bottom: 1px solid #334155;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.panel-header-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.panel-header-actions-right {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.6rem;
}

.cache-panel-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.cache-panel-body {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.cache-warm-log {
  border: 1px solid #334155;
  border-radius: 0.5rem;
  padding: 0.75rem;
  background: #111827;
}

.cache-warm-log table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}

.cache-warm-log th,
.cache-warm-log td {
  padding: 0.35rem 0.5rem;
  border-bottom: 1px solid rgba(148, 163, 184, 0.2);
  text-align: left;
}

.cache-warm-log tbody tr:last-child td {
  border-bottom: none;
}

.cache-warm-log .status-success {
  color: #22c55e;
}

.cache-warm-log .status-error {
  color: #ef4444;
}

.action-button {
  background: #2563eb;
  color: #fff;
  border: none;
  border-radius: 999px;
  padding: 0.45rem 1.1rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s ease;
}

.action-button:hover {
  background: #1e40af;
}

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

.panel-header h2 {
  margin: 0;
  font-size: 1.25rem;
}

.panel-header .panel-subtitle {
  margin: 0;
  font-size: 0.95rem;
  color: #94a3b8;
  font-weight: 400;
}

.enrichment-stage-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 0 0 1.25rem;
}

.enrichment-stage-button.stage-button-logs {
  margin-left: auto;
}

.enrichment-stage-button {
  background: transparent;
  border: 1px solid #334155;
  color: inherit;
  border-radius: 999px;
  padding: 0.35rem 0.9rem;
  font-weight: 600;
  transition:
    border-color 0.2s ease,
    color 0.2s ease,
    background 0.2s ease;
}

.enrichment-stage-button:hover {
  border-color: #475569;
  color: #f8fafc;
}

.enrichment-stage-button.active {
  background: rgba(37, 99, 235, 0.15);
  border-color: #2563eb;
  color: #f8fafc;
}

.enrichment-stage-panel {
  display: none;
  border: 1px solid #1f2937;
  border-radius: 0.9rem;
  background: rgba(15, 23, 42, 0.65);
  margin: 1.25rem 0 1.75rem;
}

.enrichment-stage-panel.active {
  display: block;
}

.stage-panel-header {
  padding: 1.25rem 1.5rem 0.75rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
  align-items: center;
  justify-content: space-between;
}

.stage-panel-header h3 {
  margin: 0;
  font-size: 1.15rem;
}

.stage-panel-header .panel-subtitle {
  margin-top: 0.25rem;
}

.stage-panel-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  font-size: 0.8rem;
  color: #cbd5f5;
}

.stage-panel-chip {
  border: 1px solid #334155;
  border-radius: 999px;
  padding: 0.25rem 0.7rem;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  background: rgba(15, 23, 42, 0.5);
}

.stage-panel-controls {
  border: 0;
  border-top: 1px solid #1f2937;
  padding: 0.85rem 1.5rem 1.25rem;
  background: transparent;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem;
  justify-content: space-between;
}

.stage-control-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}

.stage-control-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
  min-height: 2.5rem;
}

.stage-filter {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  font-size: 0.8rem;
  color: #cbd5f5;
}

.stage-filter select {
  min-width: 10rem;
}

.stage-filter-checkbox {
  font-size: 0.85rem;
}

.stage-progress {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  min-width: 220px;
}

.stage-progress-track {
  position: relative;
  width: 100%;
  height: 0.6rem;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.2);
  overflow: hidden;
}

.stage-progress-track.is-loading::before {
  content: "";
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(120deg,
      rgba(148, 163, 184, 0.35) 0,
      rgba(148, 163, 184, 0.35) 12px,
      rgba(148, 163, 184, 0.15) 12px,
      rgba(148, 163, 184, 0.15) 24px);
  animation: stageProgressStripes 1s linear infinite;
}

.stage-progress-track.is-loading .stage-progress-fill {
  opacity: 0;
}

.stage-progress-fill {
  position: absolute;
  inset: 0;
  width: 0%;
  background: linear-gradient(90deg, #38bdf8, #6366f1);
  transition: width 0.35s ease;
  border-radius: inherit;
}

.stage-progress-text {
  font-size: 0.8rem;
  color: #cbd5f5;
  white-space: nowrap;
}

@keyframes stageProgressStripes {
  from {
    transform: translateX(0);
  }

  to {
    transform: translateX(24px);
  }
}

.stage-panel-controls form {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
}

.stage-panel-selection {
  font-size: 0.85rem;
  color: #cbd5f5;
  white-space: nowrap;
}

.stage-panel-selection strong {
  color: #facc15;
}

.enrichment-status-list {
  padding: 0 1.5rem 1.5rem;
  display: grid;
  gap: 0.75rem;
}

.enrichment-status-item {
  border: 1px solid #1f2937;
  border-radius: 0.85rem;
  background: rgba(15, 23, 42, 0.5);
  padding: 0.65rem 0.85rem;
}

.enrichment-status-item summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  cursor: pointer;
  list-style: none;
}

.enrichment-status-item summary::-webkit-details-marker {
  display: none;
}

.enrichment-status-name {
  font-weight: 600;
}

.enrichment-status-meta {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  color: #cbd5f5;
  font-size: 0.8rem;
}

.enrichment-status-badge {
  border: 1px solid #2563eb;
  background: rgba(37, 99, 235, 0.15);
  color: #e2e8f0;
  padding: 0.1rem 0.5rem;
  border-radius: 999px;
  font-weight: 600;
}

.enrichment-status-fields {
  margin-top: 0.75rem;
  display: grid;
  gap: 0.35rem;
  font-size: 0.85rem;
  color: #cbd5f5;
}

.enrichment-status-field {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  border-top: 1px solid rgba(51, 65, 85, 0.45);
  padding-top: 0.35rem;
}

.enrichment-status-field:first-child {
  border-top: 0;
  padding-top: 0;
}

.enrichment-status-field.empty {
  border-top: 0;
  padding-top: 0;
  color: #94a3b8;
}

.stage-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
}

.stage-table th,
.stage-table td {
  padding: 0.65rem 0.75rem;
  border-bottom: 1px solid rgba(148, 163, 184, 0.15);
  vertical-align: top;
}

.stage-table th {
  text-align: left;
  text-transform: uppercase;
  font-size: 0.75rem;
  letter-spacing: 0.05em;
  color: #94a3b8;
}

.stage-table tr:last-child td {
  border-bottom: none;
}

.stage-table tr.is-active {
  background: rgba(59, 130, 246, 0.12);
}

.stage-table tr.is-active td {
  border-bottom-color: rgba(59, 130, 246, 0.35);
}

.table-product-name {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.table-product-name span {
  display: inline-block;
}

.icecat-table .actions-col {
  white-space: nowrap;
}

.icecat-table .actions-col button+button {
  margin-left: 0.35rem;
}

.icecat-coverage {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.icecat-coverage .status-pill {
  font-size: 0.72rem;
  padding: 0.1rem 0.55rem;
}

.icecat-coverage .pill-detail {
  margin-left: 0.35rem;
  font-weight: 600;
  opacity: 0.85;
}

.table-checkbox-col {
  width: 2.5rem;
  text-align: center;
}

.actions-col {
  width: 1%;
  white-space: nowrap;
  text-align: right;
}

.badge-group {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem;
}

.table-subtext {
  margin-top: 0.25rem;
  font-size: 0.75rem;
  color: #94a3b8;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.status-dot {
  width: 0.6rem;
  height: 0.6rem;
  border-radius: 50%;
  display: inline-block;
}

.status-dot.status-pending {
  background: #fcd34d;
}

.status-dot.status-in-progress {
  background: #f97316;
}

.status-dot.status-ready {
  background: #34d399;
}

.status-dot.status-failed {
  background: #f87171;
}

.task-matrix {
  margin: 0 1.5rem 1.5rem;
  border: 1px solid #1f2937;
  border-radius: 0.85rem;
  overflow-x: auto;
  background: rgba(15, 23, 42, 0.7);
}

.task-matrix-head,
.task-matrix-body {
  min-width: 860px;
}

.task-matrix-body.loading {
  position: relative;
}

.task-matrix-body.loading::after {
  content: "Loading…";
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  background: rgba(15, 23, 42, 0.8);
  font-weight: 600;
  color: #cbd5f5;
}

.task-matrix-row {
  display: grid;
  grid-template-columns: minmax(240px, 1.5fr) repeat(7, minmax(140px, 1fr));
  border-bottom: 1px solid rgba(51, 65, 85, 0.7);
}

.task-matrix-head .task-matrix-row {
  background: rgba(30, 41, 59, 0.85);
  position: sticky;
  top: 0;
  z-index: 1;
}

.task-matrix-cell {
  padding: 0.9rem;
  border-right: 1px solid rgba(51, 65, 85, 0.35);
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  font-size: 0.85rem;
}

.task-matrix-cell:last-child {
  border-right: none;
}

.task-matrix-cell.product-col {
  background: rgba(15, 23, 42, 0.85);
  font-size: 0.9rem;
}

.task-matrix-product {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
}

.task-matrix-select {
  margin-top: 0.2rem;
  flex-shrink: 0;
  width: 1rem;
  height: 1rem;
}

.task-matrix-product-body {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  flex: 1 1 auto;
}

.task-matrix-product-name {
  margin: 0;
  font-size: 1rem;
  font-weight: 600;
}

.task-matrix-product-meta {
  margin: 0;
  font-size: 0.78rem;
  color: #94a3b8;
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.task-matrix-label {
  font-weight: 600;
  font-size: 0.85rem;
}

.task-matrix-helper {
  margin: 0;
  color: #94a3b8;
  font-size: 0.75rem;
}

.task-matrix-status {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.status-pill {
  border-radius: 999px;
  padding: 0.1rem 0.65rem;
  font-size: 0.75rem;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
}

.status-pill.status-ready {
  background: rgba(52, 211, 153, 0.15);
  color: #6ee7b7;
}

.status-pill.status-pending {
  background: rgba(250, 204, 21, 0.18);
  color: #fde68a;
}

.status-pill.status-in_progress {
  background: rgba(251, 191, 36, 0.25);
  color: #fcd34d;
}

.status-pill.status-failed {
  background: rgba(248, 113, 113, 0.17);
  color: #fecaca;
}

.status-pill.status-missing {
  background: rgba(148, 163, 184, 0.15);
  color: #cbd5f5;
}

.task-matrix-note {
  margin: 0;
  font-size: 0.72rem;
  color: #94a3b8;
}

.task-matrix-body .task-matrix-row:nth-child(even) {
  background: rgba(15, 23, 42, 0.45);
}

.task-matrix-empty {
  padding: 1.5rem;
  text-align: center;
}

.ai-prompt-panel {
  padding: 1.25rem 1.5rem 1.75rem;
}

.ai-preview-card {
  border: 1px solid #1f2937;
  border-radius: 0.85rem;
  padding: 1rem 1.25rem;
  background: rgba(15, 23, 42, 0.55);
  margin-bottom: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.ai-preview-card header h4 {
  margin: 0;
  font-size: 1.05rem;
}

.ai-preview-form {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 0.75rem;
  align-items: end;
}

.ai-preview-form label {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  font-size: 0.9rem;
}

.ai-preview-actions {
  display: flex;
  gap: 0.5rem;
}

.ai-preview-output>div {
  margin-bottom: 0.75rem;
}

.ai-preview-output span {
  display: block;
  font-weight: 600;
  margin-bottom: 0.3rem;
}

.ai-preview-output pre {
  margin: 0;
  border: 1px solid #1f2937;
  border-radius: 0.5rem;
  background: #0f172a;
  padding: 0.75rem;
  font-size: 0.8rem;
  max-height: 200px;
  overflow: auto;
  white-space: pre-wrap;
}

.ai-prompt-form {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.ai-worker-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.ai-worker-card {
  border: 1px solid #1f2937;
  border-radius: 0.75rem;
  background: rgba(15, 23, 42, 0.55);
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.ai-worker-card h4 {
  margin: 0;
  font-size: 1rem;
  color: #e2e8f0;
}

.ai-worker-card p {
  margin: 0;
  font-size: 0.85rem;
  color: #cbd5f5;
}

.ai-worker-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  font-size: 0.72rem;
  color: #94a3b8;
}

.ai-worker-meta .badge {
  font-size: 0.72rem;
  padding: 0.05rem 0.5rem;
}

.ai-worker-prompt {
  background: rgba(15, 23, 42, 0.6);
  border: 1px dashed #334155;
  border-radius: 0.5rem;
  padding: 0.6rem 0.75rem;
  font-size: 0.78rem;
  color: #cbd5f5;
  white-space: pre-wrap;
  max-height: 140px;
  overflow: auto;
}

.enrichment-feedback {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  margin-left: auto;
  text-align: right;
}

.enrichment-feedback-message {
  font-size: 0.82rem;
  color: #fcd34d;
}

.enrichment-feedback button {
  align-self: flex-end;
}

.ai-prompt-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1rem;
}

.ai-prompt-field {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  background: rgba(15, 23, 42, 0.5);
  border: 1px solid #1f2937;
  border-radius: 0.75rem;
  padding: 1rem;
  font-size: 0.9rem;
}

.ai-prompt-label {
  font-weight: 600;
  color: #f1f5f9;
}

.ai-prompt-field textarea {
  width: 100%;
  min-height: 140px;
  resize: vertical;
  background: #0f172a;
  border: 1px solid #334155;
  border-radius: 0.5rem;
  padding: 0.75rem;
  color: inherit;
  font-family: inherit;
  font-size: 0.9rem;
}

.ai-prompt-field small {
  color: #94a3b8;
  font-size: 0.75rem;
}

.ai-prompt-actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.75rem;
}

.task-actions {
  display: flex;
  gap: 0.5rem;
}

#tasks-table tr.task-row-completed {
  cursor: pointer;
  transition: background 0.2s ease;
}

#tasks-table tr.task-row-completed:hover {
  background: rgba(37, 99, 235, 0.15);
}

#tasks-table tr.task-row-completed:focus,
#tasks-table tr.task-row-completed:focus-visible {
  outline: 2px solid #2563eb;
  outline-offset: -2px;
}

form {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
}

input,
select {
  background: #0f172a;
  border: 1px solid #334155;
  border-radius: 0.4rem;
  padding: 0.4rem 0.6rem;
  color: inherit;
}

.panel-body {
  flex: 1;
  overflow: auto;
}

.category-management {
  margin-top: 1rem;
  padding: 1rem;
  border: 1px solid #334155;
  border-radius: 0.75rem;
  background: rgba(15, 23, 42, 0.45);
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
}

.category-management header {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.category-management h4 {
  margin: 0;
  font-size: 1rem;
}

.category-management p {
  margin: 0;
  color: #94a3b8;
  font-size: 0.85rem;
}

.category-form {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.category-form label {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  font-size: 0.88rem;
}

.category-form input {
  background: #0f172a;
  border: 1px solid #334155;
  border-radius: 0.4rem;
  padding: 0.4rem 0.6rem;
  color: inherit;
}

.category-form button {
  align-self: flex-start;
}

.danger-button {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  background: rgba(220, 38, 38, 0.15);
  border: 1px solid rgba(248, 113, 113, 0.3);
  color: #fca5a5;
  padding: 0.4rem 0.8rem;
  border-radius: 0.5rem;
  cursor: pointer;
  font-weight: 600;
}

.danger-button:hover {
  background: rgba(220, 38, 38, 0.3);
}

.secondary-button {
  background: rgba(37, 99, 235, 0.1);
  border: 1px solid rgba(59, 130, 246, 0.35);
  color: #bfdbfe;
}

.secondary-button:hover {
  background: rgba(37, 99, 235, 0.2);
}

.secondary-button.danger {
  color: #fca5a5;
  border-color: rgba(248, 113, 113, 0.45);
  background: rgba(248, 113, 113, 0.12);
}

.secondary-button.danger:hover {
  background: rgba(248, 113, 113, 0.2);
  border-color: rgba(248, 113, 113, 0.6);
  color: #fecaca;
}

.secondary-button.active,
.secondary-button[aria-pressed="true"] {
  background: rgba(37, 99, 235, 0.35);
  border-color: rgba(59, 130, 246, 0.6);
  color: #e2e8f0;
}

.requirements-panel {
  margin-top: 1.5rem;
  padding: 1.25rem;
  border: 1px solid #334155;
  border-radius: 0.75rem;
  background: rgba(15, 23, 42, 0.6);
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.requirements-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.requirements-header-text h2 {
  margin: 0;
  font-size: 1.35rem;
}

.requirements-header-text {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.requirements-header-actions {
  display: flex;
  gap: 0.75rem;
  align-items: center;
}

.requirements-tree-controls {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.requirements-export-buttons {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.requirements-import-input {
  display: none;
}

.requirements-import-label {
  cursor: pointer;
}

.requirements-guide-hint {
  margin: 0.15rem 0 0;
  color: #94a3b8;
  font-size: 0.9rem;
}

.requirements-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.requirements-tree {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.requirements-tree>details {
  border: 1px solid #334155;
  border-radius: 0.65rem;
  background: rgba(15, 23, 42, 0.4);
  padding: 0.75rem 0.9rem;
}

.requirements-tree details details {
  margin-top: 0.6rem;
}

.requirements-tree summary {
  cursor: pointer;
  font-weight: 600;
  color: #e2e8f0;
  outline: none;
}

.requirements-tree summary:focus {
  outline: 2px solid #2563eb;
  outline-offset: 4px;
}

.requirements-rule-list {
  list-style: none;
  margin: 0.75rem 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.requirements-rule-list li {
  border: 1px solid #334155;
  border-radius: 0.6rem;
  padding: 0.55rem 0.75rem;
  background: rgba(37, 99, 235, 0.08);
}

.requirements-field-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  background: rgba(37, 99, 235, 0.15);
  border: 1px solid rgba(37, 99, 235, 0.35);
  color: #bfdbfe;
  border-radius: 999px;
  padding: 0.2rem 0.55rem;
  font-size: 0.8rem;
  margin: 0.2rem 0.3rem 0 0;
}

.requirements-list .placeholder,
.requirements-list .error {
  margin: 0;
  font-size: 0.9rem;
}

.requirements-actions {
  margin-top: 0.45rem;
  display: flex;
  gap: 0.45rem;
}

.requirements-actions button {
  font-size: 0.75rem;
  padding: 0.28rem 0.55rem;
}

.requirements-actions .danger-button {
  font-size: 0.75rem;
  padding: 0.25rem 0.55rem;
}

.requirement-modal .modal-content {
  max-width: 460px;
  width: 100%;
  padding: 1.75rem 1.5rem 1.5rem;
  gap: 1.25rem;
}

.requirement-modal .modal-close {
  top: 0.6rem;
  right: 0.75rem;
}

.requirement-modal-form {
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
}

.requirement-modal-form label {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  font-size: 0.95rem;
}

.requirement-modal-form input,
.requirement-modal-form select,
.requirement-modal-form textarea {
  background: #0f172a;
  border: 1px solid #334155;
  border-radius: 0.5rem;
  padding: 0.5rem 0.65rem;
  color: inherit;
  font-family: inherit;
}

.requirement-modal-form textarea {
  resize: vertical;
  min-height: 96px;
}

.requirement-modal-hint {
  margin: 0;
  font-size: 0.8rem;
  color: #94a3b8;
}

.requirement-modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.75rem;
}

.tasks-wrapper {
  display: flex;
  flex-direction: column;
  gap: 2.5rem;
  margin-top: 1.5rem;
}

.tasks-section {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.tasks-section[hidden] {
  display: none !important;
}

.tasks-subnav {
  margin-bottom: 1.25rem;
  justify-content: flex-start;
  flex-wrap: wrap;
  position: sticky;
  top: 0;
  z-index: 15;
  background: rgba(15, 23, 42, 0.75);
  backdrop-filter: blur(6px);
  padding: 0.4rem 0.5rem;
  border-radius: 0.85rem;
  border: 1px solid rgba(59, 130, 246, 0.15);
}

.feeds-body {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.suppliers-wrapper {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.suppliers-section {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.suppliers-section[hidden] {
  display: none !important;
}

.price-alerts-panel {
  border: 1px solid rgba(59, 130, 246, 0.3);
  border-radius: 0.85rem;
  background: rgba(15, 23, 42, 0.7);
  padding: 1rem 1.2rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.price-alerts-panel.is-loading {
  opacity: 0.65;
}

.price-alerts-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.price-alerts-header h3 {
  margin: 0;
  font-size: 1.1rem;
}

.price-alerts-header p {
  margin: 0.15rem 0 0;
  color: #94a3b8;
  font-size: 0.85rem;
}

.price-alerts-empty {
  margin: 0;
  padding: 0.5rem 0;
  color: #94a3b8;
  font-size: 0.9rem;
}

.price-alerts-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.price-alert-card {
  border: 1px solid rgba(148, 163, 184, 0.3);
  border-radius: 0.75rem;
  padding: 0.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  background: rgba(12, 22, 40, 0.9);
}

.price-alert-card h4 {
  margin: 0;
  font-size: 0.95rem;
}

.price-alert-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}

.price-alert-card-meta {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 0.35rem;
  font-size: 0.82rem;
  color: #94a3b8;
}

.price-alert-card-meta div {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
}

.price-alert-card-meta strong {
  color: #e2e8f0;
}

.price-alert-card .badge {
  align-self: flex-start;
}

.price-alert-card-actions {
  display: flex;
  justify-content: flex-end;
}

.competitor-header .panel-header-actions {
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.competitor-header-actions {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.competitor-dashboard {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  padding: 1.25rem 1.5rem 1.5rem;
}

.competitor-alert {
  margin: 0;
  padding: 0.75rem 1rem;
  border-radius: 0.6rem;
  border: 1px solid rgba(248, 113, 113, 0.4);
  background: rgba(248, 113, 113, 0.1);
  color: #fecaca;
  font-size: 0.9rem;
}

.competitor-alert.is-hidden {
  display: none;
}

.competitor-table {
  width: 100%;
  border-collapse: collapse;
  background: rgba(15, 23, 42, 0.45);
  border: 1px solid #334155;
  border-radius: 0.75rem;
  overflow: hidden;
}

.competitor-table thead th {
  background: rgba(15, 23, 42, 0.65);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #94a3b8;
  text-align: left;
  padding: 0.75rem 1rem;
}

.competitor-table tbody td {
  padding: 0.75rem 1rem;
  border-top: 1px solid rgba(51, 65, 85, 0.6);
  vertical-align: middle;
}

.competitor-table tbody tr {
  cursor: pointer;
}

.competitor-table tbody tr button {
  cursor: pointer;
}

.competitor-table tbody tr:hover {
  background: rgba(15, 23, 42, 0.45);
}

.competitor-source-name {
  font-weight: 600;
}

.competitor-schedule {
  font-size: 0.85rem;
  color: #94a3b8;
  margin-top: 0.25rem;
}

.competitor-state {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.competitor-progress-inline {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.competitor-progress-bar {
  height: 0.4rem;
  background: rgba(15, 23, 42, 0.45);
  border-radius: 999px;
  overflow: hidden;
  border: 1px solid rgba(51, 65, 85, 0.6);
}

.competitor-progress-bar .fill {
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, #3b82f6, #1d4ed8);
  transition: width 0.3s ease;
}

.competitor-progress-meta {
  display: flex;
  justify-content: space-between;
  font-size: 0.8rem;
  color: #94a3b8;
}

.competitor-actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.4rem;
  flex-wrap: wrap;
}

.competitor-actions button {
  padding: 0.4rem 0.75rem;
  font-size: 0.85rem;
}

.competitor-actions button[disabled] {
  opacity: 0.6;
  cursor: not-allowed;
}

.competitor-modal-content {
  max-width: 460px;
}

.competitor-modal-body {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.competitor-modal-header {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.competitor-modal-header h3 {
  margin: 0;
}

.competitor-modal-status {
  margin: 0;
  font-size: 0.85rem;
  color: #94a3b8;
}

.competitor-modal-meta dl {
  margin: 0;
  display: grid;
  gap: 0.65rem;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
}

.competitor-modal-meta dt {
  margin: 0;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #94a3b8;
}

.competitor-modal-meta dd {
  margin: 0.1rem 0 0;
  font-weight: 600;
}

.competitor-modal-progress {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.25rem;
  margin: 0.75rem 0 1.5rem;
}

.competitor-current-panel,
.competitor-recent-panel {
  background: rgba(15, 23, 42, 0.85);
  border: 1px solid rgba(99, 102, 241, 0.25);
  border-radius: 0.85rem;
  padding: 1.1rem 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  box-shadow: inset 0 0 0 1px rgba(148, 163, 184, 0.05);
}

.competitor-current-panel h4,
.competitor-recent-panel h4 {
  margin: 0;
  font-size: 1rem;
  font-weight: 600;
  color: #e2e8f0;
}

.competitor-current-body {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  font-size: 0.95rem;
}

.competitor-current-line {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
}

.competitor-current-line .label {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #94a3b8;
}

.competitor-recent-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.competitor-recent-list li {
  border: 1px solid rgba(99, 102, 241, 0.18);
  border-radius: 0.75rem;
  padding: 0.85rem 1rem;
  background: rgba(15, 23, 42, 0.7);
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.competitor-recent-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.5rem;
  font-weight: 600;
  color: #e2e8f0;
}

.competitor-recent-subtitle {
  font-size: 0.85rem;
  color: #94a3b8;
}

.competitor-recent-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.85rem;
  color: #cbd5f5;
}

.competitor-recent-price {
  font-weight: 600;
  color: #38bdf8;
}

.competitor-recent-message {
  font-size: 0.85rem;
  color: #cbd5f5;
}

.competitor-recent-list li .badge {
  white-space: nowrap;
}

.competitor-modal-form {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.competitor-modal-form label {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  font-size: 0.9rem;
}

.competitor-modal-form input[type="number"] {
  background: #0f172a;
  border: 1px solid #334155;
  border-radius: 0.45rem;
  padding: 0.55rem 0.65rem;
  color: inherit;
  font-family: inherit;
  font-size: 0.95rem;
}

.competitor-modal-form .checkbox {
  flex-direction: row;
  align-items: center;
  gap: 0.5rem;
}

.competitor-modal-actions {
  display: flex;
  justify-content: flex-end;
}

.competitor-modal-actions button {
  padding: 0.45rem 1rem;
  font-weight: 600;
}

.competitor-modal-grid {
  display: grid;
  gap: 0.75rem;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.competitor-modal-field {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  font-size: 0.9rem;
}

.competitor-modal-inline {
  display: flex;
  gap: 0.5rem;
  align-items: center;
}

.competitor-modal-inline input,
.competitor-modal-inline select,
.competitor-modal-field input {
  background: #0f172a;
  border: 1px solid #334155;
  border-radius: 0.45rem;
  padding: 0.55rem 0.65rem;
  color: inherit;
  font-family: inherit;
}

.competitor-modal-inline input {
  flex: 1 1 120px;
}

.competitor-modal-inline select {
  flex: 0 0 130px;
}

.competitor-modal-group {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.competitor-modal-group h4 {
  margin: 0;
  font-size: 0.95rem;
}

.competitor-modal-next {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.competitor-modal-next label {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  font-size: 0.9rem;
}

.product-competitor-cell {
  min-width: 180px;
}

.product-competitor-entry {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.65rem;
  font-size: 0.85rem;
}

.product-competitor-entry-name {
  font-weight: 600;
  color: #cbd5f5;
}

.product-competitor-entry-price {
  font-weight: 600;
}

.product-competitor-entry-price a {
  color: #60a5fa;
  text-decoration: none;
}

.product-competitor-entry-price a:hover {
  text-decoration: underline;
}

.product-competitor-entry-markup {
  font-weight: 600;
}

.product-competitor-entry-markup.markup-positive {
  color: #4ade80;
}

.product-competitor-entry-markup.markup-negative {
  color: #f87171;
}

.product-competitor-inline {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
}

.product-competitor-summary {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.product-competitor-inline button {
  align-self: flex-start;
  flex-shrink: 0;
}

.product-competitor-more {
  font-size: 0.75rem;
  color: #94a3b8;
  font-weight: 500;
}

.product-competitor-recommend {
  display: flex;
  align-items: baseline;
  gap: 0.4rem;
  font-size: 0.9rem;
  font-weight: 600;
  color: #facc15;
}

.product-competitor-recommend-label {
  color: #e2e8f0;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.product-competitor-recommend-note {
  font-size: 0.78rem;
  color: #94a3b8;
}

.product-competitor-status {
  font-size: 0.78rem;
  color: #94a3b8;
}

.product-competitor-status.warn {
  color: #facc15;
}

.product-competitor-status.error {
  color: #f87171;
}

.product-competitor-placeholder {
  font-size: 0.82rem;
  color: #64748b;
}

.modal-competitor-actions {
  margin-top: 0.75rem;
}

.suppliers-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  font-size: 0.85rem;
  color: #cbd5f5;
}

.suppliers-list li {
  margin: 0;
}

.competitor-results .status-note {
  margin-top: 0.25rem;
  font-size: 0.82rem;
  color: #94a3b8;
}

.feeds-list {
  overflow: auto;
}

.feeds-list table th,
.feeds-list table td {
  padding: 0.45rem 0.75rem;
  vertical-align: top;
}

.feeds-list table tbody tr:last-child td {
  border-bottom-color: rgba(51, 65, 85, 0.6);
}

.feeds-list .feed-schedule-summary {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 0.25rem 0.6rem;
  font-size: 0.78rem;
  line-height: 1.25;
}

.feeds-list .feed-schedule-summary>.badge {
  grid-column: 1 / -1;
  font-size: 0.7rem;
  padding: 0.15rem 0.45rem;
  margin-bottom: 0.1rem;
}

.feeds-list .feed-progress-indicator {
  margin-top: 0.6rem;
}

.feeds-list .feed-progress-indicator:empty {
  margin-top: 0;
}

.feeds-list .feed-progress {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.feeds-list .feed-progress-track {
  position: relative;
  height: 0.35rem;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.25);
  overflow: hidden;
}

.feeds-list .feed-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #38bdf8, #6366f1);
  width: 0;
  transition: width 0.3s ease;
}

.feeds-list .feed-progress.is-indeterminate .feed-progress-fill {
  position: absolute;
  width: 35%;
  animation: feedProgressIndeterminate 1.2s linear infinite;
}

@keyframes feedProgressIndeterminate {
  0% {
    transform: translateX(-100%);
  }

  50% {
    transform: translateX(25%);
  }

  100% {
    transform: translateX(100%);
  }
}

.feeds-list .feed-progress-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  color: #94a3b8;
  font-size: 0.68rem;
}

.feeds-list .feed-progress-meta span {
  white-space: nowrap;
}

.feeds-list .feed-schedule-row {
  display: flex;
  gap: 0.3rem;
  align-items: baseline;
}

.feeds-list .feed-schedule-row span {
  color: #94a3b8;
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.feeds-list .feed-schedule-row strong,
.feeds-list .feed-schedule-row code {
  font-size: 0.8rem;
}

.mapping-layout {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 1.25rem;
}

.mapping-sidebar {
  background: #1e293b;
  border: 1px solid #334155;
  border-radius: 0.75rem;
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.mapping-sidebar h3 {
  margin: 0;
  font-size: 1.1rem;
}

.mapping-tree {
  overflow: auto;
  font-size: 0.95rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.mapping-tree>details {
  border: 1px solid #334155;
  border-radius: 0.65rem;
  background: rgba(15, 23, 42, 0.4);
  padding: 0.55rem 0.75rem;
}

.mapping-tree details details {
  margin-top: 0.4rem;
}

.mapping-tree summary {
  cursor: pointer;
  font-weight: 600;
  color: #e2e8f0;
  outline: none;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.2rem 0.25rem;
  border-radius: 0.45rem;
}

.mapping-tree summary::before {
  content: "▸";
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  width: 1.1rem;
  color: #64748b;
  transition: transform 0.15s ease;
  font-size: 0.8rem;
}

.mapping-tree summary.has-children::before {
  visibility: visible;
}

.mapping-tree summary:not(.has-children)::before {
  content: "";
  width: 0.6rem;
}

.mapping-tree details[open]>summary::before {
  transform: rotate(90deg);
  color: #bfdbfe;
}

.mapping-tree-name {
  flex: 1;
}

.mapping-tree-actions {
  display: inline-flex;
  gap: 0.25rem;
}

.mapping-tree-actions button {
  background: rgba(37, 99, 235, 0.15);
  border: 1px solid rgba(59, 130, 246, 0.35);
  color: #bfdbfe;
  border-radius: 0.45rem;
  padding: 0.15rem 0.35rem;
  font-size: 0.75rem;
  line-height: 1;
  cursor: pointer;
}

.mapping-tree[data-editing="false"] .mapping-tree-actions {
  display: none;
}

.mapping-tree-actions button:hover {
  background: rgba(37, 99, 235, 0.3);
}

.mapping-tree-actions button[data-action="delete"] {
  background: rgba(248, 113, 113, 0.15);
  border: 1px solid rgba(248, 113, 113, 0.35);
  color: #fca5a5;
}

.mapping-tree-actions button[data-action="delete"]:hover {
  background: rgba(248, 113, 113, 0.25);
}

.mapping-tree summary:hover {
  color: #cbd5f5;
}

.mapping-tree summary.active {
  background: rgba(37, 99, 235, 0.2);
  color: #bfdbfe;
}

.mapping-tree summary:focus {
  outline: 2px solid #2563eb;
  outline-offset: 4px;
}

.mapping-tree summary::-webkit-details-marker {
  color: #64748b;
}

.mapping-tree-children {
  margin-top: 0.35rem;
  margin-left: 0.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.mapping-content {
  background: #1e293b;
  border: 1px solid #334155;
  border-radius: 0.75rem;
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.mapping-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: flex-end;
}

.mapping-supplier {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  min-width: 220px;
}

.mapping-inline-form {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 0.75rem;
  flex: 1;
}

.mapping-inline-form label {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  min-width: 220px;
  flex: 1 0 220px;
}

.mapping-inline-form input {
  background: #0f172a;
  border: 1px solid #334155;
  border-radius: 0.45rem;
  padding: 0.45rem 0.6rem;
  color: inherit;
}

.mapping-inline-form button {
  white-space: nowrap;
}

.mapping-inline-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
}

.mapping-columns {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 1rem;
}

.mapping-section-header {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  margin-bottom: 0.5rem;
  min-height: 3.6rem;
  justify-content: flex-end;
}

.mapping-section-header h3 {
  margin: 0;
  font-size: 1.05rem;
}

.mapping-section-note {
  margin: 0;
  font-size: 0.85rem;
  color: #94a3b8;
}

.mapping-list table,
.mapping-summary table,
.mapping-suggestions table {
  width: 100%;
  border-collapse: collapse;
}

.mapping-list th,
.mapping-summary th,
.mapping-suggestions th,
.mapping-list td,
.mapping-summary td,
.mapping-suggestions td {
  text-align: left;
  padding: 0.6rem 0.8rem;
  border-bottom: 1px solid #334155;
}

.mapping-list button {
  background: transparent;
  border: 1px solid #334155;
  padding: 0.35rem 0.7rem;
}

.mapping-list button:hover {
  background: #334155;
}

.mapping-suggestions button {
  background: #2563eb;
  border: none;
  color: #fff;
  padding: 0.35rem 0.85rem;
  border-radius: 999px;
  font-size: 0.85rem;
  cursor: pointer;
}

.mapping-suggestions button:hover {
  background: #1e4ed8;
}

.mapping-suggestion-note {
  margin-top: 0.2rem;
  font-size: 0.75rem;
  color: #94a3b8;
}

.mapping-suggestion-reason {
  display: inline-block;
}

.mapping-summary th:nth-child(2),
.mapping-summary td:nth-child(2) {
  text-align: right;
  width: 90px;
}

.mapping-summary button {
  background: none;
  border: none;
  color: #60a5fa;
  padding: 0;
  font: inherit;
  cursor: pointer;
}

.mapping-summary button:hover {
  color: #bfdbfe;
  text-decoration: underline;
}

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

th,
td {
  text-align: left;
  padding: 0.6rem 1rem;
  border-bottom: 1px solid #334155;
  vertical-align: top;
}

.product-image-cell {
  width: 72px;
  padding-right: 0.5rem;
}

.product-thumb {
  width: 48px;
  height: 48px;
  border-radius: 0.6rem;
  object-fit: cover;
  background: #0f172a;
  border: 1px solid #334155;
  display: block;
}

.product-thumb.placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  font-weight: 600;
  font-size: 0.9rem;
  color: #94a3b8;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.product-name-cell .product-name {
  font-weight: 600;
  margin-bottom: 0.25rem;
  overflow-wrap: anywhere;
  word-break: break-word;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
}

.product-name-cell .meta {
  color: #94a3b8;
  font-size: 0.85rem;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.product-name-cell {
  max-width: 420px;
}

.product-brand-cell {
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: flex-start;
  gap: 0.25rem;
  min-height: 74px;
}

.product-brand-cell .product-brand-text {
  font-weight: 600;
}

.product-brand-cell .availability-badge {
  align-self: flex-start;
  margin-top: 0.15rem;
}

.availability-badge {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
  min-width: 95px;
  min-height: 34px;
  padding: 0.18rem 0.45rem;
  gap: 0.1rem;
  line-height: 1.1;
}

.availability-badge .availability-line {
  display: block;
}

.availability-line-secondary {
  font-size: 0.75rem;
}

.product-offers-cell {
  min-width: 280px;
}

.product-offers {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.product-offers-list {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.product-offer-row {
  border: 1px solid #1f2a3d;
  border-radius: 0.65rem;
  padding: 0.45rem 0.65rem;
  background: rgba(15, 23, 42, 0.65);
}

.product-offer-row.is-best {
  border-color: rgba(34, 197, 94, 0.55);
  background: rgba(34, 197, 94, 0.12);
}

.product-offer-row-main {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  font-size: 0.95rem;
}

.product-offer-supplier {
  font-weight: 600;
}

.product-offer-price-block {
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.product-offer-best-label {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  background: rgba(34, 197, 94, 0.25);
  border: 1px solid rgba(34, 197, 94, 0.55);
  color: #bbf7d0;
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 0.1rem 0.4rem;
  border-radius: 999px;
  margin-right: 0.35rem;
}

.product-offer-price {
  font-weight: 700;
}

.product-offer-diff {
  font-size: 0.8rem;
  font-weight: 600;
}

.product-offer-diff.higher {
  color: #fb923c;
}

.product-offer-diff.lower {
  color: #34d399;
}

.product-offer-diff.neutral {
  color: #94a3b8;
}

.product-offer-row-details {
  margin-top: 0.2rem;
  font-size: 0.82rem;
  color: #94a3b8;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.35rem;
}

.product-offer-stock {
  flex: 1 1 auto;
}

.product-offers-empty {
  margin: 0;
  font-size: 0.85rem;
  color: #94a3b8;
}

.product-offer-more {
  font-size: 0.85rem;
  color: #94a3b8;
}

.product-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-top: 0.45rem;
}

tbody.loading {
  opacity: 0.5;
  pointer-events: none;
}

th {
  background: #0f172a;
  position: sticky;
  top: 0;
  z-index: 1;
}

tbody tr:hover {
  background: #0f172a99;
}

.tab-panel[data-tab-panel="products"] tbody tr {
  cursor: pointer;
}

.tab-panel[data-tab-panel="products"] tbody tr:focus {
  outline: 2px solid #2563eb;
  outline-offset: -2px;
}

.placeholder {
  text-align: center;
  color: #64748b;
}

.offers-list,
.suppliers-list {
  margin: 0;
  padding-left: 1.1rem;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  background: #334155;
  border-radius: 999px;
  padding: 0.15rem 0.75rem;
  font-size: 0.75rem;
}

.badge.ok {
  background: #166534;
}

.badge.neutral {
  background: #475569;
}

.badge.info {
  background: rgba(59, 130, 246, 0.18);
  color: #93c5fd;
  border: 1px solid rgba(59, 130, 246, 0.35);
}

.badge.warn {
  background: #854d0e;
}

.badge.error {
  background: #7f1d1d;
}

footer {
  border-top: 1px solid #334155;
  background: #1e293b;
  padding: 0.75rem 1.5rem;
  font-size: 0.9rem;
  color: #94a3b8;
}

.placeholder-tall {
  padding: 2rem;
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.placeholder-tall h2 {
  margin-top: 0;
}

.hint {
  color: #9ca3af;
}

.feed-log {
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.feed-actions {
  display: flex;
  gap: 0.4rem;
  flex-wrap: wrap;
}

.feed-link-list {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-top: 0.35rem;
  font-size: 0.8rem;
}

.feed-link-list a {
  color: #38bdf8;
}

.settings-layout {
  max-width: 860px;
  margin: 0 auto;
  padding: 1.5rem 1rem 3rem;
  display: flex;
  justify-content: center;
  height: 100%;
}

.settings-panel {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.settings-hint {
  margin: 0;
  color: #94a3b8;
  font-size: 0.9rem;
}

.settings-card {
  background: #1e293b;
  border: 1px solid #334155;
  border-radius: 0.9rem;
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
}

.settings-card header h3 {
  margin: 0;
  font-size: 1.1rem;
}

.settings-card header p {
  margin: 0.25rem 0 0;
  color: #94a3b8;
  font-size: 0.9rem;
}

.settings-status {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 0.75rem;
  margin: 0;
}

.settings-status div {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  padding: 0.6rem 0.75rem;
  border: 1px solid #334155;
  border-radius: 0.6rem;
  background: #0f172a;
}

.settings-status dt {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #94a3b8;
}

.settings-status dd {
  margin: 0;
  font-weight: 600;
}

.settings-status dd.ok {
  color: #22c55e;
}

.settings-status dd.warn {
  color: #f97316;
}

.settings-status dd.error {
  color: #f87171;
}

.settings-form {
  display: grid;
  gap: 0.75rem;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.settings-form label {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  font-size: 0.9rem;
}

.settings-form input {
  padding: 0.5rem 0.65rem;
  border: 1px solid #334155;
  border-radius: 0.45rem;
  background: #0f172a;
  color: #e2e8f0;
}

.settings-form button {
  grid-column: 1 / -1;
  justify-self: flex-start;
  background: #2563eb;
  border: none;
  color: #fff;
  font-weight: 600;
  padding: 0.55rem 1.4rem;
  border-radius: 999px;
  cursor: pointer;
  transition: background 0.2s ease;
}

.settings-form button:hover {
  background: #1d4ed8;
}

.settings-note {
  margin: 0;
  color: #94a3b8;
  font-size: 0.85rem;
  text-align: center;
}

.feed-actions button {
  flex: 1 1 auto;
}

.feed-log-entry {
  background: #0f172a;
  border: 1px solid #334155;
  border-radius: 0.6rem;
  padding: 0.85rem 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.feed-log-entry.success {
  border-color: #166534;
}

.feed-log-entry.error {
  border-color: #7f1d1d;
}

.feed-log-entry.info {
  border-color: #2563eb;
}

.feed-log-entry time {
  font-size: 0.8rem;
  color: #94a3b8;
}

.feed-log-entry pre {
  margin: 0;
  padding: 0.5rem;
  background: rgba(15, 23, 42, 0.65);
  border-radius: 0.5rem;
  overflow: auto;
  font-size: 0.75rem;
}

@media (max-width: 640px) {
  main {
    padding: 1rem;
  }

  .feeds-body {
    grid-template-columns: 1fr;
  }
}

.modal {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  z-index: 1000;
}

.modal.hidden {
  display: none;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.7);
  backdrop-filter: blur(2px);
}

.modal-content {
  position: relative;
  background: #0f172a;
  border: 1px solid #334155;
  border-radius: 1.25rem;
  max-width: min(1160px, 95vw);
  max-height: 90vh;
  padding: 2rem;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  box-shadow: 0 24px 60px rgba(15, 23, 42, 0.65);
  overflow-x: hidden;
  overflow-y: auto;
}

.modal-close {
  position: absolute;
  top: 0.4rem;
  right: 0.6rem;
  background: transparent;
  border: none;
  color: #94a3b8;
  font-size: 1.75rem;
  cursor: pointer;
}

.modal-close:hover {
  color: #e2e8f0;
}

.modal-body {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.modal-layout {
  display: grid;
  grid-template-columns: minmax(0, 520px) minmax(0, 1fr);
  gap: 2.5rem;
  align-items: flex-start;
}

.modal-media {
  display: flex;
  align-items: stretch;
  justify-content: stretch;
}

.modal-gallery {
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr);
  gap: 1rem;
  width: 100%;
}

.modal-gallery.without-thumbs {
  grid-template-columns: minmax(0, 1fr);
}

.modal-gallery.without-thumbs .modal-hero {
  min-height: 420px;
}

.modal-thumbnails {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  max-height: 520px;
  overflow-y: auto;
  padding-right: 0.25rem;
}

.carousel-thumb {
  background: transparent;
  border: 1px solid rgba(148, 163, 184, 0.25);
  border-radius: 0.75rem;
  padding: 0;
  cursor: pointer;
  transition:
    border-color 0.2s ease,
    transform 0.2s ease,
    box-shadow 0.2s ease;
  display: block;
}

.carousel-thumb img {
  display: block;
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: 0.65rem;
}

.carousel-thumb:hover {
  border-color: rgba(148, 163, 184, 0.6);
}

.carousel-thumb.active {
  border-color: #2563eb;
  box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.35);
  transform: translateX(2px);
}

.modal-hero {
  position: relative;
  background: radial-gradient(120% 120% at 10% 10%,
      rgba(59, 130, 246, 0.18),
      rgba(15, 23, 42, 0.9) 60%);
  border-radius: 1rem;
  min-height: 360px;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  grid-template-rows: minmax(0, 1fr);
  padding: 1.5rem;
  overflow: hidden;
  box-shadow: inset 0 0 0 1px rgba(148, 163, 184, 0.12);
}

.carousel {
  position: relative;
  width: 100%;
  height: 100%;
  min-height: 320px;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  background: transparent;
  border-radius: 0.75rem;
}

.carousel-track {
  width: 100%;
  height: 100%;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  grid-template-rows: minmax(0, 1fr);
  padding: 1rem;
}

.carousel-track img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: 0.75rem;
}

.carousel-placeholder {
  color: #94a3b8;
  text-align: center;
  padding: 1rem;
}

.carousel-control {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(15, 23, 42, 0.72);
  border: 1px solid rgba(148, 163, 184, 0.35);
  color: #e2e8f0;
  font-size: 1.75rem;
  width: 2.6rem;
  height: 2.6rem;
  border-radius: 999px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition:
    background 0.2s ease,
    transform 0.2s ease,
    border-color 0.2s ease;
}

.carousel-control.prev {
  left: 1rem;
}

.carousel-control.next {
  right: 1rem;
}

.carousel-control:hover {
  background: rgba(37, 99, 235, 0.85);
  border-color: rgba(37, 99, 235, 0.6);
  transform: translateY(-50%) scale(1.05);
}

.carousel-enlarge {
  position: absolute;
  top: 1rem;
  right: 1.25rem;
  background: rgba(15, 23, 42, 0.68);
  border: 1px solid rgba(148, 163, 184, 0.4);
  color: #e2e8f0;
  font-size: 1.25rem;
  width: 2.4rem;
  height: 2.4rem;
  border-radius: 999px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition:
    background 0.2s ease,
    border-color 0.2s ease,
    transform 0.2s ease;
}

.carousel-enlarge:hover {
  background: rgba(37, 99, 235, 0.8);
  border-color: rgba(59, 130, 246, 0.75);
  transform: scale(1.05);
}

.carousel-enlarge:disabled {
  opacity: 0.4;
  cursor: default;
  pointer-events: none;
}

.image-lightbox {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
}

.image-lightbox.hidden {
  display: none;
}

.image-lightbox-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(2, 6, 23, 0.82);
  backdrop-filter: blur(6px);
}

.image-lightbox-content {
  position: relative;
  z-index: 1;
  max-width: min(90vw, 1480px);
  max-height: min(90vh, 880px);
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  background: rgba(15, 23, 42, 0.65);
  border: 1px solid rgba(59, 130, 246, 0.25);
  border-radius: 1.25rem;
  padding: 1.5rem 4.5rem;
  box-shadow: 0 32px 80px rgba(15, 23, 42, 0.75);
}

.image-lightbox-content img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  border-radius: 0.75rem;
  box-shadow: 0 12px 32px rgba(15, 23, 42, 0.7);
}

.image-lightbox-close {
  position: absolute;
  top: 0.75rem;
  right: 0.85rem;
  background: rgba(15, 23, 42, 0.85);
  border: 1px solid rgba(148, 163, 184, 0.35);
  color: #e2e8f0;
  border-radius: 999px;
  font-size: 1.75rem;
  width: 2.8rem;
  height: 2.8rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition:
    background 0.2s ease,
    border-color 0.2s ease,
    transform 0.2s ease;
}

.image-lightbox-close:hover {
  background: rgba(37, 99, 235, 0.85);
  border-color: rgba(59, 130, 246, 0.6);
  transform: scale(1.05);
}

.image-lightbox-control {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(15, 23, 42, 0.85);
  border: 1px solid rgba(148, 163, 184, 0.35);
  color: #e2e8f0;
  font-size: 2rem;
  width: 2.9rem;
  height: 2.9rem;
  border-radius: 999px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition:
    background 0.2s ease,
    border-color 0.2s ease,
    transform 0.2s ease;
}

.image-lightbox-control:hover {
  background: rgba(37, 99, 235, 0.85);
  border-color: rgba(59, 130, 246, 0.6);
  transform: translateY(-50%) scale(1.05);
}

.image-lightbox-control.prev {
  left: 1.4rem;
}

.image-lightbox-control.next {
  right: 1.4rem;
}

.image-lightbox-control:disabled {
  opacity: 0.35;
  cursor: default;
  pointer-events: none;
}

.modal-details {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  max-height: 100%;
  overflow: hidden;
}

.modal-header {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.modal-header h2 {
  font-size: 1.75rem;
  font-weight: 700;
  color: #f8fafc;
  margin: 0;
}

.modal-actions {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.modal-actions-group {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
}

.modal-actions-label {
  font-size: 0.75rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  font-weight: 600;
  color: #94a3b8;
  margin-right: 0.25rem;
}

.modal-actions-group button {
  align-self: flex-start;
}

.competitor-button {
  border: 1px solid rgba(16, 185, 129, 0.35);
  background: rgba(16, 185, 129, 0.12);
  color: #6ee7b7;
}

.competitor-button:hover {
  background: rgba(16, 185, 129, 0.18);
  color: #bbf7d0;
}

.ai-button {
  border: 1px solid rgba(96, 165, 250, 0.4);
  background: rgba(59, 130, 246, 0.12);
  color: #bfdbfe;
}

.ai-button:hover {
  background: rgba(59, 130, 246, 0.2);
  color: #e0f2fe;
}

.modal.enrichment-only .modal-meta {
  display: none;
}

.modal.enrichment-only .modal-details {
  padding-right: 0;
}

.modal-description .description-short {
  font-weight: 600;
  font-size: 1.05rem;
  color: #f1f5f9;
  margin: 0 0 0.9rem;
}

.modal-meta {
  color: #94a3b8;
  margin: 0;
}

.modal-short {
  background: #101c32;
  border: 1px solid #1f2a3d;
  border-radius: 1rem;
  padding: 1.1rem 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  color: #e2e8f0;
}

.modal-short p {
  margin: 0;
  line-height: 1.6;
}

.modal-short .modal-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.modal-short .best-offer {
  background: rgba(37, 99, 235, 0.12);
  border: 1px solid rgba(37, 99, 235, 0.25);
  border-radius: 0.85rem;
  padding: 0.85rem 1rem;
}

.best-offer {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  border-radius: 0.75rem;
}

.best-offer>div {
  font-size: 1.05rem;
  font-weight: 600;
}

.best-offer small {
  color: #94a3b8;
}

.modal-category-control {
  background: #101c32;
  border: 1px solid #1f2a3d;
  border-radius: 1rem;
  padding: 1rem 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.modal-category-header {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.modal-category-header .label {
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.75rem;
  color: #94a3b8;
}

.modal-category-meta {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.modal-category-value {
  font-size: 1.05rem;
  font-weight: 600;
  color: #f8fafc;
}

.modal-category-actions {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.modal-category-editor {
  background: #0b1426;
  border: 1px solid #1f2a3d;
  border-radius: 1rem;
  padding: 1rem 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.modal-category-editor label {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  color: #cbd5f5;
  font-weight: 500;
}

.modal-category-editor select {
  background: #111c31;
  border: 1px solid #1f2937;
  border-radius: 0.6rem;
  color: #f8fafc;
  padding: 0.55rem 0.75rem;
}

.modal-category-editor-actions {
  display: flex;
  gap: 0.5rem;
  justify-content: flex-end;
}

.modal-description {
  line-height: 1.5;
  color: #cbd5f5;
}

.modal-description p {
  margin: 0 0 0.75rem;
}

.modal-normalized-specs {
  margin-bottom: 1rem;
}

.normalized-specs-card {
  border: 1px solid #1f2937;
  border-radius: 0.65rem;
  padding: 0.9rem 1rem;
  background: rgba(15, 23, 42, 0.65);
}

.normalized-specs-heading h4 {
  margin: 0 0 0.15rem;
  font-size: 1rem;
  color: #f8fafc;
}

.normalized-specs-heading p {
  margin: 0 0 0.75rem;
  font-size: 0.85rem;
  color: #94a3b8;
}

.normalized-specs-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 0.4rem 1rem;
  margin: 0;
}

.normalized-specs-grid dt {
  margin: 0;
  font-size: 0.8rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #94a3b8;
}

.normalized-specs-grid dd {
  margin: 0 0 0.5rem;
  font-size: 0.95rem;
  font-weight: 600;
  color: #e2e8f0;
}

.modal-specs table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95rem;
}

.modal-specs th,
.modal-specs td {
  text-align: left;
  padding: 0.4rem 0.6rem;
  border-bottom: 1px solid #1f2937;
}

.modal-specs th {
  width: 40%;
  color: #cbd5f5;
}

.modal-specs .spec-value {
  color: #e2e8f0;
  line-height: 1.5;
}

.modal-specs dl {
  margin: 0;
}

.modal-specs dl .spec-sub-row {
  display: grid;
  grid-template-columns: minmax(0, 150px) 1fr;
  gap: 0.2rem 0.75rem;
  padding: 0.2rem 0;
}

.modal-specs dl dt {
  font-weight: 600;
  color: #94a3b8;
}

.modal-specs dl dd {
  margin: 0;
  color: #e2e8f0;
}

.modal-specs ul {
  margin: 0.25rem 0;
  padding-left: 1.25rem;
}

.modal-specs ul ul {
  margin-top: 0.25rem;
}

.modal-specs ul li {
  margin: 0.1rem 0;
  list-style: disc;
}

.modal-specs td>dl+dl {
  margin-top: 0.6rem;
}

.modal-tabs {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  flex: 1;
  min-height: 0;
  width: 100%;
}

.modal-tab-list {
  display: flex;
  align-items: stretch;
  gap: 0.5rem;
  border-bottom: 1px solid #1f2937;
  padding-bottom: 0.1rem;
  width: 100%;
}

.modal-tab-button {
  background: transparent;
  border: 1px solid transparent;
  color: #94a3b8;
  padding: 0.65rem 1.1rem;
  border-radius: 0.75rem 0.75rem 0 0;
  font-weight: 600;
  transition:
    color 0.2s ease,
    border-color 0.2s ease,
    background 0.2s ease;
  margin-bottom: -1px;
  flex: 1 1 0;
  text-align: center;
}

.modal-tab-button:hover {
  color: #f8fafc;
}

.modal-tab-button.active {
  color: #f8fafc;
  background: #111c31;
  border-color: #2563eb #2563eb #111c31;
  box-shadow: 0 14px 24px rgba(15, 23, 42, 0.35);
}

.modal-tab-panels {
  flex: 1;
  min-height: 0;
  background: #111c31;
  border: 1px solid #1f2937;
  border-radius: 0.9rem;
  padding: 1.35rem 1.5rem;
}

.modal-tab-panel {
  display: none;
}

.modal-tab-panel.active {
  display: block;
}

.modal-content-views {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.content-view-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
}

.content-view-header h4 {
  margin: 0;
}

.content-view-actions {
  display: flex;
  gap: 0.5rem;
}

.content-section {
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: 0.75rem;
  padding: 1.25rem;
  background: rgba(15, 23, 42, 0.45);
  box-shadow: inset 0 0 0 1px rgba(15, 23, 42, 0.35);
}

.content-section-header h5 {
  margin: 0;
  font-size: 1rem;
}

.content-option-grid {
  margin-top: 1rem;
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

.content-option-card {
  border: 1px solid rgba(148, 163, 184, 0.25);
  border-radius: 0.75rem;
  background: rgba(15, 23, 42, 0.35);
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  min-height: 220px;
}

.content-option-card.is-active {
  border-color: rgba(96, 165, 250, 0.9);
  box-shadow: 0 0 0 1px rgba(96, 165, 250, 0.35);
}

.content-option-card header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.85rem;
}

.content-option-date {
  font-size: 0.75rem;
  color: #94a3b8;
}

.content-option-label {
  font-weight: 600;
}

.content-option-source {
  display: inline-flex;
  align-items: center;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 0.1rem 0.4rem;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.2);
}

.content-option-source-icecat {
  background: rgba(45, 212, 191, 0.2);
  color: #5eead4;
}

.content-option-source-competitor {
  background: rgba(248, 113, 113, 0.2);
  color: #fca5a5;
}

.content-option-source-ai {
  background: rgba(129, 140, 248, 0.2);
  color: #c4b5fd;
}

.content-option-source-current {
  background: rgba(96, 165, 250, 0.2);
  color: #bfdbfe;
}

.content-option-source-combined {
  background: rgba(16, 185, 129, 0.25);
  color: #6ee7b7;
}

.content-option-body {
  flex: 1;
  font-size: 0.85rem;
  color: #cbd5f5;
}

.content-option-body p {
  margin: 0;
}

.content-option-body pre {
  margin: 0;
  white-space: pre-wrap;
  word-break: break-word;
  font-family: "JetBrains Mono", "Fira Code", Menlo, Consolas, monospace;
  font-size: 0.78rem;
  background: rgba(15, 23, 42, 0.6);
  padding: 0.5rem;
  border-radius: 0.5rem;
}

.content-option-images {
  display: flex;
  gap: 0.5rem;
}

.content-option-images img {
  width: 48px;
  height: 48px;
  border-radius: 0.35rem;
  object-fit: cover;
  border: 1px solid rgba(148, 163, 184, 0.2);
}

.content-option-specs {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.content-option-specs li {
  display: flex;
  justify-content: space-between;
  gap: 0.5rem;
  font-size: 0.8rem;
}

.content-option-card footer {
  margin-top: auto;
}

.modal-extra {
  color: #e2e8f0;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.modal-extra .extra-details {
  display: grid;
  grid-template-columns: minmax(0, 160px) 1fr;
  gap: 0.35rem 1.2rem;
}

.modal-extra .extra-details dt {
  font-weight: 600;
  color: #94a3b8;
}

.modal-extra .extra-details dd {
  margin: 0 0 0.35rem;
}

.modal-extra .extra-offers {
  width: 100%;
  border-collapse: collapse;
  border: 1px solid #1f2937;
  border-radius: 0.75rem;
  overflow: hidden;
}

.modal-extra .extra-offers th,
.modal-extra .extra-offers td {
  padding: 0.6rem 0.75rem;
  text-align: left;
}

.modal-extra .extra-offers tr+tr td {
  border-top: 1px solid #1f2937;
}

.modal-extra .hint {
  color: #94a3b8;
}

.modal-extra .extra-section+.extra-section {
  border-top: 1px solid #1f2937;
  padding-top: 0.75rem;
}

.modal-extra .extra-section:first-of-type {
  border-top: none;
  padding-top: 0;
}

.modal-extra h4 {
  margin: 0 0 0.6rem;
  font-size: 1rem;
  font-weight: 600;
  color: #f8fafc;
}

.modal-extra .extra-requirements {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.modal-extra .extra-requirements li {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

@media (max-width: 900px) {
  .modal-layout {
    grid-template-columns: 1fr;
  }

  .modal-content {
    padding: 1.5rem;
  }

  .modal-gallery {
    grid-template-columns: 1fr;
    gap: 0.75rem;
  }

  .modal-thumbnails {
    flex-direction: row;
    max-height: none;
    overflow-y: hidden;
    overflow-x: auto;
    padding-bottom: 0.25rem;
    gap: 0.65rem;
  }

  .carousel-thumb {
    width: 88px;
  }

  .carousel-thumb.active {
    transform: translateY(0);
  }

  .carousel {
    min-height: 220px;
  }
}

@media (max-width: 768px) {
  .products-layout {
    grid-template-columns: 1fr;
  }

  .product-filters {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 0.75rem 1rem;
  }

  .product-filters h3 {
    width: 100%;
  }

  .filter-reset {
    margin-top: 0.25rem;
  }

  .mapping-layout {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 540px) {
  .modal-content {
    max-height: 90vh;
    padding: 1rem;
  }

  .modal-close {
    top: 0.2rem;
    right: 0.4rem;
  }
}

.requirement-filter-list {
  list-style: none;
  margin: 0.25rem 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.requirement-filter-list label {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.9rem;
}

/* CRM */
.crm-hub {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.crm-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
}

.crm-quick-actions {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  justify-content: flex-end;
}

.crm-quick-actions .action-button,
.crm-quick-actions .secondary-button {
  min-width: 142px;
}

.crm-body {
  display: flex;
  align-items: stretch;
  gap: 1.75rem;
  width: 100%;
}

.crm-hub[data-crm-active="opportunities"] .crm-body,
.crm-hub[data-crm-active="quotes"] .crm-body,
.crm-hub[data-crm-active="quote-tracker"] .crm-body {
  flex-direction: column;
  gap: 1.5rem;
}

.crm-main-area {
  flex: 1 1 100%;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  width: 100%;
}

.crm-hub[data-crm-active="opportunities"] .crm-main-area,
.crm-hub[data-crm-active="quotes"] .crm-main-area,
.crm-hub[data-crm-active="quote-tracker"] .crm-main-area {
  align-items: stretch;
}

.crm-activity-section {
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid rgba(51, 65, 85, 0.55);
  border-radius: 0.85rem;
  padding: 1rem 1.1rem;
  box-shadow: inset 0 1px 0 rgba(148, 163, 184, 0.08);
}

.crm-activity-section-header {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.crm-activity-section-header h4 {
  margin: 0;
  font-size: 0.95rem;
}

.crm-activity-section-header p {
  margin: 0;
  font-size: 0.78rem;
  color: #94a3b8;
}

.crm-note-form textarea {
  width: 100%;
  min-height: 120px;
  border-radius: 0.65rem;
  border: 1px solid rgba(59, 130, 246, 0.25);
  background: rgba(15, 23, 42, 0.8);
  color: #e2e8f0;
  padding: 0.75rem 0.85rem;
  resize: vertical;
}

.crm-note-actions {
  display: flex;
  justify-content: flex-end;
}

.crm-note-actions .action-button {
  min-width: 0;
}

.crm-note-list,
.crm-task-list,
.crm-activity-timeline {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.crm-note-list li,
.crm-task-list li,
.crm-activity-timeline li {
  background: rgba(8, 12, 24, 0.65);
  border: 1px solid rgba(59, 130, 246, 0.18);
  border-radius: 0.75rem;
  padding: 0.75rem 0.9rem;
  color: #e2e8f0;
  font-size: 0.85rem;
  box-shadow: 0 10px 18px rgba(2, 6, 23, 0.4);
}

.crm-task-form {
  display: grid;
  grid-template-columns: 1fr 150px auto;
  gap: 0.6rem;
}

.crm-task-form input {
  border-radius: 0.65rem;
}

.crm-task-form button {
  min-width: 0;
}

.crm-activities {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  width: 100%;
}

.crm-activities-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 360px);
  gap: 1.5rem;
  align-items: start;
}

.crm-activities-column {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

@media (max-width: 1100px) {
  .crm-activities-layout {
    grid-template-columns: 1fr;
  }
}

.crm-task {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
}

.crm-task strong {
  display: block;
  font-size: 0.9rem;
  color: #e2e8f0;
}

.crm-task p {
  margin: 0.25rem 0 0;
  font-size: 0.78rem;
  color: #94a3b8;
}

.crm-task-completed {
  opacity: 0.6;
}

.crm-task-completed strong {
  text-decoration: line-through;
}

.crm-activity-timeline time {
  display: block;
  font-size: 0.75rem;
  color: #94a3b8;
  margin-top: 0.25rem;
}

@media (max-width: 1360px) {
  .crm-body {
    flex-direction: column;
  }

  .crm-activity-panel {
    width: 100%;
  }
}

.crm-subnav {
  align-self: flex-start;
  margin-bottom: 0.75rem;
}

.crm-panel {
  display: none;
}

.crm-panel.active {
  display: block;
}

.crm-main-area>.crm-panel {
  width: 100%;
}

.crm-panel[data-crm-panel="opportunities"],
.crm-panel[data-crm-panel="quotes"],
.crm-panel[data-crm-panel="quote-tracker"] {
  width: 100%;
}

.crm-panel[data-crm-panel="quotes"] .quote-layout {
  grid-template-columns: 1fr;
}

.crm-panel[data-crm-panel="quotes"] .quote-sidebar {
  display: none;
}

.crm-panel[data-crm-panel="quote-tracker"] {
  width: 100%;
}

.crm-panel[data-crm-panel="quote-tracker"].active {
  display: flex;
  flex-direction: column;
}

.crm-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1.25rem;
  padding-bottom: 0.75rem;
}

.crm-header h2 {
  margin: 0;
  font-size: 1.45rem;
  letter-spacing: -0.01em;
}

.crm-header-actions {
  display: flex;
  gap: 0.6rem;
  flex-wrap: wrap;
}

.crm-layout {
  display: grid;
  grid-template-columns: 320px minmax(0, 1fr);
  gap: 2rem;
  align-items: start;
}

@media (max-width: 1180px) {
  .crm-layout {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
}

.crm-sidebar {
  background: linear-gradient(165deg,
      rgba(10, 18, 32, 0.95),
      rgba(15, 23, 42, 0.9));
  border: 1px solid rgba(51, 65, 85, 0.85);
  border-radius: 1rem;
  padding: 1.2rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  max-height: calc(100vh - 200px);
  overflow: hidden;
  box-shadow: 0 24px 48px rgba(2, 6, 23, 0.55);
}

.crm-filters {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.crm-filters input,
.crm-filters select {
  width: 100%;
  border-radius: 0.65rem;
}

.crm-account-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  overflow: auto;
}

.crm-empty {
  padding: 0.75rem;
  font-size: 0.85rem;
  color: #94a3b8;
  text-align: center;
}

.crm-account-item {
  padding: 0.85rem;
  border-radius: 0.85rem;
  border: 1px solid rgba(51, 65, 85, 0.6);
  background: rgba(17, 24, 39, 0.75);
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  cursor: pointer;
  transition:
    border 0.2s ease,
    background 0.2s ease;
}

.crm-account-item:hover {
  border-color: rgba(96, 165, 250, 0.6);
  background: rgba(30, 41, 59, 0.9);
}

.crm-account-item.active {
  border-color: rgba(96, 165, 250, 0.85);
  background: rgba(37, 99, 235, 0.22);
}

.crm-account-item h4 {
  margin: 0;
  font-size: 1rem;
  font-weight: 600;
  color: #e2e8f0;
}

.crm-account-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  font-size: 0.78rem;
  color: #94a3b8;
}

.crm-account-meta span {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
}

.crm-main {
  background: linear-gradient(165deg,
      rgba(6, 12, 24, 0.88),
      rgba(15, 23, 42, 0.86));
  border: 1px solid rgba(51, 65, 85, 0.75);
  border-radius: 1.25rem;
  padding: 1.8rem 2rem 2.2rem;
  box-shadow: 0 32px 48px rgba(2, 6, 23, 0.55);
  min-height: 420px;
  display: flex;
  flex-direction: column;
  gap: 1.35rem;
}

.crm-opportunity-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 1.5rem;
  align-items: start;
  width: 100%;
}

.crm-opportunity-workspace {
  background: linear-gradient(175deg,
      rgba(8, 13, 23, 0.92),
      rgba(15, 23, 42, 0.85));
  border: 1px solid rgba(59, 130, 246, 0.18);
  border-radius: 1.2rem;
  padding: 1.6rem 1.9rem;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  box-shadow: 0 30px 42px rgba(2, 6, 23, 0.5);
  min-width: 0;
}

.crm-opportunity-summary {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1rem;
}

.crm-opportunity-summary-card {
  background: rgba(17, 24, 39, 0.8);
  border: 1px solid rgba(96, 165, 250, 0.25);
  border-radius: 1rem;
  padding: 1rem 1.2rem;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  box-shadow: inset 0 1px 0 rgba(96, 165, 250, 0.35);
}

.crm-opportunity-summary-label {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #94a3b8;
}

.crm-opportunity-summary-value {
  font-size: 1.2rem;
  font-weight: 600;
  color: #f8fafc;
  letter-spacing: -0.01em;
}

.crm-opportunity-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  padding: 0.75rem 1rem;
  border: 1px solid rgba(51, 65, 85, 0.6);
  border-radius: 0.85rem;
  background: rgba(8, 13, 23, 0.7);
}

.crm-opportunity-view-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(15, 23, 42, 0.75);
  border-radius: 999px;
  padding: 0.3rem;
  border: 1px solid rgba(59, 130, 246, 0.25);
}

.crm-opportunity-view-button {
  border: none;
  background: transparent;
  color: #cbd5f5;
  font-size: 0.85rem;
  padding: 0.45rem 1.1rem;
  border-radius: 999px;
  cursor: pointer;
  transition:
    background 0.2s ease,
    color 0.2s ease;
}

.crm-opportunity-view-button:hover {
  background: rgba(59, 130, 246, 0.25);
}

.crm-opportunity-view-button.active {
  background: rgba(59, 130, 246, 0.9);
  color: #0f172a;
  font-weight: 600;
}

.crm-opportunity-hints {
  max-width: 520px;
  color: #94a3b8;
  font-size: 0.85rem;
}

.crm-opportunity-form-container {
  border: 1px solid rgba(59, 130, 246, 0.22);
  border-radius: 1rem;
  background: rgba(10, 16, 28, 0.8);
  padding: 1.2rem 1.35rem;
  box-shadow: inset 0 1px 0 rgba(148, 163, 184, 0.08);
}

.crm-opportunity-form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.crm-opportunity-form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
}

.crm-opportunity-form-actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.75rem;
}

.crm-opportunity-board {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1rem;
  align-items: start;
}

.crm-opportunity-column {
  background: rgba(8, 13, 23, 0.75);
  border: 1px solid rgba(59, 130, 246, 0.18);
  border-radius: 1rem;
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  box-shadow: inset 0 1px 0 rgba(148, 163, 184, 0.1);
  min-height: 260px;
}

.crm-opportunity-column h3 {
  margin: 0;
  font-size: 0.95rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #94a3b8;
}

.crm-opportunity-column-body {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  min-height: 200px;
}

.crm-opportunity-card {
  background: linear-gradient(160deg,
      rgba(17, 24, 39, 0.95),
      rgba(30, 41, 59, 0.85));
  border: 1px solid rgba(96, 165, 250, 0.35);
  border-radius: 0.9rem;
  padding: 0.9rem 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  box-shadow: 0 18px 28px rgba(2, 6, 23, 0.55);
  cursor: pointer;
  transition:
    transform 0.2s ease,
    border-color 0.2s ease;
}

.crm-opportunity-card:hover {
  transform: translateY(-2px);
  border-color: rgba(147, 197, 253, 0.6);
}

.crm-opportunity-card.active {
  border-color: rgba(248, 250, 252, 0.75);
  box-shadow: 0 22px 32px rgba(59, 130, 246, 0.4);
}

.crm-opportunity-card h4 {
  margin: 0;
  font-size: 0.95rem;
  color: #e2e8f0;
}

.crm-opportunity-card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  font-size: 0.78rem;
  color: #94a3b8;
}

.crm-opportunity-card-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.78rem;
  color: #bfdbfe;
}

.crm-opportunity-empty {
  padding: 0.75rem;
  font-size: 0.82rem;
  text-align: center;
  color: #94a3b8;
}

.crm-opportunity-table table {
  width: 100%;
  border-collapse: collapse;
  background: rgba(8, 13, 23, 0.8);
  border: 1px solid rgba(51, 65, 85, 0.55);
  border-radius: 1rem;
  overflow: hidden;
  font-size: 0.88rem;
}

.crm-opportunity-table th,
.crm-opportunity-table td {
  padding: 0.75rem 0.9rem;
  border-bottom: 1px solid rgba(51, 65, 85, 0.65);
  text-align: left;
  color: #cbd5f5;
}

.crm-opportunity-table tbody tr:hover {
  background: rgba(59, 130, 246, 0.1);
}

.crm-opportunity-table tbody tr.active {
  background: rgba(59, 130, 246, 0.18);
}

.crm-opportunity-detail {
  background: linear-gradient(160deg,
      rgba(6, 11, 21, 0.92),
      rgba(17, 24, 39, 0.88));
  border: 1px solid rgba(96, 165, 250, 0.25);
  border-radius: 1.1rem;
  padding: 1.4rem 1.6rem;
  display: flex;
  flex-direction: column;
  gap: 1.15rem;
  box-shadow: 0 28px 48px rgba(2, 6, 23, 0.5);
}

.crm-opportunity-detail-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 0.75rem;
}

.crm-opportunity-detail-header h3 {
  margin: 0;
  font-size: 1.15rem;
  letter-spacing: -0.01em;
}

.crm-opportunity-detail-subtitle {
  margin: 0.35rem 0 0;
  color: #94a3b8;
  font-size: 0.8rem;
}

.crm-opportunity-detail-actions {
  display: inline-flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.crm-opportunity-detail-metrics {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 0.75rem;
  margin: 0;
}

.crm-opportunity-detail-metrics div {
  background: rgba(15, 23, 42, 0.65);
  border: 1px solid rgba(59, 130, 246, 0.22);
  border-radius: 0.75rem;
  padding: 0.7rem 0.9rem;
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.crm-opportunity-detail-metrics dt {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #94a3b8;
  margin: 0;
}

.crm-opportunity-detail-metrics dd {
  margin: 0;
  color: #f8fafc;
  font-size: 0.95rem;
  font-weight: 500;
}

.crm-opportunity-detail-section {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.crm-opportunity-detail-section header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.6rem;
}

.crm-opportunity-detail-section h4 {
  margin: 0;
  font-size: 0.95rem;
}

.crm-opportunity-detail-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.crm-opportunity-detail-list li {
  padding: 0.65rem 0.8rem;
  border-radius: 0.7rem;
  border: 1px solid rgba(59, 130, 246, 0.22);
  background: rgba(15, 23, 42, 0.65);
  color: #cbd5f5;
  font-size: 0.82rem;
}

.crm-opportunity-detail-list time {
  display: block;
  margin-top: 0.3rem;
  font-size: 0.75rem;
  color: #94a3b8;
}

@media (max-width: 1280px) {
  .crm-opportunity-layout {
    grid-template-columns: 1fr;
  }

  .crm-opportunity-detail {
    width: 100%;
  }
}

.crm-empty-state {
  text-align: center;
  margin: 4rem auto;
  max-width: 320px;
  color: #94a3b8;
}

.crm-empty-state h3 {
  margin-bottom: 0.75rem;
  font-size: 1.25rem;
}

.crm-detail-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
}

.crm-detail-header h3 {
  margin: 0 0 0.25rem;
  font-size: 1.4rem;
  letter-spacing: -0.01em;
}

.crm-detail-actions {
  display: flex;
  gap: 0.6rem;
  flex-wrap: wrap;
}

.crm-status-pill {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 0.2rem 0.65rem;
  font-size: 0.75rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  background: rgba(59, 130, 246, 0.2);
  color: #bfdbfe;
}

.crm-tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-top: 0.35rem;
}

.crm-tag {
  display: inline-flex;
  align-items: center;
  padding: 0.15rem 0.55rem;
  font-size: 0.72rem;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.2);
  color: #cbd5f5;
}

.crm-detail-grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.crm-meta-group {
  background: rgba(15, 23, 42, 0.65);
  border: 1px solid rgba(51, 65, 85, 0.6);
  border-radius: 0.85rem;
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.crm-meta-stack {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  color: #e2e8f0;
}

.crm-meta-stack a {
  color: #93c5fd;
}

.crm-meta-group h4 {
  margin: 0;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #94a3b8;
}

.crm-meta-group dl {
  margin: 0;
  display: grid;
  grid-template-columns: max-content 1fr;
  gap: 0.45rem 0.75rem;
  font-size: 0.9rem;
}

.crm-meta-group dt {
  color: #94a3b8;
}

.crm-meta-group dd {
  margin: 0;
  color: #e2e8f0;
}

.crm-section {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.crm-section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.6rem;
}

.crm-section-header h4 {
  margin: 0;
  font-size: 1rem;
}

.crm-contact-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.88rem;
}

.crm-contact-table th,
.crm-contact-table td {
  padding: 0.6rem 0.75rem;
  border-bottom: 1px solid rgba(51, 65, 85, 0.6);
  text-align: left;
  vertical-align: top;
}

.crm-contact-table tbody tr:hover {
  background: rgba(37, 99, 235, 0.1);
}

.crm-contact-actions {
  display: inline-flex;
  gap: 0.35rem;
}

.crm-pill {
  display: inline-flex;
  align-items: center;
  padding: 0.1rem 0.5rem;
  border-radius: 999px;
  background: rgba(59, 130, 246, 0.15);
  color: #bfdbfe;
  font-size: 0.72rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.crm-notes-box {
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid rgba(51, 65, 85, 0.65);
  border-radius: 0.85rem;
  padding: 1rem;
  color: #e2e8f0;
  white-space: pre-wrap;
}

.crm-modal {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.75);
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  padding: 2rem;
  z-index: 100;
}

.crm-dialog {
  background: rgba(8, 11, 19, 0.95);
  border: 1px solid rgba(59, 130, 246, 0.35);
  border-radius: 1rem;
  padding: 1.5rem 1.75rem;
  width: min(580px, 100%);
  max-height: calc(100vh - 4rem);
  overflow: auto;
  box-shadow: 0 28px 48px rgba(2, 6, 23, 0.55);
}

.crm-dialog-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.crm-dialog-header h3 {
  margin: 0;
}

.crm-dialog-close {
  border: none;
  background: transparent;
  color: #94a3b8;
  font-size: 1.1rem;
  cursor: pointer;
}

.crm-form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.crm-form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
}

.crm-field {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  font-size: 0.9rem;
}

.crm-field span {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #94a3b8;
}

.crm-field-full {
  width: 100%;
}

.crm-modal input,
.crm-modal select,
.crm-modal textarea {
  width: 100%;
  border-radius: 0.6rem;
  border: 1px solid rgba(51, 65, 85, 0.8);
  background: rgba(15, 23, 42, 0.8);
  color: #e2e8f0;
  padding: 0.5rem 0.6rem;
  font-size: 0.95rem;
}

.crm-checkbox {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.85rem;
  color: #cbd5f5;
}

.crm-modal-actions {
  display: flex;
  gap: 0.75rem;
  justify-content: flex-end;
}

.crm-account-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-top: 0.4rem;
}

.crm-account-badge {
  padding: 0.15rem 0.55rem;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.18);
  color: #e2e8f0;
  font-size: 0.75rem;
}

.crm-empty-contacts {
  padding: 1rem;
  text-align: center;
  color: #94a3b8;
  background: rgba(15, 23, 42, 0.6);
  border: 1px dashed rgba(51, 65, 85, 0.6);
  border-radius: 0.85rem;
}

.crm-dialog-close:hover {
  color: #f8fafc;
}

.crm-dialog button.secondary-button.danger {
  color: #fca5a5;
  border-color: rgba(248, 113, 113, 0.4);
}

/* Quotes */
.quote-page {
  display: flex;
  flex-direction: column;
  gap: 2rem;
  padding-bottom: 2.5rem;
  width: 100%;
}

.quote-tracker-page {
  display: flex;
  flex-direction: column;
  gap: 1.75rem;
  width: 100%;
}

.quote-tracker-layout {
  display: grid;
  grid-template-columns: 360px minmax(0, 1fr);
  gap: 1.5rem;
  align-items: stretch;
  width: 100%;
}

.quote-tracker-sidebar {
  background: rgba(8, 13, 23, 0.85);
  border: 1px solid rgba(59, 130, 246, 0.18);
  border-radius: 1.05rem;
  padding: 1.35rem 1.5rem;
  box-shadow: 0 26px 44px rgba(2, 6, 23, 0.5);
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  min-height: 540px;
}

.quote-tracker-content {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  min-width: 0;
  width: 100%;
  align-items: stretch;
  flex: 1 1 100%;
}

.quote-tracker-toolbar {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.quote-tracker-field {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  font-size: 0.88rem;
  color: #e2e8f0;
}

.quote-tracker-field span {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #94a3b8;
}

.quote-tracker-field input,
.quote-tracker-field select {
  border-radius: 0.6rem;
}

.quote-tracker-buttons {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  justify-content: flex-start;
}

.quote-tracker-summary {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1rem;
}

.quote-tracker-summary-card {
  background: rgba(17, 24, 39, 0.8);
  border: 1px solid rgba(59, 130, 246, 0.25);
  border-radius: 0.95rem;
  padding: 1rem 1.2rem;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  box-shadow: inset 0 1px 0 rgba(148, 163, 184, 0.1);
}

.quote-tracker-summary-label {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #94a3b8;
}

.quote-tracker-summary-value {
  font-size: 1.2rem;
  font-weight: 600;
  color: #f8fafc;
  letter-spacing: -0.01em;
}

.quote-tracker-table-wrapper {
  background: rgba(8, 13, 23, 0.85);
  border: 1px solid rgba(59, 130, 246, 0.18);
  border-radius: 1.1rem;
  box-shadow: 0 24px 48px rgba(2, 6, 23, 0.45);
  overflow: hidden;
  width: 100%;
}

.quote-tracker-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.88rem;
  table-layout: fixed;
}

.quote-tracker-table thead {
  background: rgba(15, 23, 42, 0.9);
}

.quote-tracker-table th,
.quote-tracker-table td {
  padding: 0.85rem 1rem;
  border-bottom: 1px solid rgba(51, 65, 85, 0.65);
  text-align: left;
  color: #cbd5f5;
  word-break: break-word;
}

.quote-tracker-actions-col {
  width: 160px;
  text-align: right;
}

.quote-tracker-table td.quote-tracker-actions {
  text-align: right;
}

.quote-tracker-actions {
  display: inline-flex;
  gap: 0.5rem;
}

.quote-tracker-table tbody tr:hover {
  background: rgba(59, 130, 246, 0.12);
}

.quote-tracker-status {
  display: inline-flex;
  align-items: center;
  padding: 0.15rem 0.45rem;
  border-radius: 999px;
  font-size: 0.72rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  background: rgba(59, 130, 246, 0.22);
  color: #93c5fd;
}

.quote-tracker-table td .quote-tracker-meta {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.quote-tracker-table td .quote-tracker-meta span {
  color: #94a3b8;
  font-size: 0.75rem;
}

.quote-tracker-modal {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  padding: 2rem;
  z-index: 120;
}

.quote-tracker-modal .modal-content {
  width: min(900px, 95vw);
  max-height: 90vh;
  overflow-y: auto;
}

.quote-tracker-modal-content {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.quote-tracker-modal-content iframe {
  width: 100%;
  min-height: 70vh;
  border-radius: 1rem;
  border: 1px solid rgba(59, 130, 246, 0.18);
  background: rgba(15, 23, 42, 0.9);
}

.quote-editor-modal {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  padding: 2rem;
  z-index: 120;
}

.quote-editor-modal .modal-content {
  width: 96vw;
  max-height: 94vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.quote-editor-modal-body {
  display: flex;
  flex-direction: column;
  gap: 0;
  overflow: hidden;
}

.quote-editor-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.6rem 2rem 1.2rem;
  border-bottom: 1px solid rgba(59, 130, 246, 0.2);
  background: rgba(10, 18, 32, 0.92);
}

.quote-editor-modal-toolbar {
  display: inline-flex;
  gap: 0.5rem;
}

.quote-editor-modal-content {
  display: block;
  overflow: auto;
  flex: 1;
  padding: 1.5rem 2rem 2rem;
  background: linear-gradient(175deg,
      rgba(10, 18, 32, 0.95),
      rgba(15, 23, 42, 0.92));
}

.quote-editor-modal-content .quote-page {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.quote-editor-modal-content .quote-layout {
  display: flex;
  flex-direction: column;
}

.quote-editor-modal-content .quote-sidebar {
  display: none;
}

.quote-editor-modal-content .quote-main {
  border-radius: 1rem;
  border: 1px solid rgba(59, 130, 246, 0.18);
  background: linear-gradient(175deg,
      rgba(10, 18, 32, 0.92),
      rgba(15, 23, 42, 0.94));
  box-shadow: 0 32px 50px rgba(2, 6, 23, 0.55);
  padding: 1.5rem;
  overflow: auto;
  max-height: calc(94vh - 220px);
}

.quote-editor-modal-content .quote-grid {
  display: grid;
  gap: 1.2rem;
}

.quote-editor-modal-content .quote-card {
  border-radius: 0.9rem;
}

@media (max-width: 1100px) {
  .quote-editor-modal-content .quote-layout {
    grid-template-columns: 1fr;
  }

  .quote-editor-modal-content .quote-sidebar {
    max-height: 240px;
    overflow-y: auto;
  }

  .quote-editor-modal-content .quote-main {
    max-height: calc(90vh - 300px);
  }
}

@media (max-width: 1400px) {
  .quote-tracker-layout {
    grid-template-columns: 1fr;
  }

  .quote-tracker-sidebar {
    order: 1;
    min-height: auto;
  }

  .quote-tracker-content {
    order: 2;
  }
}

@media (max-width: 1200px) {
  .quote-tracker-layout {
    grid-template-columns: 1fr;
  }

  .quote-tracker-sidebar {
    order: 1;
  }

  .quote-tracker-content {
    order: 2;
  }
}

.quote-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 1.2rem;
  align-items: flex-end;
  padding: 1rem 1.25rem;
  background: rgba(15, 23, 42, 0.72);
  border: 1px solid rgba(51, 65, 85, 0.7);
  border-radius: 0.95rem;
  box-shadow: 0 18px 36px rgba(15, 23, 42, 0.35);
}

.quote-toolbar-metrics {
  display: flex;
  gap: 1rem;
  align-items: flex-end;
  flex-wrap: wrap;
  margin-left: auto;
}

.quote-field {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  font-size: 0.9rem;
  color: #e2e8f0;
}

.quote-field span {
  font-size: 0.78rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #94a3b8;
}

.quote-field-inline {
  display: flex;
  align-items: flex-end;
  gap: 0.75rem;
}

.quote-field-inline label {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.quote-client-select {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: flex-end;
}

.quote-grid {
  display: grid;
  gap: 1.5rem;
}

@media (min-width: 960px) {
  .quote-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.quote-card {
  background: linear-gradient(135deg,
      rgba(11, 19, 33, 0.92),
      rgba(15, 23, 42, 0.88));
  border: 1px solid rgba(51, 65, 85, 0.8);
  border-radius: 1rem;
  padding: 1.4rem 1.6rem;
  display: flex;
  flex-direction: column;
  gap: 1.1rem;
  box-shadow: 0 22px 40px rgba(2, 6, 23, 0.55);
}

.quote-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.quote-card-header h3 {
  margin: 0;
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.quote-form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem;
}

.quote-financial-summary {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  padding: 1rem;
  border-radius: 0.85rem;
  background: rgba(15, 23, 42, 0.65);
  border: 1px solid rgba(59, 130, 246, 0.18);
}

.quote-value-box {
  background: rgba(37, 99, 235, 0.08);
  border: 1px solid rgba(96, 165, 250, 0.4);
  border-radius: 0.7rem;
  padding: 0.6rem 0.85rem;
  font-weight: 600;
  color: #dbeafe;
  letter-spacing: 0.01em;
}

.quote-line-actions {
  display: flex;
  gap: 0.65rem;
  flex-wrap: wrap;
  align-items: center;
}

.quote-ai-output {
  border: 1px dashed rgba(148, 163, 184, 0.4);
  background: rgba(15, 23, 42, 0.4);
  border-radius: 0.75rem;
  padding: 1rem 1.25rem;
  min-height: 140px;
  color: #e2e8f0;
}

.quote-ai-output h4 {
  margin: 0 0 0.25rem;
  font-size: 0.95rem;
  color: #cbd5f5;
}

.quote-ai-output p {
  margin: 0 0 0.65rem;
  line-height: 1.4;
}

.quote-ai-output ul {
  margin: 0 0 0.65rem 1.1rem;
  padding: 0;
  list-style: disc;
}

.quote-ai-output ul li {
  margin-bottom: 0.35rem;
}

.quote-ai-output.loading {
  opacity: 0.6;
}

.quote-ai-actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.5rem;
  margin-top: 0.5rem;
}

.quote-ai-provider {
  font-size: 0.8rem;
  color: #94a3b8;
  margin: 0 0 0.4rem;
}

.quote-ai-section {
  margin-bottom: 0.9rem;
}

.quote-ai-email {
  border: 1px solid rgba(148, 163, 184, 0.35);
  border-radius: 0.6rem;
  padding: 0.75rem;
  background: rgba(15, 23, 42, 0.35);
  white-space: pre-wrap;
  line-height: 1.5;
}

.quote-intake-form textarea {
  width: 100%;
  min-height: 140px;
  resize: vertical;
  border-radius: 0.6rem;
  border: 1px solid rgba(148, 163, 184, 0.4);
  background: rgba(15, 23, 42, 0.35);
  padding: 0.75rem;
  color: #f8fafc;
  font-size: 0.95rem;
}

.quote-intake-form textarea:focus {
  outline: 2px solid rgba(96, 165, 250, 0.5);
  outline-offset: 2px;
}

.quote-intake-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem;
  margin-top: 0.5rem;
}

.quote-intake-hint {
  margin: 0;
  color: #94a3b8;
  font-size: 0.85rem;
  flex: 1;
}

.quote-intake-output {
  border: 1px dashed rgba(148, 163, 184, 0.35);
  background: rgba(15, 23, 42, 0.35);
  border-radius: 0.75rem;
  padding: 1rem 1.25rem;
  color: #e2e8f0;
  margin-top: 0.75rem;
}

.quote-intake-output.loading {
  opacity: 0.6;
}

.quote-intake-section {
  margin-bottom: 0.9rem;
}

.quote-intake-section h4 {
  margin: 0 0 0.25rem;
  font-size: 0.95rem;
  color: #cbd5f5;
}

.quote-intake-section p {
  margin: 0;
  line-height: 1.5;
}

.quote-intake-list {
  margin: 0.35rem 0 0.35rem 1.1rem;
  padding: 0;
  list-style: disc;
}

.quote-intake-list li {
  margin-bottom: 0.35rem;
}

.quote-intake-client {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 0.5rem;
  margin: 0;
  padding: 0;
}

.quote-intake-client div {
  background: rgba(15, 23, 42, 0.45);
  border-radius: 0.6rem;
  padding: 0.45rem 0.65rem;
  border: 1px solid rgba(30, 41, 59, 0.7);
}

.quote-intake-client dt {
  margin: 0;
  font-size: 0.75rem;
  text-transform: uppercase;
  color: #94a3b8;
  letter-spacing: 0.03em;
}

.quote-intake-client dd {
  margin: 0.15rem 0 0;
  font-weight: 600;
  color: #e2e8f0;
}

.ai-worker-layout {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
}

.ai-worker-column {
  flex: 1 1 360px;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.ai-worker-form textarea {
  width: 100%;
  border-radius: 0.75rem;
  border: 1px solid rgba(148, 163, 184, 0.4);
  background: rgba(15, 23, 42, 0.35);
  color: #f8fafc;
  padding: 0.85rem;
  font-size: 0.95rem;
  min-height: 180px;
  resize: vertical;
}

.ai-worker-form textarea:focus {
  outline: 2px solid rgba(96, 165, 250, 0.5);
  outline-offset: 2px;
}

.ai-worker-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
  margin-top: 0.75rem;
}

.ai-worker-status {
  margin: 0;
  font-size: 0.9rem;
  color: #94a3b8;
}

.ai-worker-status.error {
  color: #fca5a5;
}

.ai-worker-stage-list-wrapper h3 {
  margin: 0 0 0.35rem;
}

.ai-worker-stage-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.ai-worker-stage {
  border: 1px solid rgba(148, 163, 184, 0.35);
  border-radius: 0.85rem;
  padding: 0.85rem 1rem;
  background: rgba(15, 23, 42, 0.45);
  transition:
    border-color 0.2s ease,
    background 0.2s ease;
}

.ai-worker-stage-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  font-weight: 600;
  color: #e2e8f0;
}

.ai-worker-stage-dot {
  width: 0.65rem;
  height: 0.65rem;
  border-radius: 50%;
  background: #475569;
  display: inline-flex;
  margin-right: 0.35rem;
}

.ai-worker-stage-label {
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.ai-worker-stage-status {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #94a3b8;
}

.ai-worker-stage p {
  margin: 0.4rem 0 0;
  color: #cbd5f5;
  font-size: 0.9rem;
  line-height: 1.4;
}

.ai-worker-stage--active {
  border-color: rgba(96, 165, 250, 0.7);
  background: rgba(37, 99, 235, 0.2);
}

.ai-worker-stage--active .ai-worker-stage-dot {
  background: #60a5fa;
}

.ai-worker-stage--done {
  border-color: rgba(16, 185, 129, 0.6);
  background: rgba(6, 95, 70, 0.25);
}

.ai-worker-stage--done .ai-worker-stage-dot {
  background: #34d399;
}

.ai-worker-stage--error {
  border-color: rgba(248, 113, 113, 0.7);
  background: rgba(127, 29, 29, 0.3);
}

.ai-worker-stage--error .ai-worker-stage-dot {
  background: #f87171;
}

.ai-worker-output {
  border: 1px solid rgba(148, 163, 184, 0.35);
  border-radius: 0.85rem;
  background: rgba(15, 23, 42, 0.4);
  padding: 1rem 1.25rem;
  min-height: 240px;
  color: #e2e8f0;
}

.ai-worker-output h4 {
  margin: 0 0 0.35rem;
  font-size: 0.95rem;
  color: #cbd5f5;
}

.ai-worker-output p {
  margin: 0 0 0.6rem;
  line-height: 1.45;
}

.ai-worker-trace {
  margin: 1rem 0;
  border: 1px solid rgba(148, 163, 184, 0.3);
  border-radius: 0.75rem;
  background: rgba(15, 23, 42, 0.5);
  padding: 0.5rem 1rem;
}

.ai-worker-trace summary {
  cursor: pointer;
  font-weight: 600;
}

.ai-worker-trace ol {
  margin: 0.5rem 0 0;
  padding-left: 1.5rem;
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: 0.85rem;
  line-height: 1.4;
  white-space: pre-wrap;
  word-break: break-word;
}

.ai-worker-section {
  margin-bottom: 1rem;
}

.ai-worker-client-grid {
  display: grid;
  gap: 0.5rem;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
}

.ai-worker-client-grid div {
  border: 1px solid rgba(30, 41, 59, 0.6);
  border-radius: 0.6rem;
  padding: 0.5rem 0.7rem;
  background: rgba(15, 23, 42, 0.35);
}

.ai-worker-client-grid dt {
  margin: 0;
  font-size: 0.75rem;
  text-transform: uppercase;
  color: #94a3b8;
  letter-spacing: 0.04em;
}

.ai-worker-client-grid dd {
  margin: 0.2rem 0 0;
  font-weight: 600;
  color: #e2e8f0;
}

.ai-worker-issues {
  margin: 0.4rem 0 0.4rem 1.2rem;
  padding: 0;
  list-style: disc;
}

.ai-worker-issues li {
  margin-bottom: 0.3rem;
}

.ai-worker-match-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.ai-worker-match-item {
  border: 1px solid rgba(148, 163, 184, 0.35);
  border-radius: 0.85rem;
  padding: 0.9rem 1rem;
  background: rgba(15, 23, 42, 0.35);
}

.ai-worker-match-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
}

.ai-worker-match-status {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.4);
  background: rgba(15, 23, 42, 0.3);
  color: #cbd5f5;
}

.ai-worker-match-status--hit {
  border-color: rgba(16, 185, 129, 0.6);
  background: rgba(22, 163, 74, 0.2);
  color: #bbf7d0;
}

.ai-worker-match-status--miss {
  border-color: rgba(248, 113, 113, 0.6);
  background: rgba(127, 29, 29, 0.25);
  color: #fecaca;
}

.ai-worker-match-columns {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}

.ai-worker-match-block {
  flex: 1 1 260px;
  border: 1px solid rgba(30, 41, 59, 0.6);
  border-radius: 0.75rem;
  padding: 0.75rem 0.85rem;
  background: rgba(15, 23, 42, 0.35);
}

.ai-worker-match-label {
  margin: 0 0 0.35rem;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #94a3b8;
}

.ai-worker-match-description {
  margin: 0 0 0.4rem;
  line-height: 1.45;
}

.ai-worker-match-missing {
  color: #fecaca;
  font-weight: 600;
}

.ai-worker-product-link {
  display: inline-block;
  margin-top: 0.3rem;
  font-size: 0.85rem;
  color: #60a5fa;
  text-decoration: none;
}

.ai-worker-product-link:hover,
.ai-worker-product-link:focus {
  text-decoration: underline;
}

.ai-worker-semantic {
  margin-top: 0.5rem;
  border: 1px solid rgba(148, 163, 184, 0.35);
  border-radius: 0.65rem;
  background: rgba(15, 23, 42, 0.35);
  padding: 0.4rem 0.75rem;
}

.ai-worker-semantic summary {
  cursor: pointer;
  font-weight: 600;
  color: #e2e8f0;
}

.ai-worker-semantic-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 0.5rem;
  font-size: 0.9rem;
}

.ai-worker-semantic-table th,
.ai-worker-semantic-table td {
  text-align: left;
  padding: 0.35rem 0.4rem;
  border-bottom: 1px solid rgba(30, 41, 59, 0.6);
}

.semantic-product-title {
  font-weight: 600;
}

.semantic-product-sku {
  display: block;
  color: #94a3b8;
}

.semantic-product-rank {
  font-weight: 600;
  color: #94a3b8;
  font-size: 0.85rem;
}

.semantic-check {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.25rem;
  height: 1.25rem;
  border-radius: 999px;
  margin-right: 0.35rem;
  font-size: 0.8rem;
  font-weight: 700;
}

.semantic-check.ok {
  background: rgba(34, 197, 94, 0.15);
  color: #86efac;
  border: 1px solid rgba(34, 197, 94, 0.5);
}

.semantic-check.bad {
  background: rgba(248, 113, 113, 0.15);
  color: #fecaca;
  border: 1px solid rgba(248, 113, 113, 0.4);
}

.semantic-check.neutral {
  background: rgba(148, 163, 184, 0.2);
  color: #cbd5f5;
  border: 1px solid rgba(148, 163, 184, 0.4);
}

.semantic-info {
  display: inline-block;
  min-width: 3ch;
}

.ai-worker-raw {
  background: #0f172a;
  color: #e2e8f0;
  padding: 0.75rem;
  border-radius: 0.6rem;
  border: 1px solid rgba(148, 163, 184, 0.35);
  max-height: 240px;
  overflow: auto;
  font-size: 0.85rem;
}

.quote-table-wrapper {
  overflow-x: auto;
  border-radius: 0.85rem;
  border: 1px solid rgba(30, 41, 59, 0.6);
}

.quote-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 780px;
  background: rgba(2, 6, 23, 0.55);
}

.quote-table th,
.quote-table td {
  padding: 0.7rem 0.85rem;
  border-bottom: 1px solid rgba(51, 65, 85, 0.65);
  text-align: left;
  vertical-align: top;
  font-size: 0.88rem;
}

.quote-table thead tr {
  background: rgba(59, 130, 246, 0.16);
  color: #e2e8f0;
}

.quote-table tbody tr:nth-child(even) {
  background: rgba(15, 23, 42, 0.35);
}

.quote-table tbody tr:hover {
  background: rgba(37, 99, 235, 0.12);
}

.quote-table input,
.quote-table textarea,
.quote-table select {
  width: 100%;
  box-sizing: border-box;
  font-size: 0.85rem;
  background: rgba(15, 23, 42, 0.8);
  border: 1px solid rgba(51, 65, 85, 0.8);
  border-radius: 0.55rem;
  padding: 0.45rem 0.55rem;
  color: #e2e8f0;
}

.quote-table textarea {
  resize: vertical;
  min-height: 2.6rem;
}

.quote-actions-col {
  width: 200px;
  text-align: right;
}

.quote-actions-col button {
  margin-left: 0.35rem;
}

.marketing-page {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  padding: 1.5rem;
}

.marketing-header {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
}

.marketing-header-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.marketing-grid {
  display: grid;
  grid-template-columns: minmax(260px, 320px) 1fr;
  gap: 1.5rem;
  align-content: start;
}

.marketing-switcher {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.marketing-subnav-hint {
  margin: 0;
  font-size: 0.85rem;
  color: rgba(148, 163, 184, 0.85);
}

.marketing-panel {
  display: none;
}

.marketing-panel.active {
  display: block;
}

.marketing-page[data-marketing-active="campaigns"] .marketing-panel[data-marketing-panel="pricing"] {
  display: none;
}

.marketing-page[data-marketing-active="pricing"] .marketing-panel[data-marketing-panel="campaigns"] {
  display: none;
}

.marketing-pricing-layout {
  display: grid;
  grid-template-columns: minmax(0, 360px) minmax(0, 1fr);
  gap: 1.5rem;
  align-items: start;
}

.marketing-pricing-form {
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid rgba(148, 163, 184, 0.25);
  border-radius: 1rem;
  padding: 1.5rem;
  box-shadow: 0 1.25rem 2.5rem rgba(15, 23, 42, 0.35);
}

.marketing-pricing-form-header {
  margin-bottom: 1.25rem;
}

.marketing-pricing-form-header h3 {
  margin: 0 0 0.35rem;
  font-size: 1.1rem;
  color: #f8fafc;
}

.marketing-pricing-form-header p {
  margin: 0;
  color: rgba(148, 163, 184, 0.85);
  font-size: 0.85rem;
}

.marketing-pricing-form label {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  font-weight: 600;
  color: #cbd5f5;
  margin-bottom: 1rem;
  font-size: 0.85rem;
}

.marketing-pricing-form input,
.marketing-pricing-form select,
.marketing-pricing-form textarea {
  width: 100%;
  border-radius: 0.65rem;
  border: 1px solid rgba(71, 85, 105, 0.85);
  background: rgba(15, 23, 42, 0.9);
  color: #e2e8f0;
  padding: 0.55rem 0.7rem;
  font-size: 0.9rem;
  transition:
    border-color 0.2s ease,
    box-shadow 0.2s ease;
}

.marketing-pricing-form input:focus,
.marketing-pricing-form select:focus,
.marketing-pricing-form textarea:focus {
  outline: none;
  border-color: rgba(59, 130, 246, 0.75);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.25);
}

.marketing-pricing-form textarea {
  resize: vertical;
  min-height: 3.25rem;
}

.marketing-pricing-form-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 0.5rem;
}

.marketing-pricing-table {
  background: rgba(15, 23, 42, 0.55);
  border: 1px solid rgba(148, 163, 184, 0.25);
  border-radius: 1rem;
  padding: 1.25rem;
  box-shadow: 0 1.5rem 3rem rgba(15, 23, 42, 0.35);
}

.marketing-pricing-table-header {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
}

.marketing-pricing-table-header h3 {
  margin: 0;
  font-size: 1.05rem;
  color: #f8fafc;
}

.marketing-pricing-table-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
}

.marketing-pricing-table-actions input,
.marketing-pricing-table-actions select {
  border-radius: 0.65rem;
  border: 1px solid rgba(71, 85, 105, 0.85);
  background: rgba(15, 23, 42, 0.85);
  color: #e2e8f0;
  padding: 0.5rem 0.7rem;
  font-size: 0.85rem;
  min-width: 150px;
}

.marketing-pricing-table-wrapper {
  border-radius: 0.85rem;
  border: 1px solid rgba(148, 163, 184, 0.2);
  background: rgba(15, 23, 42, 0.4);
  overflow-x: auto;
}

.marketing-pricing-table table {
  width: 100%;
  border-collapse: collapse;
  min-width: 640px;
}

.marketing-pricing-table th,
.marketing-pricing-table td {
  padding: 0.6rem 0.8rem;
  border-bottom: 1px solid rgba(148, 163, 184, 0.18);
  text-align: left;
  font-size: 0.84rem;
}

.marketing-pricing-table th {
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.72rem;
  color: #cbd5f5;
  background: rgba(30, 41, 59, 0.6);
}

.marketing-pricing-table tbody tr:hover {
  background: rgba(59, 130, 246, 0.1);
}

.marketing-pricing-table tbody tr:last-child td {
  border-bottom: none;
}

.marketing-pricing-actions-col {
  width: 1%;
  white-space: nowrap;
  text-align: right;
}

.marketing-pricing-table .secondary-button.small,
.marketing-pricing-table .action-button.small {
  padding: 0.35rem 0.75rem;
}

.optional {
  font-weight: 500;
  color: rgba(148, 163, 184, 0.7);
  font-size: 0.75rem;
}

@media (max-width: 1200px) {
  .marketing-pricing-layout {
    grid-template-columns: 1fr;
  }

  .marketing-pricing-table-actions {
    width: 100%;
    justify-content: flex-start;
  }
}

.marketing-summary {
  grid-column: 1 / -1;
}

.marketing-preview {
  grid-column: 1 / -1;
}

.marketing-summary-body {
  min-height: 3.5rem;
}

.marketing-summary-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 1rem 1.25rem;
  margin: 0;
}

.marketing-summary-grid dt {
  font-size: 0.72rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #94a3b8;
  margin-bottom: 0.2rem;
}

.marketing-summary-grid dd {
  margin: 0;
  font-size: 0.95rem;
  font-weight: 600;
  color: #f8fafc;
}

.marketing-card {
  background: rgba(15, 23, 42, 0.55);
  border: 1px solid #334155;
  border-radius: 0.85rem;
  padding: 1.2rem 1.4rem;
  display: flex;
  flex-direction: column;
  gap: 1.1rem;
  min-height: 0;
}

.marketing-card-header {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
}

.marketing-card-header h3 {
  margin: 0;
  font-size: 1.05rem;
}

.marketing-card-subtitle {
  margin: 0;
  color: #94a3b8;
  font-size: 0.85rem;
}

.marketing-card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  align-items: center;
}

.marketing-card-actions input[type="search"],
.marketing-card-actions select,
.marketing-card-actions input[type="text"] {
  background: rgba(15, 23, 42, 0.65);
  border: 1px solid rgba(148, 163, 184, 0.3);
  border-radius: 0.55rem;
  color: #e2e8f0;
  padding: 0.45rem 0.65rem;
}

.marketing-toggle {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  font-size: 0.75rem;
  color: #cbd5f5;
}

.marketing-toggle select,
.marketing-toggle input[type="text"],
.marketing-toggle input[type="number"] {
  background: rgba(15, 23, 42, 0.65);
  border: 1px solid rgba(148, 163, 184, 0.3);
  border-radius: 0.55rem;
  color: #e2e8f0;
  padding: 0.45rem 0.6rem;
  min-width: 120px;
}

.marketing-toggle-narrow input[type="number"] {
  min-width: 80px;
}

.marketing-template-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.marketing-template-item {
  border: 1px solid rgba(51, 65, 85, 0.8);
  border-radius: 0.75rem;
  padding: 0.85rem 1rem;
  background: rgba(15, 23, 42, 0.45);
  transition:
    border-color 0.2s ease,
    background 0.2s ease;
  cursor: pointer;
}

.marketing-template-item:hover {
  border-color: rgba(96, 165, 250, 0.8);
  background: rgba(30, 64, 175, 0.18);
}

.marketing-template-item.is-active {
  border-color: rgba(96, 165, 250, 0.95);
  box-shadow: 0 0 0 1px rgba(96, 165, 250, 0.55);
  background: rgba(37, 99, 235, 0.18);
}

.marketing-template-item-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.35rem;
}

.marketing-template-item p {
  margin: 0;
  font-size: 0.85rem;
  color: #cbd5f5;
}

.marketing-template-pill {
  display: inline-flex;
  align-items: center;
  padding: 0.15rem 0.55rem;
  border-radius: 999px;
  background: rgba(96, 165, 250, 0.18);
  color: #bfdbfe;
  font-size: 0.75rem;
  text-transform: capitalize;
}

.marketing-preview-canvas {
  background: rgba(15, 23, 42, 0.35);
  border-radius: 0.75rem;
  border: 1px dashed rgba(148, 163, 184, 0.25);
  padding: 1rem;
  min-height: 320px;
  overflow: auto;
}

.marketing-preview-meta {
  background: rgba(15, 23, 42, 0.4);
  border: 1px solid rgba(148, 163, 184, 0.25);
  border-radius: 0.75rem;
  padding: 0.9rem 1rem;
  transition: border-color 0.2s ease;
}

.marketing-preview-meta.placeholder {
  border-style: dashed;
  color: #94a3b8;
}

.marketing-preview-meta.placeholder p {
  margin: 0;
  font-size: 0.85rem;
}

.marketing-preview-meta-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 0.8rem 1rem;
  margin: 0;
}

.marketing-preview-meta-grid dt {
  margin: 0 0 0.25rem;
  font-size: 0.7rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: #a5b4fc;
}

.marketing-preview-meta-grid dd {
  margin: 0;
  font-size: 0.95rem;
  font-weight: 600;
  color: #f8fafc;
  word-break: break-word;
}

.marketing-preview-email {
  max-width: 720px;
  margin: 0 auto;
  background: #ffffff;
  color: #0f172a;
  border-radius: 1.25rem;
  overflow: hidden;
  box-shadow: 0 24px 55px rgba(15, 23, 42, 0.1);
  border: 1px solid rgba(148, 163, 184, 0.22);
}

.marketing-preview-brand {
  padding: 1.1rem 2.5rem;
  background: #ffffff;
  border-bottom: 1px solid rgba(148, 163, 184, 0.22);
}

.marketing-preview-brand-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.8rem;
  flex-wrap: wrap;
}

.marketing-preview-logo {
  display: flex;
  align-items: center;
}

.marketing-preview-logo img {
  display: block;
  height: 2.4rem;
  width: auto;
}

.marketing-preview-brand-meta {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  font-size: 0.78rem;
  text-align: right;
}

.marketing-preview-brand-tag {
  text-transform: uppercase;
  letter-spacing: 0.22em;
  font-weight: 600;
  color: #2563eb;
}

.marketing-preview-brand-contact {
  font-size: 0.85rem;
  letter-spacing: 0.04em;
  color: #334155;
}

.marketing-preview-hero {
  padding: 2.25rem 2.5rem;
  background: linear-gradient(135deg, #0f172a 0%, #1e3a8a 52%, #2563eb 100%);
  color: #e2e8f0;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.marketing-preview-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.35rem 0.85rem;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.18);
  letter-spacing: 0.14em;
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  margin-bottom: 0.85rem;
  color: #f8fafc;
}

.marketing-preview-hero h4 {
  margin: 0;
  font-size: 1.85rem;
  letter-spacing: 0.01em;
}

.marketing-preview-hero p {
  margin: 0;
  font-size: 1rem;
  color: rgba(241, 245, 249, 0.9);
  max-width: 34rem;
}

.marketing-preview-body {
  background: #f8fafc;
  padding: 2rem 2.4rem;
  display: grid;
  gap: 1.6rem;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.marketing-preview-item {
  position: relative;
  display: flex;
  flex-direction: column;
  background: #ffffff;
  border-radius: 1.1rem;
  border: 1px solid rgba(148, 163, 184, 0.25);
  box-shadow: 0 18px 45px rgba(15, 23, 42, 0.08);
  overflow: hidden;
  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease;
}

.marketing-preview-item:hover {
  transform: translateY(-4px);
  box-shadow: 0 26px 60px rgba(15, 23, 42, 0.12);
}

.marketing-preview-card-image {
  background: #ffffff;
  padding: 1.75rem;
  border-bottom: 1px solid rgba(148, 163, 184, 0.18);
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  min-height: 14rem;
}

.marketing-preview-card-image img {
  display: block;
  width: 100%;
  max-width: 14rem;
  max-height: 12rem;
  object-fit: contain;
  background: #ffffff;
}

.marketing-preview-card-body {
  padding: 1.4rem 1.6rem 1.6rem;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.marketing-preview-card-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #475569;
}

.marketing-preview-chip,
.marketing-preview-status {
  display: inline-flex;
  align-items: center;
  padding: 0.35rem 0.65rem;
  border-radius: 999px;
  font-weight: 600;
}

.marketing-preview-chip {
  background: rgba(37, 99, 235, 0.12);
  color: #1d4ed8;
}

.marketing-preview-status {
  background: rgba(16, 185, 129, 0.14);
  color: #047857;
}

.marketing-preview-card-body h4 {
  margin: 0;
  font-size: 1.05rem;
  color: #0f172a;
  line-height: 1.4;
  min-height: 2.2em;
}

.marketing-preview-card-price {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.6rem;
}

.marketing-preview-price {
  font-size: 1.35rem;
  font-weight: 700;
  color: #0f172a;
}

.marketing-preview-change {
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  padding: 0.3rem 0.75rem;
  border-radius: 999px;
  background: rgba(37, 99, 235, 0.12);
  color: #1d4ed8;
}

.marketing-preview-change--drop {
  background: rgba(220, 38, 38, 0.12);
  color: #b91c1c;
}

.marketing-preview-change--increase {
  background: rgba(251, 191, 36, 0.18);
  color: #b45309;
}

.marketing-preview-change--restock {
  background: rgba(14, 165, 233, 0.16);
  color: #0369a1;
}

.marketing-preview-change--new {
  background: rgba(168, 85, 247, 0.16);
  color: #6d28d9;
}

.marketing-preview-change--note {
  background: rgba(15, 23, 42, 0.1);
  color: #0f172a;
}

.marketing-preview-email.layout-spotlight .marketing-preview-body {
  display: flex;
  flex-direction: column;
  gap: 1.4rem;
  padding: 2.2rem 2.5rem;
}

.marketing-preview-email.layout-spotlight .marketing-preview-item {
  flex-direction: row;
  align-items: center;
  border-radius: 1rem;
  box-shadow: 0 20px 48px rgba(15, 23, 42, 0.12);
}

.marketing-preview-email.layout-spotlight .marketing-preview-item:not(:first-child) {
  border-color: rgba(148, 163, 184, 0.22);
  box-shadow: 0 14px 32px rgba(15, 23, 42, 0.08);
}

.marketing-preview-email.layout-spotlight .marketing-preview-item:first-child {
  background: linear-gradient(135deg,
      rgba(37, 99, 235, 0.95),
      rgba(14, 165, 233, 0.9));
  border-color: rgba(37, 99, 235, 0.4);
  box-shadow: 0 30px 60px rgba(14, 116, 233, 0.35);
}

.marketing-preview-email.layout-spotlight .marketing-preview-item:first-child .marketing-preview-card-body h4,
.marketing-preview-email.layout-spotlight .marketing-preview-item:first-child .marketing-preview-price,
.marketing-preview-email.layout-spotlight .marketing-preview-item:first-child .marketing-preview-card-sku {
  color: #f8fafc;
}

.marketing-preview-email.layout-spotlight .marketing-preview-item:first-child .marketing-preview-chip,
.marketing-preview-email.layout-spotlight .marketing-preview-item:first-child .marketing-preview-status,
.marketing-preview-email.layout-spotlight .marketing-preview-item:first-child .marketing-preview-change {
  background: rgba(15, 23, 42, 0.18);
  color: #f8fafc;
}

.marketing-preview-email.layout-spotlight .marketing-preview-card-image {
  min-height: auto;
  border-bottom: none;
  border-right: 1px solid rgba(148, 163, 184, 0.2);
  width: 15rem;
  max-width: 15rem;
  padding: 1.6rem;
}

.marketing-preview-email.layout-spotlight .marketing-preview-item:first-child .marketing-preview-card-image {
  border-right: 1px solid rgba(248, 250, 252, 0.25);
}

.marketing-preview-email.layout-spotlight .marketing-preview-card-body {
  padding: 1.6rem 2rem;
  gap: 0.8rem;
}

.marketing-preview-email.layout-spotlight .marketing-preview-card-meta {
  font-size: 0.62rem;
  letter-spacing: 0.12em;
}

.marketing-preview-email.layout-spotlight .marketing-preview-card-price {
  justify-content: flex-start;
  gap: 0.9rem;
}

.marketing-preview-email.layout-minimal {
  border-radius: 1.15rem;
  border: 1px solid rgba(226, 232, 240, 0.8);
  box-shadow: 0 16px 38px rgba(15, 23, 42, 0.08);
}

.marketing-preview-email.layout-minimal .marketing-preview-brand {
  border-bottom: 1px solid rgba(226, 232, 240, 0.8);
}

.marketing-preview-email.layout-minimal .marketing-preview-hero {
  background: #ffffff;
  color: #0f172a;
  padding: 2rem 2.3rem;
  border-bottom: 1px solid rgba(226, 232, 240, 0.8);
}

.marketing-preview-email.layout-minimal .marketing-preview-hero p {
  color: #475569;
}

.marketing-preview-email.layout-minimal .marketing-preview-badge {
  display: none;
}

.marketing-preview-email.layout-minimal .marketing-preview-body {
  background: #ffffff;
  padding: 1.8rem 2.2rem;
  display: flex;
  flex-direction: column;
  gap: 1.1rem;
}

.marketing-preview-email.layout-minimal .marketing-preview-item {
  flex-direction: row;
  align-items: flex-start;
  background: transparent;
  border: 0;
  border-bottom: 1px solid rgba(203, 213, 225, 0.75);
  border-radius: 0;
  box-shadow: none;
  padding-bottom: 1.1rem;
}

.marketing-preview-email.layout-minimal .marketing-preview-item:last-child {
  border-bottom: none;
}

.marketing-preview-email.layout-minimal .marketing-preview-card-image {
  border: none;
  background: transparent;
  padding: 1rem 1.2rem;
  width: 12rem;
  max-width: 12rem;
  min-height: auto;
}

.marketing-preview-email.layout-minimal .marketing-preview-card-image img {
  max-height: 7rem;
}

.marketing-preview-email.layout-minimal .marketing-preview-card-body {
  padding: 0 1.4rem;
  gap: 0.6rem;
}

.marketing-preview-email.layout-minimal .marketing-preview-card-meta {
  font-size: 0.6rem;
  letter-spacing: 0.1em;
  color: #64748b;
}

.marketing-preview-email.layout-minimal .marketing-preview-card-body h4 {
  font-size: 1rem;
}

.marketing-preview-email.layout-minimal .marketing-preview-card-price {
  justify-content: space-between;
  width: 100%;
  gap: 0.6rem;
}

.marketing-preview-email.layout-minimal .marketing-preview-price {
  font-size: 1.1rem;
}

.marketing-preview-email.layout-minimal .marketing-preview-change {
  padding: 0.2rem 0.55rem;
  font-size: 0.7rem;
}

.marketing-preview-email.layout-minimal .marketing-preview-card-sku {
  order: -1;
  font-size: 0.66rem;
  letter-spacing: 0.06em;
}

.marketing-preview-email.layout-minimal .marketing-preview-banner {
  background: #f8fafc;
  border: 1px dashed rgba(148, 163, 184, 0.5);
  box-shadow: none;
}

.marketing-preview-card-sku {
  margin: 0;
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #94a3b8;
}

.marketing-preview-footer {
  padding: 2rem 2.2rem 2.4rem;
  background: #0f172a;
  color: #e2e8f0;
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 1.4rem;
}

.marketing-preview-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  padding: 0.85rem 2.3rem;
  border-radius: 999px;
  background: linear-gradient(135deg, #f97316, #fb923c);
  color: #ffffff;
  text-decoration: none;
  font-weight: 700;
  letter-spacing: 0.06em;
  margin-bottom: 0.75rem;
  box-shadow: 0 14px 25px rgba(249, 115, 22, 0.28);
  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease;
}

.marketing-preview-cta:hover {
  transform: translateY(-2px);
  box-shadow: 0 20px 36px rgba(249, 115, 22, 0.32);
}

.marketing-preview-footnote {
  margin: 0;
  font-size: 0.78rem;
  color: rgba(226, 232, 240, 0.75);
  letter-spacing: 0.03em;
}

.marketing-preview-footer-cta {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  align-items: center;
}

.marketing-preview-footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1.4rem;
  text-align: left;
}

.marketing-preview-footer-grid h5 {
  margin: 0 0 0.4rem;
  font-size: 0.9rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(226, 232, 240, 0.78);
}

.marketing-preview-footer-grid p {
  margin: 0.2rem 0;
  font-size: 0.85rem;
  color: rgba(226, 232, 240, 0.85);
}

.marketing-preview-footer-legal {
  margin: 0;
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(148, 163, 184, 0.9);
}

.marketing-preview-empty {
  margin: 0;
  padding: 2.5rem;
  border-radius: 1rem;
  border: 1px dashed rgba(148, 163, 184, 0.35);
  text-align: center;
  color: #475569;
  background: rgba(255, 255, 255, 0.9);
  grid-column: 1 / -1;
}

.marketing-preview-banner {
  grid-column: 1 / -1;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 1rem;
  padding: 1.5rem 1.7rem;
  border-radius: 1.1rem;
  box-shadow: 0 18px 45px rgba(15, 23, 42, 0.08);
  border: 1px solid rgba(148, 163, 184, 0.25);
  background: linear-gradient(135deg,
      rgba(248, 250, 252, 0.95),
      rgba(226, 232, 240, 0.95));
}

.marketing-preview-banner--primary {
  background: linear-gradient(135deg,
      rgba(37, 99, 235, 0.08),
      rgba(14, 165, 233, 0.18));
  border-color: rgba(37, 99, 235, 0.3);
}

.marketing-preview-banner--secondary {
  background: linear-gradient(135deg,
      rgba(236, 72, 153, 0.08),
      rgba(236, 72, 153, 0.2));
  border-color: rgba(236, 72, 153, 0.25);
}

.marketing-preview-banner-body h5 {
  margin: 0 0 0.35rem;
  font-size: 1rem;
  color: #0f172a;
}

.marketing-preview-banner-body p {
  margin: 0;
  font-size: 0.85rem;
  color: #475569;
}

.marketing-preview-banner-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  padding: 0.6rem 1.6rem;
  border-radius: 999px;
  background: linear-gradient(135deg, #2563eb, #0ea5e9);
  color: #ffffff;
  text-decoration: none;
  font-weight: 600;
  letter-spacing: 0.04em;
  box-shadow: 0 14px 28px rgba(37, 99, 235, 0.25);
  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease;
}

.marketing-preview-banner-cta:hover {
  transform: translateY(-2px);
  box-shadow: 0 20px 36px rgba(37, 99, 235, 0.28);
}

@media (min-width: 540px) {
  .marketing-preview-banner {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }

  .marketing-preview-brand {
    padding: 1.1rem 2rem;
  }
}

@media only screen and (max-width: 720px) {
  .marketing-preview-brand-inner {
    gap: 1rem;
  }

  .marketing-preview-brand-meta {
    width: 100%;
    text-align: left;
  }
}

@media only screen and (max-width: 600px) {
  .marketing-preview-brand {
    padding: 1rem 1.4rem;
  }

  .marketing-preview-body {
    padding: 1.6rem;
    gap: 1.2rem;
  }

  .marketing-preview-card-image {
    min-height: 11rem;
    padding: 1.25rem;
  }

  .marketing-preview-hero {
    padding: 1.9rem;
  }

  .marketing-preview-footer {
    padding: 1.6rem 1.4rem 1.9rem;
  }

  .marketing-preview-footer-grid {
    gap: 1rem;
  }

  .marketing-preview-email.layout-spotlight .marketing-preview-body,
  .marketing-preview-email.layout-minimal .marketing-preview-body {
    padding: 1.6rem;
  }

  .marketing-preview-email.layout-spotlight .marketing-preview-item,
  .marketing-preview-email.layout-minimal .marketing-preview-item {
    flex-direction: column;
  }

  .marketing-preview-email.layout-spotlight .marketing-preview-card-image,
  .marketing-preview-email.layout-minimal .marketing-preview-card-image {
    width: 100%;
    max-width: 100%;
    border-right: none;
    border-bottom: 1px solid rgba(148, 163, 184, 0.18);
  }

  .marketing-preview-email.layout-minimal .marketing-preview-card-body,
  .marketing-preview-email.layout-spotlight .marketing-preview-card-body {
    padding: 1.2rem 1.4rem;
  }

  .marketing-preview-email.layout-spotlight .marketing-preview-item:first-child {
    box-shadow: 0 20px 42px rgba(14, 116, 233, 0.28);
  }
}

.marketing-automation-list {
  display: grid;
  gap: 0.9rem;
}

.marketing-automation-item {
  border: 1px solid rgba(51, 65, 85, 0.75);
  border-radius: 0.75rem;
  padding: 1rem 1.1rem;
  background: rgba(15, 23, 42, 0.55);
  display: grid;
  gap: 0.55rem;
}

.marketing-automation-item header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.5rem;
}

.marketing-automation-item h4 {
  margin: 0;
  font-size: 0.95rem;
}

.marketing-automation-status {
  border-radius: 999px;
  padding: 0.15rem 0.55rem;
  font-size: 0.75rem;
  text-transform: capitalize;
}

.marketing-automation-status.status-scheduled {
  background: rgba(34, 197, 94, 0.18);
  color: #86efac;
  border: 1px solid rgba(34, 197, 94, 0.35);
}

.marketing-automation-status.status-paused {
  background: rgba(234, 179, 8, 0.16);
  color: #fde68a;
  border: 1px solid rgba(234, 179, 8, 0.35);
}

.marketing-automation-status.status-draft {
  background: rgba(148, 163, 184, 0.16);
  color: #cbd5f5;
  border: 1px solid rgba(148, 163, 184, 0.35);
}

.marketing-automation-item dl {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 0.5rem 1rem;
  margin: 0;
}

.marketing-automation-item dt {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #94a3b8;
}

.marketing-automation-item dd {
  margin: 0;
  font-size: 0.85rem;
}

.marketing-automations {
  grid-column: 1 / -1;
}

@media (max-width: 1100px) {
  .marketing-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .marketing-automations {
    grid-column: auto;
  }
}

.quote-lines-empty td {
  text-align: center;
  color: #94a3b8;
  font-style: italic;
}

@media (max-width: 900px) {
  .quote-main-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
  }

  .quote-heading {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.75rem;
  }

  .quote-number-badge {
    align-self: flex-start;
  }

  .quote-financial-summary {
    width: 100%;
  }
}

.quote-subsection {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.quote-subsection h4 {
  margin: 0;
  font-size: 0.95rem;
  color: #bfdbfe;
}

.quote-terms-list {
  margin: 0;
  padding-left: 1.1rem;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.quote-terms-list li {
  color: #cbd5f5;
  line-height: 1.4;
}

.quote-banking-table {
  width: 100%;
  border-collapse: collapse;
}

.quote-banking-table th,
.quote-banking-table td {
  padding: 0.4rem 0.5rem;
  border-bottom: 1px solid #1e293b;
  text-align: left;
}

.quote-summary {
  gap: 0.75rem;
}

.quote-summary-list {
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.quote-summary-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 0.75rem;
  font-size: 0.95rem;
  color: #dbeafe;
}

.quote-summary-row dt {
  margin: 0;
}

.quote-summary-row dd {
  margin: 0;
  font-weight: 600;
  color: #f1f5f9;
}

.quote-summary-total {
  padding-top: 0.35rem;
  border-top: 1px solid rgba(37, 99, 235, 0.35);
}

.quote-summary-total dd {
  font-size: 1.15rem;
  color: #bfdbfe;
}

.quote-summary-metric dt {
  color: #93c5fd;
}

.quote-summary-metric dd {
  color: #38bdf8;
  font-weight: 700;
}

.quote-company-profile {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  font-size: 0.85rem;
  color: #94a3b8;
}

.quote-company-profile strong {
  color: #bfdbfe;
}

.quote-thank-you-preview {
  margin-top: 0.5rem;
  padding: 0.65rem 0.75rem;
  border: 1px dashed rgba(148, 163, 184, 0.4);
  border-radius: 0.75rem;
  background: rgba(15, 23, 42, 0.35);
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.quote-thank-you-preview p {
  margin: 0;
  color: #e2e8f0;
}

.quote-card button {
  align-self: flex-start;
}

.status-error {
  color: #fca5a5;
}

.quote-layout {
  display: grid;
  grid-template-columns: 320px minmax(0, 1fr);
  gap: 2rem;
  align-items: start;
  width: 100%;
}

@media (max-width: 1180px) {
  .quote-layout {
    grid-template-columns: 1fr;
  }
}

.quote-sidebar {
  background: linear-gradient(165deg,
      rgba(10, 18, 32, 0.95),
      rgba(15, 23, 42, 0.9));
  border: 1px solid rgba(51, 65, 85, 0.85);
  border-radius: 1rem;
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 1.1rem;
  max-height: calc(100vh - 180px);
  overflow: hidden;
  box-shadow: 0 24px 48px rgba(2, 6, 23, 0.55);
}

.quote-sidebar-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.85rem;
}

.quote-sidebar-filters {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.quote-sidebar-filters input,
.quote-sidebar-filters select {
  width: 100%;
  border-radius: 0.65rem;
}

.quote-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  overflow: auto;
}

.quote-list-item {
  padding: 0.85rem;
  border-radius: 0.85rem;
  border: 1px solid rgba(51, 65, 85, 0.6);
  background: rgba(17, 24, 39, 0.75);
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  cursor: pointer;
  transition:
    border 0.2s ease,
    background 0.2s ease;
}

.quote-list-item:hover {
  border-color: rgba(96, 165, 250, 0.6);
  background: rgba(30, 41, 59, 0.9);
}

.quote-list-item.active {
  border-color: rgba(96, 165, 250, 0.85);
  background: rgba(37, 99, 235, 0.22);
}

.quote-list-status {
  font-size: 0.7rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 0.18rem 0.55rem;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.22);
}

.status-draft {
  color: #cbd5f5;
}

.status-sent {
  color: #fcd34d;
}

.status-accepted {
  color: #4ade80;
}

.status-lost {
  color: #f87171;
}

.quote-list-meta {
  display: flex;
  justify-content: space-between;
  font-size: 0.82rem;
  color: #cbd5f5;
}

.quote-main {
  display: flex;
  flex-direction: column;
  gap: 1.75rem;
  background: linear-gradient(165deg,
      rgba(6, 12, 24, 0.88),
      rgba(15, 23, 42, 0.86));
  border: 1px solid rgba(51, 65, 85, 0.75);
  border-radius: 1.25rem;
  padding: 1.8rem 2rem 2.2rem;
  box-shadow: 0 32px 48px rgba(2, 6, 23, 0.55);
  min-width: 0;
}

.quote-main-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1.75rem;
}

.quote-heading {
  display: inline-flex;
  align-items: center;
  gap: 1.25rem;
}

.quote-number-badge {
  padding: 0.4rem 1rem;
  border-radius: 999px;
  background: linear-gradient(135deg,
      rgba(59, 130, 246, 0.3),
      rgba(14, 165, 233, 0.3));
  border: 1px solid rgba(59, 130, 246, 0.45);
  color: #e2e8f0;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.35);
}

.quote-main-header h2 {
  margin: 0;
  font-size: 1.4rem;
  letter-spacing: -0.01em;
}

.quote-header-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  align-items: center;
}

.quote-status-select {
  background: rgba(30, 41, 59, 0.85);
  border: 1px solid rgba(96, 165, 250, 0.35);
  border-radius: 999px;
  padding: 0.45rem 1.25rem;
  color: #f1f5f9;
  font-weight: 600;
  box-shadow: inset 0 0 0 1px rgba(15, 23, 42, 0.45);
}

.quote-field-small input {
  width: 80px;
}

.quote-lines-empty td {
  text-align: center;
  color: #94a3b8;
  font-style: italic;
}

.quote-line-note input {
  width: 100%;
}

.quote-total-cell {
  font-weight: 600;
  text-align: right;
}

.quote-input-number {
  text-align: right;
}

input[data-field="costPrice"],
input[data-field="unitPrice"] {
  min-width: 110px;
}

input[data-field="marginPercent"] {
  min-width: 90px;
}

.quote-textarea {
  width: 100%;
  box-sizing: border-box;
  background: #0f172a;
  border: 1px solid #334155;
  border-radius: 0.4rem;
  padding: 0.4rem 0.6rem;
  color: inherit;
}

.quote-product-drawer {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.85);
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  z-index: 100;
}

.quote-product-drawer.hidden {
  display: none;
}

.quote-product-panel {
  width: min(1380px, 96vw);
  max-height: 90vh;
  background: rgba(15, 23, 42, 0.92);
  border: 1px solid rgba(59, 130, 246, 0.35);
  border-radius: 1rem;
  padding: 1.5rem;
  box-shadow:
    0 28px 60px rgba(15, 23, 42, 0.55),
    inset 0 0 0 1px rgba(59, 130, 246, 0.15);
  display: flex;
  flex-direction: column;
  gap: 1rem;
  backdrop-filter: blur(18px);
  position: relative;
  overflow: hidden;
}

.quote-product-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.quote-product-search {
  display: grid;
  grid-template-columns: 1fr 180px auto auto;
  gap: 0.75rem;
}

.quote-product-results {
  flex: 1;
  overflow: auto;
  border: 1px solid #334155;
  border-radius: 0.75rem;
  background: rgba(15, 23, 42, 0.6);
}

.quote-product-results table {
  width: 100%;
  border-collapse: collapse;
}

.quote-product-results th,
.quote-product-results td {
  padding: 0.55rem 0.65rem;
  border-bottom: 1px solid #1e293b;
  font-size: 0.85rem;
}

.quote-product-results tbody tr:hover {
  background: rgba(37, 99, 235, 0.12);
}

.quote-product-actions {
  display: flex;
  justify-content: flex-end;
}

.quote-field-small span {
  font-size: 0.7rem;
}

.action-button.is-primary {
  box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.35);
}

.quote-products-layout {
  width: 100%;
  max-height: 74vh;
}

.quote-product-panel::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 20% -10%,
      rgba(59, 130, 246, 0.18),
      transparent 55%),
    radial-gradient(circle at 85% 110%,
      rgba(14, 165, 233, 0.18),
      transparent 45%);
  pointer-events: none;
}

#quote-product-category-tree.placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  min-height: 160px;
  color: #94a3b8;
  font-style: italic;
}

#quote-product-category-tree details {
  border-left: 1px solid rgba(59, 130, 246, 0.18);
  margin-left: 0.5rem;
  padding-left: 0.75rem;
}

.quote-paste-modal {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.88);
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  z-index: 110;
}

.quote-paste-modal.hidden {
  display: none;
}

.quote-paste-dialog {
  width: min(720px, 94vw);
  max-height: 90vh;
  padding: 1.5rem;
  border-radius: 1rem;
  background: rgba(15, 23, 42, 0.95);
  border: 1px solid rgba(148, 163, 184, 0.35);
  box-shadow:
    0 28px 60px rgba(15, 23, 42, 0.55),
    inset 0 0 0 1px rgba(59, 130, 246, 0.1);
  display: flex;
  flex-direction: column;
  gap: 1rem;
  backdrop-filter: blur(14px);
}

.quote-paste-header h3 {
  margin: 0 0 0.4rem;
}

.quote-paste-header p {
  margin: 0;
  color: #94a3b8;
  font-size: 0.85rem;
}

.quote-paste-dialog textarea {
  min-height: 240px;
  resize: vertical;
  font-family:
    "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas,
    "Liberation Mono", "Courier New", monospace;
}

.quote-paste-errors {
  min-height: 1.2rem;
  color: #fca5a5;
  font-size: 0.85rem;
  white-space: pre-line;
}

.quote-paste-footer {
  display: flex;
  justify-content: flex-end;
  gap: 0.75rem;
}

#quote-product-category-tree summary {
  cursor: pointer;
}

#quote-product-category-tree .product-category-label.active {
  color: #38bdf8;
}

#quote-product-category-tree .product-category-label.has-children::after {
  content: "▾";
  font-size: 0.7rem;
  margin-left: 0.4rem;
  opacity: 0.6;
}

#quote-product-category-tree .product-category-label.active.has-children::after {
  transform: rotate(180deg);
}

#quote-product-dynamic-filters {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

#quote-product-dynamic-filters .filter-checkbox-group {
  border: 1px solid rgba(59, 130, 246, 0.12);
  border-radius: 0.6rem;
  padding: 0.75rem;
  background: rgba(15, 23, 42, 0.55);
}

#quote-product-dynamic-filters .filter-checkbox-group h4 {
  margin: 0 0 0.5rem;
  font-size: 0.85rem;
  color: #cbd5f5;
}

.quote-products-layout .product-filters {
  overflow: auto;
}

.quote-category-placeholder {
  padding: 0.75rem;
  border: 1px dashed #334155;
  border-radius: 0.75rem;
  background: rgba(15, 23, 42, 0.25);
  font-size: 0.8rem;
  color: #94a3b8;
}

.quote-filter-group {
  margin-top: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.quote-products-results .panel-body {
  max-height: 58vh;
  overflow: auto;
}

.quote-products-results table th,
.quote-products-results table td {
  vertical-align: middle;
  font-size: 0.85rem;
}

.quote-offer-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  padding: 0.1rem 0.45rem;
  margin-left: 0.45rem;
  border-radius: 999px;
  background: rgba(14, 165, 233, 0.18);
  color: #38bdf8;
  font-size: 0.68rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 600;
}

.quote-product-thumb {
  width: 48px;
  height: 48px;
  object-fit: cover;
  border-radius: 0.5rem;
  border: 1px solid rgba(148, 163, 184, 0.35);
  background: rgba(15, 23, 42, 0.8);
}

.quote-products-results .panel-header form {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
}

.quote-products-results .panel-header form input,
.quote-products-results .panel-header form select {
  background: #0f172a;
  border: 1px solid #334155;
  border-radius: 0.6rem;
  padding: 0.45rem 0.65rem;
  color: inherit;
}

.quote-products-results .panel-header-buttons {
  display: flex;
  align-items: center;
  gap: 0.55rem;
}

.quote-products-results table td:first-child,
.quote-products-results table th:first-child {
  width: 32px;
  text-align: center;
}

.feed-schedule-modal {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.88);
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  z-index: 110;
}

.feed-schedule-modal.hidden {
  display: none;
}

.feed-schedule-dialog {
  width: min(900px, 96vw);
  max-height: min(88vh, 720px);
  padding: 1.5rem;
  border-radius: 1rem;
  background: rgba(15, 23, 42, 0.95);
  border: 1px solid rgba(59, 130, 246, 0.25);
  box-shadow:
    0 28px 60px rgba(15, 23, 42, 0.55),
    inset 0 0 0 1px rgba(59, 130, 246, 0.12);
  display: flex;
  flex-direction: column;
  gap: 1rem;
  backdrop-filter: blur(16px);
  overflow: hidden;
}

.feed-schedule-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
}

.feed-schedule-header h3 {
  margin: 0;
}

.feed-schedule-subtitle {
  margin: 0.3rem 0 0;
  color: #94a3b8;
  font-size: 0.85rem;
}

.feed-schedule-form {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  flex: 1;
  overflow-y: auto;
  padding-right: 0.5rem;
}

.feed-schedule-grid {
  display: grid;
  gap: 1.25rem;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: start;
}

@media (max-width: 760px) {
  .feed-schedule-grid {
    grid-template-columns: 1fr;
  }
}

.feed-schedule-column {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.feed-schedule-field {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  font-size: 0.85rem;
}

.feed-schedule-field span {
  color: #94a3b8;
}

.feed-schedule-field input,
.feed-schedule-field select {
  padding: 0.45rem 0.6rem;
  border-radius: 0.6rem;
  border: 1px solid #334155;
  background: rgba(15, 23, 42, 0.85);
  color: inherit;
}

.feed-schedule-field small {
  color: #64748b;
  font-size: 0.75rem;
}

.feed-schedule-toggle {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.45rem 0.6rem;
  border-radius: 0.6rem;
  border: 1px dashed rgba(59, 130, 246, 0.25);
  background: rgba(15, 23, 42, 0.65);
}

.feed-schedule-toggle label {
  font-size: 0.85rem;
  color: #cbd5f5;
}

.feed-schedule-meta {
  margin-top: 0.25rem;
  display: grid;
  gap: 0.35rem 0.6rem;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  background: rgba(30, 41, 59, 0.5);
  border: 1px solid rgba(59, 130, 246, 0.18);
  border-radius: 0.65rem;
  padding: 0.6rem 0.7rem;
  font-size: 0.76rem;
}

.feed-schedule-meta .meta-item {
  display: flex;
  flex-direction: column;
  gap: 0.05rem;
}

.feed-schedule-meta .meta-item span {
  color: #94a3b8;
  letter-spacing: 0.01em;
  text-transform: uppercase;
  font-size: 0.7rem;
}

.feed-schedule-meta .meta-item strong,
.feed-schedule-meta .meta-item code {
  color: #e2e8f0;
  font-weight: 600;
  font-size: 0.88rem;
}

.feed-schedule-meta code {
  background: rgba(15, 23, 42, 0.55);
  border-radius: 0.45rem;
  padding: 0.2rem 0.35rem;
  font-size: 0.72rem;
  word-break: break-word;
}

.feed-schedule-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.feed-schedule-actions {
  display: flex;
  gap: 0.75rem;
  align-items: center;
}

.feed-history-modal {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.88);
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  z-index: 110;
}

.feed-history-modal.hidden {
  display: none;
}

.feed-history-dialog {
  width: min(960px, 97vw);
  max-width: 960px;
  max-height: min(90vh, 860px);
  padding: 1.5rem;
  border-radius: 1rem;
  background: rgba(15, 23, 42, 0.95);
  border: 1px solid rgba(59, 130, 246, 0.25);
  box-shadow:
    0 28px 60px rgba(15, 23, 42, 0.55),
    inset 0 0 0 1px rgba(59, 130, 246, 0.12);
  display: flex;
  flex-direction: column;
  gap: 1rem;
  backdrop-filter: blur(16px);
  overflow: hidden;
}

.feed-history-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.feed-history-header h3 {
  margin: 0;
}

.feed-history-body {
  flex: 1;
  overflow-y: auto;
  padding-right: 0.35rem;
}

.feed-history-empty {
  margin: 0;
  padding: 2rem 1rem;
  text-align: center;
  color: #94a3b8;
  font-size: 0.95rem;
}

.feed-history-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.feed-history-entry {
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 0.65rem;
  padding: 0.65rem 0.75rem;
  display: grid;
  gap: 0.25rem;
  background: rgba(15, 23, 42, 0.88);
}

.feed-history-entry header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}

.feed-history-entry header h4 {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  margin: 0;
  font-size: 0.95rem;
}

.feed-history-entry time {
  font-size: 0.75rem;
  color: #94a3b8;
  white-space: nowrap;
}

.feed-history-entry pre {
  margin: 0;
  padding: 0.6rem;
  background: rgba(30, 41, 59, 0.55);
  border-radius: 0.55rem;
  overflow-x: auto;
  font-size: 0.78rem;
}

.feed-history-entry .feed-history-stats,
.feed-history-entry .feed-history-links {
  display: grid;
  gap: 0.4rem;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  font-size: 0.82rem;
  color: #94a3b8;
}

.feed-history-entry .feed-history-stats div,
.feed-history-entry .feed-history-links div {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.feed-history-entry .feed-history-stats strong,
.feed-history-entry .feed-history-links strong {
  color: #e2e8f0;
  font-weight: 600;
  word-break: break-word;
}

.feed-history-entry .feed-history-links a {
  color: #60a5fa;
  text-decoration: none;
  word-break: break-word;
}

.feed-history-entry .feed-history-links a:hover {
  text-decoration: underline;
}

.analytics-layout {
  display: grid;
  gap: 1.5rem;
  grid-template-columns: repeat(auto-fit, minmax(420px, 1fr));
  align-items: start;
}

.analytics-view-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.analytics-range-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  background: rgba(15, 23, 42, 0.65);
  border: 1px solid rgba(59, 130, 246, 0.2);
  border-radius: 0.9rem;
  padding: 0.9rem 1.1rem;
  margin-bottom: 1.25rem;
}

.analytics-range-section {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem;
}

.analytics-range-label {
  font-size: 0.85rem;
  font-weight: 600;
  color: #e2e8f0;
}

.analytics-range-presets {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  background: rgba(30, 41, 59, 0.65);
  border-radius: 999px;
  padding: 0.25rem;
  border: 1px solid rgba(59, 130, 246, 0.25);
}

.analytics-range-toolbar .analytics-range-button {
  padding: 0.3rem 0.9rem;
  font-size: 0.8rem;
}

.analytics-range-toolbar .analytics-range-button.active {
  box-shadow: 0 10px 24px rgba(59, 130, 246, 0.25);
}

.analytics-range-custom {
  margin-left: auto;
  gap: 0.65rem;
}

.analytics-range-field {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  font-size: 0.8rem;
  color: #94a3b8;
}

.analytics-range-field input[type="date"] {
  background: rgba(15, 23, 42, 0.85);
  border: 1px solid rgba(100, 116, 139, 0.5);
  border-radius: 0.65rem;
  padding: 0.35rem 0.6rem;
  color: #e2e8f0;
  font: inherit;
  min-width: 150px;
}

.analytics-ribbon-range .analytics-range-toolbar {
  background: transparent;
  border: 0;
  padding: 0;
  margin: 0;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.analytics-ribbon-range .analytics-range-presets {
  padding: 0.18rem 0.25rem;
  gap: 0.25rem;
  background: rgba(30, 41, 59, 0.6);
  border-radius: 999px;
  border: 1px solid rgba(59, 130, 246, 0.2);
}

.analytics-ribbon-range .analytics-range-toolbar .analytics-range-button {
  padding: 0.26rem 0.65rem;
  font-size: 0.74rem;
}

.analytics-ribbon-range .analytics-range-custom {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  margin-left: 0;
}

.analytics-ribbon-range .analytics-range-field {
  display: inline-flex;
  align-items: center;
  gap: 0.2rem;
  font-size: 0.72rem;
  color: #a5b4fc;
}

.analytics-ribbon-range .analytics-range-field span {
  font-weight: 500;
  color: #94a3b8;
}

.analytics-ribbon-range .analytics-range-field input[type="date"] {
  min-width: 128px;
  padding: 0.3rem 0.5rem;
  border-radius: 0.55rem;
  font-size: 0.75rem;
}

.analytics-ribbon-range .analytics-range-actions {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
}

.analytics-range-actions .secondary-button.small {
  padding: 0.3rem 0.75rem;
  font-size: 0.75rem;
  line-height: 1;
}

.analytics-range-actions .link-button.small {
  font-size: 0.72rem;
  padding: 0.2rem 0.45rem;
  line-height: 1;
}

.analytics-ribbon-range .analytics-range-summary {
  font-size: 0.72rem;
  color: #94a3b8;
  margin-left: 0;
  min-width: 0;
  font-style: italic;
}

.analytics-field-dropdown {
  position: relative;
}

.analytics-field-dropdown-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.analytics-field-dropdown-panel {
  position: absolute;
  top: calc(100% + 0.4rem);
  left: 0;
  width: 320px;
  max-height: 360px;
  background: rgba(3, 13, 28, 0.95);
  border: 1px solid rgba(59, 130, 246, 0.35);
  border-radius: 0.9rem;
  padding: 0.75rem;
  box-shadow: 0 28px 48px rgba(2, 6, 23, 0.45);
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  z-index: 80;
}

.analytics-field-dropdown-panel[hidden] {
  display: none;
}

.analytics-field-dropdown-search {
  width: 100%;
  background: rgba(15, 23, 42, 0.85);
  border: 1px solid rgba(59, 130, 246, 0.25);
  border-radius: 0.6rem;
  padding: 0.4rem 0.55rem;
  color: #e2e8f0;
  font-size: 0.78rem;
}

.analytics-field-dropdown-search::placeholder {
  color: rgba(148, 163, 184, 0.7);
}

.analytics-field-dropdown-groups {
  flex: 1 1 auto;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
  padding-right: 0.2rem;
}

.analytics-field-dropdown-group {
  background: rgba(15, 23, 42, 0.45);
  border: 1px solid rgba(59, 130, 246, 0.2);
  border-radius: 0.75rem;
  padding: 0.55rem 0.6rem;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.analytics-field-dropdown-group.is-current {
  border-color: rgba(59, 130, 246, 0.5);
  box-shadow: 0 6px 18px rgba(37, 99, 235, 0.25);
}

.analytics-field-dropdown-group header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #93c5fd;
  margin: 0;
}

.analytics-field-group-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.2rem 0.45rem;
  border-radius: 999px;
  background: rgba(59, 130, 246, 0.25);
  color: #e0f2fe;
  font-size: 0.68rem;
}

.analytics-field-group-activate {
  border: 1px solid rgba(59, 130, 246, 0.35);
  background: rgba(30, 41, 59, 0.6);
  color: #dbeafe;
  border-radius: 0.55rem;
  padding: 0.25rem 0.6rem;
  font-size: 0.72rem;
  cursor: pointer;
  transition:
    border 0.2s ease,
    background 0.2s ease,
    color 0.2s ease;
}

.analytics-field-group-activate:hover {
  border-color: rgba(148, 163, 184, 0.45);
  color: #f8fafc;
}

.analytics-field-dropdown-list {
  display: grid;
  gap: 0.4rem;
}

.analytics-field-option {
  border: 1px solid rgba(59, 130, 246, 0.18);
  background: rgba(15, 23, 42, 0.75);
  border-radius: 0.65rem;
  padding: 0.4rem 0.55rem;
  color: #e2e8f0;
  text-align: left;
  font-size: 0.78rem;
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  transition:
    border 0.2s ease,
    background 0.2s ease,
    transform 0.2s ease;
  cursor: pointer;
}

.analytics-field-option:hover {
  border-color: rgba(148, 163, 184, 0.45);
  background: rgba(30, 41, 59, 0.75);
  transform: translateX(2px);
}

.analytics-field-option.is-active {
  border-color: rgba(59, 130, 246, 0.6);
  background: rgba(59, 130, 246, 0.28);
  color: #eff6ff;
  box-shadow: 0 4px 14px rgba(59, 130, 246, 0.2);
}

.analytics-field-option span {
  font-size: 0.7rem;
  color: #94a3b8;
}

.analytics-field-dropdown-empty {
  margin: 0;
  font-size: 0.78rem;
  color: #94a3b8;
  text-align: center;
}

.analytics-range-field input[type="date"]:focus-visible {
  outline: 2px solid rgba(59, 130, 246, 0.6);
  outline-offset: 2px;
}

.analytics-range-actions {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.link-button {
  border: 0;
  background: transparent;
  color: #60a5fa;
  cursor: pointer;
  font-weight: 600;
  padding: 0.1rem 0.25rem;
  border-radius: 0.35rem;
  transition:
    color 0.2s ease,
    background 0.2s ease;
}

.link-button:hover {
  color: #bfdbfe;
  background: rgba(59, 130, 246, 0.12);
}

.link-button.small {
  font-size: 0.8rem;
  padding: 0;
}

.analytics-range-summary {
  margin: 0;
  font-size: 0.85rem;
  color: #94a3b8;
  flex-basis: 100%;
}

.analytics-view-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  padding: 0;
}

.analytics-view-button {
  margin: 0;
}

.analytics-card {
  background: rgba(15, 23, 42, 0.75);
  border: 1px solid rgba(59, 130, 246, 0.2);
  border-radius: 1rem;
  padding: 1.25rem 1.5rem;
  box-shadow: 0 18px 42px rgba(15, 23, 42, 0.35);
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.analytics-view-hidden {
  display: none !important;
}

.analytics-card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
}

.analytics-card-header h3 {
  margin: 0;
}

.analytics-card-subtitle {
  margin: 0.25rem 0 0;
  font-size: 0.9rem;
  color: #94a3b8;
}

.analytics-form {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.analytics-form-grid {
  display: grid;
  gap: 0.75rem;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
}

.analytics-field {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  font-size: 0.85rem;
}

.analytics-field span {
  color: #94a3b8;
}

.analytics-field input,
.analytics-field select {
  padding: 0.45rem 0.6rem;
  border-radius: 0.6rem;
  border: 1px solid #334155;
  background: rgba(15, 23, 42, 0.85);
  color: inherit;
}

.analytics-field-narrow input {
  max-width: 110px;
}

.analytics-form-actions {
  display: flex;
  gap: 0.75rem;
}

.analytics-history-summary {
  display: grid;
  gap: 0.5rem;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  font-size: 0.85rem;
  background: rgba(30, 41, 59, 0.55);
  border: 1px solid rgba(59, 130, 246, 0.2);
  border-radius: 0.75rem;
  padding: 0.75rem;
}

.analytics-summary-item {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.analytics-summary-item span {
  color: #94a3b8;
  font-size: 0.75rem;
}

.analytics-summary-item strong {
  font-size: 0.95rem;
  color: #e2e8f0;
}

.analytics-readiness-summary {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.analytics-readiness-meta {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1rem;
}

.analytics-readiness-card {
  background: rgba(15, 23, 42, 0.55);
  border: 1px solid rgba(59, 130, 246, 0.18);
  border-radius: 0.85rem;
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.analytics-readiness-card strong {
  font-size: 1.35rem;
  font-weight: 700;
  color: #e2e8f0;
  letter-spacing: 0.01em;
}

.analytics-readiness-card span {
  color: #94a3b8;
  font-size: 0.8rem;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.analytics-readiness-card small {
  font-size: 0.75rem;
  color: rgba(148, 163, 184, 0.85);
}

.analytics-readiness-card .analytics-metric-highlight {
  color: #38bdf8;
  font-weight: 600;
}

.analytics-readiness-metric-columns {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem;
}

.analytics-readiness-table .analytics-muted {
  display: block;
  margin-top: 0.1rem;
  font-size: 0.75rem;
}

.analytics-readiness-table th,
.analytics-readiness-table td {
  white-space: nowrap;
}

.analytics-readiness-missing {
  margin-top: 1.5rem;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 1.25rem;
}

.analytics-readiness-panel {
  background: rgba(15, 23, 42, 0.55);
  border: 1px solid rgba(59, 130, 246, 0.18);
  border-radius: 0.85rem;
  padding: 1.15rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.analytics-readiness-panel header h4 {
  margin: 0;
  color: #e2e8f0;
  font-size: 1rem;
  letter-spacing: 0.01em;
}

.analytics-readiness-panel header p {
  margin: 0.25rem 0 0;
  color: #94a3b8;
  font-size: 0.82rem;
}

.analytics-readiness-actions {
  display: flex;
  gap: 0.5rem;
  align-items: center;
}

.analytics-muted-text {
  color: #94a3b8;
}

.analytics-readiness-panel .analytics-table {
  font-size: 0.85rem;
}

.analytics-mut .analytics-history-summary .analytics-empty-text {
  grid-column: 1 / -1;
  margin: 0;
  color: #94a3b8;
  font-style: italic;
}

.analytics-chart {
  width: 100%;
  max-width: 100%;
  border-radius: 0.75rem;
  background: rgba(15, 23, 42, 0.55);
  border: 1px solid rgba(59, 130, 246, 0.18);
  display: none;
}

.analytics-chart.is-visible {
  display: block;
}

.analytics-table-wrapper {
  overflow: auto;
  border: 1px solid rgba(59, 130, 246, 0.18);
  border-radius: 0.75rem;
  background: rgba(15, 23, 42, 0.55);
}

.analytics-table-title {
  margin: 0;
  padding: 0.85rem 1rem 0.5rem;
  font-size: 0.95rem;
  color: #cbd5f5;
}

.analytics-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
}

.analytics-table th,
.analytics-table td {
  padding: 0.55rem 0.75rem;
  border-bottom: 1px solid rgba(30, 41, 59, 0.8);
}

.analytics-table th {
  text-align: left;
  font-weight: 600;
  color: #cbd5f5;
}

.analytics-muted {
  color: #94a3b8;
  font-size: 0.75rem;
}

.analytics-cell-number {
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.analytics-range-group {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(30, 41, 59, 0.45);
  border: 1px solid rgba(59, 130, 246, 0.2);
  border-radius: 999px;
  padding: 0.25rem;
}

.analytics-range-button {
  border: 0;
  background: transparent;
  color: #94a3b8;
  padding: 0.3rem 0.9rem;
  border-radius: 999px;
  font-size: 0.8rem;
  cursor: pointer;
  transition:
    background 0.2s ease,
    color 0.2s ease;
}

.analytics-range-button:hover {
  color: #e2e8f0;
}

.analytics-range-button.active {
  background: rgba(59, 130, 246, 0.3);
  color: #f8fafc;
}

.analytics-sellers-summary {
  font-size: 0.82rem;
  background: rgba(15, 23, 42, 0.55);
  border: 1px solid rgba(59, 130, 246, 0.18);
  border-radius: 0.75rem;
  padding: 0.75rem 1rem;
  color: #94a3b8;
}

.analytics-sellers-summary strong {
  color: #e2e8f0;
}

.analytics-sellers-view-nav {
  display: inline-flex;
  gap: 0.5rem;
  background: rgba(30, 41, 59, 0.4);
  border: 1px solid rgba(59, 130, 246, 0.18);
  border-radius: 999px;
  padding: 0.25rem 0.35rem;
  margin-bottom: 0.5rem;
}

.analytics-sellers-view-button {
  border: 0;
  background: transparent;
  color: #94a3b8;
  padding: 0.3rem 0.9rem;
  border-radius: 999px;
  font-size: 0.8rem;
  cursor: pointer;
  transition:
    background 0.2s ease,
    color 0.2s ease;
}

.analytics-sellers-view-button:hover {
  color: #e2e8f0;
}

.analytics-sellers-view-button.active {
  background: rgba(59, 130, 246, 0.3);
  color: #f8fafc;
}

.analytics-cell-metric {
  text-align: right;
  white-space: normal;
}

.analytics-metric-primary {
  font-weight: 600;
  color: #f8fafc;
  line-height: 1.25;
}

.analytics-metric-sub {
  font-size: 0.75rem;
  color: #94a3b8;
  line-height: 1.2;
}

.analytics-positive {
  color: #34d399;
}

.analytics-negative {
  color: #f87171;
}

.analytics-neutral {
  color: #e2e8f0;
}

.analytics-sellers-columns {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.analytics-sellers-column {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.analytics-custom-list {
  display: grid;
  gap: 0.85rem;
}

.analytics-custom-view {
  border: 1px solid rgba(59, 130, 246, 0.2);
  border-radius: 0.85rem;
  padding: 0.85rem 1rem;
  background: rgba(15, 23, 42, 0.6);
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.analytics-custom-view header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.analytics-custom-view-title {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.analytics-custom-view header h4 {
  margin: 0;
  font-size: 1rem;
}

.analytics-custom-view-actions {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.analytics-custom-filters {
  display: flex;
  align-items: flex-end;
  gap: 1rem;
  margin-bottom: 1rem;
}

.analytics-custom-filters .analytics-field {
  flex: 1;
  margin: 0;
}

.analytics-custom-filters .link-button {
  margin-bottom: 0.35rem;
}

.analytics-designer {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  padding: 1rem 0;
}

.analytics-ribbon {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  padding: 0.6rem 0.85rem;
  background: rgba(15, 23, 42, 0.82);
  border: 1px solid rgba(59, 130, 246, 0.2);
  border-radius: 0.8rem;
  box-shadow: 0 14px 30px rgba(2, 6, 23, 0.32);
}

.analytics-ribbon-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.6rem;
}

.analytics-ribbon-row-tools {
  align-items: center;
}

.analytics-ribbon-group {
  display: inline-flex;
  gap: 0.4rem;
  flex-wrap: wrap;
  align-items: center;
  flex: 1 1 210px;
  min-width: 0;
}

.analytics-ribbon-group-tools {
  flex: 1 1 210px;
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0;
  background: transparent;
  border: 0;
  box-shadow: none;
}

.analytics-ribbon-stack {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  min-width: 0;
}

.analytics-ribbon-group-tools .analytics-builder-dataset-group {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.analytics-ribbon-group-tools .analytics-builder-chart-group {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.analytics-ribbon-group-wide {
  flex: 1.5 1 260px;
}

.analytics-ribbon-group-wide .analytics-ribbon-options {
  flex-wrap: wrap;
}

.analytics-ribbon-title {
  margin: 0;
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: rgba(148, 163, 184, 0.85);
}

.analytics-ribbon-options {
  display: inline-flex;
  gap: 0.45rem;
  align-items: center;
  flex-wrap: wrap;
}

@media (max-width: 1280px) {
  .analytics-ribbon-group-wide {
    flex: 1 1 100%;
  }
}

.analytics-ribbon-button {
  border: 1px solid rgba(59, 130, 246, 0.35);
  background: linear-gradient(135deg,
      rgba(59, 130, 246, 0.4),
      rgba(37, 99, 235, 0.35));
  color: #e0f2fe;
  border-radius: 0.65rem;
  padding: 0.45rem 0.75rem;
  font-size: 0.85rem;
  cursor: pointer;
  transition:
    transform 0.15s ease,
    box-shadow 0.15s ease,
    background 0.15s ease;
}

.analytics-ribbon-button:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 24px rgba(37, 99, 235, 0.35);
}

.analytics-designer-layout {
  display: grid;
  grid-template-columns: minmax(260px, 320px) minmax(0, 1fr);
  gap: 1.5rem 1.5rem;
  align-items: flex-start;
}

.analytics-field-panel {
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
  padding: 1rem 1.15rem;
  background: rgba(8, 19, 38, 0.92);
  border: 1px solid rgba(59, 130, 246, 0.28);
  border-radius: 1rem;
  box-shadow:
    0 18px 36px rgba(2, 13, 33, 0.45),
    inset 0 0 0 1px rgba(59, 130, 246, 0.12);
  min-height: 420px;
}

.analytics-field-panel-header {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.analytics-field-panel-title {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 600;
  color: #e2e8f0;
}

.analytics-field-panel-hint {
  margin: 0;
  font-size: 0.78rem;
  color: rgba(148, 163, 184, 0.8);
}

.analytics-field-panel-search {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.analytics-field-panel-body {
  flex: 1 1 auto;
  min-height: 0;
  overflow: hidden;
}

.analytics-field-panel-body .analytics-field-dropdown-groups {
  height: 100%;
  overflow-y: auto;
  padding-right: 0.2rem;
}

.analytics-designer-main {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  flex: 1 1 auto;
  min-height: 0;
}

@media (max-width: 1280px) {
  .analytics-designer-layout {
    grid-template-columns: minmax(0, 1fr);
  }

  .analytics-field-panel {
    order: -1;
    min-height: unset;
  }
}

.analytics-custom-form {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  gap: 1.75rem;
  min-height: 0;
}

.analytics-builder-wrapper {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 1.75rem;
}

.analytics-builder-row,
.analytics-dashboard-row {
  display: flex;
  gap: 1.5rem;
  width: 100%;
  padding-right: 1.5rem;
  box-sizing: border-box;
}

.analytics-builder-row>*,
.analytics-dashboard-row>* {
  flex: 1 1 0;
}

.analytics-designer-library {
  flex: 0 0 280px;
  align-self: stretch;
  max-height: calc(100vh - 240px);
  overflow: auto;
  width: min(320px, 24vw);
}

@media (max-width: 1280px) {
  .analytics-designer-library {
    flex: 1 1 100%;
    max-height: none;
  }
}

.analytics-builder {
  width: 100%;
  background: rgba(15, 23, 42, 0.55);
  border: 1px solid rgba(59, 130, 246, 0.25);
  border-radius: 1rem;
  padding: 1rem 1.25rem;
  box-sizing: border-box;
}

.analytics-dropzone-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(260px, 1fr));
  gap: 1.2rem;
  width: 100%;
}

.analytics-dashboard {
  border: 1px solid rgba(59, 130, 246, 0.22);
  border-radius: 1rem;
  background: rgba(10, 18, 34, 0.75);
  padding: 1rem 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  min-height: 320px;
  max-height: none;
  overflow-y: auto;
  width: 100%;
  box-sizing: border-box;
}

.analytics-dashboard-preview {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.analytics-dashboard-preview-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.analytics-dashboard-header h4 {
  margin: 0;
  font-size: 1.05rem;
}

.analytics-designer-library {
  gap: 0.85rem;
}

.analytics-dashboard-canvas {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  min-height: 280px;
}

.analytics-dashboard-status {
  padding: 0.85rem 1rem;
  border-radius: 0.75rem;
  background: rgba(30, 41, 59, 0.7);
  border: 1px dashed rgba(148, 163, 184, 0.25);
  color: #94a3b8;
  font-size: 0.9rem;
}

.analytics-dashboard-status.tone-success {
  color: #34d399;
}

.analytics-dashboard-status.tone-warn {
  color: #f59e0b;
}

.analytics-dashboard-status.tone-error {
  color: #f87171;
}

.analytics-dashboard-chart {
  width: 100%;
  max-width: 100%;
  border-radius: 0.75rem;
  background: rgba(15, 23, 42, 0.4);
  border: 1px solid rgba(30, 64, 175, 0.25);
  padding: 0.75rem;
  height: 260px;
  max-height: 260px;
}

.analytics-dashboard-table {
  width: 100%;
}

.analytics-sortable {
  cursor: pointer;
  position: relative;
  padding-right: 1.4rem;
  user-select: none;
}

.analytics-sortable::after {
  content: "↕";
  position: absolute;
  right: 0.35rem;
  top: 50%;
  transform: translateY(-50%);
  font-size: 0.75rem;
  opacity: 0.35;
}

.analytics-sortable[data-sort-direction="asc"]::after {
  content: "▲";
  opacity: 0.9;
}

.analytics-sortable[data-sort-direction="desc"]::after {
  content: "▼";
  opacity: 0.9;
}

.analytics-sortable:hover {
  color: #f8fafc;
}

.analytics-widget-library {
  margin-top: 1.5rem;
  border: 1px solid rgba(148, 163, 184, 0.3);
  border-radius: 1rem;
  background: rgba(15, 23, 42, 0.5);
  padding: 1rem 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.analytics-widget-library h4 {
  margin: 0;
  font-size: 1rem;
}

.analytics-widget-library-grid {
  display: grid;
  gap: 0.85rem;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.analytics-widget-card {
  background: rgba(15, 23, 42, 0.55);
  border: 1px solid rgba(59, 130, 246, 0.2);
  border-radius: 0.9rem;
  padding: 0.85rem 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  cursor: grab;
  transition:
    border 0.2s ease,
    transform 0.2s ease;
}

.analytics-widget-card header {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.analytics-widget-card header h5 {
  margin: 0;
  font-size: 0.95rem;
  color: #e2e8f0;
}

.analytics-widget-card p {
  margin: 0;
  font-size: 0.85rem;
  color: #cbd5f5;
}

.analytics-widget-card-actions {
  margin-top: auto;
  display: inline-flex;
  gap: 0.4rem;
}

.analytics-dashboard-board.is-drag-over {
  border: 2px dashed rgba(59, 130, 246, 0.45);
  border-radius: 1rem;
  padding: 0.6rem;
}

.analytics-dashboard-board {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  margin-top: 0.75rem;
  max-height: 720px;
  overflow-y: auto;
  padding-right: 0.25rem;
}

.analytics-dashboard-board.has-widgets .analytics-dashboard-empty {
  display: none;
}

.analytics-dashboard-empty {
  margin: 0;
  font-size: 0.9rem;
  color: #94a3b8;
}

.analytics-dashboard-widget {
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid rgba(59, 130, 246, 0.22);
  border-radius: 0.95rem;
  padding: 0.85rem 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  position: relative;
}

.analytics-dashboard-widget header {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 0.6rem;
}

.analytics-dashboard-widget-handle {
  cursor: grab;
  font-size: 1.2rem;
  line-height: 1;
  color: #94a3b8;
  user-select: none;
  padding: 0.15rem 0.35rem;
}

.analytics-dashboard-widget-handle:active {
  cursor: grabbing;
}

.analytics-dashboard-widget-title {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.analytics-dashboard-widget-title h5 {
  margin: 0;
  font-size: 0.95rem;
  color: #e2e8f0;
}

.analytics-dashboard-widget-title span {
  font-size: 0.8rem;
  color: #94a3b8;
}

.analytics-dashboard-widget-actions {
  display: inline-flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.35rem;
}

.analytics-dashboard-widget[data-widget-width="2"] {
  grid-column: span 2;
}

.analytics-dashboard-widget.is-drop-target {
  border-color: rgba(59, 130, 246, 0.65);
  box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.18);
}

.analytics-dashboard-widget-status {
  font-size: 0.8rem;
  color: #94a3b8;
}

.analytics-dashboard-widget-status.status-error {
  color: #f87171;
}

.analytics-dashboard-widget-body {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.analytics-dashboard-widget-chart {
  width: 100%;
  border-radius: 0.75rem;
  border: 1px solid rgba(59, 130, 246, 0.18);
  background: rgba(15, 23, 42, 0.45);
  display: none;
  height: 200px;
  max-height: 200px;
}

.analytics-dashboard-widget-chart.is-visible {
  display: block;
}

.analytics-dashboard-widget-table {
  width: 100%;
}

.analytics-custom-view dl {
  display: grid;
  gap: 0.4rem;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  margin: 0;
}

.analytics-custom-view dt {
  font-size: 0.75rem;
  color: #94a3b8;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.analytics-custom-view dd {
  margin: 0;
  font-size: 0.9rem;
  color: #e2e8f0;
}

.analytics-custom-modal {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.88);
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  z-index: 120;
}

.analytics-custom-modal.hidden {
  display: none;
}

.analytics-custom-modal .analytics-custom-form {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.analytics-custom-grid {
  display: grid;
  gap: 0.75rem;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
}

.analytics-builder-sidebar {
  min-width: 0;
  background: rgba(15, 23, 42, 0.65);
  border: 1px solid rgba(59, 130, 246, 0.2);
  border-radius: 0.9rem;
  padding: 0.9rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.analytics-builder-sidebar-header h4 {
  margin: 0;
  font-size: 1rem;
  color: #e2e8f0;
}

.analytics-builder-sidebar-header p {
  margin: 0.25rem 0 0;
  font-size: 0.8rem;
  color: #94a3b8;
}

.analytics-builder-dataset-group {
  display: grid;
  gap: 0.4rem;
}

.analytics-builder-dataset-button {
  border: 1px solid rgba(59, 130, 246, 0.2);
  background: rgba(30, 41, 59, 0.7);
  color: #cbd5f5;
  border-radius: 0.65rem;
  padding: 0.45rem 0.6rem;
  font-size: 0.8rem;
  text-align: left;
  cursor: pointer;
  transition:
    border 0.2s ease,
    background 0.2s ease,
    color 0.2s ease,
    transform 0.2s ease;
}

.analytics-builder-dataset-button:hover {
  border-color: rgba(148, 163, 184, 0.45);
  color: #f8fafc;
}

.analytics-builder-dataset-button.active {
  border-color: rgba(59, 130, 246, 0.55);
  background: rgba(37, 99, 235, 0.25);
  color: #e0f2fe;
  box-shadow: 0 8px 22px rgba(37, 99, 235, 0.25);
}

.analytics-builder-search {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  font-size: 0.8rem;
  color: #94a3b8;
}

.analytics-builder-search input[type="search"] {
  background: rgba(15, 23, 42, 0.85);
  border: 1px solid rgba(100, 116, 139, 0.5);
  border-radius: 0.65rem;
  padding: 0.45rem 0.6rem;
  color: #e2e8f0;
  font: inherit;
}

.analytics-builder-search input[type="search"]::placeholder {
  color: rgba(148, 163, 184, 0.7);
}

.analytics-builder-field-list {
  display: grid;
  gap: 0.6rem;
  max-height: calc(100vh - 360px);
  overflow-y: auto;
  padding-right: 0.25rem;
}

.analytics-builder-field {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  background: rgba(30, 41, 59, 0.8);
  border: 1px solid rgba(59, 130, 246, 0.2);
  border-radius: 0.75rem;
  padding: 0.65rem 0.75rem;
  cursor: grab;
  transition:
    border 0.2s ease,
    transform 0.2s ease,
    box-shadow 0.2s ease;
}

.analytics-builder-field[draggable="true"]:active {
  cursor: grabbing;
}

.analytics-builder-field.is-disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.analytics-builder-field:hover:not(.is-disabled) {
  border-color: rgba(148, 163, 184, 0.45);
  transform: translateY(-1px);
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.35);
}

.analytics-builder-field-title {
  font-weight: 600;
  color: #e2e8f0;
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.analytics-builder-field-meta {
  display: flex;
  gap: 0.35rem;
  font-size: 0.7rem;
  color: #93c5fd;
}

.analytics-builder-field-desc {
  font-size: 0.78rem;
  color: #cbd5f5;
}

.analytics-builder-main {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  flex: 1 1 auto;
  min-height: 0;
}

.analytics-builder-dropzones {
  display: flex;
  flex-wrap: nowrap;
  gap: 1rem;
  align-items: stretch;
  width: 100%;
  margin-bottom: 0;
}

.analytics-dropzone {
  min-width: 0;
  background: rgba(15, 23, 42, 0.85);
  border: 1px dashed rgba(59, 130, 246, 0.45);
  border-radius: 1rem;
  padding: 1rem 1.1rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  outline: none;
  transition:
    border 0.2s ease,
    background 0.2s ease,
    box-shadow 0.2s ease;
  min-height: 180px;
  box-shadow:
    inset 0 0 0 1px rgba(15, 118, 230, 0.12),
    0 12px 24px rgba(15, 23, 42, 0.28);
}

.analytics-dropzone:focus-visible {
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.4);
}

.analytics-dropzone.is-active {
  border-color: rgba(59, 130, 246, 0.8);
  background: rgba(30, 64, 175, 0.33);
}

.analytics-dropzone.is-filled {
  border-color: rgba(59, 130, 246, 0.6);
}

.analytics-dropzone-header {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.analytics-dropzone-title {
  font-size: 0.95rem;
  font-weight: 650;
  color: #e2e8f0;
}

.analytics-dropzone-hint {
  font-size: 0.78rem;
  color: rgba(148, 163, 184, 0.9);
}

.analytics-dropzone-body {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  min-height: 120px;
  padding: 0.6rem;
  align-items: flex-start;
  border-radius: 0.75rem;
  background: rgba(9, 17, 32, 0.35);
  border: 1px dashed rgba(59, 130, 246, 0.25);
  min-width: 0;
  flex: 1 1 auto;
  width: 100%;
}

.analytics-dropzone-body-multi {
  min-height: 160px;
}

.analytics-dropzone-placeholder {
  margin: 0;
  font-size: 0.8rem;
  color: rgba(148, 163, 184, 0.8);
}

@media (max-width: 1200px) {
  .analytics-builder-dropzones {
    flex-wrap: wrap;
  }

  .analytics-dropzone {
    flex: 1 1 45%;
    min-width: 260px;
  }
}

@media (max-width: 768px) {
  .analytics-dropzone {
    flex: 1 1 100%;
  }
}

.analytics-builder-chip {
  background: rgba(59, 130, 246, 0.12);
  border: 1px solid rgba(59, 130, 246, 0.45);
  color: #bfdbfe;
  padding: 0.45rem 0.65rem;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.8rem;
}

.analytics-builder-chip button {
  border: 0;
  background: transparent;
  color: inherit;
  cursor: pointer;
  font-size: 0.85rem;
  padding: 0;
  line-height: 1;
}

.analytics-builder-chip button:hover {
  color: #fca5a5;
}

@media (max-width: 960px) {
  .analytics-dropzone {
    flex-direction: column;
    align-items: stretch;
    padding: 0.4rem 0.5rem;
  }

  .analytics-builder-dropzones {
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  }

  .analytics-dropzone-body {
    min-height: 120px;
    padding: 1.6rem 0.75rem 0.75rem;
  }
}

.analytics-builder-controls {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  align-items: start;
}

.analytics-builder-control-group {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.analytics-builder-control-title {
  font-size: 0.78rem;
  color: #a5b4fc;
  letter-spacing: 0.03em;
}

.analytics-builder-chart-button {
  border: 1px solid rgba(59, 130, 246, 0.22);
  background: rgba(30, 41, 59, 0.6);
  color: #dbeafe;
  border-radius: 0.55rem;
  padding: 0.32rem 0.65rem;
  font-size: 0.76rem;
  cursor: pointer;
  transition:
    background 0.2s ease,
    color 0.2s ease,
    border 0.2s ease;
}

.analytics-builder-chart-button:hover {
  border-color: rgba(148, 163, 184, 0.45);
  color: #f8fafc;
}

.analytics-builder-chart-button.active {
  border-color: rgba(59, 130, 246, 0.6);
  background: rgba(59, 130, 246, 0.3);
  color: #eff6ff;
  box-shadow: 0 6px 18px rgba(59, 130, 246, 0.2);
}

.analytics-builder-toggle-group {
  display: inline-flex;
  gap: 0.3rem;
}

.analytics-builder-toggle-button {
  border: 1px solid rgba(148, 163, 184, 0.25);
  background: rgba(30, 41, 59, 0.55);
  color: #cbd5f5;
  border-radius: 0.55rem;
  padding: 0.3rem 0.6rem;
  font-size: 0.75rem;
  cursor: pointer;
  transition:
    background 0.2s ease,
    border 0.2s ease,
    color 0.2s ease;
}

.analytics-builder-toggle-button:hover {
  border-color: rgba(148, 163, 184, 0.5);
  color: #f8fafc;
}

.analytics-builder-toggle-button.active {
  border-color: rgba(59, 130, 246, 0.6);
  background: rgba(59, 130, 246, 0.28);
  color: #eff6ff;
  box-shadow: 0 4px 14px rgba(59, 130, 246, 0.2);
}

.analytics-builder-view-name {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.78rem;
  color: #a5b4fc;
}

.analytics-builder-view-name input {
  width: 190px;
  background: rgba(15, 23, 42, 0.85);
  border: 1px solid rgba(100, 116, 139, 0.45);
  border-radius: 0.55rem;
  padding: 0.35rem 0.55rem;
  color: #e2e8f0;
  font-size: 0.78rem;
}

.analytics-dashboard-chart {
  width: 100%;
  background: rgba(15, 23, 42, 0.55);
  border-radius: 0.75rem;
  border: 1px solid rgba(59, 130, 246, 0.18);
  display: none;
  height: 260px;
}

.analytics-dashboard-chart.is-visible {
  display: block;
}

.analytics-dashboard-table table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.82rem;
}

.analytics-dashboard-table-inner {
  max-height: 220px;
  overflow: auto;
  border: 1px solid rgba(59, 130, 246, 0.18);
  border-radius: 0.75rem;
  background: rgba(15, 23, 42, 0.55);
}

.analytics-dashboard-heatmap {
  max-height: 220px;
  overflow: auto;
  border: 1px solid rgba(59, 130, 246, 0.18);
  border-radius: 0.75rem;
  background: rgba(15, 23, 42, 0.55);
}

.analytics-dashboard-heatmap table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.82rem;
}

.analytics-dashboard-heatmap th,
.analytics-dashboard-heatmap td {
  padding: 0.55rem 0.75rem;
  border-bottom: 1px solid rgba(30, 41, 59, 0.75);
  text-align: left;
}

.analytics-kpi-grid {
  display: grid;
  gap: 0.75rem;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

.analytics-kpi-card {
  background: rgba(15, 23, 42, 0.65);
  border: 1px solid rgba(59, 130, 246, 0.25);
  border-radius: 0.9rem;
  padding: 0.85rem 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.analytics-kpi-card h5 {
  margin: 0;
  font-size: 0.85rem;
  color: #cbd5f5;
}

.analytics-kpi-card strong {
  font-size: 1.3rem;
  color: #f8fafc;
}

.analytics-kpi-card span {
  font-size: 0.75rem;
  color: #94a3b8;
}

.analytics-dashboard-table th,
.analytics-dashboard-table td {
  padding: 0.5rem 0.65rem;
  border-bottom: 1px solid rgba(30, 41, 59, 0.75);
  text-align: left;
}

.analytics-dashboard-table tr:nth-child(even) {
  background: rgba(59, 130, 246, 0.08);
}

.analytics-custom-field {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  font-size: 0.85rem;
}

.analytics-custom-field span {
  color: #94a3b8;
}

.analytics-custom-field input,
.analytics-custom-field select {
  padding: 0.45rem 0.6rem;
  border-radius: 0.6rem;
  border: 1px solid #334155;
  background: rgba(15, 23, 42, 0.85);
  color: inherit;
}

.analytics-custom-actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.75rem;
}

.analytics-custom-views {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-top: 1.5rem;
}

.analytics-custom-views-title {
  margin: 0;
  font-size: 1rem;
  color: #e2e8f0;
}

.analytics-custom-list {
  display: grid;
  gap: 0.9rem;
}

.analytics-builder-empty {
  font-size: 0.85rem;
  color: #94a3b8;
  font-style: italic;
}

.analytics-table tbody tr:hover {
  background: rgba(59, 130, 246, 0.12);
}

.analytics-empty td {
  text-align: center;
  font-style: italic;
  color: #94a3b8;
}

.analytics-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  background: rgba(59, 130, 246, 0.18);
  border-radius: 999px;
  padding: 0.25rem 0.6rem;
  font-size: 0.75rem;
  color: #bfdbfe;
}

.analytics-change-positive {
  color: #34d399;
}

.analytics-change-negative {
  color: #f87171;
}

@media (max-width: 1024px) {
  .analytics-card {
    padding: 1rem;
  }

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

  .analytics-builder-sidebar {
    min-width: 100%;
  }

  .analytics-builder-main {
    min-width: 100%;
  }
}

.quote-products-results table td:last-child {
  text-align: right;
}

.quote-products-results tbody tr:hover {
  background: rgba(37, 99, 235, 0.12);
}

.quote-products-results tbody tr .secondary-button.small {
  padding: 0.3rem 0.75rem;
}

.marketing-products-table-wrapper {
  border: 1px solid rgba(148, 163, 184, 0.35);
  border-radius: 0.85rem;
  background: rgba(15, 23, 42, 0.35);
  overflow-x: auto;
  padding: 0.5rem;
}

.marketing-product-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 700px;
  background: rgba(15, 23, 42, 0.45);
}

.marketing-product-table th,
.marketing-product-table td {
  padding: 0.6rem 0.75rem;
  border-bottom: 1px solid rgba(148, 163, 184, 0.25);
  text-align: left;
  font-size: 0.85rem;
}

.marketing-product-table th {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: #cbd5f5;
  background: rgba(30, 41, 59, 0.65);
}

.marketing-product-table tr:last-child td {
  border-bottom: none;
}

.marketing-product-select {
  width: 3rem;
  text-align: center;
}

.marketing-product-select input {
  width: 1.1rem;
  height: 1.1rem;
}

.marketing-product-name {
  font-weight: 600;
  color: #e2e8f0;
}

.marketing-product-meta {
  font-size: 0.75rem;
  color: #94a3b8;
  margin-top: 0.2rem;
}

#marketing-product-empty {
  margin: 0.75rem 0 0;
  font-size: 0.85rem;
  color: #94a3b8;
}

.tab-subnav {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.45rem;
  padding: 0.4rem 0.5rem;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.85);
  border: 1px solid rgba(59, 130, 246, 0.25);
  box-shadow: 0 0.35rem 1.2rem rgba(15, 23, 42, 0.45);
}

.tab-subnav-button {
  border: 1px solid transparent;
  background: transparent;
  color: #cbd5f5;
  font-size: 0.85rem;
  font-weight: 600;
  padding: 0.45rem 1.25rem;
  border-radius: 999px;
  cursor: pointer;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  transition:
    background 0.2s ease,
    color 0.2s ease,
    border-color 0.2s ease,
    box-shadow 0.2s ease;
}

.tab-subnav-button:hover {
  border-color: rgba(96, 165, 250, 0.4);
  background: rgba(59, 130, 246, 0.2);
  color: #f8fafc;
}

.tab-subnav-button:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.35);
}

.tab-subnav-button.active {
  background: linear-gradient(135deg, #6366f1, #38bdf8);
  color: #0f172a;
  border-color: transparent;
  box-shadow: 0 0.35rem 1rem rgba(59, 130, 246, 0.45);
}

.analytics-readiness-tree {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  border: 1px solid rgba(59, 130, 246, 0.18);
  border-radius: 0.85rem;
  background: rgba(15, 23, 42, 0.55);
  padding: 0.2rem 0.1rem;
  max-height: 420px;
  overflow: auto;
}

.analytics-readiness-tree details {
  border-radius: 0.75rem;
  background: rgba(15, 23, 42, 0.35);
  border: 1px solid transparent;
  transition:
    border-color 0.2s ease,
    background-color 0.2s ease;
}

.analytics-readiness-tree details[open] {
  border-color: rgba(59, 130, 246, 0.35);
  background: rgba(30, 41, 59, 0.6);
}

.analytics-readiness-tree summary {
  list-style: none;
  cursor: pointer;
  padding: 0.65rem 0.85rem;
  display: flex;
  gap: 0.65rem;
  align-items: center;
  color: #e2e8f0;
}

.analytics-readiness-tree summary::-webkit-details-marker {
  display: none;
}

.analytics-readiness-tree summary::before {
  content: "▸";
  color: rgba(148, 163, 184, 0.85);
  transition: transform 0.2s ease;
}

.analytics-readiness-tree details[open]>summary::before {
  transform: rotate(90deg);
  color: #38bdf8;
}

.analytics-readiness-tree .readiness-summary {
  display: flex;
  gap: 0.45rem;
  align-items: baseline;
  flex-wrap: wrap;
  font-size: 0.8rem;
  color: #94a3b8;
}

.analytics-readiness-tree .readiness-summary strong {
  color: #e2e8f0;
  font-size: 0.9rem;
}

.analytics-readiness-tree .readiness-child-list {
  padding: 0.2rem 1.2rem 0.8rem 1.2rem;
  display: grid;
  gap: 0.4rem;
}

.analytics-readiness-tree .readiness-metric {
  display: flex;
  justify-content: space-between;
  color: #cbd5f5;
  font-size: 0.78rem;
}

.analytics-readiness-tree .readiness-metric span {
  color: rgba(148, 163, 184, 0.85);
}

.analytics-readiness-tree .readiness-child-list details {
  margin-left: 0.6rem;
}

.analytics-readiness-tree details.readiness-leaf summary {
  cursor: default;
}

.analytics-readiness-tree details.readiness-leaf summary::before {
  content: "•";
  transform: none;
  color: rgba(148, 163, 184, 0.85);
}

.analytics-readiness-tree .readiness-name {
  font-weight: 600;
}

.ai-panel-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 1rem;
  flex-wrap: wrap;
}

.ai-subnav {
  display: flex;
  gap: 0.5rem;
}

.ai-qa-controls {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.ai-qa-controls input[type="search"] {
  min-width: 260px;
}

.ai-qa-table td {
  vertical-align: top;
}

.ai-qa-list {
  margin: 0;
  padding-left: 1rem;
  list-style: disc;
}

.ai-qa-list.compact {
  list-style: none;
  padding-left: 0;
}

.ai-qa-list li+li {
  margin-top: 0.25rem;
}

.ai-qa-more {
  font-style: italic;
  color: rgba(148, 163, 184, 0.9);
}

.ai-qa-empty-note {
  display: inline-block;
  padding: 0.15rem 0.4rem;
  border-radius: 9999px;
  background: #f87171;
  color: #0f172a;
  font-size: 0.75rem;
  font-weight: 600;
}

.enrichment-stage-panel[data-enrichment-stage-panel="stage-competitor"] .competitor-preview {
  margin-top: 1.5rem;
  padding: 1rem;
  border: 1px solid var(--border-muted);
  border-radius: 8px;
  background: var(--surface-muted);
  color: inherit;
}

.enrichment-stage-panel[data-enrichment-stage-panel="stage-competitor"] .competitor-preview h4 {
  margin-top: 0;
  font-size: 1.05rem;
}

.enrichment-stage-panel[data-enrichment-stage-panel="stage-competitor"] .competitor-preview .competitor-source {
  margin: 0.35rem 0 0.5rem;
  font-size: 0.95rem;
  color: rgba(148, 163, 184, 0.9);
}

.enrichment-stage-panel[data-enrichment-stage-panel="stage-competitor"] .competitor-preview .competitor-summary {
  display: grid;
  gap: 1rem;
  margin-top: 1rem;
}

.enrichment-stage-panel[data-enrichment-stage-panel="stage-competitor"] .competitor-preview .competitor-description {
  margin: 1rem 0;
  line-height: 1.5;
}

.enrichment-stage-panel[data-enrichment-stage-panel="stage-competitor"] .competitor-preview .competitor-specs {
  display: grid;
  grid-template-columns: minmax(140px, 220px) 1fr;
  gap: 0.35rem 1rem;
  margin: 1.25rem 0;
}

.enrichment-stage-panel[data-enrichment-stage-panel="stage-competitor"] .competitor-preview .competitor-specs dt {
  font-weight: 600;
  margin: 0;
}

.enrichment-stage-panel[data-enrichment-stage-panel="stage-competitor"] .competitor-preview .competitor-specs dd {
  margin: 0;
}

.enrichment-stage-panel[data-enrichment-stage-panel="stage-competitor"] .competitor-preview .competitor-images ul {
  margin: 0.5rem 0 0;
  padding-left: 1rem;
}

.enrichment-stage-panel[data-enrichment-stage-panel="stage-competitor"] .competitor-preview .competitor-images li {
  margin: 0.25rem 0;
  list-style: disc;
}

.enrichment-stage-panel[data-enrichment-stage-panel="stage-competitor"] .competitor-preview .competitor-meta,
.enrichment-stage-panel[data-enrichment-stage-panel="stage-competitor"] .competitor-preview .competitor-source-meta {
  margin: 0.5rem 0 0;
  font-size: 0.9rem;
  color: rgba(148, 163, 184, 0.95);
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 0.75rem;
  align-items: center;
}

.competitor-status-group {
  margin-top: 1rem;
  display: grid;
  gap: 0.35rem;
}

.competitor-status-group h5 {
  margin: 0;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: rgba(148, 163, 184, 0.75);
}

.competitor-status-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 0.25rem;
}

.competitor-status-item {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.85rem;
  padding: 0.35rem 0.5rem;
  border-radius: 6px;
  background: rgba(15, 23, 42, 0.45);
}

.competitor-status-item .status-label {
  font-weight: 600;
  color: #e2e8f0;
}

.competitor-status-item .status-detail {
  justify-self: end;
  color: rgba(148, 163, 184, 0.9);
}

.status-indicator {
  width: 0.55rem;
  height: 0.55rem;
  border-radius: 9999px;
  background: rgba(148, 163, 184, 0.7);
}

.status-ok .status-indicator {
  background: #34d399;
}

.status-missing .status-indicator {
  background: #f87171;
}

.status-missing .status-detail {
  color: #fca5a5;
}

.competitor-price {
  font-weight: 600;
  color: #cbd5f5;
}

.competitor-link {
  color: #38bdf8;
  text-decoration: underline;
}

.competitor-note {
  color: rgba(248, 250, 252, 0.75);
}

.competitor-meta-item {
  color: rgba(148, 163, 184, 0.85);
}

.competitor-source-list {
  display: grid;
  gap: 1.25rem;
  margin-top: 1.5rem;
}

.competitor-source-card {
  border: 1px solid rgba(148, 163, 184, 0.25);
  border-radius: 10px;
  background: rgba(15, 23, 42, 0.6);
  padding: 1rem 1.1rem;
}

.competitor-source-card header {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.competitor-source-card header h5 {
  margin: 0;
  font-size: 0.95rem;
}

.competitor-source-card .competitor-source-meta {
  margin: 0.25rem 0 0;
  font-size: 0.85rem;
  color: rgba(148, 163, 184, 0.85);
}

.competitor-source-card .competitor-source-body {
  margin-top: 0.75rem;
  display: grid;
  gap: 0.85rem;
}

.competitor-source-card .competitor-source-body .competitor-description {
  margin: 0;
}

.competitor-empty {
  margin: 0;
  color: rgba(148, 163, 184, 0.75);
}

#products-table td {
  vertical-align: top;
}

/* AI Worker UI Polish */
.ai-worker-rank-list {
  list-style: none;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.ai-worker-item-header {
  background: rgba(30, 41, 59, 0.5);
  padding: 1rem;
  border-radius: 0.5rem;
  border-left: 4px solid #3b82f6;
  margin-bottom: 1rem;
}

.ai-worker-breakdown-details summary {
  cursor: pointer;
  font-size: 0.85rem;
  color: #94a3b8;
  padding: 0.25rem 0;
  user-select: none;
}

.ai-worker-breakdown-details summary:hover {
  color: #cbd5f1;
}

.score-positive {
  color: #4ade80;
}

.score-negative {
  color: #f87171;
}

.score-badge {
  display: inline-block;
  background: rgba(0, 0, 0, 0.2);
  padding: 0.1rem 0.4rem;
  border-radius: 4px;
  font-size: 0.75rem;
  margin-left: 0.5rem;
  font-weight: bold;
}

.semantic-spec-cell .spec-hit {
  color: #4ade80;
  font-weight: 500;
}

.semantic-spec-cell .spec-miss {
  color: #f87171;
  font-weight: 500;
}

.ai-worker-semantic-table td:last-child {
  text-align: left;
}

/* Spec Sheet Redesign */
.spec-sheet-container {
  background: #0f172a;
  /* Slate 900 */
  border-radius: 12px;
  border: 1px solid rgba(148, 163, 184, 0.1);
  padding: 1.5rem;
  margin-top: 1rem;
  color: #e2e8f0;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.3);
}

.spec-sheet-container.top-pick-highlight {
  border: 1px solid #3b82f6;
  box-shadow: 0 0 15px rgba(59, 130, 246, 0.15);
}

/* Header */
.spec-sheet-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 1.5rem;
  border-bottom: 1px solid rgba(148, 163, 184, 0.1);
  padding-bottom: 1rem;
}

.product-title-badge {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.product-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: #f8fafc;
}

.verified-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: rgba(59, 130, 246, 0.15);
  color: #60a5fa;
  padding: 0.25rem 0.6rem;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 600;
  width: fit-content;
}

.product-sku {
  font-family: monospace;
  color: #94a3b8;
  font-size: 0.9rem;
}

/* Key Performance Cards */
.key-performance-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 1rem;
  margin-bottom: 2rem;
}

.perf-card {
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid rgba(59, 130, 246, 0.2);
  border-radius: 8px;
  padding: 1rem;
  display: flex;
  flex-direction: column;
  /* Stack vertical */
  align-items: flex-start;
  /* Align left */
  justify-content: space-between;
  gap: 0.75rem;
  transition: transform 0.2s;
  min-height: 100px;
  /* Ensure consistent height */
}

.perf-card:hover {
  transform: translateY(-2px);
  background: rgba(30, 41, 59, 0.8);
}

.perf-header {
  width: 100%;
  display: flex;
  justify-content: flex-start;
  margin-bottom: 0.25rem;
}

.perf-icon {
  width: 1.5rem;
  height: 1.5rem;
  color: #3b82f6;
  opacity: 0.8;
  display: flex;
  align-items: center;
  justify-content: center;
}

.perf-icon svg {
  width: 100%;
  height: 100%;
}

.perf-content {
  display: flex;
  flex-direction: column;
  width: 100%;
}

/* Label removed, but keeping class just in case of revert or other usage */
.perf-label {
  font-size: 0.75rem;
  text-transform: uppercase;
  color: #94a3b8;
  letter-spacing: 0.05em;
  margin-bottom: 0.125rem;
  display: none;
  /* Hidden by user request */
}

.perf-value {
  font-size: 0.95rem;
  font-weight: 700;
  color: #f1f5f9;
}

.perf-sub {
  font-size: 0.75rem;
  color: #64748b;
  margin-top: 0.1rem;
}

/* Spec Grid */
.spec-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
  margin-bottom: 1.5rem;
}

.spec-category-header {
  font-size: 0.9rem;
  text-transform: uppercase;
  color: #3b82f6;
  /* Electric Blue */
  font-weight: 700;
  margin-bottom: 0.75rem;
  padding-bottom: 0.25rem;
  border-bottom: 1px solid rgba(59, 130, 246, 0.3);
}

.spec-rows {
  display: flex;
  flex-direction: column;
  gap: 1px;
  /* Divider effect */
}

.spec-row {
  display: flex;
  justify-content: space-between;
  padding: 0.5rem 0.25rem;
  font-size: 0.85rem;
  align-items: baseline;
}

.spec-row:nth-child(even) {
  background: rgba(255, 255, 255, 0.02);
}

.spec-key {
  color: #94a3b8;
  font-weight: 500;
  flex: 1;
  text-transform: capitalize;
}

.spec-val {
  color: #e2e8f0;
  flex: 1.5;
  text-align: right;
  font-feature-settings: "tnum";
}

/* Raw Accordion */
.raw-specs-accordion {
  border-top: 1px solid rgba(148, 163, 184, 0.1);
  padding-top: 1rem;
  margin-top: 1rem;
}

.raw-specs-accordion summary {
  color: #64748b;
  font-size: 0.8rem;
  cursor: pointer;
  transition: color 0.2s;
}

.raw-specs-accordion summary:hover {
  color: #94a3b8;
}

.raw-specs-accordion pre {
  margin-top: 1rem;
  background: #020617;
  padding: 1rem;
  border-radius: 6px;
  font-size: 0.75rem;
  color: #94a3b8;
  overflow-x: auto;
  max-height: 300px;
}

/* Auth Styles */
.auth-controls {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 1rem;
}

#auth-user-menu {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.9rem;
  color: var(--text-secondary);
}

.auth-modal-content {
  max-width: 400px;
}

#auth-form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.form-error {
  color: var(--error);
  font-size: 0.85rem;
  background: var(--error-bg);
  padding: 0.5rem;
  border-radius: var(--radius-sm);
}

/* Auth Gate */
.auth-gate {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: #0f172a;
  /* Solid background to hide app */
  z-index: 1000;
  /* Above everything */
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.3s ease;
}

.auth-gate.hidden {
  opacity: 0;
  pointer-events: none;
}

.auth-gate-content {
  text-align: center;
}

.auth-gate-content h1 {
  font-size: 2rem;
  margin-bottom: 1rem;
  color: var(--text-primary);
}

.auth-gate-content p {
  color: var(--text-secondary);
}

/* Enhanced Auth Gate */
.auth-gate-content {
  background: #1e293b;
  /* Slate 800 - Lighter than background */
  padding: 3rem;
  /* More padding */
  border: 1px solid rgba(148, 163, 184, 0.1);
  /* Subtle border */
  border-radius: 16px;
  box-shadow:
    0 20px 25px -5px rgba(0, 0, 0, 0.5),
    0 10px 10px -5px rgba(0, 0, 0, 0.3);
  /* strong shadow */
  width: 100%;
  max-width: 420px;
  text-align: center;
}

.auth-subtitle {
  color: var(--text-secondary);
  margin-bottom: 2rem;
}

.auth-form-card {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  text-align: left;
}

.auth-form-card label {
  font-weight: 500;
  font-size: 0.9rem;
  color: var(--text-primary);
  margin-bottom: 0.5rem;
  display: block;
}

.auth-form-card input {
  width: 100%;
  padding: 0.75rem;
  border-radius: var(--radius-md);
  border: 1px solid rgba(148, 163, 184, 0.2);
  /* Lighter border */
  background: #0f172a;
  /* Darker than card (#1e293b) -> looks like a slot */
  color: #f8fafc;
  /* Bright white text */
  font-size: 1rem;
}

.auth-form-card input::placeholder {
  color: #64748b;
  /* Visible placeholder */
}

.auth-form-card input:focus {
  border-color: var(--primary);
  outline: none;
  box-shadow: 0 0 0 2px var(--primary-light);
}

.full-width {
  width: 100%;
  justify-content: center;
  padding: 0.8rem;
  font-size: 1rem;
}

.half-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

/* Auth Actions */
.auth-actions {
  margin-top: 0.5rem;
}