/* =====================================================
   rapor.css — Detaylı Rapor (raporView) + Badges
   ===================================================== */

/* ============================================
   Detaylı Rapor (raporView)
   ============================================ */
.rapor-secili {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 16px;
  margin-bottom: 16px;
  background: var(--primary-soft);
  border: 1px solid var(--primary);
  border-left: 4px solid var(--primary);
  border-radius: var(--r-sm);
  animation: slideIn 0.2s ease-out;
}

@keyframes slideIn {
  from { opacity: 0; transform: translateY(-4px); }
  to { opacity: 1; transform: translateY(0); }
}

.secili-icon {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--primary);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.secili-text { flex: 1; min-width: 0; }
.secili-label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--primary);
  font-weight: 700;
  margin-bottom: 2px;
}
.secili-ad {
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.secili-barkod {
  font-size: 11px;
  color: var(--muted);
  font-family: ui-monospace, "Consolas", monospace;
  margin-top: 2px;
}
.rapor-ozet-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 16px;
  margin-bottom: 22px;
}

@media (max-width: 1100px) {
  .rapor-ozet-grid { grid-template-columns: 1fr; }
}

.ozet-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--r);
  padding: 18px 20px;
}

.ozet-card h3 {
  margin: 0 0 14px;
  font-size: 14px;
  font-weight: 700;
}

.ozet-stack {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.ozet-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 14px;
  border-radius: var(--r-sm);
  border-left: 4px solid transparent;
}

