/* ─────────────────────────────────────────────────────────────────────────────
   Rankivor Dashboard — style.css
   Minimalist, tek renk (#3BB930 yeşil) tasarım sistemi
   ──────────────────────────────────────────────────────────────────────────── */

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

/* ── Tokens ─────────────────────────────────────────────────────────────────── */
:root {
  /* Ana renk paleti — tek yeşil üzerine kurulu */
  --green:       #10b981;          /* Dinlendirici modern zümrüt yeşili */
  --green-dim:   #059669;          /* hover, pressed */
  --green-mute:  rgba(16,185,129,.08); /* subtle bg tint */
  --green-glow:  rgba(16,185,129,.04);
 
  /* Nötr gri skalası — LİGHT MODE */
  --bg:          #f4f6f4;          /* zemin */
  --surface-0:   #ffffff;          /* sidebar */
  --surface-1:   #ffffff;          /* kartlar */
  --surface-2:   #ebefeb;          /* hover yüzey */
  --border:      #e0e4e0;          /* hafif çizgi */
  --border-mid:  #cbd0cb;
 
  /* Tipografi */
  --text:        #181a18;
  --text-muted:  #585e58;
  --text-dim:    #848a84;
 
  /* Durum */
  --ok:          #10b981;
  --warn:        #d4a017;
  --err:         #e05a67;          /* Gözü yormayan yumuşak crimson gül kırmızısı */
 
  /* Boyutlar */
  --sidebar-w:   220px;
  --sidebar-collapsed-w: 68px;
  --active-sidebar-w: var(--sidebar-w);
  --radius-sm:   6px;
  --radius:      10px;
  --radius-lg:   14px;
  --font:        'Geist', 'Inter', system-ui, -apple-system, sans-serif;
  --transition:  180ms cubic-bezier(.25,.46,.45,.94);
}

/* ── Base ───────────────────────────────────────────────────────────────────── */
html { height: 100%; font-size: 14px; }

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  height: 100%;
  display: flex;
  overflow: hidden;
  -webkit-font-smoothing: antialiased;
}

a { text-decoration: none; color: inherit; }
button { font-family: var(--font); cursor: pointer; }

/* ── Scrollbar ──────────────────────────────────────────────────────────────── */
::-webkit-scrollbar { width: 5px; height: 5px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border-mid); border-radius: 99px; }
::-webkit-scrollbar-thumb:hover { background: var(--text-dim); }

/* ══════════════════════════════════════════════════════════════════════════════
   SIDEBAR
   ══════════════════════════════════════════════════════════════════════════════ */
.sidebar {
  width: var(--active-sidebar-w);
  min-width: var(--active-sidebar-w);
  background: var(--surface-0);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  height: 100vh;
  overflow: hidden;
  transition: width var(--transition), min-width var(--transition);
}

/* Logo */
.sidebar-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 22px 20px 20px;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  transition: background var(--transition), padding var(--transition), justify-content var(--transition);
}

.sidebar-logo:hover {
  background: var(--surface-2);
}

.logo-mark {
  width: 28px;
  height: 28px;
  background: var(--green);
  border-radius: 7px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 700;
  color: var(--bg);
  flex-shrink: 0;
  letter-spacing: -0.5px;
}

.logo-text {
  font-size: 14px;
  font-weight: 600;
  letter-spacing: -0.2px;
  color: var(--text);
}

/* Nav */
.sidebar-nav {
  flex: 1;
  padding: 14px 12px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  overflow-y: auto;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 8px 10px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 500;
  color: var(--text-muted);
  transition: color var(--transition), background var(--transition);
  position: relative;
}

.nav-item:hover {
  color: var(--text);
  background: var(--surface-2);
}

.nav-item.active {
  color: var(--green);
  background: var(--green-mute);
}

.nav-item.active svg {
  stroke: var(--green);
}

.nav-badge {
  margin-left: auto;
  font-size: 11px;
  color: var(--text-dim);
  background: var(--surface-2);
  padding: 1px 6px;
  border-radius: 99px;
  font-weight: 500;
}

.nav-item.active .nav-badge {
  background: var(--green-mute);
  color: var(--green);
}

/* Sidebar Footer */
.sidebar-footer {
  padding: 12px 14px;
  border-top: 1px solid var(--border);
}

.auth-section {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.btn-login-google {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 9px 12px;
  border-radius: var(--radius-sm);
  background: var(--surface-2);
  border: 1px solid var(--border);
  color: var(--text);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: background var(--transition), border-color var(--transition);
}

.btn-login-google:hover {
  background: var(--surface-3);
  border-color: var(--border-mid);
}

.btn-login-google svg {
  flex-shrink: 0;
}

.user-profile {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--surface-2);
  padding: 6px 8px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  margin-bottom: 6px;
}

.user-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  object-fit: cover;
  background: var(--surface-3);
}

.user-info {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  flex: 1;
}

.user-name {
  font-size: 11px;
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.user-email {
  font-size: 10px;
  color: var(--text-dim);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.btn-icon-logout {
  background: none;
  border: none;
  padding: 4px;
  color: var(--text-dim);
  cursor: pointer;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color var(--transition), background var(--transition);
}

.btn-icon-logout:hover {
  color: var(--err);
  background: var(--surface-3);
}

.hidden {
  display: none !important;
}

.auth-section.hidden {
  display: none !important;
}

.ext-status {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  color: var(--text-muted);
}

.ext-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--text-dim);
  flex-shrink: 0;
  transition: background var(--transition);
}

.ext-dot.connected { background: var(--green); }
.ext-dot.connecting {
  background: var(--warn);
  animation: pulse-dot 1.4s ease-in-out infinite;
}
.ext-dot.error { background: var(--err); }

@keyframes pulse-dot {
  0%, 100% { opacity: 1; }
  50% { opacity: .35; }
}

/* ══════════════════════════════════════════════════════════════════════════════
   MAIN CONTENT
   ══════════════════════════════════════════════════════════════════════════════ */
.main-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
  height: 100vh;
  overflow: hidden;
}

/* ── Top Bar ──────────────────────────────────────────────────────────────── */
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 28px;
  height: 58px;
  border-bottom: 1px solid var(--border);
  background: var(--bg);
  flex-shrink: 0;
}

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

.page-title {
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -0.3px;
}

.shop-badge {
  font-size: 11px;
  color: var(--text-muted);
  background: var(--surface-1);
  border: 1px solid var(--border);
  padding: 2px 8px;
  border-radius: 99px;
}

.shop-select {
  font-family: var(--font);
  font-size: 11px;
  font-weight: 500;
  color: var(--text-muted);
  background: var(--surface-1);
  border: 1px solid var(--border);
  padding: 2px 24px 2px 8px;
  border-radius: 99px;
  cursor: pointer;
  outline: none;
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  background-image: url("data:image/svg+xml;charset=UTF-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23848a84' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 8px center;
  background-size: 10px;
  transition: var(--transition);
}

.shop-select:hover {
  border-color: var(--green);
  background-color: var(--surface-2);
  color: var(--text);
}

.shop-select option {
  background: var(--surface-1);
  color: var(--text);
}

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

.sync-time {
  font-size: 11px;
  color: var(--text-dim);
}

.btn-sync {
  display: flex;
  align-items: center;
  gap: 6px;
  background: var(--surface-1);
  border: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 500;
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  transition: color var(--transition), border-color var(--transition), background var(--transition);
}

.btn-sync:hover {
  color: var(--green);
  border-color: var(--green);
  background: var(--green-mute);
}

.btn-clear-cache {
  display: flex;
  align-items: center;
  gap: 6px;
  background: var(--surface-1);
  border: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 500;
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  transition: color var(--transition), border-color var(--transition), background var(--transition);
}

.btn-clear-cache:hover {
  color: var(--err);
  border-color: var(--err);
  background: rgba(192, 57, 43, 0.08); /* light red tint */
}

/* ── Pages ────────────────────────────────────────────────────────────────── */
.page {
  display: none;
  flex: 1;
  overflow-y: auto;
  min-height: 0;
  padding: 24px 28px;
}

.page.active {
  display: flex;
  flex-direction: column;
  gap: 20px;
  min-height: 0;
  overflow-y: auto;
}

/* ══════════════════════════════════════════════════════════════════════════════
   STAT CARDS
   ══════════════════════════════════════════════════════════════════════════════ */
.stat-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 10px;
}

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

.stat-card {
  background: var(--surface-1);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px 20px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  transition: border-color var(--transition);
}

.stat-card:hover {
  border-color: var(--border-mid);
}

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

.stat-value {
  font-size: 22px;
  font-weight: 600;
  letter-spacing: -0.8px;
  color: var(--text);
  line-height: 1.15;
}

.stat-sub {
  font-size: 11px;
  color: var(--text-dim);
  margin-top: 2px;
}

/* ══════════════════════════════════════════════════════════════════════════════
   SECTION BLOCKS
   ══════════════════════════════════════════════════════════════════════════════ */
.section-block {
  background: var(--surface-1);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

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

.section-title {
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.7px;
  color: var(--text-muted);
}

.link-btn {
  background: none;
  border: none;
  font-size: 12px;
  color: var(--text-dim);
  transition: color var(--transition);
  padding: 0;
}

.link-btn:hover {
  color: var(--green);
}

/* ══════════════════════════════════════════════════════════════════════════════
   TABLE
   ══════════════════════════════════════════════════════════════════════════════ */
.table-wrap {
  overflow-x: auto;
  overflow-y: visible;
}

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

.data-table thead th {
  position: sticky;
  top: 0;
  background: var(--surface-1);
  z-index: 10;
  padding: 10px 16px;
  text-align: left;
  font-size: 10.5px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  color: var(--text-dim);
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}

.data-table thead th.num { text-align: right; }

.data-table tbody tr {
  border-bottom: 1px solid var(--border);
  transition: background var(--transition);
}

.data-table tbody tr:last-child { border-bottom: none; }

.data-table tbody tr:hover { background: var(--surface-2); }

.data-table tbody td {
  padding: 10px 16px;
  vertical-align: middle;
}

.data-table tbody td.num {
  text-align: right;
  font-variant-numeric: tabular-nums;
  color: var(--text);
  font-size: 14.5px;
  font-weight: 700;
}

/* Listing title cell */
.listing-cell {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.listing-thumb {
  width: 34px;
  height: 34px;
  border-radius: 5px;
  object-fit: cover;
  background: var(--surface-2);
  border: 1px solid var(--border);
  flex-shrink: 0;
}

.listing-thumb-ph {
  width: 34px;
  height: 34px;
  border-radius: 5px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  color: var(--text-dim);
}

.listing-info { min-width: 0; }

.listing-title {
  font-size: 12.5px;
  font-weight: 500;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 280px;
}

.listing-id {
  font-size: 10px;
  color: var(--text-dim);
  font-variant-numeric: tabular-nums;
}

.listing-meta-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 2px;
}

.state-indicator {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 9px;
  font-weight: 600;
  padding: 1px 5px;
  border-radius: 4px;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

/* Status badges */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 10.5px;
  font-weight: 500;
  padding: 2px 8px;
  border-radius: 99px;
}

.badge-active {
  color: var(--green);
  background: var(--green-mute);
}

.badge-inactive {
  color: var(--text-dim);
  background: var(--surface-2);
}

.badge-draft {
  color: var(--warn);
  background: rgba(212,160,23,.1);
}

/* Empty row */
.empty-row td {
  text-align: center;
  padding: 36px 16px;
  color: var(--text-dim);
  font-size: 12px;
}

/* ══════════════════════════════════════════════════════════════════════════════
   LOG CONSOLE
   ══════════════════════════════════════════════════════════════════════════════ */
.log-console {
  padding: 12px 16px;
  font-family: 'Cascadia Code', 'Fira Code', 'Courier New', monospace;
  font-size: 11px;
  line-height: 1.8;
  color: var(--text-muted);
  max-height: 180px;
  overflow-y: auto;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
}

.log-line { display: block; }
.log-info  { color: #2563eb; }
.log-ok    { color: #15803d; }
.log-warn  { color: #b45309; }
.log-err   { color: #b91c1c; }

/* ══════════════════════════════════════════════════════════════════════════════
   LISTINGS PAGE
   ══════════════════════════════════════════════════════════════════════════════ */


/* Listings page layout */
#page-listings {
  gap: 0;
}

#page-listings.page.active {
  overflow-y: hidden;
}

#page-listings .table-wrap {
  background: var(--surface-1);
  border: 1px solid var(--border);
  border-radius: 0 var(--radius) var(--radius) var(--radius);
  overflow-x: auto;
  overflow-y: auto;
  flex: 1;
  min-height: 0;
}

/* Listings Table Compacting to fit full width */
#listings-table {
  font-size: 11px;
}

#listings-table thead th {
  padding: 8px 5px;
  font-size: 9px;
  letter-spacing: 0.1px;
  height: 26px;
  box-sizing: border-box;
}

