:root {
  --bg-base: #0A0B0E;
  --bg-card: #13141B;
  --bg-card-hover: #1A1C26;
  --bg-input: #0E0F15;
  --border-color: rgba(255, 255, 255, 0.09);
  --border-focus: #FFFFFF;
  --text-primary: #F3F4F6;
  --text-secondary: #9CA3AF;
  --text-muted: #6B7280;
  --accent-pro: #FFFFFF;
  --accent-emerald: #10B981;
  --accent-amber: #F59E0B;
  --accent-cyan: #38BDF8;
  --accent-rose: #F43F5E;
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  background-color: var(--bg-base);
  color: var(--text-primary);
  font-family: var(--font-sans);
  font-size: 13.5px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}

/* Navbar */
.navbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 28px;
  background-color: var(--bg-card);
  border-bottom: 1px solid var(--border-color);
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(12px);
}

.nav-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.logo-box {
  width: 38px;
  height: 38px;
  background: linear-gradient(135deg, #262938 0%, #161720 100%);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
}

.logo-icon {
  width: 20px;
  height: 20px;
  color: #FFFFFF;
}

.brand-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 900;
  font-size: 15px;
  letter-spacing: 0.8px;
  color: #FFFFFF;
}

.badge-pro {
  background: rgba(255, 255, 255, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.3);
  color: #FFFFFF;
  font-size: 9px;
  font-weight: 900;
  padding: 2px 6px;
  border-radius: 4px;
  letter-spacing: 0.5px;
}

.brand-subtitle {
  font-size: 11px;
  color: var(--text-secondary);
}

.nav-center {
  flex: 1;
  max-width: 480px;
  margin: 0 24px;
}

.search-box {
  position: relative;
  display: flex;
  align-items: center;
}

.search-icon {
  position: absolute;
  left: 12px;
  width: 16px;
  height: 16px;
  color: var(--text-muted);
}

.search-box input {
  width: 100%;
  padding: 9px 36px 9px 38px;
  background-color: var(--bg-input);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-size: 13px;
  outline: none;
  transition: all 0.2s;
}

.search-box input:focus {
  border-color: rgba(255, 255, 255, 0.4);
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.06);
}

.btn-icon {
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 18px;
  padding: 4px 8px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.2s;
}

.btn-icon:hover {
  color: #FFFFFF;
}

#clearSearch {
  position: absolute;
  right: 8px;
}

.nav-right {
  display: flex;
  align-items: center;
  gap: 14px;
}

.sync-status {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: var(--text-secondary);
  padding: 6px 12px;
  background: rgba(255, 255, 255, 0.04);
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: var(--accent-amber);
}

.status-dot.online {
  background-color: var(--accent-emerald);
  box-shadow: 0 0 8px rgba(16, 185, 129, 0.6);
}

.status-dot.syncing {
  background-color: var(--accent-cyan);
  animation: pulse 1s infinite;
}

@keyframes pulse {
  0% { opacity: 0.4; }
  50% { opacity: 1; }
  100% { opacity: 0.4; }
}

/* Buttons */
.btn-primary {
  background: #FFFFFF;
  color: #000000;
  font-weight: 700;
  font-size: 13px;
  padding: 8px 16px;
  border-radius: var(--radius-md);
  border: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: all 0.2s;
}

.btn-primary:hover:not(:disabled) {
  background: #E5E7EB;
  box-shadow: 0 4px 12px rgba(255, 255, 255, 0.15);
}

.btn-primary:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.08);
  color: #FFFFFF;
  font-weight: 600;
  font-size: 13px;
  padding: 8px 14px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s;
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.15);
}

.btn-outline-small {
  background: transparent;
  color: #FFFFFF;
  font-size: 11px;
  font-weight: 700;
  padding: 4px 8px;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(255, 255, 255, 0.3);
  cursor: pointer;
  transition: all 0.2s;
}

.btn-outline-small:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: #FFFFFF;
}

/* Layout */
.container {
  max-width: 1740px;
  margin: 0 auto;
  padding: 12px 24px 40px 24px;
}

/* Metrics Grid */
.metrics-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px;
  margin-bottom: 20px;
}

