/* ==========================================================================
   Kitap Keşif Merkezi V3 — Standalone Sayfa Tasarımı (1:1 UI Eşleşmesi)
   Kaynak: Referans Mockup (Derin Lacivert-Mavi, Glow Efektleri, Glassmorphism)
   ========================================================================== */

:root {
  --bg-deep: #0c1222;
  --bg-card: rgba(18, 26, 47, 0.7);
  --bg-card-hover: rgba(26, 38, 66, 0.85);
  --bg-sidebar: #090e1a;
  --border-soft: rgba(255, 255, 255, 0.08);
  --border-glow: rgba(56, 189, 248, 0.25);
  
  --primary-blue: #2563eb;
  --primary-blue-hover: #1d4ed8;
  --accent-cyan: #38bdf8;
  --accent-purple: #8b5cf6;
  --accent-green: #10b981;
  --accent-yellow: #f59e0b;
  --accent-pink: #ec4899;
  --accent-orange: #f97316;

  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --text-dim: #64748b;

  --radius-xl: 20px;
  --radius-lg: 14px;
  --radius-md: 10px;
  --radius-sm: 6px;
  
  --font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

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

body {
  font-family: var(--font-family);
  background-color: var(--bg-deep);
  background-image: 
    radial-gradient(circle at 15% 10%, rgba(37, 99, 235, 0.12) 0%, transparent 40%),
    radial-gradient(circle at 85% 20%, rgba(139, 92, 246, 0.1) 0%, transparent 45%),
    radial-gradient(circle at 50% 90%, rgba(16, 185, 129, 0.08) 0%, transparent 50%);
  color: var(--text-main);
  min-height: 100vh;
  display: flex;
  overflow-x: hidden;
}

/* Scrollbar */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.2);
}
::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.18);
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.3);
}

/* ==========================================================================
   SIDEBAR (Sol Menü)
   ========================================================================== */
.sidebar {
  width: 250px;
  flex-shrink: 0;
  background: var(--bg-sidebar);
  border-right: 1px solid var(--border-soft);
  display: flex;
  flex-direction: column;
  height: 100vh;
  position: sticky;
  top: 0;
  padding: 24px 16px;
  overflow-y: auto;
}

.brand-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--border-soft);
  margin-bottom: 20px;
}
.brand-icon-box {
  width: 44px;
  height: 44px;
  background: linear-gradient(135deg, #f59e0b, #ec4899);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  box-shadow: 0 4px 12px rgba(245, 158, 11, 0.3);
}
.brand-text h1 {
  font-size: 1.1rem;
  font-weight: 700;
  color: #fff;
  line-height: 1.2;
}
.brand-text span {
  font-size: 0.72rem;
  color: var(--accent-cyan);
  display: block;
}

.nav-section-title {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-dim);
  margin: 18px 8px 8px 8px;
}

.sidebar-nav {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  color: var(--text-muted);
  text-decoration: none;
  border-radius: var(--radius-md);
  font-size: 0.88rem;
  font-weight: 500;
  transition: all 0.15s ease;
  border: 1px solid transparent;
  cursor: pointer;
  background: transparent;
}
.nav-item:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.05);
}
.nav-item.active {
  color: #fff;
  background: linear-gradient(90deg, #1d4ed8, #2563eb);
  border-color: rgba(96, 165, 250, 0.4);
  box-shadow: 0 4px 14px rgba(37, 99, 235, 0.35);
}
.nav-item .icon {
  font-size: 1.05rem;
  opacity: 0.85;
}
.nav-item.active .icon {
  opacity: 1;
}

/* ==========================================================================
   MAIN CONTENT WRAPPER
   ========================================================================== */
.main-wrapper {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  height: 100vh;
  overflow-y: auto;
}

/* TOP HEADER */
.top-header {
  padding: 24px 32px 16px 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.header-title-box h2 {
  font-size: 1.85rem;
  font-weight: 800;
  color: #fff;
  display: flex;
  align-items: center;
  gap: 8px;
  letter-spacing: -0.02em;
}
.header-title-box p {
  color: var(--text-muted);
  font-size: 0.95rem;
  margin-top: 4px;
}

.header-right {
  display: flex;
  align-items: center;
  gap: 16px;
}

.archive-pill {
  background: rgba(18, 26, 47, 0.8);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-lg);
  padding: 8px 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  backdrop-filter: blur(10px);
}
.archive-icon {
  font-size: 1.3rem;
  color: var(--accent-cyan);
}
.archive-info strong {
  display: block;
  font-size: 0.82rem;
  color: #fff;
}
.archive-info span {
  font-size: 0.72rem;
  color: var(--text-muted);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}
.icon-btn-round {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(18, 26, 47, 0.8);
  border: 1px solid var(--border-soft);
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  position: relative;
  transition: all 0.2s ease;
}
.icon-btn-round:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
}
.badge-dot {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 8px;
  height: 8px;
  background: #ef4444;
  border-radius: 50%;
}