#listings-table tbody td {
  padding: 8px 5px;
}

#listings-table .listing-title {
  max-width: 160px;
}

#listings-table .task-badge {
  font-size: 9.5px;
}

#listings-table .state-indicator {
  font-size: 9.5px;
}

#page-listings.page {
  padding: 16px 14px;
}

/* Sticky Mağaza Ortalamaları Row */
.averages-row td {
  position: sticky;
  top: 26px; /* Exactly below the table header th */
  z-index: 9;
  background-color: #f5f6f8 !important; /* Solid color to prevent scrolled rows showing underneath */
  box-shadow: inset 0 -2px 0 rgba(0, 0, 0, 0.08); /* Bottom border */
}

/* ── Pagination ────────────────────────────────────────────────────────────── */
.pagination {
  display: flex;
  align-items: center;
  gap: 12px;
  justify-content: center;
  padding: 4px 0 8px;
  margin-top: 14px;
}

.page-btn {
  background: var(--surface-1);
  border: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 12px;
  font-family: var(--font);
  padding: 6px 14px;
  border-radius: var(--radius-sm);
  transition: color var(--transition), border-color var(--transition);
}

.page-btn:not(:disabled):hover {
  color: var(--green);
  border-color: var(--green);
}

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

.page-info {
  font-size: 12px;
  color: var(--text-dim);
  min-width: 60px;
  text-align: center;
  font-variant-numeric: tabular-nums;
}

/* ══════════════════════════════════════════════════════════════════════════════
   SYNC OVERLAY
   ══════════════════════════════════════════════════════════════════════════════ */
.sync-overlay {
  position: fixed;
  inset: 0;
  background: rgba(244, 246, 244, 0.85);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
  backdrop-filter: blur(4px);
}

.sync-overlay.hidden { display: none; }

.sync-card {
  background: var(--surface-1);
  border: 1px solid var(--border-mid);
  border-radius: var(--radius-lg);
  padding: 32px 40px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  min-width: 280px;
}

.sync-spinner {
  width: 32px;
  height: 32px;
  border: 2px solid var(--border-mid);
  border-top-color: var(--green);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

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

.sync-label {
  font-size: 13px;
  font-weight: 500;
  color: var(--text);
}

.sync-progress-bar {
  width: 200px;
  height: 3px;
  background: var(--surface-2);
  border-radius: 99px;
  overflow: hidden;
}

.sync-progress-fill {
  height: 100%;
  background: var(--green);
  border-radius: 99px;
  width: 0%;
  transition: width 300ms ease;
}

.sync-progress-text {
  font-size: 11px;
  color: var(--text-dim);
  font-variant-numeric: tabular-nums;
}

.sync-sub-label {
  font-size: 11.5px;
  color: var(--text-dim);
  font-family: var(--font-mono, monospace);
  text-align: center;
  width: 100%;
  max-width: 260px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  margin-top: 4px;
}

/* ── Numeric value colors ──────────────────────────────────────────────────── */
.val-positive { color: #000000; }
.val-zero     { color: var(--text-dim); }

/* ── Sortable Headers ──────────────────────────────────────────────────────── */
th.sortable {
  cursor: pointer;
  user-select: none;
  position: relative;
  transition: color var(--transition), background-color var(--transition);
}

th.sortable:hover {
  color: var(--text) !important;
  background: var(--surface-2);
}

th.sortable::after {
  content: '';
  display: inline-block;
  margin-left: 5px;
  opacity: 0.35;
  font-size: 10px;
  font-family: var(--font);
}

th.sortable.sort-desc::after {
  content: '↓';
  opacity: 1;
}

th.sortable.sort-asc::after {
  content: '↑';
  opacity: 1;
}

/* ── State Tabs (Özel Durum Sekmeleri) ──────────────────────────────────────── */
.state-tabs-wrap {
  width: 100%;
  overflow-x: auto;
  padding-bottom: 0;
  margin-bottom: -1px;
  position: relative;
  z-index: 10;
  flex-shrink: 0;
  -webkit-overflow-scrolling: touch;
}

/* Sekmeler sarmalayıcısının kaydırma çubuğu */
.state-tabs-wrap::-webkit-scrollbar {
  height: 0px;
}
.state-tabs-wrap::-webkit-scrollbar-thumb {
  background: transparent;
}
.state-tabs-wrap::-webkit-scrollbar-track {
  background: transparent;
}

.state-tabs {
  display: flex;
  gap: 4px;
  min-width: max-content;
  padding: 0;
  align-items: flex-end;
}

.state-tab {
  background: #f1f3f1; /* ultra clean neutral bg */
  border: 1px solid var(--border);
  border-radius: 8px 8px 0 0; /* rounded top only, flat bottom to sit on table */
  padding: 10px 18px;
  cursor: pointer;
  user-select: none;
  display: flex;
  flex-direction: column; /* Back to columns: name on top, stats on a new line! */
  align-items: flex-start;
  gap: 4px; /* vertical gap between name and sub stats */
  min-width: 130px;
  position: relative;
  transition: background var(--transition);
  border-bottom-color: var(--border);
}

.state-tab:hover {
  background: var(--border);
}

.state-tab.active {
  background: var(--surface-1); /* White bg matches table card below */
  border-color: var(--border);
  border-bottom-color: var(--surface-1); /* Melts/connects directly into table! */
  border-top: 3px solid #181a18; /* Premium charcoal dark accent line (not green!) */
  box-shadow: none;
  transform: none;
  margin-bottom: -1px; /* Overlaps bottom border perfectly */
  z-index: 2;
}

.state-tab.active:hover {
  background: var(--surface-1);
}

.state-tab-header {
  display: flex;
  align-items: center;
  gap: 6px;
}

.state-tab-emoji {
  font-size: 14px;
}

.state-tab-name {
  font-size: 12px;
  font-weight: 700;
  color: var(--text);
}

.state-tab.active .state-tab-name {
  color: var(--text);
}

.state-tab-sub {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 14px; /* Increased stats font size to 14px for high legibility */
  color: var(--text-muted);
}

.state-tab.active .state-tab-sub {
  color: var(--text-muted);
}

.sub-active {
  color: var(--text-muted); /* Neutral (not green!) */
  font-weight: 600;
}

.state-tab.active .sub-active {
  color: var(--text); /* Solid dark slate on active */
}

.sub-inactive {
  color: var(--text-dim);
}

.state-tab.active .sub-inactive {
  color: var(--text-dim);
}

.sub-inactive {
  color: var(--text-dim);
}

.sub-sep {
  opacity: 0.5;
}

/* ══════════════════════════════════════════════════════════════════════════════
   RESPONSIVE DESIGN (MOBİL & TABLET UYUMLULUĞU)
   ══════════════════════════════════════════════════════════════════════════════ */

/* Hamburger Menü Buton Stilleri */
.btn-menu-toggle {
  display: flex;
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  align-items: center;
  justify-content: center;
  padding: 8px;
  margin-left: -8px;
  border-radius: var(--radius-sm);
  transition: color var(--transition), background var(--transition);
}

.btn-menu-toggle:hover {
  color: var(--text);
  background: var(--surface-2);
}

/* Sidebar collapsed rules for desktop screens */
@media (min-width: 769px) {
  body.sidebar-collapsed {
    --active-sidebar-w: var(--sidebar-collapsed-w);
  }
  
  .sidebar-collapsed .logo-text {
    display: none;
  }
  
  .sidebar-collapsed .sidebar-logo {
    justify-content: center;
    padding: 22px 0 20px;
  }
  
  .sidebar-collapsed .nav-item {
    justify-content: center;
    padding: 8px 0;
  }
  
  .sidebar-collapsed .nav-item .nav-text {
    display: none;
  }
  
  .sidebar-collapsed .nav-badge {
    display: none;
  }
  
  .sidebar-collapsed .user-info {
    display: none;
  }
  
  .sidebar-collapsed .btn-icon-logout {
    display: none;
  }
  
  .sidebar-collapsed .ext-status span {
    display: none;
  }
  
  .sidebar-collapsed .ext-status {
    justify-content: center;
    padding: 6px 0;
  }
  
  .sidebar-collapsed .user-profile {
    justify-content: center;
    padding: 6px 0;
  }
  
  .sidebar-collapsed .btn-login-google {
    justify-content: center;
    padding: 9px 0;
    font-size: 0;
  }
  
  .sidebar-collapsed .btn-login-google svg {
    margin: 0;
  }
}

/* Arka Plan Karartma Örtüsü */
.sidebar-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(3px);
  z-index: 999;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.sidebar-backdrop.active {
  opacity: 1;
  pointer-events: auto;
}

/* Tablet & Mobil Ortak Optimizasyonları (Genişlik <= 768px) */
@media (max-width: 768px) {
  .btn-menu-toggle {
    display: flex;
  }

  body {
    position: relative;
  }

  /* Sol menüyü çekmeceye dönüştür */
  .sidebar {
    position: fixed;
    left: 0;
    top: 0;
    bottom: 0;
    z-index: 1000;
    width: var(--sidebar-w);
    min-width: var(--sidebar-w);
    box-shadow: 0 0 24px rgba(0, 0, 0, 0.15);
    transform: translateX(-100%);
    transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  }

  .sidebar.active {
    transform: translateX(0);
  }

  /* Sayfa paddingleri daraltılarak alan kazanılır */
  .page {
    padding: 16px;
    -webkit-overflow-scrolling: touch;
  }

  .topbar {
    padding: 0 16px;
  }

  /* Toolbar ve filtrelerin dikey sıralanması */
  .listings-toolbar {
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
  }

  .search-wrap {
    max-width: none;
    width: 100%;
  }

  .toolbar-filters {
    display: flex;
    gap: 8px;
    width: 100%;
  }

  .filter-select {
    flex: 1;
    min-width: 0; /* Küçülmeye izin ver */
  }

  /* Ürün tablolarında başlık hücresi genişlik ayarı */
  .listing-title {
    max-width: 150px;
  }

  .listing-cell {
    gap: 8px;
  }
}

/* Mobil Cihazlar (Genişlik <= 600px) */
@media (max-width: 600px) {
  /* Üst barda senkronizasyon metnini gizleyerek alan aç */
  .sync-time {
    display: none;
  }

  .topbar-left {
    gap: 8px;
  }

  /* Sayfa başlığı boyutu */
  .page-title {
    font-size: 14px;
  }

  .shop-badge {
    padding: 1px 6px;
    font-size: 10px;
  }
  .shop-select {
    padding: 1px 18px 1px 6px;
    font-size: 10px;
    background-position: right 4px center;
  }
}

/* Küçük Mobil Cihazlar (Genişlik <= 480px) */
@media (max-width: 480px) {
  /* Stat kartlarını 2 sütuna düşür */
  .stat-grid {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 8px;
  }

  .stat-card {
    padding: 12px 14px;
    gap: 2px;
  }

  .stat-label {
    font-size: 10px;
    letter-spacing: 0.4px;
  }

  .stat-value {
    font-size: 18px;
    letter-spacing: -0.5px;
  }

  .stat-sub {
    font-size: 10px;
  }

  /* Senkronizasyon overlay kartının taşmasını önle */
  .sync-card {
    width: 90%;
    max-width: 320px;
    min-width: 0;
    padding: 24px 20px;
  }

  /* Log konsolunun mobilde daha iyi kayması */
  .log-console {
    white-space: pre-wrap;
    word-break: break-all;
    max-height: 140px;
  }
}

/* ══════════════════════════════════════════════════════════════════════════════
   SELECTION ACTION BAR (YÜZEN KONTROL ÇUBUĞU)
   ══════════════════════════════════════════════════════════════════════════════ */
.selection-action-bar {
  position: fixed;
  bottom: -90px; /* Varsayılan olarak ekran dışında sakla */
  left: calc(50% + var(--sidebar-w) / 2);
  transform: translateX(-50%);
  background: #ffffff;
  border: 1px solid #000000;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.12);
  padding: 10px 20px;
  border-radius: 99px;
  display: flex;
  align-items: center;
  gap: 16px;
  z-index: 999;
  transition: bottom 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275), opacity 0.3s ease;
  opacity: 0;
  pointer-events: none;
}

.selection-action-bar.active {
  bottom: 24px;
  opacity: 1;
  pointer-events: auto;
}

.selection-count {
  font-size: 13.5px;
  font-weight: 700;
  color: #000000;
  padding-left: 4px;
  border-right: 1px solid #000000;
  padding-right: 16px;
  white-space: nowrap;
}

.selection-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.sel-btn {
  border: 1px solid #000000;
  padding: 8px 18px;
  border-radius: 99px;
  font-size: 13px;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  background: #ffffff;
  color: #000000;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: none !important;
}

.sel-btn svg {
  flex-shrink: 0;
}

.sel-btn-ads {
  background: #ffffff;
  color: #000000;
}

.sel-btn-ads:hover {
  background: #f0fdf4 !important;
  border-color: #22c55e !important;
  color: #15803d !important;
  transform: translateY(-1.5px);
}

.sel-btn-listing {
  background: #ffffff;
  color: #000000;
}

.sel-btn-listing:hover {
  background: #f0fdf4 !important;
  border-color: #22c55e !important;
  color: #15803d !important;
  transform: translateY(-1.5px);
}

.sel-btn-shipping-copy {
  background: #ffffff;
  color: #000000;
}

.sel-btn-shipping-copy:hover {
  background: #f0fdf4 !important;
  border-color: #22c55e !important;
  color: #15803d !important;
  transform: translateY(-1.5px);
}

.sel-btn-clear {
  background: #ffffff;
  color: #000000;
}

.sel-btn-clear:hover {
  background: #f0fdf4 !important;
  border-color: #22c55e !important;
  color: #15803d !important;
  transform: translateY(-1.5px);
}

@media (max-width: 768px) {
  .selection-action-bar {
    left: 50%;
    width: calc(100% - 32px);
    border-radius: 16px;
    flex-direction: column;
    gap: 12px;
    padding: 16px;
    bottom: -160px;
  }
  .selection-action-bar.active {
    bottom: 16px;
  }
  .selection-count {
    border-right: none;
    padding-right: 0;
    width: 100%;
    text-align: center;
    border-bottom: 1px solid var(--border);
    padding-bottom: 8px;
  }
  .selection-actions {
    width: 100%;
    justify-content: center;
    flex-wrap: wrap;
  }
  .sel-btn {
    flex: 1;
    justify-content: center;
    min-width: 120px;
  }
}

/* ══════════════════════════════════════════════════════════════════════════════
   SCHEDULER / ZAMANLAYICI SAYFASI ELEMANLARI
   ══════════════════════════════════════════════════════════════════════════════ */
.scheduler-card {
  background: var(--surface-1);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 20px;
  margin-bottom: 16px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.015);
  font-family: var(--font);
  color: var(--text);
  transition: border-color var(--transition), box-shadow var(--transition);
}

