/* admin.css - Tam Uyumlu Mavi Tema */

:root {
  --primary: #0078d4;
  --primary-dark: #005fa3;
  --bg-light: #f9f9f9;
  --text-dark: #333;
  --border-color: #ccc;
  --radius: 8px;
  --transition: 0.2s ease;
  --success: #28a745;
}

body {
  font-family: "Segoe UI", Arial, sans-serif;
  background: var(--bg-light);
  color: var(--text-dark);
  margin: 0;
  padding: 20px;
}

h1, h2, h3 {
  text-align: center !important;
  display: block;
  width: 100%;
  margin: 10px 0 16px 0;
  color: var(--primary-dark);
}

/* --- SEKME MENÜSÜ --- */
.tabs {
  background: #fff;
  border: 1px solid #ddd;
  border-radius: var(--radius);
  padding: 20px;
  max-width: 1200px;
  margin: 20px auto;
  box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.tab-nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  row-gap: 15px; /* Alt satıra geçince yapışmasın */
  list-style: none;
  padding: 0;
  border-bottom: 2px solid #eee;
  padding-bottom: 20px;
  margin-bottom: 20px;
}

.tab-nav a {
  display: block;
  padding: 10px 15px;
  background: #eee;
  color: #333;
  text-decoration: none;
  border-radius: 6px;
  transition: var(--transition);
  font-weight: 500;
  border: 1px solid transparent;
}

