/* ==========================================================================
   Kitap Okuma Takip Çizelgesi — Stiller, Şablonlar & Canlı A4 Ön İzleme
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. CSS Değişkenleri
   -------------------------------------------------------------------------- */
/* --------------------------------------------------------------------------
   1. CSS Değişkenleri & Varsayılan Değerler
   -------------------------------------------------------------------------- */
:root {
  --font-family: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
  --font-heading: 'Plus Jakarta Sans', sans-serif;
  --font-size-base: 14.5px;
  --theme-letter-spacing: 0px;

  /* Şekil Dili Varsayılanları (Tema bazlı ezilecek) */
  --theme-radius-card: 14px;
  --theme-radius-btn: 10px;
  --theme-radius-badge: 9999px;
  --theme-shadow-card: 0 4px 14px rgba(0, 0, 0, 0.06);
  --theme-shadow-btn: 0 2px 4px rgba(0, 0, 0, 0.08);
  --theme-border-width: 1.5px;
  --theme-border-style: solid;
  
  --primary: #2d6a4f;
  --primary-hover: #1b4332;
  --primary-light: #d8f3dc;
  --primary-text: #ffffff;
  
  --bg-body: #f4f7f4;
  --bg-card: #ffffff;
  --bg-input: #ffffff;
  --bg-hover: #eaf2eb;
  
  --text-main: #1b261b;
  --text-muted: #405342;
  --text-subtle: #748c77;
  
  --border-color: #2d6a4f;
  --border-focus: #52b788;
  
  --radius-xs: 4px;
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-full: 9999px;
  
  --btn-min-height: 42px;
}

/* --------------------------------------------------------------------------
   2. 15 SEÇKİN ŞABLON TEMA TANIMLARI (GÖRSEL DÜZENLER & TEMATİK TABLOLAR)
   -------------------------------------------------------------------------- */

/* --- 1. GÖRSEL & BOYAMALI ŞABLONLAR --- */

/* TEMA 1: 📚 BOYAMALI KİTAPLIK */
[data-active-template="kitaplik"] {
  --font-family: 'Plus Jakarta Sans', system-ui, sans-serif;
  --font-heading: 'Quicksand', 'Plus Jakarta Sans', rounded, sans-serif;
  --theme-radius-card: 18px;
  --theme-radius-btn: 14px;
  --theme-radius-badge: 9999px;
  --theme-shadow-card: 0 8px 24px rgba(140, 74, 47, 0.10);
  --theme-shadow-btn: 0 3px 8px rgba(140, 74, 47, 0.15);
  --theme-border-width: 2px;
  --theme-border-style: solid;
  --primary: #8c4a2f;
  --primary-hover: #6f3620;
  --primary-light: #f7ebe5;
  --primary-text: #ffffff;
  --bg-body: #fbf7f4;
  --bg-card: #ffffff;
  --bg-hover: #f3eae4;
  --text-main: #3e2723;
  --text-muted: #6d4c41;
  --border-color: #8c4a2f;
  --border-focus: #d4a373;
}

/* TEMA 2: 🌳 BİLGE OKUMA AĞACI */
[data-active-template="agac"] {
  --font-family: 'Plus Jakarta Sans', system-ui, sans-serif;
  --font-heading: 'Quicksand', 'Plus Jakarta Sans', rounded, sans-serif;
  --theme-radius-card: 20px;
  --theme-radius-btn: 16px;
  --theme-radius-badge: 9999px;
  --theme-shadow-card: 0 8px 24px rgba(45, 106, 79, 0.09);
  --theme-shadow-btn: 0 3px 8px rgba(45, 106, 79, 0.15);
  --theme-border-width: 2px;
  --theme-border-style: solid;
  --primary: #2d6a4f;
  --primary-hover: #1b4332;
  --primary-light: #d8f3dc;
  --primary-text: #ffffff;
  --bg-body: #f4f8f4;
  --bg-card: #ffffff;
  --bg-hover: #e8f3e8;
  --text-main: #1b261b;
  --text-muted: #405342;
  --border-color: #2d6a4f;
  --border-focus: #52b788;
}

/* TEMA 3: 🐛 KİTAP KURDU MACERA YOLU */
[data-active-template="yol"] {
  --font-family: 'Plus Jakarta Sans', system-ui, sans-serif;
  --font-heading: 'Quicksand', 'Plus Jakarta Sans', rounded, sans-serif;
  --theme-radius-card: 16px;
  --theme-radius-btn: 14px;
  --theme-radius-badge: 9999px;
  --theme-shadow-card: 0 8px 20px rgba(217, 119, 6, 0.12);
  --theme-shadow-btn: 0 3px 8px rgba(217, 119, 6, 0.18);
  --theme-border-width: 2.5px;
  --theme-border-style: solid;
  --primary: #d97706;
  --primary-hover: #b45309;
  --primary-light: #fef3c7;
  --primary-text: #ffffff;
  --bg-body: #fffbeb;
  --bg-card: #ffffff;
  --bg-hover: #fef3c7;
  --text-main: #451a03;
  --text-muted: #78350f;
  --border-color: #d97706;
  --border-focus: #f59e0b;
}

/* TEMA 4: 🃏 MİNİ İNCELEME KARTLARI */
[data-active-template="kartlar"] {
  --font-family: 'Plus Jakarta Sans', system-ui, sans-serif;
  --font-heading: 'Plus Jakarta Sans', sans-serif;
  --theme-radius-card: 8px;
  --theme-radius-btn: 8px;
  --theme-radius-badge: 6px;
  --theme-shadow-card: 4px 4px 0px #1e1b4b;
  --theme-shadow-btn: 3px 3px 0px #1e1b4b;
  --theme-border-width: 2.5px;
  --theme-border-style: solid;
  --primary: #5b21b6;
  --primary-hover: #4c1d95;
  --primary-light: #ede9fe;
  --primary-text: #ffffff;
  --bg-body: #faf5ff;
  --bg-card: #ffffff;
  --bg-hover: #f3e8ff;
  --text-main: #1e1b4b;
  --text-muted: #6b21a8;
  --border-color: #1e1b4b;
  --border-focus: #06d6a0;
}