/* ── Zamanlayıcı Durum Çubuğu ── */
.scheduler-status-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: var(--surface-1);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 10px 18px;
  font-size: 13px;
  font-weight: 600;
  flex-wrap: wrap;
  gap: 8px;
}

.scheduler-status-bar .wh-system-clock {
  color: var(--text);
  font-family: 'Geist Mono', monospace;
}

.scheduler-status-bar .wh-system-status {
  color: var(--text-muted);
  font-weight: 500;
}

/* Canlı Sistem Başlığı & Saat */
.wh-system-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--border);
  padding-bottom: 12px;
  margin-bottom: 16px;
  font-size: 13px;
  font-weight: 700;
  font-family: var(--font);
  flex-wrap: wrap;
  gap: 8px;
}

.wh-system-clock {
  color: var(--text);
  font-family: 'Geist Mono', monospace;
}

.wh-system-status {
  color: var(--text-muted);
}


/* Akıllı Görev Kuyruğu Uyarısı */
.wh-smart-alert {
  background: rgba(217, 119, 6, 0.05);
  border: 1px solid rgba(217, 119, 6, 0.15);
  border-radius: 6px;
  padding: 10px 14px;
  font-size: 11.5px;
  color: #b45309;
  line-height: 1.5;
  text-align: left;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
  animation: fadeIn 0.2s ease-in-out;
}

.wh-smart-alert::before {
  content: 'ℹ️';
  font-size: 13px;
  flex-shrink: 0;
}

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

.working-hours-grid:has(.active) .working-hours-col:not(.active) {
  opacity: 0.45;
  filter: grayscale(15%);
}

.scheduler-card:hover {
  border-color: var(--border-mid);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.025);
}

/* Çalışma Zamanı Grid Sistemi */
.working-hours-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  text-align: left;
}

@media (max-width: 900px) {
  .working-hours-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }
}

.working-hours-col {
  background: var(--surface-0);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  position: relative;
  transition: border-color var(--transition), box-shadow var(--transition), transform var(--transition);
}

.working-hours-col:hover {
  border-color: var(--border-mid);
  transform: translateY(-1px);
}

.working-hours-col.active {
  border: 1.5px solid var(--green);
  background: rgba(59, 185, 48, 0.04);
  box-shadow: 0 4px 16px rgba(59, 185, 48, 0.06);
}

.wh-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.wh-time {
  font-size: 13.5px;
  font-weight: 700;
  color: var(--text);
  font-family: var(--font);
}

.wh-status-badge {
  font-size: 8.5px;
  font-weight: 700;
  text-transform: uppercase;
  padding: 2px 8px;
  border-radius: 99px;
  background: rgba(59, 185, 48, 0.1);
  color: var(--green);
  display: none;
  align-items: center;
  gap: 4px;
}

.wh-status-badge::before {
  content: '';
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--green);
  display: inline-block;
  animation: wh-pulse-dot 1.5s infinite ease-in-out;
}

@keyframes wh-pulse-dot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.6; transform: scale(1.3); }
}

.wh-title {
  font-size: 12px;
  font-weight: 700;
  color: var(--text);
}

.wh-desc {
  font-size: 11px;
  color: var(--text-dim);
  line-height: 1.45;
}

.scheduler-card .card-content {
  font-size: 13.5px;
  line-height: 1.6;
  color: var(--text-muted);
  text-align: left;
}

.scheduler-card .card-header-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 14px;
  border-bottom: 1px solid var(--border);
  padding-bottom: 12px;
}

.scheduler-card .card-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.minimal-btn {
  background: var(--surface-2);
  border: 1px solid var(--border);
  color: var(--text-muted);
  padding: 6px 14px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.minimal-btn:hover {
  background: var(--surface-1);
  border-color: var(--border-mid);
  color: var(--text);
}

.minimal-btn.btn-danger {
  color: var(--err);
}

.minimal-btn.btn-danger:hover {
  background: rgba(192, 57, 43, 0.08);
  border-color: rgba(192, 57, 43, 0.2);
}

#btn-start-queue {
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

#btn-start-queue:hover {
  background: var(--green) !important;
  color: white !important;
  border-color: var(--green-dim) !important;
  box-shadow: 0 4px 12px rgba(59, 185, 48, 0.16);
}

#page-scheduler.page.active {
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding-bottom: 40px;
}

.q-btn-delete:hover {
  color: var(--err);
  background: rgba(192, 57, 43, 0.08);
}

/* Zamanlama Seçimi Açılır Kutusu */
.sch-select {
  background: var(--surface-2);
  border: 1px solid var(--border);
  padding: 5px 10px;
  border-radius: 6px;
  font-size: 12px;
  font-family: var(--font);
  color: var(--text-muted);
  outline: none;
  cursor: pointer;
  transition: all 0.2s ease;
}

.sch-select:hover, .sch-select:focus {
  border-color: var(--border-mid);
  color: var(--text);
  background: var(--surface-1);
}

/* ══════════════════════════════════════════════════════════════════════════════
   TOAST NOTIFICATION (BİLDİRİMLER)
   ══════════════════════════════════════════════════════════════════════════════ */
.toast-container {
  position: fixed;
  top: 24px;
  right: 24px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  z-index: 99999;
  pointer-events: none;
}

.toast {
  background: #ffffff;
  border-left: 4px solid var(--green);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08), 0 2px 8px rgba(0, 0, 0, 0.04);
  border-radius: 8px;
  padding: 12px 18px;
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 290px;
  max-width: 390px;
  transform: translateX(120%);
  transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.25), opacity 0.3s ease;
  opacity: 0;
  pointer-events: auto;
}

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