.user-pill {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(18, 26, 47, 0.8);
  border: 1px solid var(--border-soft);
  border-radius: 30px;
  padding: 4px 12px 4px 4px;
  color: #fff;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
}
.user-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: linear-gradient(135deg, #8b5cf6, #3b82f6);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.85rem;
}

/* ==========================================================================
   METRIC STAT CARDS (5'li Sayaç Paneli)
   ========================================================================== */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 16px;
  padding: 0 32px 20px 32px;
}

.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-xl);
  padding: 18px;
  display: flex;
  align-items: center;
  gap: 16px;
  position: relative;
  overflow: hidden;
  backdrop-filter: blur(12px);
  transition: transform 0.2s ease, border-color 0.2s ease;
}
.stat-card:hover {
  transform: translateY(-2px);
  border-color: rgba(255, 255, 255, 0.18);
}

.stat-icon-wrapper {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  flex-shrink: 0;
}
.stat-card.blue .stat-icon-wrapper { background: rgba(37, 99, 235, 0.2); color: #60a5fa; border: 1px solid rgba(37, 99, 235, 0.3); }
.stat-card.green .stat-icon-wrapper { background: rgba(16, 185, 129, 0.2); color: #34d399; border: 1px solid rgba(16, 185, 129, 0.3); }
.stat-card.indigo .stat-icon-wrapper { background: rgba(99, 102, 241, 0.2); color: #818cf8; border: 1px solid rgba(99, 102, 241, 0.3); }
.stat-card.orange .stat-icon-wrapper { background: rgba(249, 115, 22, 0.2); color: #fb923c; border: 1px solid rgba(249, 115, 22, 0.3); }
.stat-card.pink .stat-icon-wrapper { background: rgba(236, 72, 153, 0.2); color: #f472b6; border: 1px solid rgba(236, 72, 153, 0.3); }

.stat-content {
  flex: 1;
  min-width: 0;
}
.stat-label {
  font-size: 0.76rem;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-bottom: 2px;
}
.stat-row {
  display: flex;
  align-items: baseline;
  gap: 8px;
}
.stat-number {
  font-size: 1.55rem;
  font-weight: 800;
  color: #fff;
  letter-spacing: -0.02em;
}
.stat-delta {
  font-size: 0.74rem;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 20px;
}
.stat-delta.green { background: rgba(16, 185, 129, 0.2); color: #34d399; }
.stat-desc {
  font-size: 0.72rem;
  color: var(--text-dim);
  margin-top: 3px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ==========================================================================
   KAYNAKLAR (Source Platform Filters)
   ========================================================================== */
.sources-bar {
  margin: 0 32px 20px 32px;
  background: var(--bg-card);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-xl);
  padding: 16px 20px;
  backdrop-filter: blur(12px);
}

.sources-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
}
.sources-title {
  font-size: 0.92rem;
  font-weight: 700;
  color: #fff;
}
.sources-pill-group {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.source-cat-pill {
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 0.74rem;
  font-weight: 600;
  color: var(--text-muted);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid transparent;
  cursor: pointer;
  transition: all 0.15s ease;
}
.source-cat-pill:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
}
.source-cat-pill.active {
  background: #2563eb;
  color: #fff;
}
.source-cat-pill .count {
  margin-left: 4px;
  opacity: 0.8;
}

.sources-carousel {
  display: flex;
  align-items: center;
  gap: 12px;
  overflow-x: auto;
  padding-bottom: 4px;
}
.source-box {
  flex-shrink: 0;
  width: 76px;
  height: 74px;
  background: rgba(15, 23, 42, 0.7);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-md);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  position: relative;
  cursor: pointer;
  transition: all 0.2s ease;
}
.source-box:hover {
  border-color: rgba(56, 189, 248, 0.4);
  transform: translateY(-2px);
  background: rgba(30, 41, 59, 0.9);
}
.source-box .src-icon-wrap {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.85rem;
}
.source-box .src-name {
  font-size: 0.68rem;
  color: var(--text-muted);
  text-align: center;
  white-space: nowrap;
  max-width: 68px;
  overflow: hidden;
  text-overflow: ellipsis;
}
.source-box .status-dot {
  position: absolute;
  top: 5px;
  right: 5px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #10b981;
}

/* ==========================================================================
   SEARCH & FILTER BAR + ACTION BUTTONS
   ========================================================================== */
.controls-row {
  margin: 0 32px 20px 32px;
  display: grid;
  grid-template-columns: 1fr 260px;
  gap: 16px;
}

.search-filters-card {
  background: var(--bg-card);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-xl);
  padding: 16px 20px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  backdrop-filter: blur(12px);
}

.search-input-wrap {
  display: flex;
  gap: 12px;
  position: relative;
}
.search-icon-inside {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-dim);
  font-size: 1rem;
}
.search-input-text {
  flex: 1;
  background: rgba(11, 17, 33, 0.8);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-md);
  padding: 10px 16px 10px 42px;
  color: #fff;
  font-size: 0.9rem;
  outline: none;
  transition: border-color 0.2s ease;
}
.search-input-text:focus {
  border-color: var(--accent-cyan);
}
.search-input-text::placeholder {
  color: var(--text-dim);
}

.btn-search {
  background: var(--primary-blue);
  color: #fff;
  border: none;
  border-radius: var(--radius-md);
  padding: 0 24px;
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: background 0.15s ease;
}
.btn-search:hover {
  background: var(--primary-blue-hover);
}

.dropdowns-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}
.dropdown-group label {
  display: block;
  font-size: 0.72rem;
  color: var(--text-muted);
  margin-bottom: 4px;
}
.custom-select {
  width: 100%;
  background: rgba(11, 17, 33, 0.8);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-sm);
  padding: 8px 12px;
  color: #fff;
  font-size: 0.82rem;
  outline: none;
  cursor: pointer;
}
.custom-select:focus {
  border-color: var(--accent-cyan);
}