.ozet-row.brut   { background: #eff6ff; border-left-color: #3b82f6; }
.ozet-row.iptal  { background: #fef2f2; border-left-color: #ef4444; }
.ozet-row.iade   { background: #fffbeb; border-left-color: #f59e0b; }
.ozet-row.net    { background: #f0fdf4; border-left-color: #16a34a; }
.ozet-row.kargo  { background: #fff7ed; border-left-color: #f97316; }
.ozet-row.hizmet { background: #ecfdf5; border-left-color: #10b981; }
.ozet-row.stopaj { background: #f5f3ff; border-left-color: #8b5cf6; }
.ozet-row.kdv    { background: #fef2f2; border-left-color: #ef4444; }
.ozet-row.netkar { background: #ecfdf5; border-left-color: #059669; }

.ozet-row.brut   .ozet-label { color: #1e40af; }
.ozet-row.iptal  .ozet-label { color: #b91c1c; }
.ozet-row.iade   .ozet-label { color: #92400e; }
.ozet-row.net    .ozet-label { color: #166534; }
.ozet-row.kargo  .ozet-label { color: #c2410c; }
.ozet-row.hizmet .ozet-label { color: #047857; }
.ozet-row.stopaj .ozet-label { color: #6d28d9; }
.ozet-row.kdv    .ozet-label { color: #b91c1c; }
.ozet-row.netkar .ozet-label { color: #065f46; }

.ozet-label {
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 2px;
}

.ozet-num {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  font-variant-numeric: tabular-nums;
}

.ozet-tutar {
  font-size: 16px;
  font-weight: 700;
  color: var(--text);
  font-variant-numeric: tabular-nums;
}

.ozet-row.iptal  .ozet-tutar,
.ozet-row.iade   .ozet-tutar { color: var(--danger); }
.ozet-row.net    .ozet-tutar { color: var(--success); }
.ozet-row.kargo  .ozet-tutar { color: #c2410c; }
.ozet-row.hizmet .ozet-tutar { color: #047857; }
.ozet-row.stopaj .ozet-tutar { color: #6d28d9; }
.ozet-row.kdv    .ozet-tutar { color: #b91c1c; }
.ozet-row.netkar .ozet-tutar { color: #059669; font-size: 18px; font-weight: 800; }

.metrik-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.metrik-row {
  display: flex;
  gap: 12px;
  align-items: center;
}

.metrik-icon {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  font-weight: 700;
  flex-shrink: 0;
}

.metrik-icon.icon-blue   { background: #dbeafe; color: #1e40af; }
.metrik-icon.icon-orange { background: #ffedd5; color: #c2410c; }
.metrik-icon.icon-purple { background: #f3e8ff; color: #6b21a8; }
.metrik-icon.icon-yellow { background: #fef3c7; color: #92400e; }
.metrik-icon.icon-green  { background: #dcfce7; color: #166534; }
.metrik-icon.icon-red    { background: #fee2e2; color: #b91c1c; }

.metrik-content { flex: 1; }

.metrik-label {
  font-size: 12.5px;
  color: var(--muted);
  margin-bottom: 2px;
}

.metrik-value {
  font-size: 16px;
  font-weight: 700;
  color: var(--text);
  font-variant-numeric: tabular-nums;
}

#raporTablo thead th:nth-child(2),
#raporTablo thead th:nth-child(3),
#raporTablo thead th:nth-child(4),
#raporTablo thead th:nth-child(5),
#raporTablo thead th:nth-child(6),
#raporTablo thead th:nth-child(7),
#raporTablo thead th:nth-child(8),
#raporTablo tbody td:nth-child(2),
#raporTablo tbody td:nth-child(3),
#raporTablo tbody td:nth-child(4),
#raporTablo tbody td:nth-child(5),
#raporTablo tbody td:nth-child(6),
#raporTablo tbody td:nth-child(7),
#raporTablo tbody td:nth-child(8) {
  text-align: right;
  font-variant-numeric: tabular-nums;
}

#raporTablo tbody td:nth-child(1) {
  white-space: normal;
  word-break: break-word;
  min-width: 280px;
  max-width: 420px;
  line-height: 1.4;
}

#raporTablo tbody tr {
  cursor: pointer;
}

#raporTablo tbody tr.row-secili td {
  background: var(--primary-soft) !important;
  border-color: var(--primary);
}

#raporTablo tbody tr.row-secili td:first-child {
  box-shadow: inset 4px 0 0 var(--primary);
}

.urun-cell {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.urun-cell .urun-ad { font-weight: 600; color: var(--text); font-size: 13px; }
.urun-cell .urun-meta { font-size: 11px; color: var(--muted); font-family: ui-monospace, monospace; }

.urun-cell-with-img {
  display: flex;
  gap: 12px;
  align-items: center;
}

.urun-thumb {
  width: 56px;
  height: 56px;
  object-fit: contain;
  background: white;
  border-radius: 8px;
  border: 1px solid var(--border);
  flex-shrink: 0;
}

.urun-thumb-empty {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  color: var(--muted);
  background: var(--border-soft);
}

.urun-info { flex: 1; min-width: 0; }
.urun-info .urun-ad {
  font-weight: 600;
  color: var(--text);
  font-size: 13px;
  margin-bottom: 2px;
  line-height: 1.35;
}

.urun-ad-link {
  text-decoration: none;
  color: inherit;
}
.urun-ad-link:hover .urun-ad {
  color: var(--primary);
  text-decoration: underline;
}
.urun-thumb-link {
  display: inline-block;
  text-decoration: none;
}
.urun-thumb-link:hover .urun-thumb {
  border-color: var(--primary);
}
.urun-info .urun-meta {
  font-size: 11px;
  color: var(--muted);
  font-family: ui-monospace, "SF Mono", "Consolas", monospace;
}

/* Komisyon Tarifesi */
.komisyon-donemler-card { margin-bottom: 16px; }

.komisyon-donem-listesi {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.komisyon-donem-bos {
  color: var(--muted);
  font-size: 13px;
  font-style: italic;
  padding: 8px 0;
}

.komisyon-donem-tag {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  background: var(--primary-soft);
  color: var(--primary);
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  border: 1px solid #fbcaca;
}

.komisyon-donem-tag .donem-sil {
  background: transparent;
  color: var(--danger);
  font-size: 16px;
  padding: 0 4px;
  line-height: 1;
  border: none;
  cursor: pointer;
}
.komisyon-donem-tag .donem-sil:hover {
  background: var(--danger-soft);
  color: var(--danger-hover);
}

.komisyon-donem-tag .donem-meta {
  font-weight: 400;
  font-size: 11px;
  color: var(--muted);
  margin-left: 4px;
}

.komisyon-filtre-row {
  display: flex;
  gap: 12px;
  align-items: flex-end;
}

.komisyon-sayac {
  font-size: 12px;
  color: var(--muted);
  margin-left: auto;
  padding-bottom: 10px;
}

/* Komisyon kart liste */
.komisyon-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.komisyon-card {
  background: white;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 18px 22px 28px;
  display: grid;
  grid-template-columns: minmax(280px, 1.4fr) minmax(180px, 0.8fr) minmax(560px, 2.4fr);
  gap: 24px;
  align-items: center;
  position: relative;
  transition: box-shadow 0.15s;
}
.komisyon-card:hover {
  box-shadow: var(--shadow-sm);
}

@media (max-width: 1280px) {
  .komisyon-card {
    grid-template-columns: 1fr;
    gap: 16px;
  }
}

/* Ürün bölümü */
.kc-product {
  display: flex;
  gap: 14px;
  align-items: center;
}
.kc-thumb-wrap {
  width: 64px;
  height: 64px;
  border-radius: 10px;
  background: var(--border-soft);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  overflow: hidden;
  border: 1px solid var(--border);
}
.kc-thumb {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}
.kc-product-info {
  flex: 1;
  min-width: 0;
}
.kc-product-title {
  font-weight: 700;
  font-size: 14px;
  margin-bottom: 8px;
  color: var(--text);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  line-height: 1.35;
}
.kc-product-meta {
  display: flex;
  gap: 10px;
  align-items: center;
  font-size: 12px;
  color: var(--muted);
  flex-wrap: wrap;
}
.kc-product-meta .mono {
  font-family: ui-monospace, "Consolas", monospace;
  font-size: 11px;
}
.kc-tag {
  background: var(--border-soft);
  color: var(--text-2);
  padding: 2px 10px;
  border-radius: 12px;
  font-size: 11px;
  font-weight: 500;
}

/* Mevcut fiyat bölümü */
.kc-current {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.kc-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  font-size: 13px;
  gap: 8px;
}
.kc-label {
  color: var(--muted);
  font-weight: 700;
  font-size: 10.5px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.kc-value {
  font-weight: 700;
  font-size: 14px;
  font-variant-numeric: tabular-nums;
  color: var(--text);
}
.kc-value.muted { color: var(--muted); font-weight: 500; }
.kc-value.com-green { color: var(--success); }
.kc-value.com-yellow { color: #d97706; }
.kc-value.com-orange { color: #ea580c; }
.kc-value.com-red { color: var(--danger); }

/* Aralık kartları */
.kc-tiers {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
}
.kc-tier {
  background: white;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 14px 12px 12px;
  text-align: center;
}
.kc-tier .tier-label {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.1em;
  margin-bottom: 6px;
}
.kc-tier .tier-yuzde {
  font-size: 22px;
  font-weight: 800;
  margin-bottom: 6px;
  font-variant-numeric: tabular-nums;
  color: var(--text);
  line-height: 1.1;
}
.kc-tier .tier-range {
  font-size: 11px;
  color: var(--muted);
  margin-bottom: 8px;
  padding-bottom: 8px;
  border-bottom: 1px dashed var(--border);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.kc-tier .tier-kar {
  font-size: 12px;
  color: var(--muted);
  min-height: 18px;
  font-variant-numeric: tabular-nums;
  font-weight: 600;
}
.kc-tier.tier-1 .tier-label { color: #6366f1; }
.kc-tier.tier-2 .tier-label { color: #a855f7; }
.kc-tier.tier-3 .tier-label { color: #ea580c; }
.kc-tier.tier-4 .tier-label { color: #16a34a; }
.kc-tier.gecerli {
  background: var(--success-soft);
  border-color: var(--success);
}

/* Tarih */
.kc-date {
  position: absolute;
  bottom: 8px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 11px;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

/* Plus tek-tier kartı */
.komisyon-card.plus {
  grid-template-columns: minmax(280px, 1.4fr) minmax(180px, 0.8fr) minmax(220px, 1fr);
}
.kc-plus-tier {
  background: var(--success-soft);
  border: 1px solid var(--success);
  border-radius: 10px;
  padding: 14px 18px 12px;
  text-align: center;
}
.kc-plus-tier .tier-label {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.1em;
  margin-bottom: 6px;
  color: var(--success-text);
}
.kc-plus-tier .tier-yuzde {
  font-size: 26px;
  font-weight: 800;
  margin-bottom: 8px;
  color: var(--success);
  font-variant-numeric: tabular-nums;
  line-height: 1.1;
}
.kc-plus-tier .tier-range {
  font-size: 11px;
  color: var(--success-text);
  margin-bottom: 8px;
  padding-bottom: 8px;
  border-bottom: 1px dashed var(--success);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.kc-plus-tier .tier-kar {
  font-size: 12px;
  color: var(--success-text);
  min-height: 18px;
  font-variant-numeric: tabular-nums;
  font-weight: 600;
}

/* Plus dönem tablosu */
.plus-donem-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
.plus-donem-table th {
  text-align: left;
  padding: 10px 14px;
  font-size: 10px;
  font-weight: 700;
  color: var(--muted);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  background: var(--border-soft);
  border-bottom: 1px solid var(--border);
}
.plus-donem-table th:last-child { text-align: right; }
.plus-donem-table td {
  padding: 14px;
  border-bottom: 1px solid var(--border-soft);
  font-variant-numeric: tabular-nums;
}
.plus-donem-table td:last-child { text-align: right; font-weight: 700; }
.plus-donem-table tr:last-child td { border-bottom: none; }
.plus-donem-table .donem-sil {
  background: transparent;
  color: var(--danger);
  border: none;
  font-size: 16px;
  cursor: pointer;
  padding: 0 6px;
  margin-left: 8px;
}

/* Ürün Bilgileri hücresi */
.ko-product-cell .badge-onerilen {
  display: inline-block;
  background: linear-gradient(135deg, #7c3aed, #a855f7);
  color: white;
  font-size: 10px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 4px;
  margin-bottom: 8px;
  letter-spacing: 0.02em;
}
.ko-product-row {
  display: flex;
  gap: 12px;
  align-items: flex-start;
}
.ko-product-thumb {
  width: 64px;
  height: 64px;
  object-fit: contain;
  background: white;
  border-radius: 8px;
  border: 1px solid var(--border);
  flex-shrink: 0;
}
.ko-product-thumb-empty {
  width: 64px;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--border-soft);
  border-radius: 8px;
  font-size: 24px;
  flex-shrink: 0;
}
.ko-product-info {
  flex: 1;
  min-width: 0;
  overflow: hidden;
}
.ko-product-title {
  font-weight: 700;
  font-size: 13px;
  color: var(--text);
  margin-bottom: 6px;
  line-height: 1.3;
  word-break: break-word;
  overflow-wrap: break-word;
  white-space: normal;
}
.ko-product-meta {
  font-size: 11.5px;
  color: var(--muted);
  margin-bottom: 2px;
  line-height: 1.4;
}
.ko-product-meta .meta-label { font-weight: 500; }

/* Güncel Fiyat ve Komisyon hücresi */
.ko-price-cell { font-size: 12px; }
.ko-price-row { margin-bottom: 8px; }
.ko-price-row:last-child { margin-bottom: 0; }
.ko-price-label {
  color: var(--muted);
  font-size: 11px;
  margin-bottom: 2px;
}
.ko-price-value {
  color: var(--text);
  font-weight: 600;
  font-size: 13px;
  font-variant-numeric: tabular-nums;
}
.ko-price-value.commission {
  color: var(--text);
}
.rank-badge {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  background: #fef3c7;
  color: #b45309;
  font-size: 10px;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: 4px;
  margin-left: 4px;
}

/* Fiyat Aralığı hücreleri */
.ko-tier-cell {
  text-align: center;
  position: relative;
  padding: 16px 12px !important;
}
.ko-tier-cell.gecerli { background: var(--success-soft); }
.ko-tier-cell.empty { color: var(--muted); }

.ko-tier-price {
  font-size: 16px;
  font-weight: 700;
  color: var(--text);
  font-variant-numeric: tabular-nums;
  margin-bottom: 2px;
}
.ko-tier-op {
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 12px;
}
.ko-tier-kom-label {
  font-size: 11px;
  color: var(--muted);
  margin-bottom: 2px;
}
.ko-tier-kom {
  font-size: 14px;
  font-weight: 700;
  color: #ea580c;
  font-variant-numeric: tabular-nums;
  margin-bottom: 10px;
}
.ko-tier-status {
  font-size: 12px;
  color: var(--muted);
  cursor: pointer;
  padding: 4px 0;
}
.ko-tier-status.gecerli {
  color: var(--success);
  font-weight: 700;
  cursor: default;
}
.ko-tier-status.gecerli::before { content: "✓ "; }
.ko-tier-status.sec:hover { color: var(--primary); }

/* Fiyat Güncelle hücresi */
.ko-update-cell {
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: stretch;
  vertical-align: middle !important;
}
.ko-price-input {
  width: 100%;
  padding: 8px 12px;
  border: 1px solid var(--border-strong);
  border-radius: 6px;
  font-size: 13px;
  font-variant-numeric: tabular-nums;
  text-align: left;
  font-family: inherit;
  color: var(--text);
}
.ko-price-input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-soft);
}
.ko-update-btn {
  width: 100%;
  padding: 8px;
  font-size: 12px;
}
.ko-update-btn:disabled {
  background: var(--border);
  color: var(--muted);
  cursor: not-allowed;
}

/* Rekabet — Otomatik mod butonu */
#rekabetOtomatikBtn.aktif {
  background: var(--success);
  border-color: var(--success);
  box-shadow: 0 0 0 0 rgba(22, 163, 74, 0.6);
  animation: autoPulse 2s ease-in-out infinite;
}
#rekabetOtomatikBtn.aktif:hover {
  background: #15803d;
}

@keyframes autoPulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(22, 163, 74, 0.5); }
  50% { box-shadow: 0 0 0 8px rgba(22, 163, 74, 0); }
}

/* Rekabet — Canlı Aktivite paneli */
.live-panel {
  background: #0f172a;
  color: #e2e8f0;
  border-radius: var(--r);
  margin-bottom: 18px;
  overflow: hidden;
  border: 1px solid #1e293b;
  contain: layout style;     /* iç değişiklikler dış layout'u etkilemesin */
}

/* Daralt/genişlet toggle butonu */
.live-daralt-btn {
  background: transparent;
  border: none;
  color: #cbd5e1;
  cursor: pointer;
  padding: 6px;
  border-radius: 6px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s, transform 0.2s;
}
.live-daralt-btn:hover { background: #1e293b; color: white; }
.live-daralt-icon { transition: transform 0.2s; }
/* Daraltılmış durumda feed'i gizle, ikonu döndür */
.live-panel.daraltilmis .live-feed { display: none !important; }
.live-panel.daraltilmis .live-daralt-icon { transform: rotate(-90deg); }

/* Rekabet tablosu içerik render'ı dış sayfa scroll'unu etkilemesin */
#rekabetView .table-card,
#rekabetView .table-wrapper {
  contain: layout style;
}

.live-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 16px;
  border-bottom: 1px solid #1e293b;
  background: #111c2e;
}

.live-title {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
}

.live-title strong { color: #f1f5f9; }

.live-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #22c55e;
  display: inline-block;
}

.live-dot.scanning {
  background: #3b82f6;
  animation: livePulse 1.2s ease-in-out infinite;
}

.live-dot.updating {
  background: #a855f7;
  animation: livePulse 1.2s ease-in-out infinite;
}

.live-dot.error { background: #ef4444; }

@keyframes livePulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(59, 130, 246, 0.5); }
  50% { box-shadow: 0 0 0 6px rgba(59, 130, 246, 0); }
}

.live-status {
  font-size: 12px;
  color: #94a3b8;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 2px 8px;
  background: #1e293b;
  border-radius: 4px;
}

.live-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.live-count {
  font-size: 11px;
  color: #94a3b8;
  font-variant-numeric: tabular-nums;
}

.live-heart {
  font-size: 16px;
  color: #ef4444;
  display: inline-block;
  animation: heartbeat 1.2s ease-in-out infinite;
  text-shadow: 0 0 8px rgba(239, 68, 68, 0.6);
}

@keyframes heartbeat {
  0%, 100% { transform: scale(1); }
  15% { transform: scale(1.25); }
  30% { transform: scale(1); }
  45% { transform: scale(1.18); }
  60% { transform: scale(1); }
}

.live-actions button {
  padding: 4px 10px;
  font-size: 11px;
  background: #1e293b;
  color: #cbd5e1;
  border-color: #334155;
}

.live-actions button:hover {
  background: #334155;
  color: white;
}

.live-feed,
#liveFeed {
  height: 280px !important;
  max-height: 280px !important;
  overflow: hidden !important;
  overflow-y: hidden !important;
  overflow-x: hidden !important;
  scrollbar-width: none !important;       /* Firefox */
  -ms-overflow-style: none !important;    /* IE/Edge eski */
  padding: 4px 0;
  font-family: ui-monospace, "SF Mono", "Cascadia Code", "Consolas", monospace;
  font-size: 12px;
}
.live-feed::-webkit-scrollbar,
#liveFeed::-webkit-scrollbar {
  display: none !important;                /* Chrome/Safari */
  width: 0 !important;
  height: 0 !important;
}

.live-empty {
  text-align: center;
  color: #64748b;
  padding: 24px;
  font-style: italic;
  font-family: "Inter", sans-serif;
  font-size: 13px;
}

.live-entry {
  display: grid;
  grid-template-columns: 64px 22px 1fr;
  gap: 8px;
  padding: 5px 16px;
  border-bottom: 1px solid #1e293b;
  align-items: start;
  line-height: 1.4;
  animation: liveSlide 0.2s ease-out;
}

@keyframes liveSlide {
  from { opacity: 0; transform: translateY(-4px); }
  to { opacity: 1; transform: translateY(0); }
}

.live-time { color: #64748b; }
.live-icon { text-align: center; font-size: 13px; }
.live-msg { color: #cbd5e1; }
.live-detail { color: #64748b; font-size: 11px; margin-top: 2px; }

.live-entry.info .live-icon { color: #3b82f6; }
.live-entry.success .live-msg { color: #4ade80; }
.live-entry.bizde .live-msg { color: #4ade80; }
.live-entry.rakipte .live-msg { color: #fbbf24; }
.live-entry.update .live-msg { color: #c084fc; }
.live-entry.warning .live-msg { color: #fbbf24; }
.live-entry.error .live-msg { color: #f87171; }

/* Rekabet tablosu */
#rekabetTablo tbody td:nth-child(1) {
  white-space: normal;
  word-break: break-word;
  min-width: 240px;
  max-width: 360px;
  line-height: 1.4;
}
/* Mevcut Fiyat / Kâr / BB Sıra / BB Fiyat / Önerilen — sayısal kolonlar */
#rekabetTablo thead th:nth-child(2),
#rekabetTablo thead th:nth-child(3),
#rekabetTablo thead th:nth-child(4),
#rekabetTablo thead th:nth-child(5),
#rekabetTablo thead th:nth-child(6),
#rekabetTablo tbody td:nth-child(2),
#rekabetTablo tbody td:nth-child(3),
#rekabetTablo tbody td:nth-child(4),
#rekabetTablo tbody td:nth-child(5),
#rekabetTablo tbody td:nth-child(6) {
  text-align: right;
  font-variant-numeric: tabular-nums;
}

/* Default komisyon ayarı (tablo header) */
.table-header-controls {
  display: flex;
  align-items: center;
  gap: 14px;
}
.default-kom-input {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--text-2);
  background: var(--border-soft);
  padding: 6px 10px;
  border-radius: 8px;
  border: 1px solid var(--border);
}
.default-kom-input input {
  width: 56px;
  padding: 3px 6px;
  border: 1px solid var(--border);
  border-radius: 5px;
  font-size: 12px;
  font-weight: 600;
  font-family: inherit;
  text-align: right;
  font-variant-numeric: tabular-nums;
  background: #fff;
}
.default-kom-input input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 2px var(--primary-soft);
}

/* Min / Max / Marj pill input grubu */
.ayarlar-th { text-align: right !important; min-width: 280px; }
.ayarlar-pills {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
  align-items: center;
  flex-wrap: nowrap;
}
.pill-input {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #fff5f5;
  border: 1px solid #fecaca;
  border-radius: 999px;
  padding: 4px 10px 4px 12px;
  transition: border-color 0.15s, background 0.15s;
}
.pill-input:focus-within {
  border-color: var(--primary);
  background: #fff;
  box-shadow: 0 0 0 2px var(--primary-soft);
}
.pill-input .pill-label {
  font-size: 10px;
  font-weight: 700;
  color: #94a3b8;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.pill-input input[type="number"] {
  width: 56px;
  border: none;
  background: transparent;
  padding: 2px 0;
  font-size: 12px;
  font-weight: 600;
  color: #b91c1c;
  font-family: inherit;
  text-align: right;
  font-variant-numeric: tabular-nums;
}
.pill-input input[type="number"]:focus { outline: none; }
.pill-input input[type="number"]::-webkit-outer-spin-button,
.pill-input input[type="number"]::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}
.pill-input input[type="number"] { -moz-appearance: textfield; }
.kupon-rozet {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  background: #fef3c7;
  color: #92400e;
  margin-top: 4px;
  cursor: help;
  white-space: nowrap;
}

.bb-rozet {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 5px 12px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.02em;
}
.bb-rozet-emoji {
  font-size: 18px;
  line-height: 1;
}
.bb-rozet.bizde { background: var(--success-soft); color: var(--success-text); }
.bb-rozet.rakipte { background: var(--warning-soft); color: var(--warning-text); }
.bb-rozet.tek { background: var(--border-soft); color: var(--muted); }
.bb-rozet.bilinmiyor { background: var(--border-soft); color: var(--muted); }

.oneri-fiyat.gunceller { color: var(--primary); font-weight: 700; }
.oneri-fiyat.kalkar { color: var(--success); font-weight: 700; }
.oneri-fiyat.dusuk { color: var(--danger); font-weight: 700; font-size: 11px; }

.tara-loading { font-size: 13px; color: var(--muted); }
.tara-success { color: var(--success); }
.tara-error { color: var(--danger); }

/* (Eski iade tablosu CSS'i kaldırıldı - yeni tablo 6 kolonlu ve kendi stilleri var) */

.row-actions {
  display: flex;
  gap: 4px;
}

.row-actions button {
  padding: 4px 9px;
  font-size: 11.5px;
  border-radius: 5px;
}

.aktif-toggle {
  padding: 5px 14px;
  font-size: 12px;
  font-weight: 600;
  border-radius: 999px;
  border: 1px solid transparent;
  cursor: pointer;
  min-width: 64px;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}
.aktif-toggle.aktif {
  background: var(--success-soft);
  color: var(--success-text);
  border-color: var(--success-text);
}
.aktif-toggle.aktif:hover {
  background: var(--success-text);
  color: #fff;
}
.aktif-toggle.pasif {
  background: var(--border-soft);
  color: var(--muted);
  border-color: var(--border-strong);
}
.aktif-toggle.pasif:hover {
  background: var(--bg);
  color: var(--text);
  border-color: var(--muted-2);
}

.tarife-toggle {
  width: 26px;
  height: 26px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--bg);
  color: var(--muted);
  border: 1px solid var(--border);
  border-radius: 6px;
  cursor: pointer;
  transition: transform 0.2s ease, background 0.15s, color 0.15s;
  margin-left: 4px;
}
.tarife-toggle:hover {
  background: var(--card);
  color: var(--text);
  border-color: var(--muted-2);
}
.tarife-toggle.acik {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
  transform: rotate(-180deg);
}

.rekabet-tarife-row > td {
  background: var(--bg);
  border-top: none !important;
  padding: 0 !important;
}
.tarife-detay {
  padding: 12px 18px;
  border-left: 3px solid var(--primary);
  background: var(--border-soft);
  margin: 4px 8px 8px 8px;
  border-radius: var(--r-sm);
}
.tarife-bos {
  color: var(--muted);
  font-size: 12.5px;
  font-style: italic;
}
.tarife-baslik {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 10px;
}
.tarife-donem {
  font-weight: 500;
  color: var(--muted);
}
.tarife-current {
  margin-left: auto;
  color: var(--success-text);
  font-weight: 500;
}
.tarife-tiers {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
}
.tarife-tier {
  display: flex;
  flex-direction: column;
  gap: 4px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 8px 10px;
  font-size: 12px;
}
.tarife-tier.bos {
  opacity: 0.5;
}
.tarife-tier.mevcut {
  border-color: var(--success-text);
  background: var(--success-soft);
}
.tt-label {
  font-size: 10.5px;
  text-transform: uppercase;
  color: var(--muted);
  letter-spacing: 0.04em;
  font-weight: 600;
}
.tt-mevcut-rozet {
  color: var(--success-text);
  font-size: 9.5px;
  margin-left: 4px;
}
.tt-range {
  color: var(--text-2);
  font-size: 11.5px;
}
.tt-yuzde {
  font-weight: 700;
  font-size: 14px;
  color: var(--primary);
}
.tarife-tier.mevcut .tt-yuzde { color: var(--success-text); }

@media (max-width: 900px) {
  .tarife-tiers { grid-template-columns: repeat(2, 1fr); }
}

.empty {
  text-align: center;
  color: var(--muted);
  padding: 60px 20px;
  font-size: 13.5px;
  background: var(--border-soft);
  margin: 0;
  border-radius: var(--r-sm);
}

/* ============================================
   Badges
   ============================================ */
.badge {
  display: inline-block;
  padding: 3px 9px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.01em;
}

.badge.delivered { background: var(--success-soft); color: var(--success-text); }
.badge.waiting   { background: var(--warning-soft); color: var(--warning-text); }
.badge.cancelled { background: var(--danger-soft);  color: var(--danger-text); }
.badge.efatura   { background: var(--success-soft); color: var(--success-text); }
.badge.fiziki    { background: var(--info-soft);    color: var(--info-text); }

.badge-select {
  appearance: none;
  -webkit-appearance: none;
  border: 1px solid transparent;
  border-radius: 999px;
  padding: 3px 22px 3px 10px;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  background-color: var(--border-soft);
  color: var(--text-2);
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='10' height='10' viewBox='0 0 20 20'><path fill='%236b7280' d='M5 8l5 5 5-5z'/></svg>");
  background-repeat: no-repeat;
  background-position: right 6px center;
  transition: filter 0.15s, box-shadow 0.15s;
  max-width: 100%;
}

.badge-select:hover { filter: brightness(0.97); }
.badge-select:focus {
  outline: none;
  box-shadow: 0 0 0 3px var(--primary-soft);
}

.badge-select.delivered { background-color: var(--success-soft); color: var(--success-text); }
.badge-select.waiting   { background-color: var(--warning-soft); color: var(--warning-text); }
.badge-select.cancelled { background-color: var(--danger-soft);  color: var(--danger-text); }
.badge-select.efatura   { background-color: var(--success-soft); color: var(--success-text); }
.badge-select.fiziki    { background-color: var(--info-soft);    color: var(--info-text); }