.toast-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: var(--green);
}

.toast-content {
  flex: 1;
}

.toast-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
}

.toast-desc {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 2px;
}

.toast-close {
  background: none;
  border: none;
  color: var(--text-dim);
  cursor: pointer;
  padding: 4px;
  font-size: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
  transition: background var(--transition);
}

.toast-close:hover {
  background: var(--surface-2);
  color: var(--text);
}


/* ── GECE OTO-PİLOT KONTROL PANELİ (TEMİZLENDİ) ── */

/* ── Benchmark Bar ───────────────────────────────────────────────────────────── */
.benchmark-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 10px 16px;
  margin-bottom: 12px;
  background: var(--surface-1);
  border: 1px solid var(--border);
  border-radius: 10px;
  align-items: center;
}

.benchmark-item {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  background: var(--green-mute);
  border: 1px solid rgba(59,185,48,.18);
  border-radius: 6px;
  flex: 1 1 auto;
  min-width: 140px;
}

.benchmark-label {
  font-size: 10px;
  font-weight: 600;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: .4px;
  white-space: nowrap;
}

.benchmark-value {
  font-size: 13px;
  font-weight: 700;
  color: var(--green-dim);
  margin-left: auto;
  white-space: nowrap;
}

/* ── page-listings Layout Overrides (Tabs Glued to Table) ────────────────── */
#page-listings.page {
  gap: 0 !important;
}

#page-listings .benchmark-bar {
  margin-bottom: 20px;
}

#page-listings .state-tabs-wrap {
  margin-bottom: 0;
  border-bottom: 1px solid var(--border);
}

#page-listings .table-wrap {
  margin-top: 0;
  background: var(--surface-1);
  border: 1px solid var(--border);
  border-top: none;
  border-radius: 0 0 var(--radius) var(--radius);
}

#page-listings .pagination {
  margin-top: 20px;
}

/* ==========================================================================
   24 SAATLİK OTONOM ZAMANLAYICI VE TIMELINE EK STİLLERİ
   ========================================================================== */

/* Canlı Aktif Görev Paneli */
.active-task-container {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.7), rgba(255, 255, 255, 0.9));
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border: 1px solid rgba(59, 130, 246, 0.18);
  box-shadow: 0 8px 32px rgba(31, 38, 135, 0.05), inset 0 1px 0 rgba(255, 255, 255, 0.6);
  border-radius: var(--radius);
  padding: 20px;
  margin-bottom: 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  position: relative;
  overflow: hidden;
  transition: all 0.3s ease;
}

.active-task-container::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  height: 100%;
  background: var(--accent-active, #3b82f6);
}

.active-task-header {
  display: flex;
  align-items: center;
  gap: 8px;
}

.pulse-dot {
  width: 8px;
  height: 8px;
  background-color: #10b981;
  border-radius: 50%;
  box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7);
  animation: pulse-dot-anim 1.8s infinite;
}

.pulse-dot.processing {
  background-color: #3b82f6;
  box-shadow: 0 0 0 0 rgba(59, 130, 246, 0.7);
}

.pulse-dot.sleeping {
  background-color: #6b7280;
  box-shadow: 0 0 0 0 rgba(107, 114, 128, 0.7);
}

@keyframes pulse-dot-anim {
  0% {
    transform: scale(0.95);
    box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7);
  }
  70% {
    transform: scale(1);
    box-shadow: 0 0 0 8px rgba(16, 185, 129, 0);
  }
  100% {
    transform: scale(0.95);
    box-shadow: 0 0 0 0 rgba(16, 185, 129, 0);
  }
}

.active-task-badge {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: #3b82f6;
  background: rgba(59, 130, 246, 0.10);
  border: 1px solid rgba(59, 130, 246, 0.30);
  padding: 3px 10px;
  border-radius: 99px;
  display: inline-block;
  animation: badge-glow-pulse 1.6s ease-in-out infinite;
}

.active-task-content h3 {
  font-size: 16px;
  font-weight: 700;
  color: var(--text);
  margin: 0;
}

.active-task-content p {
  font-size: 12.5px;
  color: var(--text-muted);
  margin-top: 4px;
}

/* Zaman Dilimi ve Mod Seçim Alanları */
.ctrl-select-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: 1;
}

.ctrl-select-group label {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
}

.ctrl-select {
  background: var(--surface-2);
  border: 1px solid var(--border);
  padding: 8px 12px;
  border-radius: 8px;
  font-size: 13px;
  font-family: var(--font);
  color: var(--text);
  outline: none;
  cursor: pointer;
  transition: all 0.2s ease;
}

.ctrl-select:hover, .ctrl-select:focus {
  border-color: var(--border-mid);
  background: var(--surface-1);
}

/* ── Zamanlayıcı Premium İç Bileşenleri ── */
.log-console-minimal {
  background: var(--surface-1); /* White background */
  border: 1px solid var(--border);
  border-radius: 8px; /* slight rounding */
  padding: 16px 20px;
  height: 220px;
  overflow-y: auto;
  font-family: var(--font);
  font-size: 12px;
  line-height: 1.6;
  text-align: left;
  box-shadow: inset 0 1px 4px rgba(0, 0, 0, 0.02);
  display: flex;
  flex-direction: column;
  align-items: flex-start; /* Stack tag badges neatly */
  gap: 6px;
}

.tasks-list-container {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 10px 0;
  max-height: 480px;
  overflow-y: auto;
}

.timeline-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  border: 1px solid var(--border);
  border-radius: 6px; /* slight rounding */
  background: var(--surface-1);
  transition: all 0.2s ease;
  gap: 16px;
}

.timeline-item:hover {
  border-color: var(--border-mid);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.015);
}

.timeline-item.isleniyor {
  border-color: rgba(37, 99, 235, 0.35);
  background: rgba(37, 99, 235, 0.01);
  box-shadow: 0 0 10px rgba(37, 99, 235, 0.04);
}

.timeline-left {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
  flex: 1;
}

.timeline-icon-wrap {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--surface-2);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  flex-shrink: 0;
  transition: all 0.2s ease;
}

.timeline-item.isleniyor .timeline-icon-wrap {
  background: rgba(37, 99, 235, 0.08);
  border-color: rgba(37, 99, 235, 0.2);
  color: #2563eb;
}

.timeline-item.tamamlandi .timeline-icon-wrap {
  background: var(--green-mute);
  border-color: rgba(59, 185, 48, 0.2);
  color: var(--green);
}

.timeline-details {
  display: flex;
  flex-direction: column;
  gap: 3px;
  text-align: left;
  min-width: 0;
}

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

.timeline-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 240px;
}

.timeline-badge {
  font-size: 9px;
  font-weight: 700;
  text-transform: uppercase;
  padding: 2px 6px;
  border-radius: 4px;
  letter-spacing: 0.3px;
}

