/* ── Reset & Base ─────────────────────────────── */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --bg-primary: #0a0e1a;
  --bg-secondary: #111827;
  --bg-card: #1a2035;
  --bg-card-hover: #1f2847;
  --bg-input: #151b2e;
  --border: #2a3352;
  --border-light: #333d5c;

  --text-primary: #e8ecf4;
  --text-secondary: #8892b0;
  --text-muted: #5a6480;

  --accent-blue: #4f8cff;
  --accent-purple: #a855f7;
  --accent-green: #22c55e;
  --accent-orange: #f59e0b;
  --accent-red: #ef4444;
  --accent-cyan: #06b6d4;
  --accent-pink: #ec4899;

  --gradient-brand: linear-gradient(135deg, #4f8cff 0%, #a855f7 100%);
  --gradient-green: linear-gradient(135deg, #22c55e 0%, #06b6d4 100%);
  --gradient-danger: linear-gradient(135deg, #ef4444 0%, #ec4899 100%);

  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.5);
  --shadow-glow-blue: 0 0 20px rgba(79, 140, 255, 0.2);
  --shadow-glow-green: 0 0 20px rgba(34, 197, 94, 0.2);

  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 20px;

  --font: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --transition: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

html {
  font-size: 14px;
  scroll-behavior: smooth;
}

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

/* ── Header ───────────────────────────────────── */
.header {
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 32px;
  background: rgba(10, 14, 26, 0.85);
  backdrop-filter: blur(16px) saturate(180%);
  border-bottom: 1px solid var(--border);
}

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

.header__logo {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-sm);
  background: var(--gradient-brand);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 18px;
  color: #fff;
  letter-spacing: -0.5px;
}

.header__title {
  font-size: 16px;
  font-weight: 700;
  letter-spacing: -0.3px;
  background: var(--gradient-brand);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.header__subtitle {
  font-size: 11px;
  color: var(--text-muted);
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: 1.5px;
}

.header__actions {
  display: flex;
  gap: 8px;
}

/* ── Buttons ──────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 18px;
  border: none;
  border-radius: var(--radius-sm);
  font-family: var(--font);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition);
  white-space: nowrap;
}

.btn--primary {
  background: var(--gradient-brand);
  color: #fff;
  box-shadow: var(--shadow-glow-blue);
}

.btn--primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 0 30px rgba(79, 140, 255, 0.35);
}

.btn--danger {
  background: var(--gradient-danger);
  color: #fff;
}

.btn--danger:hover {
  transform: translateY(-1px);
  box-shadow: 0 0 30px rgba(239, 68, 68, 0.3);
}

.btn--ghost {
  background: transparent;
  color: var(--text-secondary);
  border: 1px solid var(--border);
}

.btn--ghost:hover {
  background: var(--bg-card);
  color: var(--text-primary);
  border-color: var(--border-light);
}

.btn--sm {
  padding: 6px 12px;
  font-size: 12px;
}

.btn--icon {
  padding: 8px;
  border-radius: 8px;
}

.btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  transform: none !important;
}

/* ── Main ─────────────────────────────────────── */
.main {
  max-width: 1400px;
  margin: 0 auto;
  padding: 28px 32px 60px;
  display: flex;
  flex-direction: column;
  gap: 28px;
}

/* ── Stats Cards ──────────────────────────────── */
.stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 16px;
}

.stat-card {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 20px 22px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  transition: all var(--transition);
}

.stat-card:hover {
  border-color: var(--border-light);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.stat-card--highlight {
  border-color: rgba(34, 197, 94, 0.3);
  background: linear-gradient(135deg, rgba(34, 197, 94, 0.05) 0%, var(--bg-card) 100%);
}

.stat-card__icon {
  width: 46px;
  height: 46px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.stat-card__icon--blue {
  background: rgba(79, 140, 255, 0.12);
  color: var(--accent-blue);
}

.stat-card__icon--purple {
  background: rgba(168, 85, 247, 0.12);
  color: var(--accent-purple);
}

.stat-card__icon--orange {
  background: rgba(245, 158, 11, 0.12);
  color: var(--accent-orange);
}

.stat-card__icon--green {
  background: rgba(34, 197, 94, 0.12);
  color: var(--accent-green);
}

.stat-card__icon--cyan {
  background: rgba(6, 182, 212, 0.12);
  color: var(--accent-cyan);
}

.stat-card__body {
  display: flex;
  flex-direction: column;
}

.stat-card__value {
  font-size: 26px;
  font-weight: 800;
  letter-spacing: -0.5px;
  line-height: 1.1;
}

.stat-card__label {
  font-size: 12px;
  color: var(--text-muted);
  font-weight: 400;
  margin-top: 4px;
}

/* ── Section Titles ───────────────────────────── */
.section-title {
  font-size: 15px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text-secondary);
}

/* ── Scan Panel ───────────────────────────────── */
.scan-panel {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
}

.scan-panel__header {
  margin-bottom: 20px;
}

.scan-panel__controls {
  display: flex;
  flex-direction: column;
  gap: 0;
  /* Spacing handled by row margins */
  width: 100%;
}

/* ── Form Elements ────────────────────────────── */
.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form-group--checkbox {
  justify-content: flex-end;
  padding-bottom: 2px;
}

.form-label {
  font-size: 11px;
  font-weight: 500;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.8px;
}

.form-input,
.form-select {
  padding: 9px 14px;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-family: var(--font);
  font-size: 13px;
  transition: border-color var(--transition);
  min-width: 130px;
}

.form-input:focus,
.form-select:focus {
  outline: none;
  border-color: var(--accent-blue);
  box-shadow: 0 0 0 3px rgba(79, 140, 255, 0.15);
}

.form-select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%235a6480' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 36px;
  cursor: pointer;
}

.form-select--small {
  padding: 7px 12px;
  font-size: 12px;
  min-width: 160px;
}

/* Checkbox */
.checkbox {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  font-size: 13px;
  color: var(--text-secondary);
  user-select: none;
}

.checkbox input {
  display: none;
}

.checkbox__mark {
  width: 18px;
  height: 18px;
  border: 2px solid var(--border-light);
  border-radius: 5px;
  transition: all var(--transition);
  position: relative;
}

.checkbox input:checked+.checkbox__mark {
  background: var(--accent-blue);
  border-color: var(--accent-blue);
}

.checkbox input:checked+.checkbox__mark::after {
  content: '';
  position: absolute;
  left: 4px;
  top: 1px;
  width: 6px;
  height: 10px;
  border: solid #fff;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

/* ── Scan Progress ────────────────────────────── */
.scan-progress {
  margin-top: 20px;
  animation: fadeIn 0.3s ease;
}

.scan-progress__bar {
  height: 6px;
  background: var(--bg-input);
  border-radius: 3px;
  overflow: hidden;
}

.scan-progress__fill {
  height: 100%;
  width: 0%;
  background: var(--gradient-brand);
  border-radius: 3px;
  transition: width 0.4s ease;
}

.scan-progress__fill--indeterminate {
  width: 30% !important;
  animation: indeterminate 1.5s ease infinite;
}

.scan-progress__info {
  display: flex;
  justify-content: space-between;
  margin-top: 8px;
  font-size: 12px;
  color: var(--text-secondary);
}

.scan-progress__product {
  margin-top: 4px;
  font-size: 12px;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

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

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

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

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ── Products Section ─────────────────────────── */
.products-section {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
}

.products-section__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}

.products-section__filters {
  display: flex;
  gap: 8px;
}

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

.table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
}

.table th {
  padding: 10px 14px;
  text-align: left;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
  position: sticky;
  top: 0;
  background: var(--bg-card);
}

.th--sortable {
  cursor: pointer;
  user-select: none;
  transition: color var(--transition);
}

.th--sortable:hover {
  color: var(--accent-blue);
}

.th--sortable.active {
  color: var(--accent-blue);
}

.th--right {
  text-align: right;
}

.th--center {
  text-align: center;
}

.table td {
  padding: 12px 14px;
  font-size: 13px;
  border-bottom: 1px solid rgba(42, 51, 82, 0.5);
  vertical-align: middle;
}

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

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

.table tbody tr.row--profitable {
  background: rgba(34, 197, 94, 0.04);
}

.table tbody tr.row--profitable:hover {
  background: rgba(34, 197, 94, 0.08);
}

.table tbody tr.row--loss {
  opacity: 0.6;
}

/* Cell variants */
.cell-product {
  display: flex;
  flex-direction: column;
  gap: 2px;
  max-width: 280px;
}

.cell-product__name {
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

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

.cell-number {
  text-align: right;
  font-variant-numeric: tabular-nums;
  font-weight: 500;
}

.cell-profit--positive {
  color: var(--accent-green);
}

.cell-profit--negative {
  color: var(--accent-red);
}

.cell-profitability {
  text-align: right;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.cell-rating {
  text-align: right;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 4px;
}

.cell-rating__star {
  color: var(--accent-orange);
  font-size: 12px;
}

/* Status badges */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.3px;
}

.badge--pending {
  background: rgba(245, 158, 11, 0.12);
  color: var(--accent-orange);
}

.badge--scraped {
  background: rgba(79, 140, 255, 0.12);
  color: var(--accent-blue);
}

.badge--found {
  background: rgba(168, 85, 247, 0.12);
  color: var(--accent-purple);
}

.badge--profit {
  background: rgba(34, 197, 94, 0.12);
  color: var(--accent-green);
}

.badge--loss {
  background: rgba(239, 68, 68, 0.12);
  color: var(--accent-red);
}

.badge--priority {
  background: rgba(236, 72, 153, 0.12);
  color: var(--accent-pink);
  margin-left: 6px;
  padding: 2px 6px;
  font-size: 10px;
}

/* Table empty */
.table-empty {
  text-align: center;
  padding: 60px 20px;
  color: var(--text-muted);
}

.table-empty p {
  margin-top: 16px;
  font-size: 14px;
}

/* Row actions */
.row-actions {
  display: flex;
  gap: 4px;
  justify-content: flex-end;
}

.row-actions button {
  padding: 5px 8px;
  background: none;
  border: 1px solid transparent;
  border-radius: 6px;
  color: var(--text-muted);
  cursor: pointer;
  transition: all var(--transition);
  font-size: 12px;
}

.row-actions button:hover {
  background: var(--bg-input);
  color: var(--text-primary);
  border-color: var(--border);
}

.row-actions button.delete:hover {
  color: var(--accent-red);
  border-color: rgba(239, 68, 68, 0.3);
}

/* ── Modal ─────────────────────────────────────── */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 2000;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  animation: fadeIn 0.2s ease;
}

.modal {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  width: 100%;
  max-width: 560px;
  max-height: 85vh;
  overflow-y: auto;
  box-shadow: var(--shadow-lg);
}

.modal--wide {
  max-width: 1000px;
  width: 95%;
}

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

.modal__header h3 {
  font-size: 16px;
  font-weight: 600;
}

.modal__close {
  width: 32px;
  height: 32px;
  background: none;
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text-muted);
  font-size: 18px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition);
}