.metric-card {
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 16px 20px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.metric-label {
  font-size: 11px;
  font-weight: 700;
  color: var(--text-muted);
  letter-spacing: 0.6px;
  margin-bottom: 6px;
}

.metric-value {
  font-size: 26px;
  font-weight: 800;
  color: var(--text-primary);
  letter-spacing: -0.5px;
  font-family: var(--font-mono);
}

.metric-sub {
  font-size: 11px;
  color: var(--text-secondary);
  margin-top: 6px;
}

.text-emerald { color: var(--accent-emerald) !important; }
.text-cyan { color: var(--accent-cyan) !important; }
.text-amber { color: var(--accent-amber) !important; }

.rate-control {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 4px;
}

.rate-input-group {
  display: flex;
  align-items: center;
  background-color: var(--bg-input);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 4px 8px;
}

.currency-symbol, .currency-unit {
  font-size: 12px;
  color: var(--text-muted);
  font-weight: bold;
}

.rate-input-group input {
  width: 58px;
  background: transparent;
  border: none;
  outline: none;
  color: #FFFFFF;
  font-family: var(--font-mono);
  font-size: 15px;
  font-weight: 700;
  text-align: center;
}

/* Filters Bar */
.filters-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.filter-tabs {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  padding-bottom: 4px;
}

.tab-btn {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
  padding: 8px 14px;
  border-radius: var(--radius-md);
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s;
}

.tab-btn:hover {
  color: #FFFFFF;
  border-color: rgba(255, 255, 255, 0.2);
}

.tab-btn.active {
  background: rgba(255, 255, 255, 0.12);
  border-color: #FFFFFF;
  color: #FFFFFF;
  font-weight: 700;
}

.filter-selects {
  display: flex;
  gap: 10px;
}

.dropdown {
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-size: 12.5px;
  padding: 8px 12px;
  outline: none;
  cursor: pointer;
}

.dropdown:focus {
  border-color: #FFFFFF;
}

/* Table Container */
.table-container {
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  overflow: hidden;
  position: relative;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
}

.products-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
}

.products-table th {
  background-color: #161822;
  color: var(--text-muted);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.6px;
  text-transform: uppercase;
  padding: 12px 14px;
  border-bottom: 1px solid var(--border-color);
  position: sticky;
  top: 0;
  z-index: 10;
}

.products-table td {
  padding: 12px 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  vertical-align: middle;
  transition: background 0.15s;
}

.products-table tbody tr:hover td {
  background-color: var(--bg-card-hover);
}

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

.product-thumb {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-md);
  background-color: var(--bg-input);
  border: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  flex-shrink: 0;
}

.product-thumb img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.product-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.product-name {
  font-weight: 700;
  color: #FFFFFF;
  font-size: 13px;
  cursor: pointer;
}

.product-name:hover {
  text-decoration: underline;
}

.product-meta {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  color: var(--text-muted);
}

.badge-brand {
  background: rgba(255, 255, 255, 0.08);
  color: #FFFFFF;
  padding: 1px 5px;
  border-radius: 4px;
  font-size: 9px;
  font-weight: 700;
}

.badge-line {
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: var(--text-secondary);
  padding: 1px 5px;
  border-radius: 4px;
  font-size: 9px;
  font-weight: 600;
}

.badge-line.superior {
  border-color: #FFFFFF;
  color: #FFFFFF;
  background: rgba(255, 255, 255, 0.1);
}

/* Category Badge */
.badge-category {
  display: inline-block;
  padding: 3px 8px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 600;
}