/* Sağ Büyük Butonlar */
.actions-card {
  display: flex;
  flex-direction: column;
  gap: 10px;
  justify-content: center;
}
.btn-action-primary {
  background: linear-gradient(135deg, #7c3aed, #2563eb);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: var(--radius-lg);
  padding: 14px 20px;
  font-weight: 700;
  font-size: 0.95rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  cursor: pointer;
  box-shadow: 0 6px 20px rgba(124, 58, 237, 0.35);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.btn-action-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 25px rgba(124, 58, 237, 0.5);
}

.btn-action-secondary {
  background: rgba(18, 26, 47, 0.8);
  color: #fff;
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-lg);
  padding: 13px 20px;
  font-weight: 600;
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  cursor: pointer;
  transition: background 0.2s ease;
}
.btn-action-secondary:hover {
  background: rgba(30, 41, 59, 0.9);
}

/* ==========================================================================
   2-COLUMN MAIN WORKSPACE (Kitap Listesi + Detay Paneli)
   ========================================================================== */
.workspace-grid {
  display: grid;
  grid-template-columns: 1fr 390px;
  gap: 20px;
  padding: 0 32px 40px 32px;
}

/* Sol Kitap Listesi */
.book-list-container {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.list-top-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.list-count-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: #fff;
}
.sort-select {
  background: rgba(18, 26, 47, 0.8);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-md);
  padding: 6px 14px;
  color: var(--text-muted);
  font-size: 0.8rem;
  outline: none;
  cursor: pointer;
}