.badge-ads { background: rgba(0, 0, 0, 0.08); color: #000000; }
.badge-listing { background: rgba(15, 23, 42, 0.08); color: #0f172a; }
.badge-shipping-copy { background: rgba(79, 70, 229, 0.08); color: #4f46e5; }
.badge-message { background: rgba(139, 92, 246, 0.08); color: #8b5cf6; }
.badge-order { background: rgba(236, 72, 153, 0.08); color: #ec4899; }
.badge-pinterest { background: rgba(239, 68, 68, 0.08); color: #ef4444; }
.badge-browsing { background: rgba(245, 158, 11, 0.08); color: #f59e0b; }
.badge-announcement { background: rgba(6, 182, 212, 0.08); color: #06b6d4; }
.badge-discount { background: rgba(16, 185, 129, 0.08); color: #10b981; }

.timeline-desc {
  font-size: 11px;
  color: var(--text-dim);
}

.timeline-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

.task-badge {
  font-size: 9px;
  font-weight: 700;
  text-transform: uppercase;
  padding: 3px 8px;
  border-radius: 99px;
  border: 1px solid transparent;
}

.task-pending {
  color: #b45309;
  background: rgba(217, 119, 6, 0.06);
  border-color: rgba(217, 119, 6, 0.12);
}

.task-processing {
  color: #3b82f6;
  background: rgba(59, 130, 246, 0.12);
  border-color: rgba(59, 130, 246, 0.35);
  animation: badge-glow-pulse 1.6s ease-in-out infinite;
  position: relative;
}

.task-done {
  color: var(--green);
  background: var(--green-mute);
  border-color: rgba(59, 185, 48, 0.12);
}

.task-cancelled {
  color: #6b7280;
  background: rgba(107, 114, 128, 0.06);
  border-color: rgba(107, 114, 128, 0.12);
}

@keyframes badge-glow-pulse {
  0%, 100% {
    box-shadow: 0 0 0 0 rgba(59, 130, 246, 0.55);
    background: rgba(59, 130, 246, 0.12);
    border-color: rgba(59, 130, 246, 0.35);
    color: #3b82f6;
    opacity: 1;
  }
  50% {
    box-shadow: 0 0 0 6px rgba(59, 130, 246, 0);
    background: rgba(59, 130, 246, 0.25);
    border-color: rgba(59, 130, 246, 0.7);
    color: #2563eb;
    opacity: 0.35;
  }
}

/* Eski animasyon - geriye uyumluluk */
@keyframes pulse-active-task {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.75; }
}

.q-btn {
  background: none;
  border: none;
  padding: 5px;
  border-radius: 4px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--text-dim);
  transition: all 0.2s ease;
}

.q-btn:hover {
  background: var(--surface-2);
  color: var(--text);
}

.q-btn-run:hover {
  color: var(--green);
  background: var(--green-mute);
}

.q-btn-cancel:hover {
  color: var(--warn);
  background: rgba(212, 160, 23, 0.08);
}

.q-btn-delete:hover {
  color: var(--err);
  background: rgba(192, 57, 43, 0.08);
}

.stats-text {
  font-size: 13.5px;
  font-weight: 700;
  color: var(--text);
  text-align: center;
}

/* Monospace logs */
.log-line {
  display: inline-flex;
  align-items: center;
  background: var(--surface-2);
  border: 1px solid var(--border);
  color: var(--text);
  font-family: var(--font);
  font-size: 11.5px;
  font-weight: 500;
  padding: 4px 10px;
  border-radius: 6px;
  max-width: 100%;
  word-break: break-word;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.01);
}

.log-line.log-ok {
  border-left: 3.5px solid var(--green);
}

.log-line.log-warn {
  border-left: 3.5px solid var(--warn);
}

.log-line.log-err {
  border-left: 3.5px solid var(--err);
}

.log-line.log-info {
  border-left: 3.5px solid #3b82f6;
}

/* ── Listing Accordion & Sub-Accordion Premium Styles ── */
.listing-main-row {
  transition: background-color 0.2s ease;
}
.listing-main-row:hover {
  background-color: rgba(59, 130, 246, 0.02) !important;
}
.listing-detail-row {
  background: #fafbfc !important;
  border-bottom: 2px solid var(--border);
  box-shadow: inset 0 2px 8px rgba(0, 0, 0, 0.03);
  transition: all 0.25s ease;
}
.opt-accordion-header {
  transition: all 0.2s ease;
}
.opt-accordion-header:hover {
  background: #f8fafc !important;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.02);
}
.opt-accordion-header.active {
  background: #f1f5f9 !important;
  border-bottom-left-radius: 0 !important;
  border-bottom-right-radius: 0 !important;
}
.arrow-icon {
  transition: transform 0.2s ease;
  font-size: 10px;
}
.arrow-icon.active {
  transform: rotate(180deg);
}

/* Badge & Comparison styles */
.badge-group-title {
  font-size: 11px;
  font-weight: 700;
  color: #4b5563;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 5px;
}
.badge-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 15px;
}
.kw-badge {
  font-size: 11px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 6px;
  border: 1px solid transparent;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.kw-badge.open {
  color: #166534;
  background: #f0fdf4;
  border-color: #bbf7d0;
}
.kw-badge.closed {
  color: #991b1b;
  background: #fef2f2;
  border-color: #fca5a5;
}
.kw-badge.keep {
  color: #075985;
  background: #f0f9ff;
  border-color: #bae6fd;
}
.kw-badge.already-closed {
  color: #4b5563;
  background: #f3f4f6;
  border-color: #d1d5db;
}

.tag-badge {
  font-size: 11px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 6px;
  border: 1px solid transparent;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.tag-badge.relevant {
  color: #166534;
  background: #f0fdf4;
  border-color: #bbf7d0;
}
.tag-badge.irrelevant {
  color: #991b1b;
  background: #fef2f2;
  border-color: #fca5a5;
}

/* Left & Right Comparison Layout */
.comparison-grid {
  display: flex;
  flex-direction: column;
  gap: 15px;
}
.comparison-row {
  display: flex;
  gap: 20px;
  padding-bottom: 12px;
  border-bottom: 1px dashed #e2e8f0;
}
.comparison-row:last-child {
  border-bottom: none;
  padding-bottom: 0;
}
.comp-col {
  flex: 1;
  font-size: 12.5px;
  line-height: 1.6;
  padding: 12px;
  border-radius: 8px;
  border: 1px solid #e2e8f0;
  background: #ffffff;
}
.comp-col.comp-before {
  border-left: 4px solid #f59e0b;
}
.comp-col.comp-after {
  border-left: 4px solid var(--green);
}
.comp-label {
  font-size: 11px;
  font-weight: 700;
  color: #6b7280;
  text-transform: uppercase;
  margin-bottom: 6px;
  display: block;
}
.comp-val {
  font-family: inherit;
  white-space: pre-wrap;
  word-break: break-word;
  color: #1f2937;
}
.comp-val-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.comp-tag {
  font-size: 11px;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: 6px;
  background: #f3f4f6;
  border: 1px solid #e5e7eb;
  color: #374151;
}
.comp-tag.added {
  background: #ecfdf5;
  border-color: #a7f3d0;
  color: #065f46;
}
.comp-tag.removed {
  background: #fef2f2;
  border-color: #fca5a5;
  color: #991b1b;
}

/* Premium Tooltip Styles */
[data-tooltip] {
  position: relative;
  cursor: pointer;
}

[data-tooltip]::after {
  content: attr(data-tooltip);
  position: absolute;
  bottom: 130%;
  left: 50%;
  transform: translateX(-50%) translateY(4px);
  background: rgba(15, 23, 42, 0.95); /* Deep slate */
  color: #ffffff;
  padding: 8px 12px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 500;
  white-space: normal;
  width: max-content;
  max-width: 280px;
  line-height: 1.4;
  text-align: center;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.18s cubic-bezier(0.4, 0, 0.2, 1), transform 0.18s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 1000;
}

[data-tooltip]:hover::after {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* Tooltip Arrow */
[data-tooltip]::before {
  content: '';
  position: absolute;
  bottom: 120%;
  left: 50%;
  transform: translateX(-50%) translateY(4px);
  border-width: 5px;
  border-style: solid;
  border-color: rgba(15, 23, 42, 0.95) transparent transparent transparent;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.18s cubic-bezier(0.4, 0, 0.2, 1), transform 0.18s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 1000;
}

[data-tooltip]:hover::before {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* Premium Custom Scrollbar */
.custom-scrollbar::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
.custom-scrollbar::-webkit-scrollbar-track {
  background: transparent;
}
.custom-scrollbar::-webkit-scrollbar-thumb {
  background: #cbd5e1; /* soft slate */
  border-radius: 4px;
}
.custom-scrollbar::-webkit-scrollbar-thumb:hover {
  background: #94a3b8; /* darker slate on hover */
}

/* Comparison stats styles inside listing table cells */
.cell-main {
  font-size: 14.5px;
  font-weight: 700;
}
.cell-sub {
  font-size: 10.5px;
  font-weight: 700;
  margin-top: 1px;
  display: block;
  font-family: var(--font-mono, monospace);
  letter-spacing: -0.2px;
}
.comp-up {
  color: var(--green) !important;
}
.comp-down {
  color: var(--err) !important;
}

/* Premium Optimization Performance Cards Styling */
.opt-stats-container {
  display: flex;
  gap: 20px;
  margin-top: 5px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}
.opt-stats-card {
  flex: 1;
  min-width: 320px;
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 16px;
  backdrop-filter: blur(10px);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.02);
  transition: box-shadow var(--transition);
}
.opt-stats-card:hover {
  box-shadow: 0 6px 24px rgba(59, 185, 48, 0.04);
}
.opt-stats-title {
  font-size: 13.5px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  gap: 8px;
  border-bottom: 1px solid var(--border);
  padding-bottom: 10px;
}
.opt-stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  gap: 12px;
}
.opt-stat-item {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 85px;
  transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
}
.opt-stat-item:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.04);
  border-color: #cbd5e1;
}
.opt-stat-label {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
  border-bottom: 1px dashed #e2e8f0;
  padding-bottom: 4px;
  margin-bottom: 4px;
}
.opt-stat-cols {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 6px;
  gap: 6px;
  width: 100%;
}
.opt-stat-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  flex: 1;
  text-align: center;
}
.opt-stat-col:not(:last-child) {
  border-right: 1px solid #e2e8f0;
}
.opt-stat-col-title {
  font-size: 8px;
  font-weight: 700;
  color: var(--text-dim);
  text-transform: uppercase;
  margin-bottom: 4px;
  letter-spacing: 0.5px;
}
.opt-stat-col-val {
  font-weight: 700;
  font-family: var(--font-mono, monospace);
}
.opt-stat-col-val.current {
  color: var(--text);
  font-size: 20px;
}
.opt-stat-col-val.before {
  color: var(--text-dim);
  font-size: 16px;
  font-weight: 500;
  text-decoration: line-through;
}
.opt-stat-col-diff {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 22px;
}
.opt-stat-diff {
  font-size: 9.5px;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 2px;
  padding: 2px 6px;
  border-radius: 4px;
  margin-top: 0px;
  width: fit-content;
  font-family: var(--font-mono, monospace);
  letter-spacing: -0.2px;
}
.opt-stat-diff.positive {
  color: #15803d;
  background: #f0fdf4;
}
.opt-stat-diff.negative {
  color: #b91c1c;
  background: #fef2f2;
}
.opt-stat-diff.neutral {
  color: #475569;
  background: #f1f5f9;
}

/* Premium Sequential Sync Steps Checklist Styling */
.sync-steps-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  width: 100%;
  margin-top: 14px;
  border-top: 1px solid var(--border);
  padding-top: 16px;
  align-self: stretch;
}
.sync-step {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 12px;
  color: var(--text-muted);
  opacity: 0.45;
  transition: opacity var(--transition), color var(--transition);
}
.sync-step.active {
  opacity: 1;
  color: var(--text);
  font-weight: 600;
}
.sync-step.completed {
  opacity: 1;
  color: var(--green-dim);
  font-weight: 600;
}
.sync-step-icon {
  font-size: 13px;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
}
.sync-step-name {
  flex-grow: 1;
  text-align: left;
}
.sync-step-count {
  font-family: var(--font-mono, monospace);
  font-size: 11px;
  color: var(--text-dim);
  background: #f1f5f9;
  padding: 2px 6px;
  border-radius: 4px;
  font-weight: 500;
}
.sync-step.active .sync-step-count {
  background: var(--green-mute);
  color: var(--green-dim);
  font-weight: 700;
}
.sync-step.completed .sync-step-count {
  background: rgba(59, 185, 48, 0.12);
  color: var(--green-dim);
  font-weight: 700;
}

/* ══════════════════════════════════════════════════════════════════════════════
   PREMIUM CHAT & AI MESSAGING PANEL (MESAJLAR)
   ══════════════════════════════════════════════════════════════════════════════ */
.chat-container {
  display: flex;
  height: calc(100vh - 120px);
  background: var(--surface-1);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

/* Sol Panel: Konuşma Listesi */
.chat-sidebar {
  width: 320px;
  max-width: 320px;
  flex: 0 0 320px;
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  background: var(--surface-1);
  min-width: 0;
}

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

.chat-search-wrap {
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 8px;
}

#btn-chat-refresh {
  width: 100%;
  background: var(--green);
  color: #fff;
  border: none;
  border-radius: var(--radius-sm);
  padding: 8px 12px;
  font-size: 12px;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  cursor: pointer;
  transition: background var(--transition);
  box-sizing: border-box;
}

#btn-chat-refresh:hover {
  background: var(--green-dim);
}

.chat-search-wrap input {
  width: 100%;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 8px 12px;
  color: var(--text);
  font-size: 13px;
  outline: none;
  transition: border-color var(--transition);
  box-sizing: border-box;
}

.chat-search-wrap input:focus {
  border-color: var(--green);
}

.convo-list {
  flex: 1;
  overflow-y: auto;
}

.chat-loading-placeholder, .chat-empty-list {
  padding: 40px 20px;
  text-align: center;
  color: var(--text-dim);
  font-size: 12.5px;
}

/* Görüşme Kartı */
.convo-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 18px;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  transition: background var(--transition), border-left var(--transition);
  border-left: 3px solid transparent;
  box-sizing: border-box;
  min-width: 0;
}

.convo-item:hover {
  background: var(--surface-2);
}

.convo-item.active {
  background: var(--green-mute);
  border-left-color: var(--green);
}

.convo-item.unread {
  background: rgba(59, 185, 48, 0.02);
}

.convo-item-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid var(--border);
  object-fit: cover;
  flex-shrink: 0;
}

.convo-item-info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.convo-item-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.convo-item-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.convo-item-time {
  font-size: 10px;
  color: var(--text-dim);
  white-space: nowrap;
}

.convo-item-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-width: 0;
}

.convo-item-excerpt {
  font-size: 11.5px;
  color: var(--text-dim);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  flex: 1;
}

.convo-item-unread-dot {
  width: 8px;
  height: 8px;
  background: var(--green);
  border-radius: 50%;
  box-shadow: 0 0 6px var(--green);
  flex-shrink: 0;
}

/* Sağ Panel: Aktif Sohbet */
.chat-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  background: var(--surface-1);
  position: relative;
}

.chat-empty-state {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px;
  color: var(--text-dim);
  text-align: center;
  gap: 12px;
}

.chat-empty-state svg {
  color: var(--border-mid);
}