/* --- 2. TEMATİK PORTFOLYO ÇİZELGELERİ --- */

/* TEMA 5: 🌲 ORMAN MACERASI (Çocuk / Doğa) */
[data-active-template="forest"] {
  --font-family: 'Plus Jakarta Sans', system-ui, sans-serif;
  --font-heading: 'Quicksand', 'Plus Jakarta Sans', rounded, sans-serif;
  --theme-radius-card: 22px;
  --theme-radius-btn: 18px;
  --theme-radius-badge: 9999px;
  --theme-shadow-card: 0 10px 25px rgba(45, 106, 79, 0.09);
  --theme-shadow-btn: 0 3px 8px rgba(45, 106, 79, 0.15);
  --theme-border-width: 2.5px;
  --theme-border-style: solid;
  --primary: #2d6a4f;
  --primary-hover: #1b4332;
  --primary-light: #d8f3dc;
  --primary-text: #ffffff;
  --bg-body: #f4f7f4;
  --bg-card: #ffffff;
  --bg-hover: #eaf2eb;
  --text-main: #1b261b;
  --text-muted: #405342;
  --border-color: #2d6a4f;
  --border-focus: #52b788;
}

/* TEMA 6: 🚀 UZAY GEZGİNİ (Çocuk & Genç / STEM) */
[data-active-template="space"] {
  --font-family: 'Plus Jakarta Sans', system-ui, sans-serif;
  --font-heading: 'Quicksand', 'Plus Jakarta Sans', rounded, sans-serif;
  --theme-radius-card: 16px;
  --theme-radius-btn: 14px;
  --theme-radius-badge: 9999px;
  --theme-shadow-card: 0 8px 24px rgba(67, 56, 202, 0.12);
  --theme-shadow-btn: 0 3px 8px rgba(67, 56, 202, 0.18);
  --theme-border-width: 2px;
  --theme-border-style: solid;
  --primary: #4338ca;
  --primary-hover: #3730a3;
  --primary-light: #e0e7ff;
  --primary-text: #ffffff;
  --bg-body: #f5f3ff;
  --bg-card: #ffffff;
  --bg-hover: #ede9fe;
  --text-main: #1e1b4b;
  --text-muted: #4338ca;
  --border-color: #4338ca;
  --border-focus: #818cf8;
}

/* TEMA 7: 🐳 DENİZALTI KEŞFİ (Çocuk / Okyanus) */
[data-active-template="ocean"] {
  --font-family: 'Plus Jakarta Sans', system-ui, sans-serif;
  --font-heading: 'Quicksand', 'Plus Jakarta Sans', rounded, sans-serif;
  --theme-radius-card: 20px;
  --theme-radius-btn: 16px;
  --theme-radius-badge: 9999px;
  --theme-shadow-card: 0 8px 24px rgba(2, 132, 199, 0.10);
  --theme-shadow-btn: 0 3px 8px rgba(2, 132, 199, 0.15);
  --theme-border-width: 2px;
  --theme-border-style: solid;
  --primary: #0284c7;
  --primary-hover: #0369a1;
  --primary-light: #e0f2fe;
  --primary-text: #ffffff;
  --bg-body: #f0f9ff;
  --bg-card: #ffffff;
  --bg-hover: #e0f2fe;
  --text-main: #082f49;
  --text-muted: #0369a1;
  --border-color: #0284c7;
  --border-focus: #38bdf8;
}

/* TEMA 8: 🏰 MASAL DİYARI (Çocuk / Hayal Gücü) */
[data-active-template="castle"] {
  --font-family: 'Plus Jakarta Sans', system-ui, sans-serif;
  --font-heading: 'Quicksand', 'Plus Jakarta Sans', rounded, sans-serif;
  --theme-radius-card: 20px;
  --theme-radius-btn: 16px;
  --theme-radius-badge: 9999px;
  --theme-shadow-card: 0 8px 24px rgba(190, 24, 93, 0.10);
  --theme-shadow-btn: 0 3px 8px rgba(190, 24, 93, 0.15);
  --theme-border-width: 2px;
  --theme-border-style: solid;
  --primary: #be185d;
  --primary-hover: #9d174d;
  --primary-light: #fce7f3;
  --primary-text: #ffffff;
  --bg-body: #fdf2f8;
  --bg-card: #ffffff;
  --bg-hover: #fce7f3;
  --text-main: #500724;
  --text-muted: #9d174d;
  --border-color: #be185d;
  --border-focus: #f472b6;
}

/* TEMA 9: 🌸 JAPON ZEN GÜNLÜĞÜ (Minimalist & Dokusho-Noto) */
[data-active-template="sakura"],
[data-active-template="zen"] {
  --font-family: 'Plus Jakarta Sans', system-ui, sans-serif;
  --font-heading: 'Plus Jakarta Sans', sans-serif;
  --theme-letter-spacing: 0.6px;
  --theme-radius-card: 4px;
  --theme-radius-btn: 4px;
  --theme-radius-badge: 4px;
  --theme-shadow-card: none;
  --theme-shadow-btn: none;
  --theme-border-width: 1px;
  --theme-border-style: solid;
  --primary: #785942;
  --primary-hover: #5e4431;
  --primary-light: #efe9e3;
  --primary-text: #ffffff;
  --bg-body: #fdfbf7;
  --bg-card: #ffffff;
  --bg-hover: #f7f3ee;
  --text-main: #2b2523;
  --text-muted: #6d5d54;
  --border-color: #d8cfc4;
  --border-focus: #785942;
}