/* Kitap Kartı (Yatay Satır Kart) */
.book-card-row {
  background: var(--bg-card);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-xl);
  padding: 16px 20px;
  display: flex;
  align-items: center;
  gap: 18px;
  cursor: pointer;
  transition: all 0.2s ease;
  backdrop-filter: blur(12px);
  position: relative;
}
.book-card-row:hover {
  background: var(--bg-card-hover);
  border-color: rgba(56, 189, 248, 0.3);
  transform: translateX(3px);
}
.book-card-row.selected {
  border-color: var(--accent-cyan);
  background: rgba(22, 36, 68, 0.85);
  box-shadow: 0 4px 20px rgba(56, 189, 248, 0.15);
}

.book-thumb-wrap {
  width: 58px;
  height: 82px;
  border-radius: 8px;
  overflow: hidden;
  flex-shrink: 0;
  background: #1e293b;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.4);
}
.book-thumb-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.book-main-info {
  flex: 1;
  min-width: 0;
}
.book-main-info h3 {
  font-size: 1.05rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 2px;
}
.book-author-pub {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 8px;
}
.book-badges-row {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}
.grade-badge {
  background: rgba(59, 130, 246, 0.2);
  color: #93c5fd;
  border: 1px solid rgba(59, 130, 246, 0.3);
  border-radius: 6px;
  padding: 2px 8px;
  font-size: 0.72rem;
  font-weight: 600;
}
.type-badge {
  background: rgba(236, 72, 153, 0.2);
  color: #f472b6;
  border: 1px solid rgba(236, 72, 153, 0.3);
  border-radius: 6px;
  padding: 2px 8px;
  font-size: 0.72rem;
  font-weight: 600;
}

/* Orta İkonlar ve Durum */
.book-source-status {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-shrink: 0;
}
.status-pill-indicator {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.78rem;
  font-weight: 600;
}
.status-pill-indicator.verified { color: #34d399; }
.status-pill-indicator.missing { color: #fb923c; }

.media-tag-indicator {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.78rem;
  color: var(--text-muted);
}
.sources-count-link {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 0.78rem;
  color: var(--text-dim);
}

/* Skor / Puan */
.priority-score-badge {
  display: flex;
  align-items: center;
  gap: 4px;
  background: rgba(245, 158, 11, 0.15);
  border: 1px solid rgba(245, 158, 11, 0.3);
  border-radius: 8px;
  padding: 4px 10px;
  color: #fbbf24;
  font-weight: 800;
  font-size: 0.95rem;
}

/* Sağ Butonlar */
.book-card-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}
.btn-state-action {
  padding: 8px 16px;
  border-radius: var(--radius-md);
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  border: none;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: all 0.15s ease;
}
.btn-state-action.ready {
  background: rgba(16, 185, 129, 0.2);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.4);
}
.btn-state-action.ready:hover {
  background: #10b981;
  color: #fff;
}
.btn-state-action.preparing {
  background: rgba(59, 130, 246, 0.2);
  color: #60a5fa;
  border: 1px solid rgba(59, 130, 246, 0.4);
}
.btn-state-action.searching {
  background: rgba(249, 115, 22, 0.2);
  color: #fb923c;
  border: 1px solid rgba(249, 115, 22, 0.4);
}

.btn-card-more {
  background: transparent;
  border: none;
  color: var(--text-dim);
  font-size: 1.1rem;
  cursor: pointer;
  padding: 4px;
}
.btn-card-more:hover {
  color: #fff;
}

/* ==========================================================================
   SAĞ DETAY KARTI (Inspector Panel)
   ========================================================================== */
.inspector-panel {
  background: var(--bg-card);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-xl);
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 20px;
  backdrop-filter: blur(14px);
  position: sticky;
  top: 24px;
  max-height: calc(100vh - 48px);
  overflow-y: auto;
}