.chat-empty-state p {
  font-size: 13px;
  max-width: 320px;
  line-height: 1.5;
}

.chat-active-wrap {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

/* Sohbet Başlığı */
.chat-header {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 24px;
  background: var(--surface-1);
  border-bottom: 1px solid var(--border);
}

.chat-header-avatar {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 1px solid var(--border);
}

.chat-header-info {
  display: flex;
  flex-direction: column;
  gap: 3px;
  text-align: left;
}

#chat-header-name {
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
}

#chat-header-title {
  font-size: 11px;
  color: var(--text-dim);
}

.chat-header-tags {
  margin-left: auto;
  display: flex;
  gap: 8px;
}

.chat-tag {
  font-size: 10px;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 6px;
  text-transform: uppercase;
}

.chat-tag-red {
  background: rgba(239, 68, 68, 0.08);
  color: #ef4444;
  border: 1px solid rgba(239, 68, 68, 0.15);
}

.chat-tag-blue {
  background: var(--green-mute);
  color: var(--green);
  border: 1px solid rgba(59, 185, 48, 0.15);
}

/* Mesajlaşma Akışı */
.chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  background: var(--bg);
}

.chat-bubble {
  max-width: 65%;
  padding: 8px 12px;
  border-radius: 12px;
  word-wrap: break-word;
  text-align: left;
}

.chat-bubble-text {
  font-size: 14.5px; /* Yazılar bir tık büyük ve okunaklı */
  line-height: 1.45;
  white-space: pre-wrap; /* Sadece gerçek metin alanında satır sonları korunsun */
}

.chat-bubble.customer {
  align-self: flex-start;
  background: var(--surface-1);
  color: var(--text);
  border: 1px solid var(--border);
  border-bottom-left-radius: 3px;
}

.chat-bubble.seller {
  align-self: flex-end;
  background: var(--green);
  color: #fff;
  border-bottom-right-radius: 3px;
}

/* AI Taslak Paneli */
.chat-ai-box {
  background: var(--surface-1);
  border-top: 1px solid var(--border);
  padding: 18px 24px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.chat-ai-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.chat-ai-title-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  font-size: 13px;
  color: var(--text);
}

.chat-ai-glow-dot {
  width: 8px;
  height: 8px;
  background: var(--green);
  border-radius: 50%;
  box-shadow: 0 0 6px var(--green);
}

.chat-ai-glow-dot.loading {
  background: var(--warn);
  box-shadow: 0 0 6px var(--warn);
  animation: pulse-active-task 1.5s infinite;
}

.chat-ai-glow-dot.error {
  background: var(--err);
  box-shadow: 0 0 6px var(--err);
}

.chat-ai-model-label {
  font-size: 10px;
  color: var(--text-dim);
  background: var(--surface-2);
  padding: 2px 8px;
  border-radius: 99px;
  border: 1px solid var(--border);
}

.chat-ai-draft-container {
  width: 100%;
  display: flex;
  gap: 16px;
}

.chat-ai-draft-half {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.chat-ai-draft-label {
  font-size: 10px;
  font-weight: 700;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  display: flex;
  align-items: center;
  gap: 4px;
}

#chat-ai-draft-textarea,
#chat-ai-draft-textarea-tr {
  width: 100%;
  height: 120px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 12px;
  color: var(--text);
  font-family: inherit;
  font-size: 13px;
  line-height: 1.5;
  resize: none;
  outline: none;
  transition: border-color var(--transition);
  box-sizing: border-box;
}

#chat-ai-draft-textarea:focus,
#chat-ai-draft-textarea-tr:focus {
  border-color: var(--green);
}

.chat-ai-prompt-wrap {
  display: flex;
  gap: 10px;
}

#chat-ai-directive-input {
  flex: 1;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  color: var(--text);
  font-size: 13px;
  outline: none;
  transition: border-color var(--transition);
}

#chat-ai-directive-input:focus {
  border-color: var(--green);
}

.chat-ai-btn-regen {
  background: var(--green);
  color: #fff;
  border: none;
  border-radius: var(--radius-sm);
  padding: 0 18px;
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  transition: opacity var(--transition);
  white-space: nowrap;
}

.chat-ai-btn-regen:hover {
  opacity: 0.9;
}

.chat-ai-actions {
  width: 100%;
}

.chat-ai-btn-send {
  width: 100%;
  background: var(--green);
  color: #fff;
  border: none;
  border-radius: var(--radius-sm);
  padding: 12px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 4px 10px rgba(59, 185, 48, 0.15);
  transition: background var(--transition), transform 0.1s;
}

.chat-ai-btn-send:hover {
  background: var(--green-dim);
}

.chat-ai-btn-send:active {
  transform: scale(0.99);
}

/* ── Shipping Modal Styles ────────────────────────────────────────────────── */
.shipping-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(244, 246, 244, 0.65);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  backdrop-filter: blur(8px);
  opacity: 1;
  transition: opacity var(--transition);
}
.shipping-modal-overlay.hidden {
  display: none;
}
.shipping-modal-card {
  background: var(--surface-1);
  border: 1px solid var(--border-mid);
  border-radius: var(--radius-lg);
  width: 480px;
  max-width: 90%;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.15);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  animation: modalSlideUp 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}
@keyframes modalSlideUp {
  from { transform: translateY(20px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}
.shipping-modal-header {
  padding: 18px 24px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.shipping-modal-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
  margin: 0;
}
.shipping-modal-close {
  background: none;
  border: none;
  font-size: 24px;
  color: var(--text-dim);
  cursor: pointer;
  padding: 0;
  line-height: 1;
}
.shipping-modal-close:hover {
  color: var(--err);
}
.shipping-modal-body {
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.shipping-listing-preview {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--surface-2);
  padding: 12px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
}
.preview-thumb-wrap img {
  width: 44px;
  height: 44px;
  border-radius: 6px;
  object-fit: cover;
  border: 1px solid var(--border);
}
.preview-thumb-wrap .listing-thumb-ph {
  width: 44px;
  height: 44px;
  border-radius: 6px;
}
.preview-details {
  min-width: 0;
  flex: 1;
}
.preview-title {
  font-size: 13px;
  font-weight: 500;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.preview-id {
  font-size: 11px;
  color: var(--text-dim);
  margin-top: 2px;
}
.shipping-select-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.shipping-select-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
}
.shipping-dropdown {
  width: 100%;
  padding: 10px 14px;
  font-family: inherit;
  font-size: 13px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface-1);
  color: var(--text);
  outline: none;
  cursor: pointer;
  transition: border-color var(--transition);
}
.shipping-dropdown:focus {
  border-color: var(--green);
}
.shipping-modal-status {
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(59, 185, 48, 0.05);
  border: 1px solid rgba(59, 185, 48, 0.15);
  padding: 10px 14px;
  border-radius: var(--radius-sm);
}
.status-spinner {
  width: 16px;
  height: 16px;
  border: 2px solid rgba(59, 185, 48, 0.2);
  border-top-color: var(--green);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}
.status-text {
  font-size: 12px;
  color: var(--green);
  font-weight: 500;
}
.shipping-modal-footer {
  padding: 16px 24px;
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  background: var(--surface-2);
}
.btn-shipping-cancel {
  background: var(--surface-1);
  border: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 13px;
  font-weight: 500;
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: border-color var(--transition);
}
.btn-shipping-cancel:hover {
  border-color: var(--border-mid);
}
.btn-shipping-confirm {
  background: var(--green);
  border: 1px solid var(--green);
  color: white;
  font-size: 13px;
  font-weight: 600;
  padding: 8px 18px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: opacity var(--transition);
}
.btn-shipping-confirm:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}
.btn-shipping-confirm:not(:disabled):hover {
  opacity: 0.9;
}
.btn-shipping-copy:hover {
  background: #4338ca !important;
}


/* ══════════════════════════════════════════════════════════════════════════════
   COMPETITOR SHOP TRACKING SYSTEM (RAKİP MAĞAZA TAKİP SİSTEMİ)
   ══════════════════════════════════════════════════════════════════════════════ */

.competitor-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
  width: 100%;
}

.competitor-card {
  background: var(--surface-1);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.015);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  cursor: pointer;
  position: relative;
  overflow: hidden;
}

.competitor-card:hover {
  transform: translateY(-4px);
  border-color: var(--border-mid);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.04), inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.competitor-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 2px;
  background: linear-gradient(90deg, #a855f7 0%, #6366f1 100%);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.competitor-card:hover::before {
  opacity: 1;
}

.comp-card-header {
  display: flex;
  align-items: center;
  gap: 12px;
}

.comp-card-icon {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  border: 1px solid var(--border);
  object-fit: cover;
  background: var(--surface-2);
}

.comp-card-info {
  min-width: 0;
  flex: 1;
  text-align: left;
}