/* TEMA 10: 🕯️ SICAK İSKANDİNAV (Hygge & Cozy) */
[data-active-template="hygge"] {
  --font-family: 'Plus Jakarta Sans', system-ui, sans-serif;
  --font-heading: 'Playfair Display', Georgia, serif;
  --theme-radius-card: 14px;
  --theme-radius-btn: 12px;
  --theme-radius-badge: 9999px;
  --theme-shadow-card: 0 6px 20px rgba(140, 74, 47, 0.08);
  --theme-shadow-btn: 0 2px 6px rgba(140, 74, 47, 0.12);
  --theme-border-width: 1.5px;
  --theme-border-style: solid;
  --primary: #8c4a2f;
  --primary-hover: #6f3620;
  --primary-light: #f7ebe5;
  --primary-text: #ffffff;
  --bg-body: #f7f2eb;
  --bg-card: #fffdfb;
  --bg-hover: #f0e7db;
  --text-main: #3e2723;
  --text-muted: #6d4c41;
  --border-color: #d4a373;
  --border-focus: #8c4a2f;
}

/* TEMA 11: ⚡ TREND GENÇLİK (Neo-Editorial / BookTok) */
[data-active-template="genc"],
[data-active-template="pastel"] {
  --font-family: 'Plus Jakarta Sans', system-ui, sans-serif;
  --font-heading: 'Plus Jakarta Sans', sans-serif;
  --theme-radius-card: 6px;
  --theme-radius-btn: 6px;
  --theme-radius-badge: 4px;
  --theme-shadow-card: 4px 4px 0px #1e1b4b;
  --theme-shadow-btn: 3px 3px 0px #1e1b4b;
  --theme-border-width: 2.5px;
  --theme-border-style: solid;
  --primary: #5b21b6;
  --primary-hover: #4c1d95;
  --primary-light: #ede9fe;
  --primary-text: #ffffff;
  --bg-body: #faf5ff;
  --bg-card: #ffffff;
  --bg-hover: #f3e8ff;
  --text-main: #1e1b4b;
  --text-muted: #6b21a8;
  --border-color: #1e1b4b;
  --border-focus: #06d6a0;
}

/* TEMA 12: 🎨 SANAT ATÖLYESİ (Yaratıcı & Dinamik) */
[data-active-template="art"] {
  --font-family: 'Plus Jakarta Sans', system-ui, sans-serif;
  --font-heading: 'Plus Jakarta Sans', sans-serif;
  --theme-radius-card: 14px;
  --theme-radius-btn: 12px;
  --theme-radius-badge: 9999px;
  --theme-shadow-card: 0 8px 24px rgba(234, 88, 12, 0.10);
  --theme-shadow-btn: 0 3px 8px rgba(234, 88, 12, 0.16);
  --theme-border-width: 2px;
  --theme-border-style: solid;
  --primary: #ea580c;
  --primary-hover: #c2410c;
  --primary-light: #ffedd5;
  --primary-text: #ffffff;
  --bg-body: #fff7ed;
  --bg-card: #ffffff;
  --bg-hover: #ffedd5;
  --text-main: #431407;
  --text-muted: #9a3412;
  --border-color: #ea580c;
  --border-focus: #f97316;
}

/* TEMA 13: ☕ KAHVE & KİTAP (Yetişkin / Klasik) */
[data-active-template="coffee"] {
  --font-family: 'Plus Jakarta Sans', system-ui, sans-serif;
  --font-heading: 'Playfair Display', Georgia, serif;
  --theme-radius-card: 12px;
  --theme-radius-btn: 10px;
  --theme-radius-badge: 9999px;
  --theme-shadow-card: 0 6px 20px rgba(120, 53, 15, 0.08);
  --theme-shadow-btn: 0 2px 6px rgba(120, 53, 15, 0.12);
  --theme-border-width: 1.5px;
  --theme-border-style: solid;
  --primary: #78350f;
  --primary-hover: #592408;
  --primary-light: #fef3c7;
  --primary-text: #ffffff;
  --bg-body: #fcf9f2;
  --bg-card: #ffffff;
  --bg-hover: #f7f0e3;
  --text-main: #331a08;
  --text-muted: #78350f;
  --border-color: #92400e;
  --border-focus: #b45309;
}

/* TEMA 14: 🏛️ KLASİK EDEBİYAT & EX-LIBRIS (Akademik tablo, Playfair serif) */
[data-active-template="klasik"],
[data-active-template="library"] {
  --font-family: 'Plus Jakarta Sans', system-ui, sans-serif;
  --font-heading: 'Playfair Display', Georgia, serif;
  --theme-letter-spacing: 0.4px;
  --theme-radius-card: 0px;
  --theme-radius-btn: 0px;
  --theme-radius-badge: 0px;
  --theme-shadow-card: none;
  --theme-shadow-btn: none;
  --theme-border-width: 2px;
  --theme-border-style: double;
  --primary: #1a2a44;
  --primary-hover: #0f1a2a;
  --primary-light: #eaeff5;
  --primary-text: #ffffff;
  --bg-body: #f9f8f5;
  --bg-card: #ffffff;
  --bg-hover: #f0ede6;
  --text-main: #101827;
  --text-muted: #374151;
  --border-color: #1a2a44;
  --border-focus: #c5a059;
}