.modal__close:hover {
  background: var(--bg-card);
  color: var(--text-primary);
}

.modal__body {
  padding: 24px;
}

/* Calculator */
.calc-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.calc-result {
  margin-top: 24px;
  padding: 20px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  animation: fadeIn 0.3s ease;
}

.calc-result__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.calc-item {
  display: flex;
  justify-content: space-between;
  padding: 8px 0;
  font-size: 13px;
  border-bottom: 1px solid rgba(42, 51, 82, 0.3);
}

.calc-item__label {
  color: var(--text-secondary);
}

.calc-item__value {
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.calc-item--total {
  grid-column: 1 / -1;
  padding: 12px 0;
  font-size: 14px;
  border-bottom: none;
}

.calc-item--total .calc-item__label {
  font-weight: 600;
  color: var(--text-primary);
}

.calc-item--highlight .calc-item__value {
  color: var(--accent-green);
  font-size: 18px;
}

.calc-item--negative .calc-item__value {
  color: var(--accent-red);
}

/* Product Detail */
.product-detail {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.product-detail__section {
  padding: 16px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
}

.product-detail__section h4 {
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: var(--text-muted);
  margin-bottom: 12px;
}

.product-detail__section--full {
  grid-column: 1 / -1;
}

.detail-row {
  display: flex;
  justify-content: space-between;
  padding: 6px 0;
  font-size: 13px;
}

.detail-row__label {
  color: var(--text-secondary);
}

.detail-row__value {
  font-weight: 500;
  font-variant-numeric: tabular-nums;
}

.detail-links {
  display: flex;
  gap: 10px;
  margin-top: 8px;
}

.detail-links a {
  font-size: 12px;
  color: var(--accent-blue);
  text-decoration: none;
  transition: color var(--transition);
}

.detail-links a:hover {
  color: var(--accent-purple);
}

/* ── Utilities ─────────────────────────────────── */
.hidden {
  display: none;
}

.text-green {
  color: var(--accent-green);
}

.text-red {
  color: var(--accent-red);
}

/* ── Animations ────────────────────────────────── */
@keyframes pulse {

  0%,
  100% {
    opacity: 1;
  }

  50% {
    opacity: 0.5;
  }
}

.loading {
  animation: pulse 1.5s ease infinite;
}

/* ── Responsive ────────────────────────────────── */
@media (max-width: 768px) {
  .header {
    padding: 12px 16px;
  }

  .main {
    padding: 16px;
    gap: 16px;
  }

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

  .scan-panel__controls {
    flex-direction: column;
  }

  .scan-panel__controls .form-group {
    width: 100%;
  }

  .scan-panel__controls .form-input,
  .scan-panel__controls .form-select {
    width: 100%;
  }

  .btn--scan {
    width: 100%;
    justify-content: center;
  }

  .products-section__header {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }

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

  .product-detail {
    grid-template-columns: 1fr;
  }

  .modal {
    margin: 12px;
  }
}

/* ── Product Thumbnails ────────────────────────── */
.product-thumb {
  width: 48px;
  height: 48px;
  object-fit: cover;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: #fff;
  /* fallback */
}

/* Gallery */
.product-gallery {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.product-gallery__thumb {
  width: 60px;
  height: 60px;
  object-fit: cover;
  border-radius: 4px;
  cursor: pointer;
  border: 2px solid transparent;
  transition: border-color 0.2s;
  background: #2a2e36;
}

.product-gallery__thumb:hover {
  border-color: var(--primary-color);
}

.product-thumb-placeholder {
  width: 48px;
  height: 48px;
  border-radius: 6px;
  background: var(--bg-input);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
}

.product-thumb-placeholder::after {
  content: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="%239CA3AF" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M14.5 4h-5L7 7H4a2 2 0 0 0-2 2v9a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2V9a2 2 0 0 0-2-2h-3l-2.5-3z"/><circle cx="12" cy="13" r="3"/></svg>');
  opacity: 0.6;
}

/* ── Kanban Board ──────────────────────────────── */
.kanban-board {
  display: flex;
  gap: 16px;
  overflow-x: auto;
  height: calc(100vh - 280px);
  min-height: 500px;
  padding-bottom: 8px; /* space for scrollbar */
}

.kanban-column {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  min-width: 320px;
  flex: 0 0 320px;
}

.kanban-column__header {
  padding: 16px;
  border-bottom: 1px solid var(--border);
  font-weight: 600;
  font-size: 14px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: rgba(0, 0, 0, 0.2);
  flex-shrink: 0;
}

.kanban-column__count {
  background: var(--bg-input);
  padding: 2px 8px;
  border-radius: 10px;
  font-size: 11px;
  color: var(--text-muted);
}

.kanban-column__body {
  padding: 16px;
  overflow-y: auto;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.kanban-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 12px;
  transition: all var(--transition);
  display: flex;
  gap: 12px;
  position: relative;
}

.kanban-card:hover {
  border-color: var(--accent-blue);
  transform: translateY(-2px);
  box-shadow: var(--shadow-sm);
}

.kanban-card__img {
  width: 60px;
  height: 60px;
  border-radius: var(--radius-sm);
  object-fit: cover;
  background: #fff;
  flex-shrink: 0;
}

.kanban-card__content {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.kanban-card__title {
  font-size: 13px;
  font-weight: 500;
  line-height: 1.4;
  margin-bottom: 2px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  color: var(--text-primary);
  text-decoration: none;
}

.kanban-card__title:hover {
  text-decoration: underline;
}

.kanban-card__meta {
  font-size: 11px;
  color: var(--text-muted);
  display: flex;
  justify-content: space-between;
}

.kanban-card__price {
  font-weight: 600;
  color: var(--text-primary);
}

.kanban-card__status {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
}

.kanban-card__status--green {
  background: var(--accent-green);
}

.kanban-card__status--red {
  background: var(--accent-red);
}

/* Responsive Kanban */
@media (max-width: 1024px) {
  .kanban-column {
    min-width: 200px;
    flex: 1 0 200px;
  }
}

/* Batch cost on kanban cards */
.kanban-card__batch {
  font-size: 10px;
  margin-top: 4px;
  padding: 3px 6px;
  background: rgba(79, 140, 255, 0.1);
  border-radius: 4px;
  color: var(--accent-blue);
  font-weight: 600;
}

.kanban-card__quantity {
  font-size: 10px;
  color: var(--text-muted);
  margin-top: 2px;
}

/* Transfer buttons in product modal */
.transfer-buttons {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px dashed var(--border);
}

.transfer-buttons .btn {
  font-size: 12px;
  padding: 6px 14px;
}

/* ── Views ────────────────────────────────────── */
.view-hidden {
  display: none !important;
}

.view-active {
  display: block !important;
  animation: fadeIn 0.3s ease;
}

/* ── UI Refactor (New Layout) ────────────────── */
.scan-settings-row {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 20px;
  /* margin-bottom: 24px; */
  /* padding-bottom: 24px; */
  /* border-bottom: 1px solid var(--border); */
}

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

.checkbox-group {
  display: flex;
  align-items: center;
  padding-bottom: 10px;
}

.kanban-column__title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
  color: var(--text-primary);
}

.kanban-column__title svg {
  color: var(--text-muted);
}

/* ── Spacing Tweaks ──────────────────────────── */
.scan-actions-row {
  margin-top: 0;
  /* Reset margin-top to avoid double spacing */
}

.main {
  gap: 40px;
  /* Increase spacing between main sections */
  padding-bottom: 80px;
}

/* ── Fix Spacing Bug ─────────────────────────── */
.scan-settings-row {
  margin-bottom: 20px;
  padding-bottom: 20px;
  border-bottom: 1px solid rgba(42, 51, 82, 0.5);
  /* Lighter border */
}

/* ── Force Layout Spacing ────────────────────── */
.main {
  display: flex !important;
  flex-direction: column !important;
  gap: 40px !important;
}

/* ── Toast ─────────────────────────────────────── */
.toast {
  position: fixed;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%) translateY(100px);
  background: var(--bg-card);
  border: 1px solid var(--accent-blue);
  color: var(--text-primary);
  padding: 12px 24px;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  z-index: 2000;
  transition: transform 0.3s cubic-bezier(0.18, 0.89, 0.32, 1.28);
  display: flex;
  align-items: center;
  gap: 10px;
  pointer-events: none;
  font-weight: 500;
  font-size: 13px;
}

.toast--visible {
  transform: translateX(-50%) translateY(0);
}
/* ── Custom Tree Select ──────────────────────── */
.custom-tree-select {
  position: relative;
  width: 100%;
  user-select: none;
}
.tree-select-header {
  padding: 12px 16px;
  background: var(--bg-card);
  border: 1px solid rgba(42, 51, 82, 0.5);
  border-radius: 8px;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: all var(--transition);
  color: #e2e8f0;
  font-size: 14px;
}
.tree-select-header:hover {
  border-color: var(--accent-blue);
}
.tree-select-dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: var(--bg-secondary);
  border: 1px solid rgba(42, 51, 82, 0.5);
  border-radius: 8px;
  margin-top: 4px;
  max-height: 400px;
  overflow-y: auto;
  z-index: 1000;
  box-shadow: var(--shadow-lg);
}
.tree-group-header {
  padding: 10px 16px;
  cursor: pointer;
  display: flex;
  align-items: center;
  background: rgba(255, 255, 255, 0.02);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  font-weight: 500;
  color: #94a3b8;
  transition: background 0.2s;
}
.tree-group-header:hover {
  background: rgba(255, 255, 255, 0.05);
  color: #e2e8f0;
}
.tree-toggle {
  margin-right: 10px;
  font-size: 10px;
  transition: transform 0.2s;
  display: inline-block;
}
.tree-group.expanded .tree-toggle {
  transform: rotate(90deg);
}
.tree-group-content {
  display: none;
  padding-left: 0;
  background: rgba(0, 0, 0, 0.1);
}
.tree-group.expanded .tree-group-content {
  display: block;
}
.tree-item {
  display: flex !important;
  align-items: center;
  padding: 8px 16px 8px 32px;
  cursor: pointer;
  transition: background 0.2s;
  font-size: 13px;
  color: #cbd5e1;
}
.tree-item:hover {
  background: rgba(79, 140, 255, 0.1);
  color: #fff;
}
.tree-item input[type="radio"] {
  margin-right: 12px;
  width: 16px;
  height: 16px;
  cursor: pointer;
  accent-color: var(--accent-blue);
}
.hidden {
  display: none;
}