.inspector-cover-box {
  width: 100%;
  height: 200px;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: #1e293b;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
}
.inspector-cover-box img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.inspector-header-info {
  position: relative;
}
.inspector-score-pill {
  position: absolute;
  top: 0;
  right: 0;
  background: rgba(16, 185, 129, 0.2);
  border: 1px solid rgba(16, 185, 129, 0.35);
  color: #34d399;
  border-radius: 8px;
  padding: 4px 10px;
  font-weight: 800;
  font-size: 0.95rem;
}
.inspector-header-info h2 {
  font-size: 1.35rem;
  font-weight: 800;
  color: #fff;
  margin-bottom: 4px;
}
.inspector-author {
  font-size: 0.85rem;
  color: var(--text-muted);
}
.inspector-publisher {
  font-size: 0.8rem;
  color: var(--text-dim);
  margin-bottom: 10px;
}

/* Tabs */
.inspector-tabs {
  display: flex;
  border-bottom: 1px solid var(--border-soft);
  gap: 8px;
}
.insp-tab-btn {
  padding: 8px 12px;
  background: transparent;
  border: none;
  border-bottom: 2px solid transparent;
  color: var(--text-muted);
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
}
.insp-tab-btn:hover {
  color: #fff;
}
.insp-tab-btn.active {
  color: var(--accent-cyan);
  border-bottom-color: var(--accent-cyan);
}

/* Kaynaklar Bölümü */
.inspector-sources-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.insp-source-item {
  background: rgba(11, 17, 33, 0.7);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-md);
  padding: 12px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.insp-src-meta {
  display: flex;
  align-items: center;
  gap: 10px;
}
.insp-src-icon {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.85rem;
}
.insp-src-texts strong {
  display: block;
  font-size: 0.84rem;
  color: #fff;
}
.insp-src-texts span {
  font-size: 0.72rem;
  color: var(--text-muted);
}
.btn-insp-action {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-sm);
  padding: 6px 12px;
  color: #fff;
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.15s ease;
}
.btn-insp-action:hover {
  background: rgba(255, 255, 255, 0.18);
}

.btn-add-new-source {
  width: 100%;
  background: transparent;
  border: 1px dashed rgba(255, 255, 255, 0.2);
  border-radius: var(--radius-md);
  padding: 10px;
  color: var(--text-muted);
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
}
.btn-add-new-source:hover {
  border-color: var(--accent-cyan);
  color: #fff;
}