.comp-card-name {
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
  margin: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.comp-card-meta {
  font-size: 11px;
  color: var(--text-dim);
  margin-top: 2px;
}

.comp-card-badge-row {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.comp-badge {
  font-size: 9px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 4px;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.comp-badge-star {
  background: rgba(24a, 204, 21, 0.1);
  color: #eab308;
  border: 1px solid rgba(234, 179, 8, 0.2);
}

.comp-badge-discount {
  background: rgba(168, 85, 247, 0.1);
  color: #c084fc;
  border: 1px solid rgba(168, 85, 247, 0.2);
}

.comp-card-metrics {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: 14px 0;
}

.comp-metric-item {
  display: flex;
  flex-direction: column;
  text-align: left;
}

.comp-metric-label {
  font-size: 10px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.4px;
  margin-bottom: 2px;
}

.comp-metric-value {
  font-size: 16px;
  font-weight: 700;
  color: var(--text);
}

.comp-card-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 11px;
  color: var(--text-dim);
}

.comp-growth-pill {
  padding: 3px 8px;
  border-radius: 99px;
  font-weight: 700;
  font-size: 10px;
}

.comp-growth-pill.positive {
  background: rgba(34, 197, 94, 0.1);
  color: #22c55e;
}

.comp-growth-pill.neutral {
  background: var(--surface-2);
  color: var(--text-dim);
}

/* SVG Chart Elements */
.chart-grid-line {
  stroke: rgba(0, 0, 0, 0.08);
  stroke-dasharray: 4, 4;
}

.chart-line {
  stroke: url(#chart-gradient);
  stroke-width: 3.5;
  stroke-linecap: round;
  stroke-linejoin: round;
  fill: none;
  filter: drop-shadow(0 6px 8px rgba(168, 85, 247, 0.15));
}

.chart-area {
  fill: url(#chart-area-gradient);
}

.chart-dot {
  fill: #a855f7;
  stroke: #ffffff;
  stroke-width: 2.5;
  cursor: pointer;
  transition: r 0.2s ease, fill 0.2s ease;
}

.chart-dot:hover {
  r: 7;
  fill: #6366f1;
}

.chart-axis-text {
  fill: rgba(0, 0, 0, 0.55);
  font-size: 10px;
  font-family: inherit;
}

/* ── Competitor Comparison Matrix Table ────────────────────────────────────── */
.competitor-matrix-table {
  border-collapse: collapse;
  font-size: 13px;
  background: #ffffff;
  color: #374151;
  width: 100%;
}

.competitor-matrix-table th, 
.competitor-matrix-table td {
  border: none !important;
  border-bottom: 1px solid #f3f4f6 !important; /* İnce ve pürüzsüz yatay çizgi */
  padding: 14px 18px !important;
  text-align: center;
  font-family: 'Geist', sans-serif;
  vertical-align: middle;
  transition: background 0.15s ease, color 0.15s ease;
}

.competitor-matrix-table th {
  background: #f9fafb !important; /* Premium hafif gri başlık arka planı */
  font-weight: 600;
  color: #4b5563 !important;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border-bottom: 1px solid #e5e7eb !important;
}

.competitor-matrix-table tr.row-start-date td,
.competitor-matrix-table tr.row-star-seller td,
.competitor-matrix-table tr.row-listings-count td,
.competitor-matrix-table tr.row-monthly-sales-calc td,
.competitor-matrix-table tr.row-coefficient td {
  background: #ffffff !important;
  color: #1f2937 !important;
}

.competitor-matrix-table tr:hover td {
  background: #fcfcfc !important; /* Hafif satır vurgusu */
}

.competitor-matrix-table tr.row-date:hover td {
  background: #f9fafb !important;
}

.competitor-matrix-table td.cell-label, 
.competitor-matrix-table th.cell-label {
  font-weight: 500 !important; /* Kalınlığı yumuşatılmış temiz font */
  background: #ffffff !important;
  color: #4b5563 !important; /* Şık füme antrasit */
  text-align: left !important;
  min-width: 160px;
  padding-left: 20px !important;
  font-size: 12.5px;
}

.competitor-matrix-table th.cell-label {
  background: #f9fafb !important;
  border-bottom: 1px solid #e5e7eb !important;
}

  border-radius: 10px !important;
  border: 1px solid #e5e7eb !important;
  box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.02), 0 1px 2px -1px rgba(0, 0, 0, 0.02) !important;
  overflow: hidden;
}

/* ══════════════════════════════════════════════════════════════════════════════
   💎 JEWELRY INVENTORY & MADE-TO-ORDER PIPELINE STYLES
   ══════════════════════════════════════════════════════════════════════════════ */

/* Tab Panels */
.jewelry-tab-panel {
  display: none;
  animation: fadeIn 0.25s ease;
}
.jewelry-tab-panel.active {
  display: block;
}

/* Glassmorphism Jewelry Cards Grid */
.jewelry-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 24px;
}

.jewelry-card-premium {
  background: rgba(255, 255, 255, 0.8);
  border: 1px solid rgba(229, 231, 235, 0.7);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.03);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  flex-direction: column;
  height: 100%;
}

.jewelry-card-premium:hover {
  transform: translateY(-5px);
  box-shadow: 0 12px 30px rgba(139, 92, 246, 0.08);
  border-color: rgba(139, 92, 246, 0.25);
}

.jewelry-card-media {
  position: relative;
  height: 180px;
  background: #f9fafb;
  border-bottom: 1px solid rgba(229, 231, 235, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.jewelry-card-svg-preview {
  width: 100%;
  height: 100%;
  padding: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.3s ease;
}
.jewelry-card-svg-preview svg {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.jewelry-card-premium:hover .jewelry-card-svg-preview {
  transform: scale(1.05);
}

.jewelry-card-img-preview {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.jewelry-card-media:hover .jewelry-card-img-preview {
  opacity: 1;
}

.jewelry-card-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  background: rgba(15, 23, 42, 0.75);
  backdrop-filter: blur(4px);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  padding: 4px 8px;
  border-radius: 6px;
  letter-spacing: 0.5px;
  z-index: 2;
}

.jewelry-card-price-badge {
  position: absolute;
  bottom: 12px;
  right: 12px;
  background: var(--green);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(59, 185, 48, 0.25);
  z-index: 2;
}

.jewelry-card-body {
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  flex-grow: 1;
}

.jewelry-card-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
  margin: 0;
}

.jewelry-card-collection {
  font-size: 11px;
  color: var(--text-dim);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-top: -6px;
}

.jewelry-card-meta-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
  border-top: 1px solid rgba(229, 231, 235, 0.5);
  padding-top: 10px;
  margin-top: auto;
}

.jewelry-card-margin {
  font-weight: 700;
  color: var(--green);
}

.jewelry-card-actions {
  display: flex;
  gap: 8px;
  margin-top: 8px;
}

.btn-jewelry-card-action {
  flex: 1;
  padding: 8px 12px;
  border-radius: 8px;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  border: 1px solid #d1d5db;
  background: #ffffff;
  color: #374151;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
}

.btn-jewelry-card-action:hover {
  background: #f9fafb;
  border-color: #cbd5e1;
}

.btn-jewelry-card-action.primary {
  background: linear-gradient(135deg, #8b5cf6 0%, #6366f1 100%);
  border: none;
  color: #ffffff;
}

.btn-jewelry-card-action.primary:hover {
  opacity: 0.9;
}

/* Kanban Board Elements */
.kanban-board-wrapper::-webkit-scrollbar {
  height: 8px;
}
.kanban-board-wrapper::-webkit-scrollbar-track {
  background: rgba(0,0,0,0.02);
  border-radius: 4px;
}
.kanban-board-wrapper::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 4px;
}
.kanban-board-wrapper::-webkit-scrollbar-thumb:hover {
  background: #94a3b8;
}

.kanban-card {
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  padding: 14px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.02);
  cursor: grab;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.kanban-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.05);
}

.kanban-card-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
  margin: 0;
}

.kanban-card-meta {
  font-size: 11.5px;
  color: var(--text-dim);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.kanban-card-tag {
  font-size: 10px;
  font-weight: 700;
  background: #f1f5f9;
  color: #475569;
  padding: 2px 6px;
  border-radius: 4px;
  text-transform: uppercase;
}

.kanban-card-actions {
  display: flex;
  justify-content: flex-end;
  gap: 6px;
  border-top: 1px solid #f1f5f9;
  padding-top: 8px;
  margin-top: 4px;
}

.btn-kanban-action {
  background: none;
  border: none;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  color: #4f46e5;
  padding: 2px 6px;
  border-radius: 4px;
  transition: background 0.2s ease;
}

.btn-kanban-action:hover {
  background: #f1f5f9;
}

.btn-kanban-action.danger:hover {
  color: #ef4444;
  background: #fef2f2;
}

/* Cost Input Row elements */
.jewelry-cost-row {
  display: flex;
  gap: 8px;
  align-items: center;
  background: #f9fafb;
  padding: 8px;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
}
.jewelry-cost-row select, .jewelry-cost-row input {
  padding: 6px;
  border: 1px solid #d1d5db;
  border-radius: 4px;
  font-size: 12px;
}

/* Chrome, Safari, Edge, Opera: Hide number input spinners */
input::-webkit-outer-spin-button,
input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

/* Firefox: Hide number input spinners */
input[type=number] {
  -moz-appearance: textfield;
}

/* Rakip/Kendi Mağaza Güncelleme Efekti */
@keyframes cell-flash-highlight {
  0% {
    background-color: rgba(245, 158, 11, 0.45) !important; /* Daha belirgin koyu amber */
    box-shadow: inset 0 0 15px rgba(245, 158, 11, 0.6) !important;
  }
  50% {
    background-color: rgba(245, 158, 11, 0.05) !important; /* Çok şeffaf, belirgin yanıp sönme */
    box-shadow: inset 0 0 2px rgba(245, 158, 11, 0.1) !important;
  }
  100% {
    background-color: rgba(245, 158, 11, 0.45) !important;
    box-shadow: inset 0 0 15px rgba(245, 158, 11, 0.6) !important;
  }
}

.highlight-fade {
  animation: cell-flash-highlight 1.2s ease-in-out infinite !important; /* Daha hızlı ve belirgin yanıp sönme */
  border-left: 3px solid #d97706 !important;
  border-right: 3px solid #d97706 !important;
  font-weight: 850 !important;
  font-size: 1.12em !important; /* Daha büyük yazı boyutu */
  color: #b45309 !important; /* Daha belirgin koyu amber yazı rengi */
  transition: all 0.2s ease-in-out;
}

.competitor-matrix-table td,
.competitor-matrix-table th {
  border-left: 3px solid transparent;
  border-right: 3px solid transparent;
  transition: border-color 0.2s ease, font-weight 0.2s ease, font-size 0.2s ease, color 0.2s ease;
}

/* Store Averages KPI Cards */
.store-kpis-wrap {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  background: var(--surface-1);
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: 12px;
}
.store-kpi-card {
  flex: 1;
  min-width: 110px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 10px;
  text-align: center;
  transition: transform 0.2s;
}
.store-kpi-card:hover {
  transform: translateY(-2px);
}
.store-kpi-label {
  font-size: 10px;
  font-weight: 600;
  color: var(--text-dim);
  text-transform: uppercase;
  margin-bottom: 4px;
}
.store-kpi-value {
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
  font-family: 'Geist Mono', monospace;
}

/* Rakipler Sayfası Sayfa Sonu Hizalaması (Flex-stretch) */
#page-competitors.page.active {
  overflow-y: hidden !important;
  display: flex;
  flex-direction: column;
}

#competitor-table-block {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  margin-bottom: 0 !important;
}

#competitor-table-wrap {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
}

/* Listings page overrides: force all texts to black and hide all SVG/icon elements */
#page-listings, 
#page-listings *,
#selection-action-bar,
#selection-action-bar * {
  color: #000000 !important;
}

#page-listings svg,
#selection-action-bar svg {
  display: none !important;
}

/* Ensure tooltip text remains white and readable on listings page */
#page-listings [data-tooltip]::after {
  color: #ffffff !important;
}

/* ══════════════════════════════════════════════════════════════════════════════
   GROWTH & ROI PAGE STYLES
   ══════════════════════════════════════════════════════════════════════════════ */