/* TEMA 15: 👓 BÜYÜK BOY & NET (Erişilebilir tablo, 18px+, mutlak siyah) */
[data-active-template="erisilebilir"],
[data-active-template="senior"] {
  --font-family: system-ui, -apple-system, Arial, sans-serif;
  --font-heading: system-ui, -apple-system, Arial, sans-serif;
  --font-size-base: 18px;
  --theme-radius-card: 4px;
  --theme-radius-btn: 4px;
  --theme-radius-badge: 4px;
  --theme-shadow-card: none;
  --theme-shadow-btn: none;
  --theme-border-width: 2.5px;
  --theme-border-style: solid;
  --primary: #000000;
  --primary-hover: #1f2937;
  --primary-light: #e5e7eb;
  --primary-text: #ffffff;
  --bg-body: #ffffff;
  --bg-card: #ffffff;
  --bg-hover: #f3f4f6;
  --text-main: #000000;
  --text-muted: #1f2937;
  --border-color: #000000;
  --border-focus: #000000;
  --btn-min-height: 52px;
}

/* --------------------------------------------------------------------------
   3. Sıfırlama & Temel Düzen
   -------------------------------------------------------------------------- */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: var(--font-size-base);
  margin: 0;
  padding: 0;
  width: 100%;
  overflow-x: hidden;
  overflow-y: visible;
}

body {
  font-family: var(--font-family);
  background-color: var(--bg-body);
  color: var(--text-main);
  line-height: 1.45;
  margin: 0;
  padding: 6px 8px;
  width: 100%;
  overflow-x: hidden;
  overflow-y: visible;
  transition: background-color 0.2s ease, color 0.2s ease;
  -webkit-font-smoothing: antialiased;
}

.app-container {
  width: 100%;
  max-width: 1020px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* --------------------------------------------------------------------------
   4. DİNAMİK PROFESYONEL ŞABLON BAŞLIĞI
   -------------------------------------------------------------------------- */
.template-header-box {
  background: var(--bg-card);
  border: var(--theme-border-width) var(--theme-border-style) var(--border-color);
  border-radius: var(--theme-radius-card);
  padding: 18px 20px 14px 20px;
  box-shadow: var(--theme-shadow-card);
  display: flex;
  flex-direction: column;
  gap: 16px;
  transition: all 0.2s ease;
}

/* Profesyonel Başlık Banner */
.pro-masthead {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 6px;
  border-bottom: var(--theme-border-width) var(--theme-border-style) var(--border-color);
  padding-bottom: 12px;
}

.pro-badge-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 14px;
  border-radius: var(--theme-radius-badge);
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  background: var(--primary-light);
  color: var(--primary);
  border: 1px solid var(--border-color);
}

.pro-main-title {
  font-family: var(--font-heading);
  font-size: 1.65rem;
  font-weight: 800;
  letter-spacing: var(--theme-letter-spacing);
  margin: 0;
  color: var(--text-main);
  line-height: 1.2;
}

.pro-sub-title {
  font-size: 0.88rem;
  color: var(--text-muted);
  font-weight: 600;
  margin: 0;
}

/* Bilgi Kartları & Maskot Bölümü */
.pro-info-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
}

.pro-cards-grid {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  flex: 1 1 340px;
}

.pro-info-card {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 8px 12px;
  background: var(--bg-body);
  border: 1.5px solid var(--border-color);
  border-radius: var(--radius-sm);
  flex: 1 1 150px;
  min-width: 140px;
}

.pro-info-label {
  font-size: 0.76rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-muted);
}

.pro-info-input {
  width: 100%;
  background: transparent;
  border: none;
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 800;
  color: var(--text-main);
  outline: none;
  padding: 0;
}

.pro-info-input:focus {
  color: var(--primary);
}

.pro-mascot-crest {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-left: auto;
}

.pro-speech-bubble {
  position: relative;
  background: #fef08a;
  border: 2px solid #000000;
  border-radius: 16px;
  padding: 8px 14px;
  font-weight: 800;
  font-size: 0.88rem;
  color: #000000;
  text-align: center;
  line-height: 1.25;
  box-shadow: 2px 2px 0 #000000;
}

.pro-speech-bubble .bubble-tail-right {
  position: absolute;
  right: -8px;
  top: 50%;
  transform: translateY(-50%);
  width: 0;
  height: 0;
  border-top: 6px solid transparent;
  border-bottom: 6px solid transparent;
  border-left: 8px solid #000000;
}

.pro-mascot-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.pro-mascot-icon:hover {
  transform: scale(1.08) rotate(-2deg);
}

/* --------------------------------------------------------------------------
   5. HIZLI ŞABLON SEÇİCİ ÇİPLERİ
   -------------------------------------------------------------------------- */
.template-quick-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--bg-card);
  border: var(--border-width) solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 8px 12px;
  box-shadow: var(--shadow-xs);
  overflow-x: auto;
}

.quick-bar-title {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 800;
  font-size: 0.88rem;
  color: var(--text-muted);
  white-space: nowrap;
}

.template-chips {
  display: flex;
  align-items: center;
  gap: 6px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.template-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  background: var(--bg-body);
  border: var(--border-width) solid var(--border-color);
  border-radius: var(--radius-full);
  font-family: inherit;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-muted);
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.15s ease;
}

.template-chip:hover {
  color: var(--text-main);
  border-color: var(--primary);
}

.template-chip.active {
  background: var(--primary);
  color: #ffffff;
  border-color: var(--primary);
  box-shadow: 0 2px 5px rgba(0,0,0,0.15);
}

[data-active-template="space"] .template-chip.active {
  background: #3b82f6;
  color: #fff;
}

/* --------------------------------------------------------------------------
   6. İSTATİSTİK & TOOLBAR
   -------------------------------------------------------------------------- */
.stats-bar {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 8px;
}