.cat-security { background: rgba(59, 130, 246, 0.15); color: #60A5FA; }
.cat-comfort { background: rgba(245, 158, 11, 0.15); color: #FBBF24; }
.cat-fire { background: rgba(239, 68, 68, 0.15); color: #F87171; }
.cat-video { background: rgba(168, 85, 247, 0.15); color: #C084FC; }
.cat-consumables { background: rgba(107, 114, 128, 0.2); color: #9CA3AF; }

/* Colors cell */
.colors-row {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-wrap: wrap;
}

.color-dot {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: 1.5px solid rgba(255, 255, 255, 0.4);
  display: inline-block;
  cursor: help;
  transition: transform 0.15s;
}

.color-dot:hover {
  transform: scale(1.3);
  border-color: #FFFFFF;
}

/* Editable Price Inputs */
.price-input {
  background-color: var(--bg-input);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  color: #FFFFFF;
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 700;
  padding: 6px 8px;
  width: 100%;
  max-width: 105px;
  outline: none;
  transition: all 0.2s;
  text-align: right;
}

.price-input:focus {
  border-color: #FFFFFF;
  background-color: #181A24;
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.15);
}

.price-input.modified {
  border-color: var(--accent-amber);
  background-color: rgba(245, 158, 11, 0.1);
  color: #FCD34D;
}

/* Margin cell */
.margin-badge {
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 12.5px;
  display: flex;
  flex-direction: column;
}

.margin-uah {
  color: var(--accent-emerald);
}

.margin-pct {
  font-size: 10px;
  color: var(--text-muted);
}

/* Actions */
.btn-save-row {
  background: transparent;
  border: 1px solid var(--border-color);
  color: var(--text-muted);
  cursor: pointer;
  padding: 6px 8px;
  border-radius: var(--radius-sm);
  transition: all 0.2s;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.btn-save-row:hover:not(:disabled) {
  background: rgba(255, 255, 255, 0.15);
  color: #FFFFFF;
  border-color: #FFFFFF;
}

.btn-save-row.active {
  background: var(--accent-amber);
  color: #000000;
  border-color: var(--accent-amber);
  font-weight: bold;
}

/* Empty & Loading States */
.loading-overlay {
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(10, 11, 14, 0.85);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  z-index: 20;
  backdrop-filter: blur(4px);
}

.spinner {
  width: 38px;
  height: 38px;
  border: 3px solid rgba(255, 255, 255, 0.1);
  border-top-color: #FFFFFF;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

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

.empty-state {
  padding: 60px 20px;
  text-align: center;
  color: var(--text-muted);
}

.empty-state h3 {
  color: var(--text-primary);
  margin: 12px 0 6px 0;
}

/* Modal */
.modal-backdrop {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s;
}

.modal-backdrop.open,
.modal-backdrop.active {
  opacity: 1;
  pointer-events: auto;
}

.modal-card {
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  width: 90%;
  max-width: 680px;
  max-height: 85vh;
  display: flex;
  flex-direction: column;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.6);
}

.modal-header {
  padding: 18px 24px;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.modal-title {
  font-size: 18px;
  font-weight: 800;
  margin-top: 4px;
}

.modal-body {
  padding: 24px;
  overflow-y: auto;
}

.modal-form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.form-group.full-width {
  grid-column: 1 / -1;
}

.form-group label {
  display: block;
  font-size: 11.5px;
  color: var(--text-secondary);
  font-weight: 600;
  margin-bottom: 6px;
}

.form-group input, .form-group textarea {
  width: 100%;
  padding: 9px 12px;
  background-color: var(--bg-input);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-size: 13px;
  outline: none;
}

.form-group input:focus, .form-group textarea:focus {
  border-color: #FFFFFF;
}

.articles-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 8px;
  margin-top: 6px;
}

.article-chip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 6px 10px;
}

.article-color {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
}

.article-code {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-secondary);
}

.modal-footer {
  padding: 16px 24px;
  border-top: 1px solid var(--border-color);
  display: flex;
  justify-content: flex-end;
  gap: 12px;
}

/* Toast */
.toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  background: #1E222D;
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #FFFFFF;
  padding: 12px 18px;
  border-radius: var(--radius-md);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
  font-size: 13px;
  transform: translateY(100px);
  opacity: 0;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  z-index: 200;
}

.toast.show {
  transform: translateY(0);
  opacity: 1;
}

.toast-icon {
  background: var(--accent-emerald);
  color: #000000;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 900;
}

.toast.toast-error {
  border-color: var(--accent-red);
}

.toast.toast-error .toast-icon {
  background: var(--accent-red);
  color: #FFFFFF;
}

/* Table Inputs & Currency Wrappers */
.input-currency-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.table-input {
  background-color: var(--bg-input);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  color: #FFFFFF;
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 700;
  padding: 6px 20px 6px 8px;
  width: 100%;
  outline: none;
  transition: all 0.2s;
  text-align: right;
}

.table-input:focus {
  border-color: #FFFFFF;
  background-color: #1A1D27;
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.2);
}

.input-currency-wrapper .currency-symbol {
  position: absolute;
  right: 6px;
  color: var(--text-muted);
  font-size: 11px;
  font-weight: 600;
  pointer-events: none;
}

/* Product Info Cell */
.product-info-cell {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.product-name-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.product-subtext {
  font-size: 11px;
  color: var(--text-muted);
}

/* Color dots */
.color-dots-wrapper {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-wrap: wrap;
}

.color-dot.color-white { background: #FFFFFF; border-color: #AAAAAA; }
.color-dot.color-black { background: #111111; border-color: #555555; }
.color-dot.color-fog { background: #9E9E9E; border-color: #CCCCCC; }
.color-dot.color-grey { background: #757575; border-color: #999999; }
.color-dot.color-graphite { background: #424242; border-color: #777777; }
.color-dot.color-ivory { background: #FFFFF0; border-color: #DCDCDC; }
.color-dot.color-olive { background: #556B2F; border-color: #889955; }
.color-dot.color-oyster { background: #DCD7D0; border-color: #A09890; }

/* Line Badges */
.badge-line-baseline { border-color: #3B82F6; color: #60A5FA; background: rgba(59, 130, 246, 0.1); }
.badge-line-superior { border-color: #FFFFFF; color: #FFFFFF; background: rgba(255, 255, 255, 0.15); font-weight: 700; }
.badge-line-fibra { border-color: #10B981; color: #34D399; background: rgba(16, 185, 129, 0.1); }

/* Orientation Badges */
.badge-orientation {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 1px 6px;
  border-radius: 4px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.2px;
}
.badge-ori-both {
  border: 1px solid rgba(168, 85, 247, 0.4);
  color: #C084FC;
  background: rgba(168, 85, 247, 0.12);
}
.badge-ori-horiz {
  border: 1px solid rgba(56, 189, 248, 0.4);
  color: #38BDF8;
  background: rgba(56, 189, 248, 0.12);
}
.badge-ori-vert {
  border: 1px solid rgba(236, 72, 153, 0.4);
  color: #F472B6;
  background: rgba(236, 72, 153, 0.12);
}

/* Margin Cell */
.margin-cell {
  display: flex;
  flex-direction: column;
  font-family: var(--font-mono);
  font-weight: 700;
}

.margin-val {
  font-size: 13px;
}

.margin-pct {
  font-size: 10.5px;
}

/* Row Actions */
.actions-cell {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.btn-action {
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
  border-radius: var(--radius-sm);
  width: 28px;
  height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.15s;
}

.btn-action:hover:not(:disabled) {
  border-color: #FFFFFF;
  color: #FFFFFF;
  background: rgba(255, 255, 255, 0.1);
}

.btn-action:disabled {
  opacity: 0.3;
  cursor: not-allowed;
}

/* Row Dirty Highlight */
tr.is-dirty {
  background-color: rgba(245, 158, 11, 0.07) !important;
}

tr.is-dirty td:first-child {
  border-left: 3px solid var(--accent-amber);
}

tr.is-dirty .table-input {
  border-color: rgba(245, 158, 11, 0.5);
  background-color: rgba(245, 158, 11, 0.08);
  color: #FDE68A;
}

tr.is-dirty .btn-save-row {
  background: var(--accent-amber);
  color: #000000;
  border-color: var(--accent-amber);
}

/* Sync status states */
.sync-status.status-connecting .status-dot {
  background-color: var(--accent-cyan);
  animation: pulse 1s infinite;
}

.sync-status.status-synced .status-dot {
  background-color: var(--accent-emerald);
  box-shadow: 0 0 8px rgba(16, 185, 129, 0.7);
}

.sync-status.status-error .status-dot {
  background-color: var(--accent-red);
  box-shadow: 0 0 8px rgba(239, 68, 68, 0.7);
}

/* Modal Article Badges */
.article-badge {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 6px 10px;
}

.article-color-name {
  font-size: 12px;
  color: #FFFFFF;
  text-transform: capitalize;
}

.article-sku {
  margin-left: auto;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--accent-cyan);
}

/* Modal Large for Price Import */
.modal-card.modal-large {
  max-width: 1100px;
  width: 95%;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
}

.modal-card.modal-large .modal-body {
  overflow-y: auto;
  flex: 1;
  padding: 24px;
}

/* Drag & Drop Zone */
.drop-zone {
  border: 2px dashed rgba(255, 255, 255, 0.2);
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.02);
  padding: 40px 20px;
  text-align: center;
  transition: all 0.25s ease;
  cursor: pointer;
}

.drop-zone:hover, .drop-zone.drag-over {
  border-color: #FFFFFF;
  background: rgba(255, 255, 255, 0.06);
  transform: translateY(-2px);
}

.drop-zone-icon {
  color: var(--accent-cyan);
  margin-bottom: 12px;
}

.drop-zone-title {
  font-size: 18px;
  font-weight: 700;
  color: #FFFFFF;
  margin-bottom: 6px;
}

.drop-zone-subtitle {
  font-size: 13px;
  color: var(--text-secondary);
  margin-bottom: 20px;
}

/* Import Loading State */
.import-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 50px 20px;
  gap: 16px;
}

.import-loading-text {
  font-size: 14px;
  color: var(--text-secondary);
  font-weight: 600;
}

/* Stats Grid */
.import-stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-bottom: 20px;
}

.stat-box {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 12px 16px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.stat-label {
  font-size: 11px;
  color: var(--text-muted);
  text-transform: uppercase;
  font-weight: 700;
  letter-spacing: 0.5px;
}

.stat-val {
  font-size: 20px;
  font-weight: 800;
  font-family: var(--font-mono);
  color: #FFFFFF;
}

/* Diff Table */
.diff-table-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
  gap: 16px;
  flex-wrap: wrap;
}

.diff-filter-tabs {
  display: flex;
  gap: 8px;
}

.diff-tab-btn {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
  padding: 6px 12px;
  border-radius: var(--radius-md);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.diff-tab-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #FFFFFF;
}

.diff-tab-btn.active {
  background: #FFFFFF;
  color: #000000;
  border-color: #FFFFFF;
}

.checkbox-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--text-secondary);
  cursor: pointer;
}

.checkbox-label input[type="checkbox"] {
  accent-color: #FFFFFF;
  width: 16px;
  height: 16px;
}

.diff-table-wrapper {
  max-height: 400px;
  overflow-y: auto;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  background: var(--bg-card);
}

.diff-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12.5px;
}

.diff-table th {
  position: sticky;
  top: 0;
  background: #151821;
  padding: 10px 12px;
  text-align: left;
  font-size: 11px;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  border-bottom: 1px solid var(--border-color);
  z-index: 10;
}

.diff-table td {
  padding: 10px 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  vertical-align: middle;
}

.diff-table tr:hover {
  background: rgba(255, 255, 255, 0.03);
}

.diff-table tr.diff-changed {
  background: rgba(245, 158, 11, 0.04);
}

.diff-cell {
  display: flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-mono);
  font-weight: 600;
}

.diff-val-old {
  color: var(--text-muted);
  text-decoration: line-through;
  font-size: 11px;
}

.diff-val-new {
  color: #FFFFFF;
  font-weight: 700;
}

.diff-arrow {
  color: var(--text-muted);
  font-size: 10px;
}

.diff-badge {
  font-size: 10px;
  padding: 1px 4px;
  border-radius: 4px;
  font-weight: 700;
  margin-left: 4px;
}

.diff-badge.diff-plus {
  background: rgba(16, 185, 129, 0.15);
  color: var(--accent-emerald);
}

.diff-badge.diff-minus {
  background: rgba(239, 68, 68, 0.15);
  color: var(--accent-red);
}

.badge-status {
  display: inline-block;
  padding: 3px 8px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 700;
  text-align: center;
}

.badge-status.badge-updated {
  background: rgba(245, 158, 11, 0.15);
  color: #FBBF24;
}

.badge-status.badge-identical {
  background: rgba(107, 114, 128, 0.2);
  color: #9CA3AF;
}

.badge-status.badge-unmatched {
  background: rgba(239, 68, 68, 0.15);
  color: #F87171;
}

.btn-primary-small {
  background: #FFFFFF;
  color: #000000;
  font-weight: 700;
  font-size: 11.5px;
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  border: none;
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
}

.btn-primary-small:hover:not(:disabled) {
  background: #E5E7EB;
  box-shadow: 0 2px 8px rgba(255, 255, 255, 0.2);
}

.btn-primary-small:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.calculated-rate-uah {
  font-family: var(--font-mono);
  font-size: 12.5px;
  font-weight: 700;
  color: #FFFFFF;
  text-align: right;
  padding: 6px 8px;
  background: rgba(255, 255, 255, 0.03);
  border-radius: var(--radius-sm);
  border: 1px dashed rgba(255, 255, 255, 0.15);
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 4px;
}




/* -------------------------------------------------------------------------- */
/* Dynamic Categories, Product Editor & Media Compression Styles               */
/* -------------------------------------------------------------------------- */

.filter-tabs-wrapper {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.btn-tab-add {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px dashed rgba(255, 255, 255, 0.2);
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-tab-add:hover {
  background: rgba(16, 185, 129, 0.1);
  border-color: var(--accent-emerald);
  color: var(--accent-emerald);
}

/* Modal Product Editor Specifics */
.modal-product-editor {
  max-width: 820px;
  max-height: 90vh;
}

.modal-header-left {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.modal-subtitle {
  font-size: 11px;
  color: var(--text-muted);
}

.modal-subtitle code {
  font-family: var(--font-mono);
  background: rgba(255, 255, 255, 0.08);
  padding: 1px 5px;
  border-radius: 4px;
  color: var(--text-secondary);
}

.modal-nav-tabs {
  display: flex;
  background: rgba(0, 0, 0, 0.3);
  border-bottom: 1px solid var(--border-color);
  padding: 0 24px;
  gap: 4px;
}

.modal-nav-tab {
  padding: 12px 18px;
  background: transparent;
  border: none;
  border-bottom: 2px solid transparent;
  color: var(--text-secondary);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.modal-nav-tab:hover {
  color: var(--text-primary);
}

.modal-nav-tab.active {
  color: #FFFFFF;
  border-bottom-color: var(--accent-cyan);
  background: rgba(56, 189, 248, 0.05);
}

.section-lead {
  font-size: 12.5px;
  color: var(--text-secondary);
  line-height: 1.5;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 12px 16px;
  margin-bottom: 20px;
}

.required-star {
  color: var(--accent-rose);
  font-weight: bold;
}

.form-hint {
  font-size: 10.5px;
  color: var(--text-muted);
  margin-top: 4px;
  display: block;
}

.input-with-action {
  display: flex;
  gap: 8px;
  align-items: center;
}

.input-with-action select, .input-with-action input {
  flex: 1;
}

.btn-link-action {
  background: transparent;
  border: none;
  color: var(--accent-cyan);
  font-size: 11.5px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  padding: 4px 6px;
  text-decoration: underline;
}

.btn-link-action:hover {
  color: #FFFFFF;
}

/* Margin summary card inside modal */
.margin-summary-card {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.08) 0%, rgba(56, 189, 248, 0.05) 100%);
  border: 1px solid rgba(16, 185, 129, 0.25);
  border-radius: var(--radius-md);
  padding: 14px 18px;
}

.margin-summary-title {
  font-size: 11.5px;
  font-weight: 700;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 10px;
}

.margin-summary-row {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.margin-item {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.margin-lbl {
  font-size: 11px;
  color: var(--text-muted);
}

.margin-val {
  font-size: 16px;
  font-weight: 800;
  font-family: var(--font-mono);
}

/* Colors manager styles */
.colors-manager {
  margin-bottom: 24px;
}

.colors-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 16px;
}

.colors-header h4 {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-primary);
}

.quick-colors-bar {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.quick-lbl {
  font-size: 11px;
  color: var(--text-muted);
  margin-right: 4px;
}

.btn-quick-color {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  font-size: 11.5px;
  cursor: pointer;
  transition: all 0.15s;
}

.btn-quick-color:hover {
  background: var(--bg-card-hover);
  border-color: rgba(255, 255, 255, 0.3);
  color: #FFFFFF;
}

.swatch-circle {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  display: inline-block;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.swatch-white { background-color: #FFFFFF; }
.swatch-black { background-color: #111111; }
.swatch-graphite { background-color: #4B5563; }
.swatch-grey { background-color: #9CA3AF; }

.articles-grid {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.color-row-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 10px 14px;
  gap: 12px;
}

.color-row-card.is-default {
  border-color: rgba(56, 189, 248, 0.4);
  background: rgba(56, 189, 248, 0.04);
}

.color-badge-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 120px;
}

.color-name-text {
  font-size: 13px;
  font-weight: 600;
}

.color-sku-input {
  flex: 1;
  max-width: 200px;
  font-family: var(--font-mono);
  font-size: 12.5px;
  padding: 6px 10px !important;
}

.color-default-label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11.5px;
  color: var(--text-secondary);
  cursor: pointer;
}

.color-default-label input[type="radio"] {
  cursor: pointer;
}

.btn-remove-color {
  background: transparent;
  border: none;
  color: var(--accent-rose);
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 15px;
  line-height: 1;
  transition: all 0.15s;
}

.btn-remove-color:hover {
  background: rgba(244, 63, 94, 0.15);
}

/* Unification Box */
.unify-tool-box {
  background: rgba(56, 189, 248, 0.03);
  border: 1px dashed rgba(56, 189, 248, 0.3);
  border-radius: var(--radius-md);
  padding: 18px;
  margin-top: 20px;
}

.unify-tool-header {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13.5px;
  color: var(--accent-cyan);
  margin-bottom: 6px;
}

.unify-tool-desc {
  font-size: 11.5px;
  color: var(--text-secondary);
  line-height: 1.4;
  margin-bottom: 14px;
}

.unify-inputs-row {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}

.btn-merge {
  white-space: nowrap;
  background: rgba(56, 189, 248, 0.15);
  border-color: rgba(56, 189, 248, 0.4);
  color: var(--accent-cyan);
}

.btn-merge:hover {
  background: var(--accent-cyan);
  color: #000000;
}

/* Image Upload & Compression */
.image-uploader-box {
  display: flex;
  flex-direction: column;
}

.dropzone-area {
  border: 2px dashed rgba(255, 255, 255, 0.15);
  border-radius: var(--radius-lg);
  background: rgba(0, 0, 0, 0.2);
  padding: 30px 20px;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s ease;
  position: relative;
}

.dropzone-area:hover, .dropzone-area.drag-over {
  border-color: var(--accent-cyan);
  background: rgba(56, 189, 248, 0.05);
}

.dropzone-content-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  color: var(--text-muted);
}

.dropzone-main-text {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
}

.dropzone-sub-text {
  font-size: 11.5px;
  color: var(--text-muted);
  max-width: 420px;
}

.dropzone-preview-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  flex-wrap: wrap;
}

.dropzone-preview-wrap img {
  width: 140px;
  height: 140px;
  object-fit: contain;
  background: #000000;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 4px;
}

.dropzone-preview-info {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
}

.preview-badge {
  background: rgba(16, 185, 129, 0.15);
  border: 1px solid rgba(16, 185, 129, 0.3);
  color: var(--accent-emerald);
  font-size: 11.5px;
  font-weight: 700;
  padding: 5px 10px;
  border-radius: 6px;
  font-family: var(--font-mono);
}

.btn-link-danger {
  background: transparent;
  border: none;
  color: var(--accent-rose);
  font-size: 12px;
  cursor: pointer;
  text-decoration: underline;
  padding: 0;
}

.btn-link-danger:hover {
  color: #FFFFFF;
}

/* Modal Footer Layout */
.modal-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 24px;
  border-top: 1px solid var(--border-color);
}

.modal-footer-right {
  display: flex;
  gap: 10px;
}

.btn-danger-outline {
  background: rgba(244, 63, 94, 0.08);
  border: 1px solid rgba(244, 63, 94, 0.3);
  color: var(--accent-rose);
  padding: 9px 16px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-danger-outline:hover {
  background: var(--accent-rose);
  color: #FFFFFF;
}

.modal-small {
  max-width: 450px;
}


/* Subcategories Row */
.subcategory-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding-top: 10px;
  border-top: 1px dashed rgba(255, 255, 255, 0.08);
  margin-top: 10px;
  overflow-x: auto;
}

.subcategory-pills {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: nowrap;
}

.subcat-pill {
  padding: 5px 12px;
  border-radius: 14px;
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
  font-size: 11.5px;
  font-weight: 500;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.15s ease;
}

.subcat-pill:hover {
  border-color: rgba(255, 255, 255, 0.3);
  color: var(--text-primary);
}

.subcat-pill.active {
  background: rgba(56, 189, 248, 0.15);
  border-color: var(--accent-cyan);
  color: var(--accent-cyan);
  font-weight: 700;
}

.btn-subcat-add {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  background: transparent;
  border: 1px dashed rgba(56, 189, 248, 0.4);
  border-radius: 12px;
  color: var(--accent-cyan);
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.15s;
}

.btn-subcat-add:hover {
  background: rgba(56, 189, 248, 0.1);
  border-color: var(--accent-cyan);
}

/* --- Color Photo Cards & Brand Management --- */
.color-photo-card {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 12px 16px;
  display: flex;
  align-items: center;
  gap: 14px;
  transition: border-color 0.2s;
}
.color-photo-card:hover {
  border-color: rgba(255, 255, 255, 0.2);
}
.color-photo-badge {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  font-size: 13px;
  min-width: 130px;
}
.color-photo-preview {
  width: 48px;
  height: 48px;
  border-radius: 6px;
  border: 1px solid var(--border-color);
  background: #101218;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  flex-shrink: 0;
}
.color-photo-preview img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.color-photo-inputs {
  flex: 1;
  display: flex;
  gap: 8px;
  align-items: center;
}
.color-photo-inputs input {
  flex: 1;
  background-color: var(--bg-input);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  color: #fff;
  padding: 7px 10px;
  font-size: 12px;
  outline: none;
}
.color-photo-inputs input:focus {
  border-color: #fff;
}

.brand-item-card {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 10px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  transition: all 0.2s;
}
.brand-item-card:hover {
  border-color: rgba(255, 255, 255, 0.15);
  background: rgba(255, 255, 255, 0.04);
}
.brand-logo-preview {
  width: 32px;
  height: 32px;
  border-radius: 4px;
  background: #14161F;
  border: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  flex-shrink: 0;
}
.brand-logo-preview img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

/* --- Compact Metrics Toolbar (Maximized Table Real Estate) --- */
.metrics-compact-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 8px 18px;
  margin-bottom: 12px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.25);
}

.metric-compact-item {
  display: flex;
  align-items: center;
  gap: 10px;
}

.metric-compact-icon {
  font-size: 16px;
  line-height: 1;
}

.metric-compact-text {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
}

.metric-compact-title {
  color: var(--text-muted);
  font-weight: 600;
  font-size: 12px;
}

.metric-compact-value {
  font-size: 15px;
  font-weight: 800;
  font-family: var(--font-mono);
  color: #FFFFFF;
}

.metric-compact-tag {
  color: var(--text-secondary);
  font-size: 11px;
}

.rate-compact-controls {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.rate-input-group.compact {
  padding: 2px 8px;
  border-radius: 6px;
  background: var(--bg-input);
}

.rate-input-group.compact input {
  width: 52px;
  font-size: 13px;
  padding: 2px 0;
}

.btn-action-outline.compact {
  font-size: 11px;
  padding: 4px 8px;
  background: rgba(59, 130, 246, 0.12);
  border: 1px solid rgba(59, 130, 246, 0.4);
  color: #60a5fa;
  border-radius: 6px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.btn-action-outline.compact:hover {
  background: rgba(59, 130, 246, 0.22);
}

/* --- View Switcher (Table vs Cards / Cart) --- */
.view-switch-box {
  display: flex;
  align-items: center;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 2px;
  gap: 2px;
  margin-left: 6px;
}

.btn-view-mode {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  font-size: 12px;
  font-weight: 600;
  border-radius: 4px;
  border: none;
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.2s;
}

.btn-view-mode:hover {
  color: #FFFFFF;
  background: rgba(255, 255, 255, 0.06);
}

.btn-view-mode.active {
  background: rgba(255, 255, 255, 0.14);
  color: #FFFFFF;
  font-weight: 700;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.4);
}

/* --- Maximized Table Container Space --- */
.table-container {
  min-height: calc(100vh - 210px);
}

/* --- Product Cards Grid (Cards / Cart View) --- */
.products-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
  padding: 16px;
  width: 100%;
}

.product-card {
  background: #141620;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transition: transform 0.2s, border-color 0.2s, box-shadow 0.2s;
  position: relative;
}

.product-card:hover {
  transform: translateY(-2px);
  border-color: rgba(255, 255, 255, 0.2);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.45);
}

.product-card.is-dirty {
  border-color: var(--accent-amber);
  box-shadow: 0 0 12px rgba(245, 158, 11, 0.2);
}

.product-card-header {
  position: relative;
  background: rgba(0, 0, 0, 0.25);
  height: 140px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.product-card-img {
  max-width: 100%;
  max-height: 120px;
  object-fit: contain;
  transition: transform 0.2s;
}

.product-card:hover .product-card-img {
  transform: scale(1.06);
}

.product-card-badges {
  position: absolute;
  top: 8px;
  left: 8px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  z-index: 2;
}

.product-card-brand-badge {
  position: absolute;
  top: 8px;
  right: 8px;
  display: flex;
  align-items: center;
  gap: 5px;
  background: rgba(18, 20, 28, 0.9);
  backdrop-filter: blur(6px);
  padding: 3px 8px;
  border-radius: 4px;
  border: 1px solid var(--border-color);
  font-size: 11px;
  font-weight: 700;
  color: #fff;
  z-index: 2;
}

.product-card-brand-badge img {
  width: 14px;
  height: 14px;
  object-fit: contain;
}

.product-card-color-strip {
  position: absolute;
  bottom: 8px;
  right: 8px;
  display: flex;
  gap: 4px;
  background: rgba(0, 0, 0, 0.6);
  padding: 3px 7px;
  border-radius: 12px;
  backdrop-filter: blur(4px);
  z-index: 2;
}

.product-card-body {
  padding: 14px;
  display: flex;
  flex-direction: column;
  flex: 1;
  gap: 10px;
}

.product-card-title {
  font-size: 14px;
  font-weight: 700;
  color: #FFFFFF;
  line-height: 1.35;
  margin: 0;
}

.product-card-desc {
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 33px;
}

.product-card-pricing {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: var(--radius-md);
  padding: 8px 10px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  font-size: 11px;
}

.pricing-row-label {
  color: var(--text-muted);
}

.pricing-row-val {
  font-weight: 700;
  font-family: var(--font-mono);
  color: #fff;
  text-align: right;
}

.product-card-actions {
  display: flex;
  gap: 8px;
  margin-top: auto;
  padding-top: 10px;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.btn-card-edit {
  flex: 1;
  padding: 8px 12px;
  font-size: 12px;
  font-weight: 600;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  color: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: all 0.2s;
}

.btn-card-edit:hover {
  background: rgba(255, 255, 255, 0.16);
  border-color: rgba(255, 255, 255, 0.3);
}

.btn-card-delete {
  padding: 8px 12px;
  background: rgba(239, 68, 68, 0.08);
  border: 1px solid rgba(239, 68, 68, 0.25);
  border-radius: var(--radius-md);
  color: #EF4444;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
}

.btn-card-delete:hover {
  background: rgba(239, 68, 68, 0.2);
}

/* --- Compatibility Selector & Presets --- */
.compat-tags-wrapper {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  min-height: 42px;
  padding: 8px 12px;
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  align-items: center;
}

.compat-pill-tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(59, 130, 246, 0.15);
  border: 1px solid rgba(59, 130, 246, 0.4);
  color: #93C5FD;
  padding: 5px 10px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 600;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
}

.compat-pill-remove {
  background: none;
  border: none;
  color: #93C5FD;
  cursor: pointer;
  font-size: 13px;
  line-height: 1;
  padding: 0 2px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 3px;
  transition: all 0.15s;
}

.compat-pill-remove:hover {
  background: rgba(239, 68, 68, 0.2);
  color: #EF4444;
}

.btn-compat-preset {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
  padding: 5px 10px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-compat-preset:hover {
  background: rgba(255, 255, 255, 0.12);
  color: #FFFFFF;
  border-color: rgba(255, 255, 255, 0.25);
}

/* Two-Tier Compatibility & Conflict Styling */
.compat-section-card {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 16px 18px;
  position: relative;
  transition: all 0.2s ease;
}

.compat-section-requires {
  border-left: 4px solid #3B82F6;
  background: linear-gradient(180deg, rgba(59, 130, 246, 0.04) 0%, rgba(255, 255, 255, 0.01) 100%);
}

.compat-section-conflicts {
  border-left: 4px solid #EF4444;
  background: linear-gradient(180deg, rgba(239, 68, 68, 0.04) 0%, rgba(255, 255, 255, 0.01) 100%);
}

.compat-count-badge {
  font-size: 11px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 12px;
  text-transform: uppercase;
  letter-spacing: 0.4px;
}
.compat-count-badge.badge-blue {
  background: rgba(59, 130, 246, 0.15);
  color: #60A5FA;
  border: 1px solid rgba(59, 130, 246, 0.3);
}
.compat-count-badge.badge-rose {
  background: rgba(239, 68, 68, 0.15);
  color: #F87171;
  border: 1px solid rgba(239, 68, 68, 0.3);
}

.compat-presets-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin: 10px 0 14px 0;
  background: rgba(0, 0, 0, 0.22);
  padding: 8px 12px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.04);
}

.compat-presets-label {
  font-size: 11px;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  margin-right: 4px;
}

.btn-conflict-preset {
  background: rgba(239, 68, 68, 0.06);
  border: 1px solid rgba(239, 68, 68, 0.25);
  color: #FCA5A5;
  padding: 5px 10px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-conflict-preset:hover {
  background: rgba(239, 68, 68, 0.18);
  color: #FFFFFF;
  border-color: rgba(239, 68, 68, 0.5);
}

.btn-rose {
  background: #DC2626 !important;
  color: #FFFFFF !important;
  border: none !important;
}
.btn-rose:hover {
  background: #B91C1C !important;
}

.compat-tags-wrapper.conflict-wrapper {
  border-color: rgba(239, 68, 68, 0.25);
}

.conflict-pill-tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(239, 68, 68, 0.14);
  border: 1px solid rgba(239, 68, 68, 0.45);
  color: #FCA5A5;
  padding: 5px 10px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 600;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
}

.conflict-pill-remove {
  background: none;
  border: none;
  color: #FCA5A5;
  cursor: pointer;
  font-size: 13px;
  line-height: 1;
  padding: 0 2px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 3px;
  transition: all 0.15s;
}

.conflict-pill-remove:hover {
  background: rgba(239, 68, 68, 0.35);
  color: #FFFFFF;
}