/* Mini Widget */
.growth-mini-widget {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.08) 0%, rgba(16, 185, 129, 0.02) 100%);
  border: 1px dashed var(--green);
  border-radius: var(--radius-lg);
  padding: 16px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  transition: transform var(--transition), box-shadow var(--transition);
  margin-top: 4px;
}
.growth-mini-widget:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.06);
}
.mini-widget-left {
  display: flex;
  align-items: center;
  gap: 24px;
  flex: 1;
}
.mini-widget-stat {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.mini-widget-label {
  font-size: 10px;
  color: var(--text-dim);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.mini-widget-value {
  font-size: 16px;
  font-weight: 700;
  color: var(--text);
  font-family: 'Geist Mono', monospace;
}
.mini-widget-value.highlight-green {
  color: var(--green);
}
.btn-mini-widget-link {
  background: var(--green);
  color: var(--bg);
  border: none;
  border-radius: var(--radius-sm);
  padding: 8px 16px;
  font-size: 12px;
  font-weight: 600;
  transition: background var(--transition);
}
.btn-mini-widget-link:hover {
  background: var(--green-dim);
}

/* Growth Page Grid */
.growth-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-bottom: 8px;
}
@media (max-width: 1200px) {
  .growth-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 768px) {
  .growth-grid { grid-template-columns: 1fr; }
}

.growth-card {
  background: var(--surface-1);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 140px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.02);
  transition: border-color var(--transition), box-shadow var(--transition);
}
.growth-card:hover {
  border-color: var(--border-mid);
  box-shadow: 0 4px 12px rgba(0,0,0,0.03);
}
.growth-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}
.growth-card-title {
  font-size: 11px;
  color: var(--text-dim);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.growth-badge {
  font-size: 9px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 4px;
}
.badge-green { background: var(--green-mute); color: var(--green); }
.badge-teal { background: rgba(6, 182, 212, 0.08); color: #0891b2; }
.badge-gray { background: var(--surface-2); color: var(--text-muted); }
.badge-red { background: rgba(239, 68, 68, 0.08); color: var(--err); }

.growth-stat-value {
  font-size: 28px;
  font-weight: 800;
  letter-spacing: -1px;
  color: var(--text);
  font-family: 'Geist Mono', monospace;
}
.growth-stat-value.text-green {
  color: var(--green);
}
.growth-card-sub {
  font-size: 11px;
  color: var(--text-dim);
  margin-top: 8px;
}
.growth-card-sub strong {
  font-family: 'Geist Mono', monospace;
  color: var(--text);
  font-weight: 600;
}
.growth-card-sub .diff-green {
  color: var(--green);
  font-weight: 600;
}
.growth-card-sub .diff-red {
  color: var(--err);
  font-weight: 600;
}

/* Circular Health Score */
.health-score-container {
  display: flex;
  justify-content: center;
  align-items: center;
  margin: 4px 0;
}
.health-score-ring {
  position: relative;
  width: 120px;
  height: 120px;
}
.health-score-ring svg {
  transform: rotate(-90deg);
}
.health-score-ring circle {
  fill: none;
  stroke-width: 10;
}
.health-score-ring .ring-bg {
  stroke: var(--surface-2);
}
.health-score-ring .ring-fill {
  stroke: var(--green);
  stroke-linecap: round;
  stroke-dasharray: 314.16;
  stroke-dashoffset: 314.16;
  transition: stroke-dashoffset 0.8s ease-in-out;
}
.health-score-val {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 20px;
  font-weight: 800;
  color: var(--text);
  font-family: 'Geist Mono', monospace;
}

/* Growth Page Rows */
.growth-row {
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: 16px;
  margin-bottom: 8px;
}
@media (max-width: 1024px) {
  .growth-row { grid-template-columns: 1fr; }
}

/* Timeline SVG Chart */
.growth-chart-wrap {
  position: relative;
  padding: 20px 20px 10px 20px;
  min-height: 300px;
  background: var(--surface-1);
}
.chart-tooltip {
  position: absolute;
  background: rgba(24, 26, 24, 0.95);
  border: 1px solid var(--border);
  color: #ffffff;
  padding: 10px 12px;
  border-radius: 8px;
  font-size: 11.5px;
  pointer-events: none;
  z-index: 100;
  box-shadow: 0 4px 20px rgba(0,0,0,0.15);
  font-family: var(--font);
  line-height: 1.5;
  max-width: 260px;
  word-break: break-word;
}
.chart-tooltip strong {
  display: block;
  font-size: 12px;
  margin-bottom: 4px;
  color: var(--green);
}

/* AI Assistant Report Box */
.growth-ai-block {
  display: flex;
  flex-direction: column;
}
.growth-ai-content {
  padding: 20px;
  font-size: 13px;
  line-height: 1.7;
  color: var(--text-muted);
  flex: 1;
  overflow-y: auto;
  background: var(--surface-1);
}
.growth-ai-paragraph {
  margin-bottom: 12px;
}
.growth-ai-bullet {
  position: relative;
  padding-left: 20px;
  margin-bottom: 8px;
}
.growth-ai-bullet::before {
  content: "✦";
  position: absolute;
  left: 0;
  color: var(--green);
  font-weight: 700;
}

/* Before/After highlights grid */
.before-after-grid {
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-height: 320px;
  overflow-y: auto;
  background: var(--surface-1);
}
.ba-item {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 12px 14px;
}
.ba-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}
.ba-title {
  font-size: 12px;
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 180px;
}
.ba-tag {
  font-size: 9px;
  font-weight: 700;
  background: rgba(139, 92, 246, 0.08);
  color: #8b5cf6;
  padding: 2px 5px;
  border-radius: 4px;
  text-transform: uppercase;
}
.ba-comparison {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 11.5px;
}
.ba-val-group {
  display: flex;
  align-items: center;
  gap: 8px;
}
.ba-old {
  color: var(--text-dim);
  text-decoration: line-through;
}
.ba-arrow {
  color: var(--green);
  font-weight: bold;
}
.ba-new {
  font-weight: 700;
  color: var(--text);
}

/* Growth Suggestions */
.suggestions-list-wrap {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 16px;
  margin-top: 12px;
}
.suggestion-card {
  background: var(--surface-1);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 16px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 12px;
  transition: transform var(--transition), border-color var(--transition), box-shadow var(--transition);
}
.suggestion-card:hover {
  border-color: var(--border-mid);
  box-shadow: 0 4px 12px rgba(0,0,0,0.03);
  transform: translateY(-2px);
}
.suggestion-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.suggestion-badge {
  font-size: 9px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 4px;
  text-transform: uppercase;
}
.badge-priority-high {
  background: rgba(239, 68, 68, 0.08);
  color: var(--err);
}
.badge-priority-medium {
  background: rgba(245, 158, 11, 0.08);
  color: #d97706;
}
.badge-priority-low {
  background: rgba(59, 130, 246, 0.08);
  color: #2563eb;
}
.badge-priority-success {
  background: var(--green-mute);
  color: var(--green);
}
.suggestion-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
}
.suggestion-text {
  font-size: 11.5px;
  color: var(--text-dim);
  line-height: 1.5;
  flex-grow: 1;
}
.suggestion-btn {
  background: var(--surface-2);
  border: 1px solid var(--border);
  color: var(--text);
  font-size: 11px;
  font-weight: 600;
  padding: 8px 12px;
  border-radius: var(--radius);
  cursor: pointer;
  text-align: center;
  transition: background var(--transition), border-color var(--transition);
}
.suggestion-btn:hover {
  background: var(--surface-1);
  border-color: var(--border-mid);
}

/* ── Listing Detail Page Light Theme ── */
.detail-page-container {
  background: #f8fafc !important;
  color: #0f172a !important;
  padding: 24px !important;
  border-radius: 16px !important;
  border: 1px solid #e2e8f0 !important;
  display: flex !important;
  flex-direction: column !important;
  gap: 24px !important;
  font-family: inherit !important;
  box-shadow: 0 4px 6px -1px rgba(0,0,0,0.05) !important;
}
.detail-back-btn {
  display: inline-flex !important;
  align-items: center !important;
  gap: 8px !important;
  background: #ffffff !important;
  border: 1px solid #cbd5e1 !important;
  color: #334155 !important;
  padding: 8px 16px !important;
  border-radius: 8px !important;
  font-size: 13px !important;
  font-weight: 600 !important;
  cursor: pointer !important;
  width: fit-content !important;
  transition: all 0.2s ease !important;
  box-shadow: 0 1px 2px 0 rgba(0,0,0,0.05) !important;
}
.detail-back-btn:hover {
  background: #f1f5f9 !important;
  border-color: #94a3b8 !important;
  color: #0f172a !important;
}
.detail-header-card {
  background: #ffffff !important;
  border: 1px solid #e2e8f0 !important;
  border-radius: 12px !important;
  padding: 20px !important;
  display: flex !important;
  gap: 20px !important;
  align-items: center !important;
  box-shadow: 0 1px 3px rgba(0,0,0,0.02) !important;
}
.detail-image {
  width: 90px !important;
  height: 90px !important;
  border-radius: 8px !important;
  object-fit: cover !important;
  border: 1px solid #e2e8f0 !important;
}
.detail-title-section {
  flex-grow: 1 !important;
  display: flex !important;
  flex-direction: column !important;
  gap: 6px !important;
}
.detail-title {
  font-size: 18px !important;
  font-weight: 700 !important;
  color: #0f172a !important;
  margin: 0 !important;
  line-height: 1.4 !important;
}
.detail-subtitle {
  font-size: 12px !important;
  color: #64748b !important;
  display: flex !important;
  align-items: center !important;
  gap: 12px !important;
}
.detail-grid {
  display: grid !important;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)) !important;
  gap: 20px !important;
}
.detail-section-card {
  background: #ffffff !important;
  border: 1px solid #e2e8f0 !important;
  border-radius: 12px !important;
  padding: 20px !important;
  box-shadow: 0 1px 3px rgba(0,0,0,0.02) !important;
  display: flex !important;
  flex-direction: column !important;
  gap: 16px !important;
}
.detail-section-title {
  font-size: 14px !important;
  font-weight: 700 !important;
  color: #334155 !important;
  border-bottom: 1px solid #f1f5f9 !important;
  padding-bottom: 10px !important;
  margin: 0 !important;
  display: flex !important;
  align-items: center !important;
  gap: 8px !important;
}
.detail-stats-grid {
  display: grid !important;
  grid-template-columns: repeat(2, 1fr) !important;
  gap: 12px !important;
}
.detail-stat-box {
  background: #f8fafc !important;
  border: 1px solid #f1f5f9 !important;
  border-radius: 8px !important;
  padding: 12px !important;
  display: flex !important;
  flex-direction: column !important;
  gap: 4px !important;
}
.detail-stat-label {
  font-size: 11px !important;
  font-weight: 600 !important;
  color: #64748b !important;
}
.detail-stat-value {
  font-size: 18px !important;
  font-weight: 700 !important;
  color: #0f172a !important;
  font-family: monospace !important;
}
.detail-badge {
  font-size: 10px !important;
  font-weight: 700 !important;
  padding: 4px 10px !important;
  border-radius: 6px !important;
  width: fit-content !important;
  text-transform: uppercase !important;
}
.detail-badge-active {
  background: #ecfdf5 !important;
  color: #047857 !important;
  border: 1px solid #a7f3d0 !important;
}
.detail-badge-inactive {
  background: #fef2f2 !important;
  color: #b91c1c !important;
  border: 1px solid #fca5a5 !important;
}
.detail-comparison-box {
  background: #f8fafc !important;
  border: 1px solid #e2e8f0 !important;
  border-radius: 8px !important;
  padding: 14px !important;
  display: flex !important;
  flex-direction: column !important;
  gap: 8px !important;
}
.detail-comp-header {
  font-size: 11px !important;
  font-weight: 700 !important;
  color: #475569 !important;
  text-transform: uppercase !important;
}
.detail-comp-before {
  color: #64748b !important;
  text-decoration: line-through !important;
  font-size: 12px !important;
}
.detail-comp-after {
  color: #10b981 !important;
  font-weight: 700 !important;
  font-size: 13.5px !important;
}

/* ⚠️ Uyuşmazlık Uyarısı Alan Listing Satırı Vurgusu */
.warning-row {
  background-color: #fef2f2 !important;
}
.warning-row:hover {
  background-color: #fee2e2 !important;
}