.stat-card {
  background: var(--bg-card);
  border: var(--theme-border-width) var(--theme-border-style) var(--border-color);
  border-radius: var(--theme-radius-card);
  padding: 8px 12px;
  display: flex;
  align-items: center;
  gap: 10px;
  box-shadow: var(--theme-shadow-card);
  transition: all 0.15s ease;
}

.stat-icon-wrap {
  width: 36px;
  height: 36px;
  border-radius: var(--theme-radius-btn);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.stat-icon-wrap svg { width: 18px; height: 18px; }

.bg-blue { background-color: #e0f2fe; color: #0284c7; }
.bg-amber { background-color: #fef3c7; color: #d97706; }
.bg-emerald { background-color: #d1fae5; color: #059669; }
.bg-purple { background-color: #ede9fe; color: #7c3aed; }
.bg-rose { background-color: #ffe4e6; color: #e11d48; }

.stat-value {
  font-family: var(--font-heading);
  font-size: 1.3rem;
  font-weight: 800;
  line-height: 1.1;
  color: var(--text-main);
}

.stat-label {
  font-size: 0.76rem;
  color: var(--text-muted);
  font-weight: 600;
  white-space: nowrap;
}

.toolbar {
  background: var(--bg-card);
  border: var(--theme-border-width) var(--theme-border-style) var(--border-color);
  border-radius: var(--theme-radius-card);
  padding: 8px 12px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  box-shadow: var(--theme-shadow-card);
  transition: all 0.15s ease;
}

.toolbar-left, .toolbar-right {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.toolbar-left { flex: 1 1 320px; }

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

.search-box .search-icon {
  position: absolute;
  left: 10px;
  width: 17px;
  height: 17px;
  color: var(--text-muted);
  pointer-events: none;
}

.search-box input {
  width: 100%;
  height: var(--btn-min-height);
  padding: 6px 30px 6px 34px;
  font-size: 0.9rem;
  font-family: inherit;
  color: var(--text-main);
  background: var(--bg-input);
  border: var(--theme-border-width) solid var(--border-color);
  border-radius: var(--theme-radius-btn);
  outline: none;
}

.clear-btn {
  position: absolute;
  right: 8px;
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
}

.status-filters {
  display: flex;
  background: var(--bg-body);
  border: var(--theme-border-width) solid var(--border-color);
  padding: 2px;
  border-radius: var(--theme-radius-btn);
  gap: 2px;
}

.filter-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  padding: 5px 10px;
  font-size: 0.85rem;
  font-family: var(--font-heading);
  font-weight: 700;
  border-radius: var(--theme-radius-badge);
  cursor: pointer;
}

.filter-btn.active {
  background: var(--primary);
  color: #ffffff;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: var(--btn-min-height);
  padding: 0 14px;
  font-family: var(--font-heading);
  font-size: 0.9rem;
  font-weight: 700;
  border-radius: var(--theme-radius-btn);
  border: var(--theme-border-width) solid transparent;
  box-shadow: var(--theme-shadow-btn);
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.15s ease;
}

.btn svg { width: 17px; height: 17px; }

.btn-primary {
  background-color: var(--primary);
  color: var(--primary-text);
  border-color: var(--border-color);
}

.btn-secondary {
  background-color: var(--bg-card);
  color: var(--text-main);
  border-color: var(--border-color);
}

.btn-ghost {
  background-color: transparent;
  color: var(--text-muted);
}

/* --------------------------------------------------------------------------
   7. ÇİZELGE TABLOSU
   -------------------------------------------------------------------------- */
.content-section { width: 100%; }

.table-responsive-container {
  width: 100%;
  overflow-x: auto;
  background: var(--bg-card);
  border: var(--theme-border-width) var(--theme-border-style) var(--border-color);
  border-radius: var(--theme-radius-card);
  box-shadow: var(--theme-shadow-card);
  -webkit-overflow-scrolling: touch;
}

.book-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 0.94rem;
}

.book-table th {
  padding: 10px 12px;
  color: #000000;
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 0.92rem;
  text-align: center;
  border: var(--theme-border-width) solid var(--border-color);
  white-space: nowrap;
}

.book-table td {
  padding: 10px 12px;
  border: var(--theme-border-width) solid var(--border-color);
  color: var(--text-main);
  vertical-align: middle;
}

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

.num-badge {
  width: 28px;
  height: 28px;
  border-radius: var(--theme-radius-badge);
  border: var(--theme-border-width) solid var(--border-color);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 900;
  font-size: 0.9rem;
  color: #000000;
  margin: 0 auto;
}

.stamp-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 8px;
  border-radius: 8px;
  font-size: 0.8rem;
  font-weight: 800;
  cursor: pointer;
  background: var(--bg-body);
  border: 1.5px dashed var(--border-color);
  color: var(--text-main);
  transition: all 0.15s ease;
}

.stamp-btn.stamped {
  background: #dcfce7;
  border: 2px solid #16a34a;
  color: #15803d;
}

/* --------------------------------------------------------------------------
   8. EN AŞAĞIDA CANLI A4 ÖN İZLEME (LIVE SHEET PREVIEW)
   -------------------------------------------------------------------------- */
.live-preview-section {
  width: 100%;
  background: var(--bg-card);
  border: var(--border-width) solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 20px;
  box-shadow: var(--shadow-md);
  margin-top: 14px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.preview-header-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 14px;
  padding-bottom: 14px;
  border-bottom: 1.5px solid var(--border-color);
}

.preview-title-group {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.preview-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: var(--primary-light);
  color: var(--primary);
  font-size: 0.78rem;
  font-weight: 800;
  padding: 3px 10px;
  border-radius: var(--radius-full);
  width: fit-content;
}

.preview-main-title {
  font-size: 1.3rem;
  font-weight: 800;
  color: var(--text-main);
  margin: 0;
}

.preview-sub-title {
  font-size: 0.84rem;
  color: var(--text-muted);
  margin: 0;
}

.preview-actions-bar {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

.preview-toggle-group {
  display: flex;
  background: var(--bg-body);
  border: 1.5px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 3px;
  gap: 4px;
}

.toggle-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: var(--radius-xs);
  border: none;
  background: transparent;
  font-family: inherit;
  font-size: 0.84rem;
  font-weight: 700;
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.15s;
}

.toggle-btn.active {
  background: var(--bg-card);
  color: var(--primary);
  box-shadow: var(--shadow-xs);
}

/* A4 Özelleştirme Şeridi */
.preview-options-bar {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px 18px;
  background: var(--bg-body);
  border: 1.5px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
}

.preview-opt-title {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.85rem;
  font-weight: 800;
  color: var(--text-muted);
  white-space: nowrap;
}

.preview-opt-checkboxes {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px 18px;
}

.preview-checkbox-toggle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.84rem;
  font-weight: 700;
  color: var(--text-main);
  cursor: pointer;
  user-select: none;
}

.preview-checkbox-toggle input[type="checkbox"] {
  width: 17px;
  height: 17px;
  accent-color: var(--primary);
  cursor: pointer;
}

/* A4 Kağıt Görünüm Çerçevesi */
.a4-paper-viewport {
  width: 100%;
  background: #cbd5e1;
  border-radius: var(--radius-md);
  padding: 24px 12px;
  overflow-x: auto;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  -webkit-overflow-scrolling: touch;
}

[data-active-template="space"] .a4-paper-viewport {
  background: #0b1120;
}

.a4-paper-sheet {
  width: 794px;
  height: 1123px;
  max-height: 1123px;
  background: #ffffff;
  color: #000000;
  box-shadow: 0 14px 38px rgba(0, 0, 0, 0.2), 0 2px 8px rgba(0,0,0,0.08);
  border-radius: 4px;
  padding: 18px 20px;
  box-sizing: border-box;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  overflow: hidden;
}

/* --------------------------------------------------------------------------
   9. MODALLAR
   -------------------------------------------------------------------------- */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 12px;
  z-index: 1000;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}

.modal-overlay.active { opacity: 1; pointer-events: auto; }

.modal-card {
  background: var(--bg-card);
  border: var(--border-width) solid var(--border-color);
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 580px;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-lg);
  overflow: hidden;
}

.modal-card.modal-sm { max-width: 400px; }

.modal-header {
  padding: 14px 18px;
  border-bottom: var(--border-width) solid var(--border-color);
  display: flex;
  align-items: center;
  gap: 12px;
}

.modal-header-icon {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  background: var(--primary-light);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal-title { font-size: 1.15rem; font-weight: 800; color: var(--text-main); flex: 1; }
.btn-close-modal { background: none; border: none; color: var(--text-muted); cursor: pointer; padding: 6px; }

.modal-body {
  padding: 16px 18px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.modal-footer {
  padding: 12px 18px;
  border-top: var(--border-width) solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  background: var(--bg-body);
}

.theme-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}

.theme-option-card {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px;
  border: var(--border-width) solid var(--border-color);
  border-radius: var(--radius-md);
  background: var(--bg-card);
  cursor: pointer;
  text-align: left;
  transition: all 0.15s ease;
}

.theme-option-card:hover {
  border-color: var(--primary);
  transform: translateY(-1px);
}

.theme-option-card.active {
  border-color: var(--primary);
  outline: 2px solid var(--primary);
  background: var(--primary-light);
}

.theme-preview-box {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 1.2rem;
}

.preview-kitaplik { background: #f7ebe5; color: #8c4a2f; border: 2px solid #8c4a2f; border-radius: 8px; }
.preview-agac { background: #d8f3dc; color: #2d6a4f; border: 2px solid #2d6a4f; border-radius: 12px; }
.preview-yol { background: #fef3c7; color: #d97706; border: 2.5px solid #d97706; border-radius: 9999px; }
.preview-kartlar { background: #ede9fe; color: #5b21b6; border: 2.5px solid #1e1b4b; box-shadow: 2px 2px 0px #1e1b4b; border-radius: 4px; }
.preview-forest { background: #d8f3dc; color: #2d6a4f; border: 2px solid #2d6a4f; border-radius: 12px; }
.preview-space { background: #e0e7ff; color: #4338ca; border: 2px solid #4338ca; border-radius: 10px; }
.preview-ocean { background: #e0f2fe; color: #0284c7; border: 2px solid #0284c7; border-radius: 12px; }
.preview-castle { background: #fce7f3; color: #be185d; border: 2px solid #be185d; border-radius: 12px; }
.preview-sakura, .preview-zen { background: #fdfbf7; color: #785942; border: 1px solid #d8cfc4; border-radius: 2px; }
.preview-hygge { background: #f7ebe5; color: #8c4a2f; border: 1.5px solid #d4a373; border-radius: 8px; }
.preview-genc, .preview-pastel { background: #ede9fe; color: #5b21b6; border: 2.5px solid #1e1b4b; box-shadow: 2px 2px 0px #1e1b4b; border-radius: 4px; }
.preview-art { background: #ffedd5; color: #ea580c; border: 2px solid #ea580c; border-radius: 10px; }
.preview-coffee { background: #fef3c7; color: #78350f; border: 1.5px solid #92400e; border-radius: 8px; }
.preview-klasik, .preview-library { background: #eaeff5; color: #1a2a44; border: 2.5px double #1a2a44; border-radius: 0; }
.preview-erisilebilir, .preview-senior { background: #000000; color: #ffffff; border: 2.5px solid #000; border-radius: 2px; }

.theme-option-info strong { font-size: 0.92rem; color: var(--text-main); display: block; font-family: var(--font-heading); }
.theme-option-info span { font-size: 0.76rem; color: var(--text-muted); line-height: 1.25; }

/* ==========================================================================
   YAPISAL ŞABLON BASKI VE ÖN İZLEME BİLEŞENLERİ (A4 KANVAS)
   ========================================================================== */

/* 1. KİTAPLIK ŞABLONU STİLLERİ */
.bookshelf-shelf {
  display: flex;
  align-items: flex-end;
  gap: 12px;
  padding: 0 14px 4px 14px;
  position: relative;
  min-height: 165px;
}

.bookshelf-wood {
  height: 14px;
  background: linear-gradient(180deg, #b07d62 0%, #8c4a2f 100%);
  border: 1.5px solid #43281c;
  border-radius: 3px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.15);
  margin-bottom: 22px;
}

/* 2. MİNİ İNCELEME KARTLARI STİLLERİ */
.review-cards-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.review-card-box {
  border: 1.5px solid #000;
  border-radius: 6px;
  padding: 8px 10px;
  background: #fff;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 4px;
  min-height: 145px;
}

/* 3. OKUMA AĞACI ELMALARI STİLLERİ */
.tree-apples-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px 14px;
  padding: 10px;
}

/* 4. MACERA YOLU İSTASYONLARI STİLLERİ */
.path-steps-flow {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 10px 14px;
  padding: 10px 0;
}

/* --------------------------------------------------------------------------
   TEMA ÖZEL ETKİLEŞİM & AYRIŞTIRICI STİLLERİ
   -------------------------------------------------------------------------- */

/* Genç (Neo-Brutalist): Sert ofset gölge ve dinamik hover */
[data-active-template="genc"] .stat-card,
[data-active-template="genc"] .toolbar,
[data-active-template="genc"] .table-responsive-container,
[data-active-template="genc"] .book-mobile-card {
  box-shadow: 4px 4px 0px #1e1b4b !important;
}

[data-active-template="genc"] .btn {
  box-shadow: 3px 3px 0px #1e1b4b !important;
  border: 2px solid #1e1b4b !important;
}

[data-active-template="genc"] .btn:hover {
  transform: translate(-2px, -2px);
  box-shadow: 5px 5px 0px #1e1b4b !important;
}

[data-active-template="genc"] .stat-card:hover,
[data-active-template="genc"] .book-mobile-card:hover {
  transform: translate(-2px, -2px);
  box-shadow: 6px 6px 0px #1e1b4b !important;
}

/* Klasik / Akademik: Çift çerçeve, sıfır gölge, Playfair serif */
[data-active-template="klasik"] .template-header-box,
[data-active-template="klasik"] .stat-card,
[data-active-template="klasik"] .toolbar,
[data-active-template="klasik"] .table-responsive-container,
[data-active-template="klasik"] .book-mobile-card {
  border-radius: 0 !important;
  box-shadow: none !important;
}

[data-active-template="klasik"] .btn {
  border-radius: 0 !important;
  box-shadow: none !important;
}

/* Zen: Ultra minimal, sıfır gölge, 1px ipeksi hatlar */
[data-active-template="zen"] .stat-card,
[data-active-template="zen"] .toolbar,
[data-active-template="zen"] .table-responsive-container,
[data-active-template="zen"] .book-mobile-card {
  box-shadow: none !important;
}

/* Erişilebilir: Büyük punto, yüksek kontrast, 2.5px tokmak çerçeve */
[data-active-template="erisilebilir"] .stat-value {
  font-size: 1.6rem !important;
}

[data-active-template="erisilebilir"] .btn {
  font-size: 1.05rem !important;
  min-height: 52px;
}

/* Evrensel Erişilebilirlik & Focus Durumu */
:focus-visible {
  outline: 3px solid var(--border-focus) !important;
  outline-offset: 2px !important;
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* --------------------------------------------------------------------------
   10. YAZDIRMA (PRINT) PROFESYONEL AYARLARI
   -------------------------------------------------------------------------- */
@media print {
  body {
    background: #ffffff !important;
    padding: 0 !important;
    margin: 0 !important;
  }
  
  /* Tüm arayüz elemanlarını gizle */
  .stats-bar, 
  .toolbar, 
  .template-quick-bar, 
  .content-section, 
  .preview-header-bar, 
  .modal-overlay, 
  .toast-container,
  #template-banner-area {
    display: none !important;
  }

  .live-preview-section {
    margin: 0 !important;
    padding: 0 !important;
    border: none !important;
    box-shadow: none !important;
    background: transparent !important;
  }

  .a4-paper-viewport {
    background: transparent !important;
    padding: 0 !important;
    overflow: visible !important;
    display: block !important;
  }

  .a4-paper-sheet {
    box-shadow: none !important;
    border: none !important;
    padding: 0 !important;
    margin: 0 auto !important;
    width: 100% !important;
    min-height: auto !important;
    page-break-inside: avoid;
  }

  @page {
    size: A4 portrait;
    margin: 6mm;
  }
}

/* Mobil */
@media (max-width: 768px) {
  .pro-info-bar {
    flex-direction: column-reverse;
  }

  .pro-mascot-crest {
    margin-left: 0;
    margin-bottom: 6px;
  }

  .pro-cards-grid { width: 100%; }

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

  .preview-actions-bar {
    width: 100%;
    justify-content: stretch;
  }

  .preview-actions-bar button, .preview-actions-bar .preview-toggle-group {
    flex: 1 1 45%;
  }

  .toolbar-right {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .toolbar-right #btn-add-book {
    grid-column: span 2;
  }
}

/* --------------------------------------------------------------------------
   11. MOBİL KART GÖRÜNÜMÜ (< 650px), AUTOCOMPLETE & GERİ AL BİLEŞENLERİ
   -------------------------------------------------------------------------- */

.mobile-cards-container {
  display: none;
  width: 100%;
  flex-direction: column;
  gap: 12px;
}

@media (max-width: 650px) {
  .table-responsive-container {
    display: none !important;
  }
  .mobile-cards-container {
    display: flex !important;
  }
}

.book-mobile-card {
  background: var(--bg-card);
  border: var(--border-width) solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 12px 14px;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  gap: 10px;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.book-mobile-card:hover {
  border-color: var(--primary);
  box-shadow: var(--shadow-md);
}

.mobile-card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  border-bottom: 1px dashed var(--border-color);
  padding-bottom: 8px;
}

.mobile-card-title-group {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1;
  min-width: 0;
}

.mobile-card-title {
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--text-main);
  line-height: 1.25;
  word-break: break-word;
}

.mobile-card-actions {
  display: flex;
  gap: 6px;
  flex-shrink: 0;
}

.mobile-card-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
  font-size: 0.85rem;
}

.mobile-card-info-item {
  background: var(--bg-body);
  border-radius: var(--radius-sm);
  padding: 6px 8px;
  border: 1px solid var(--border-color);
}

.mobile-card-info-label {
  font-size: 0.72rem;
  color: var(--text-muted);
  font-weight: 700;
  text-transform: uppercase;
  display: flex;
  align-items: center;
  gap: 4px;
}

.mobile-card-info-val {
  font-weight: 700;
  color: var(--text-main);
  margin-top: 2px;
  word-break: break-word;
}

.mobile-card-stamp-btn {
  width: 100%;
  padding: 9px 12px;
  font-size: 0.9rem;
  font-weight: 800;
  border-radius: var(--radius-sm);
  border: 2px dashed var(--border-color);
  background: var(--bg-body);
  color: var(--text-main);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.mobile-card-stamp-btn.stamped {
  background: #dcfce7;
  color: #15803d;
  border: 2px solid #16a34a;
}

/* Open Library Autocomplete */
.autocomplete-wrapper {
  position: relative;
  width: 100%;
}

.autocomplete-dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: #ffffff;
  border: 2px solid var(--primary);
  border-radius: var(--radius-sm);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.18);
  z-index: 1200;
  max-height: 220px;
  overflow-y: auto;
  margin-top: 4px;
}

.autocomplete-item {
  padding: 8px 12px;
  cursor: pointer;
  border-bottom: 1px solid #e2e8f0;
  display: flex;
  flex-direction: column;
  gap: 2px;
  text-align: left;
}

.autocomplete-item:last-child {
  border-bottom: none;
}

.autocomplete-item:hover {
  background: var(--primary-light);
}

.autocomplete-item-title {
  font-weight: 800;
  color: var(--text-main);
  font-size: 0.88rem;
}

.autocomplete-item-sub {
  font-size: 0.76rem;
  color: var(--text-muted);
  display: flex;
  justify-content: space-between;
}

.autocomplete-loading {
  padding: 10px;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.82rem;
  font-style: italic;
}

/* Toast Geri Al Butonu */
.toast-undo-btn {
  margin-left: 10px;
  background: #ffffff;
  color: #0f172a;
  border: 1.5px solid #000;
  border-radius: 4px;
  padding: 3px 8px;
  font-size: 0.78rem;
  font-weight: 800;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: all 0.15s ease;
}

.toast-undo-btn:hover {
  background: #f1f5f9;
  transform: scale(1.05);
}

/* ==========================================================================
   YAZDIRMA (PRINT) STİLLERİ - SADECE A4 ÇİZELGEYİ BASAR (TEK SAYFA)
   ========================================================================== */
@media print {
  @page {
    size: A4 portrait;
    margin: 0;
  }

  html, body {
    margin: 0 !important;
    padding: 0 !important;
    background: #ffffff !important;
    color: #000000 !important;
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
  }

  /* Üst bar, istatistikler, şablon çipleri, butonlar ve tabloları gizle */
  #template-banner-area,
  .stats-bar,
  .template-quick-bar,
  .toolbar,
  .content-section,
  .preview-header-bar,
  .preview-options-bar,
  .modal-overlay,
  #toast-container,
  footer,
  header {
    display: none !important;
    visibility: hidden !important;
  }

  /* Taşıyıcı kapsayıcıları sıfırla */
  #app-container,
  main,
  .live-preview-section,
  .a4-paper-viewport {
    display: block !important;
    width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    border: none !important;
    background: transparent !important;
    box-shadow: none !important;
    overflow: visible !important;
  }

  /* Yalnızca A4 Kağıdı Basılacak (Tek Sayfa Tam Boyut) */
  #a4-sheet-canvas,
  .a4-paper-sheet {
    display: flex !important;
    flex-direction: column !important;
    justify-content: space-between !important;
    width: 210mm !important;
    min-width: 210mm !important;
    max-width: 210mm !important;
    height: 297mm !important;
    min-height: 297mm !important;
    max-height: 297mm !important;
    margin: 0 auto !important;
    padding: 8mm 10mm !important;
    border: none !important;
    box-shadow: none !important;
    border-radius: 0 !important;
    background: #ffffff !important;
    box-sizing: border-box !important;
    overflow: hidden !important;
    page-break-after: avoid !important;
    page-break-before: avoid !important;
    page-break-inside: avoid !important;
    break-after: avoid !important;
    break-before: avoid !important;
    break-inside: avoid !important;
  }
}