/* Detay Alt Aksiyonları */
.inspector-footer-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: auto;
}
.btn-insp-questions {
  background: linear-gradient(135deg, #8b5cf6, #3b82f6);
  color: #fff;
  border: none;
  border-radius: var(--radius-lg);
  padding: 13px;
  font-weight: 700;
  font-size: 0.9rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  box-shadow: 0 4px 15px rgba(139, 92, 246, 0.35);
  transition: transform 0.15s ease;
}
.btn-insp-questions:hover {
  transform: translateY(-2px);
}
.btn-insp-publish {
  background: rgba(16, 185, 129, 0.15);
  border: 1px solid rgba(16, 185, 129, 0.35);
  color: #34d399;
  border-radius: var(--radius-lg);
  padding: 12px;
  font-weight: 700;
  font-size: 0.9rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: all 0.15s ease;
}
.btn-insp-publish:hover {
  background: #10b981;
  color: #fff;
}

/* Toast / Modal */
.toast-notice {
  position: fixed;
  bottom: 24px;
  right: 24px;
  background: rgba(15, 23, 42, 0.95);
  border: 1px solid var(--accent-cyan);
  color: #fff;
  padding: 14px 20px;
  border-radius: var(--radius-md);
  font-size: 0.88rem;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
  z-index: 1000;
  display: flex;
  align-items: center;
  gap: 10px;
  animation: slideUp 0.25s ease;
}
@keyframes slideUp {
  from { transform: translateY(20px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

.sidebar-mobile-backdrop,
.mobile-discovery-menu-btn,
.mobile-sidebar-close-btn {
  display: none;
}

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

@media (max-width: 1200px) {
  .stats-grid { grid-template-columns: repeat(3, 1fr); }
  .workspace-grid { grid-template-columns: 1fr; }
  .inspector-panel { position: static; max-height: none; }
}

@media (max-width: 1000px) {
  body {
    flex-direction: column;
  }
  .mobile-discovery-menu-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-width: 44px;
    min-height: 44px;
    padding: 0 14px;
    border-radius: 12px;
    border: 1px solid var(--border-soft);
    background: rgba(18, 26, 47, 0.9);
    color: #fff;
    font-weight: 700;
    font-size: 0.88rem;
    cursor: pointer;
    flex-shrink: 0;
  }
  .mobile-sidebar-close-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    min-width: 44px;
    min-height: 44px;
    margin-left: auto;
    border-radius: 12px;
    border: 1px solid var(--border-soft);
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
    font-size: 1rem;
    font-weight: 800;
    cursor: pointer;
    flex-shrink: 0;
  }
  .sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    width: min(290px, 85vw);
    max-width: 85vw;
    height: 100vh;
    height: 100dvh;
    z-index: 1200;
    transform: translateX(-105%);
    transition: transform 0.24s cubic-bezier(0.22, 1, 0.36, 1);
    padding: max(16px, env(safe-area-inset-top, 16px)) 14px max(24px, env(safe-area-inset-bottom, 24px));
  }
  body.is-mobile-sidebar-open .sidebar {
    transform: translateX(0);
  }
  body.is-mobile-sidebar-open .sidebar-mobile-backdrop {
    display: block;
    position: fixed;
    inset: 0;
    background: rgba(4, 8, 20, 0.68);
    backdrop-filter: blur(4px);
    z-index: 1190;
  }
  .main-wrapper {
    width: 100%;
    height: auto;
    min-height: 100dvh;
    overflow: visible;
  }
  .top-header {
    padding: max(14px, env(safe-area-inset-top, 14px)) 14px 12px;
    flex-wrap: wrap;
    gap: 12px;
  }
  .header-left-row {
    width: 100%;
    align-items: flex-start;
    flex-wrap: wrap;
  }
  .header-title-box {
    flex: 1 1 190px;
    min-width: 0;
  }
  .header-title-box h2 {
    font-size: clamp(1.25rem, 5.2vw, 1.65rem);
    flex-wrap: wrap;
    word-break: break-word;
  }
  .header-right {
    width: 100%;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 10px;
  }
  .archive-pill {
    flex: 1 1 160px;
    min-width: 0;
  }
  .icon-btn-round {
    width: 44px;
    height: 44px;
    min-width: 44px;
    min-height: 44px;
  }
  .user-pill {
    min-height: 44px;
  }
  .stats-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    padding: 0 14px 14px;
    gap: 10px;
  }
  .sources-bar {
    margin: 0 14px 14px;
    padding: 14px;
  }
  .source-cat-pill {
    min-height: 44px;
    padding: 8px 14px;
    display: inline-flex;
    align-items: center;
  }
  .controls-row {
    margin: 0 14px 14px;
    grid-template-columns: minmax(0, 1fr);
    gap: 12px;
  }
  .dropdowns-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }
  .workspace-grid {
    padding: 0 14px 32px;
    grid-template-columns: minmax(0, 1fr);
    gap: 14px;
  }
  .book-card-row {
    flex-wrap: wrap;
    padding: 14px;
    gap: 12px;
  }
  .book-source-status {
    flex-wrap: wrap;
    flex-shrink: 1;
    min-width: 0;
    width: 100%;
    gap: 8px 12px;
  }
  .book-card-actions {
    width: 100%;
    justify-content: space-between;
    flex-wrap: wrap;
  }
  .inspector-header-info h2 {
    padding-right: 68px;
    word-break: break-word;
  }
}

@media (max-width: 480px) {
  .stats-grid,
  .dropdowns-row {
    grid-template-columns: minmax(0, 1fr);
  }
  .top-header {
    padding-inline: 12px;
  }
  .stats-grid,
  .workspace-grid {
    padding-inline: 12px;
  }
  .sources-bar,
  .controls-row {
    margin-inline: 12px;
  }
  .search-filters-card,
  .inspector-panel {
    padding: 14px 12px;
  }
}