.tab-nav a:hover { background: #d4e7fa; color: var(--primary-dark); }
.tab-nav a.active { background: var(--primary); color: #fff; box-shadow: 0 4px 6px rgba(0,120,212,0.3); }

/* Aktif Modül (Yeşil) */
.tab-nav a.active-module {
  background-color: var(--success) !important;
  color: #fff !important;
  border-color: #1e7e34 !important;
}

.tab { display: none; animation: fadeIn 0.3s; }
.tab.active { display: block; }

@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

/* --- ÖZEL AYAR KUTULARI (MAVİ ÇİZGİLİ) --- */
.kenar-cizgili-ayar {
    border-left: 5px solid var(--border-color);
    padding: 15px;
    margin-bottom: 20px;
    background: #f8f9fa;
    border-radius: 0 8px 8px 0;
    transition: var(--transition);
}

.kenar-cizgili-ayar:hover {
    border-left-color: var(--primary);
    background: #fff;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.ayar-basligi {
    display: block;
    font-size: 1.1rem;
    font-weight: bold;
    color: var(--primary-dark);
    margin-bottom: 8px;
    border-bottom: 1px solid #eee;
    padding-bottom: 5px;
}

.description {
    font-size: 0.9rem;
    color: #666;
    margin-bottom: 15px;
    font-style: italic;
}

/* Layout Grid (Tasarım Sekmesi İçin) */
.layout-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    background: #eef5fc;
    padding: 20px;
    border-radius: 8px;
    border: 1px solid #bcd4f5;
}

/* Form Elemanları */
label { display: block; margin-top: 10px; font-weight: 600; font-size: 0.9rem; }
input[type="text"], input[type="time"], input[type="number"], input[type="range"], textarea, select {
  width: 100%; padding: 10px; margin-top: 5px;
  border: 1px solid var(--border-color); border-radius: 4px;
  box-sizing: border-box; font-size: 14px;
}
textarea { min-height: 80px; font-family: monospace; resize: vertical; }

/* Radyo Grupları */
.radio-group {
    display: flex; gap: 15px; margin: 10px 0; flex-wrap: wrap;
    background: #fff; padding: 10px; border-radius: 4px; border: 1px solid #eee;
}
.radio-group label {
    margin-top: 0; font-weight: normal; cursor: pointer;
    display: flex; align-items: center; gap: 5px;
}

/* Tablolar */
table { width: 100%; border-collapse: collapse; margin-top: 15px; background: #fff; }
th, td { border: 1px solid #ddd; padding: 10px; text-align: center; }
th { background: #f1f1f1; color: #333; }

/* Butonlar */
.buttons { text-align: center; margin-top: 30px; padding-top: 20px; border-top: 1px solid #eee; }
button {
  background: var(--primary); color: #fff; border: none;
  border-radius: 6px; padding: 12px 24px; cursor: pointer;
  font-size: 1rem; margin: 0 5px;
}
button:hover { background: var(--primary-dark); transform: translateY(-1px); 
}
/* --- LAYOUT SEÇİCİ STİLLERİ --- */
.layout-option {
  cursor: pointer;
  text-align: center;
  display: block;
}
.layout-option input { display: none; } /* Radyo butonunu gizle */

.layout-preview {
  width: 120px;
  height: 80px;
  background: #fff;
  border: 2px solid #ddd;
  border-radius: 6px;
  display: flex;
  flex-direction: column;
  padding: 2px;
  gap: 2px;
  transition: all 0.2s;
}

/* Seçili olduğunda parlasın */
.layout-option input:checked + .layout-preview {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(0,120,212,0.2);
  transform: translateY(-2px);
}

.layout-name {
  display: block;
  margin-top: 8px;
  font-weight: 600;
  color: #666;
  font-size: 0.9rem;
}
.layout-option input:checked ~ .layout-name { color: var(--primary); }

/* Mini Temsili Kutular */
.lp-header { height: 10px; background: #cbd5e1; border-radius: 2px; }
.lp-footer { height: 8px; background: #cbd5e1; border-radius: 2px; }
.lp-body { flex: 1; display: flex; gap: 2px; }
.lp-col { flex: 1; background: #e2e8f0; border-radius: 2px; }

/* --- TOAST BİLDİRİM STİLLERİ (MERKEZİ) --- */
#toast-container {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 999999; /* En üstte durması için */
}

.toast-box {
  position: relative;
  min-width: 300px;
  background: #f3e66f;
  color: #110f0f;
  padding: 16px 20px;
  border-radius: 8px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.5);
  display: flex;
  align-items: center;
  gap: 15px;
  overflow: hidden;
  margin-bottom: 10px; /* Üst üste gelirse aralık olsun */
  border-left: 4px solid;
  font-size: 18px;
  font-family: 'Poppins', sans-serif;
  animation: slideInLeft 0.4s cubic-bezier(0.68, -0.55, 0.27, 1.55) forwards;
}

.toast-box.success { border-left-color: #22c55e; }
.toast-box.success i { color: #22c55e; }

.toast-box.error { border-left-color: #ef4444; }
.toast-box.error i { color: #ef4444; }

.toast-box.info { border-left-color: #3b82f6; }
.toast-box.info i { color: #3b82f6; }

.toast-progress {
  position: absolute;
  bottom: 0;
  left: 0;
  height: 3px;
  width: 100%;
  background: rgba(255,255,255,0.2);
}

.toast-progress::after {
  content: '';
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 100%;
  background: rgba(255,255,255,0.7);
  animation: progress linear forwards;
}

@keyframes slideInLeft {
  from { opacity: 0; transform: translateX(100%); }
  to { opacity: 1; transform: translateX(0); }
}

@keyframes fadeOutRight {
  to { opacity: 0; transform: translateX(100%); }
}

@keyframes progress {
  from { width: 100%; }
  to { width: 0%; }
}

    /* ... admin.css'in önceki kodları ... */

/* Zarf ikonunu ve üzerindeki kırmızıyı güzelleştirir */
.mesaj-kutusu {
  position: relative;
  display: inline-block;
  margin-right: 20px;
}
.mesaj-sayisi {
  position: absolute;
  top: -8px;
  right: -8px;
  background-color: red;
  color: white;
  border-radius: 50%;
  padding: 3px 6px;
  font-size: 10px;
  font-weight: bold;
  display: none; 
}
.fa-envelope:hover {
  transform: scale(1.1);
  cursor: pointer;
}

/* --- BURADAN AŞAĞISINI YENİ EKLE --- */

/* --- CHAT WIDGET (SAĞ ALT KÖŞE) --- */
.chat-widget-container {
  position: fixed !important;
  bottom: 20px !important;
  right: 20px !important;
  z-index: 999999 !important;
  display: none; /* JS ile flex yapılacak */
  flex-direction: column;
  animation: slideUp 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  background: transparent;
  pointer-events: none;
  font-family: 'Segoe UI', sans-serif;
}

.chat-box {
  width: 360px;
  height: 500px;
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 12px 40px rgba(0,0,0,0.25);
  display: flex;
  flex-direction: column;
  pointer-events: auto;
  overflow: hidden;
  border: 1px solid rgba(0,0,0,0.1);
}

.chat-header {
  background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
  color: #fff;
  padding: 18px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
  box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.online-dot {
  position:absolute; bottom:0; right:0; 
  width:10px; height:10px; 
  background:#22c55e; 
  border-radius:50%; 
  border:2px solid #2563eb;
}

.close-btn {
  background: rgba(255,255,255,0.2);
  border: none;
  color: white;
  width: 30px; height: 30px;
  border-radius: 50%;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: background 0.2s;
}
.close-btn:hover { background: rgba(255,255,255,0.3); }

.chat-body {
  flex: 1;
  background: #f1f5f9;
  padding: 20px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.chat-footer {
  padding: 15px;
  background: #fff;
  border-top: 1px solid #f1f5f9;
}

.send-btn {
  position: absolute; right: 5px; top: 50%; transform: translateY(-50%);
  width: 38px; height: 38px;
  background: #2563eb; color: white;
  border: none; border-radius: 50%;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: transform 0.2s;
  box-shadow: 0 4px 6px rgba(37,99,235,0.3);
}
.send-btn:hover { transform: translateY(-50%) scale(1.1); background: #1d4ed8; }

/* Mesaj Balonları */
.msg-bubble {
  padding: 12px 16px;
  border-radius: 12px;
  font-size: 0.95rem;
  line-height: 1.5;
  max-width: 80%;
  position: relative;
  word-wrap: break-word;
  box-shadow: 0 1px 2px rgba(0,0,0,0.05);
}

.msg-in {
  background: #fff;
  border-bottom-left-radius: 2px;
  align-self: flex-start;
  color: #1e293b;
}

.msg-out {
  background: #2563eb;
  color: white;
  border-bottom-right-radius: 2px;
  align-self: flex-end;
}

@keyframes slideUp {
  from { transform: translateY(100px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

