/* ========================================= */
@import "logo.css";
@import "topbar.css";
/* ✂️ BERBER RANDEVU - FİNAL CSS (v10.0)    */
/* ========================================= */

@import url("https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700&display=swap");

:root {
  /* --- AÇIK TEMA (Varsayılan) --- */
  --primary: #2563eb;
  /* Ana Mavi */
  --primary-light: #3b82f6;
  --primary-dark: #1e40af;

  --bg-body: #f8fafc;
  /* Arkaplan */
  --surface: #ffffff;
  /* Kart/Panel Rengi */
  --border: #e2e8f0;
  /* Çizgiler */

  --text-main: #0f172a;
  /* Ana Yazı Rengi */
  --text-sub: #64748b;
  /* Alt Yazı Rengi */

  --success: #10b981;
  /* Yeşil (Onay) */
  --danger: #ef4444;
  /* Kırmızı (Hata/Sil) */

  --sidebar-width: 260px;
  --border-radius: 12px;
  --shadow:
    0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.05);
}

/* --- KOYU TEMA (Dark Mode) --- */
body.dark-mode {
  --primary: #60a5fa;
  /* Koyu modda daha parlak mavi */
  --primary-light: #93c5fd;
  --primary-dark: #2563eb;

  --bg-body: #0f172a;
  /* Çok koyu lacivert */
  --surface: #1e293b;
  /* Koyu gri paneller */
  --border: #334155;
  /* Koyu çizgiler */

  --text-main: #f8fafc;
  /* Beyaz yazılar */
  --text-sub: #94a3b8;
  /* Gri yazılar */

  --shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.5);
  /* Daha belirgin gölge */
}

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

body {
  font-family: "Poppins", sans-serif;
  background: var(--bg-body);
  color: var(--text-main);
  min-height: 100vh;
  overflow-x: hidden;
  transition:
    background-color 0.3s ease,
    color 0.3s ease;
  /* Yumuşak geçiş */
}

/* GİZLEME SINIFI (Çok Önemli) */
.hidden {
  display: none !important;
}

/* --- GİRİŞ VE KAYIT SAYFALARI --- */
.hero-section {
  background: linear-gradient(135deg, #1e3a8a 0%, #172554 100%);
  color: white;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 2rem;
  gap: 1.5rem;
  text-align: center;
}

.hero-title {
  font-size: 2.5rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.auth-box {
  background: var(--surface);
  padding: 2.5rem;
  border-radius: 16px;
  width: 100%;
  max-width: 420px;
  /* Genişlik sınırı */
  color: var(--text-main);
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.25);
  text-align: left;
}

.auth-box h1,
.auth-box h2 {
  text-align: center;
  margin-bottom: 1.5rem;
  color: var(--primary);
}

/* --- DASHBOARD DÜZENİ (Layout) --- */
.dashboard-container {
  display: block;
  width: 100%;
  min-height: 100vh;
}

/* Sidebar (Sol Menü - Sabit) */
.sidebar {
  position: fixed;
  top: 0;
  left: 0;
  width: var(--sidebar-width);
  height: 100vh;
  background: var(--surface);
  border-right: 1px solid var(--border);
  padding: 1.5rem;
  overflow-y: auto;
  z-index: 500;
  transition: transform 0.3s ease;
  display: flex;
  flex-direction: column;
  scrollbar-width: none;
  /* Hide scrollbar for Firefox */
}

/* Hide scrollbar for Chrome/Safari/Edge */
.sidebar::-webkit-scrollbar {
  display: none;
}

/* Sidebar Altı (Çıkış Butonu Alanı) */
.mt-auto {
  margin-top: auto;
  padding-top: 20px;
  border-top: 1px solid var(--border);
}

/* Ana İçerik */
.main-content {
  margin-left: var(--sidebar-width);
  /* Sidebar kadar boşluk bırak */
  padding: 2rem;
  width: calc(100% - var(--sidebar-width));
  /* Kalan genişliği al */
  min-height: 100vh;
  background: var(--bg-body);
  transition:
    margin-left 0.3s ease,
    width 0.3s ease;
}

/* --- BİLEŞENLER --- */
/* --- LOGO VE MARKA ALANI (YENİ) --- */
.logo-container {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 0;
  text-decoration: none;
  /* Link ise altçizgiyi kaldır */
  color: var(--text-main);
  transition: transform 0.3s ease;
}

/* SVG/IMG İkon Animasyonu */
.logo-container img,
.logo-container svg {
  filter: drop-shadow(0 4px 6px rgba(212, 175, 55, 0.3));
  /* Altın gölge */
  transition: transform 0.3s ease;
  width: 48px;
  height: 48px;
}

.logo-container:hover img,
.logo-container:hover svg {
  transform: rotate(-10deg) scale(1.1);
  /* Üzerine gelince hafif oynar */
}

/* Marka İsmi */
.brand-text-group {
  display: flex;
  flex-direction: column;
  line-height: 1;
  text-align: left;
}

.brand-name {
  font-family: 'Poppins', sans-serif;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--primary);
  /* Metin rengi primary olsun */
  letter-spacing: -0.5px;
}

/* "Bu" kelimesini vurgulamak için (Opsiyonel - Eğer HTML'de kullanılırsa) */
.brand-name .highlight {
  color: #FACC15;
  /* Altın rengi */
}

.brand-slogan {
  font-size: 0.75rem;
  color: var(--text-sub);
  letter-spacing: 1px;
  text-transform: uppercase;
  margin-top: 2px;
  font-weight: 500;
}

/* --- MOBİL UYUM --- */
@media (max-width: 480px) {
  .brand-name {
    font-size: 1.3rem;
  }

  .brand-slogan {
    display: none;
    /* Mobilde yer kaplamaması için sloganı gizleyebiliriz */
  }

  .logo-container img,
  .logo-container svg {
    width: 36px;
    height: 36px;
  }
}

.menu-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  color: var(--text-sub);
  text-decoration: none;
  border-radius: 8px;
  margin-bottom: 5px;
  transition: all 0.2s;
  cursor: pointer;
  font-weight: 500;
}

.menu-item:hover,
.menu-item.active {
  background: rgba(37, 99, 235, 0.1);
  color: var(--primary);
}

body.dark-mode .menu-item:hover {
  background: rgba(255, 255, 255, 0.1);
}

.top-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2rem;
  flex-wrap: wrap;
  gap: 1rem;
}

.user-profile {
  display: flex;
  align-items: center;
  gap: 15px;
  background: var(--surface);
  padding: 8px 15px;
  border-radius: 50px;
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
}

.icon-btn {
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 50%;
  width: 35px;
  height: 35px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s;
  color: var(--text-main);
}

.icon-btn:hover {
  background: var(--bg-body);
  color: var(--primary);
  border-color: var(--primary);
}

.avatar {
  width: 36px;
  height: 36px;
  background: var(--primary);
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  font-size: 0.9rem;
}

/* Kartlar */
.card {
  background: var(--surface);
  padding: 1.5rem;
  border-radius: var(--border-radius);
  box-shadow: var(--shadow);
  margin-bottom: 1rem;
  border: 1px solid var(--border);
  transition: transform 0.2s;
}

.card:hover {
  transform: translateY(-2px);
}

/* Butonlar */
.btn {
  padding: 10px 20px;
  border-radius: 8px;
  border: none;
  font-weight: 600;
  cursor: pointer;
  transition: 0.2s;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

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

.btn-primary:hover {
  background: var(--primary-dark);
}

.btn-danger {
  background: var(--danger);
  color: white;
}

.btn-outline {
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text-sub);
}

.btn-outline:hover {
  border-color: var(--primary);
  color: var(--primary);
}

/* Form Elemanları */
.input-group {
  margin-bottom: 1.2rem;
  width: 100%;
}

.input-group label {
  display: block;
  margin-bottom: 0.5rem;
  font-size: 0.9rem;
  color: var(--text-sub);
  font-weight: 500;
}

.input-group input,
.input-group select,
.input-group textarea {
  width: 100%;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  color: var(--text-main);
  outline: none;
  transition: border-color 0.2s;
}

.input-group input:focus {
  border-color: var(--primary);
}

/* Hata Durumu Stilleri */
.input-group.error input,
.input-group.error select {
  border-color: var(--danger) !important;
  box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.1);
}

.input-group.error label {
  color: var(--danger) !important;
}

/* Hızlı hata sınıfları (form validasyonu için) */
.input-error {
  border-color: var(--danger) !important;
  box-shadow: 0 0 0 4px rgba(239, 68, 68, 0.08);
}

.error-text {
  color: var(--danger);
  font-size: 0.85rem;
  margin-top: 6px;
}

/* --- MODALLAR (PENCERELER) --- */
.modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.7);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 9999;
  padding: 1rem;
  backdrop-filter: blur(5px);
}

.modal-content {
  background: var(--surface);
  padding: 2rem;
  border-radius: 16px;
  width: 100%;
  max-width: 450px;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
  max-height: 90vh;
  overflow-y: auto;
  color: var(--text-main);
  display: flex;
  flex-direction: column;
  gap: 10px;
  position: relative;
}

/* Profil Resmi Stili */
.courier-avatar-img {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--border);
}

/* --- RAPORLAMA & İSTATİSTİK (PREMIUM) --- */
.badge-gold {
  background: linear-gradient(45deg, #f59e0b, #fbbf24);
  color: #78350f;
  padding: 2px 8px;
  border-radius: 6px;
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.5px;
  box-shadow: 0 2px 4px rgba(245, 158, 11, 0.3);
}

.stats-filter {
  background: var(--bg-body);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 4px;
  display: flex;
  gap: 4px;
}

.filter-btn {
  background: transparent;
  border: none;
  padding: 6px 12px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-sub);
  transition: all 0.2s;
}

.filter-btn.active {
  background: var(--surface);
  color: var(--primary);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 20px;
}

/* Küçük ekranlarda stats-grid'i daha küçük yap */
@media (max-width: 480px) {
  .stats-grid {
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  }
}

.stat-card {
  background: var(--surface);
  padding: 1.5rem;
  border-radius: 16px;
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  display: flex;
  align-items: center;
  gap: 20px;
  transition: transform 0.2s;
}

.stat-card:hover {
  transform: translateY(-3px);
}

.stat-icon {
  width: 50px;
  height: 50px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
}

.income-card .stat-icon {
  background: rgba(16, 185, 129, 0.1);
  color: #10b981;
}

.count-card .stat-icon {
  background: rgba(59, 130, 246, 0.1);
  color: #3b82f6;
}

.stat-label {
  font-size: 0.9rem;
  color: var(--text-sub);
  margin-bottom: 4px;
}

.stat-value {
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--text-main);
}

/* --- MOBİL VE TABLET UYUMLULUK (1024px ALTI) --- */
.mobile-header {
  display: none;
}

/* Masaüstünde gizle */

@media (max-width: 1024px) {

  /* 1. Mobil Header'ı Göster */
  .mobile-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    /* dikey ortalama */
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 60px;
    background: var(--primary);
    color: white;
    padding: 0 1rem;
    z-index: 2000;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  }

  .mobile-menu-btn {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    border-radius: 4px;
    padding: 8px;
    line-height: 1;
    /* ikon ortalaması */
    display: flex;
    align-items: center;
    /* dikey ortalama */
    justify-content: center;
  }

  .mobile-header .brand-mobile {
    display: flex;
    flex-direction: row;
    align-items: center;
    /* logo + yazı ortalanır */
    gap: 10px;
    font-weight: 700;
    font-size: 1.5rem;
    color: white;
    margin-bottom: 0;
    align-self: center;
  }

  .mobile-header .brand-text {
    color: white;
  }

  .brand-mobile img {
    width: 40px;
    height: 40px;
    object-fit: contain;
    background: none;
    border-radius: 4px;
    padding: 0;
    margin: 0;
  }

  .logo img {
    width: 40px;
    height: 40px;
  }

  .logo {
    background: none;
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .brand-text {
    display: block;
  }

  /* 2. Sidebar'ı Gizle */
  .sidebar {
    left: -100% !important;
    top: 60px;
    height: calc(100vh - 60px);
    width: 260px;
    z-index: 1999;
    box-shadow: 4px 0 15px rgba(0, 0, 0, 0.2);
    transition: left 0.3s ease-in-out;
    border-right: none;
    display: flex;
  }

  .sidebar.active {
    left: 0 !important;
  }

  .sidebar .brand {
    display: none;
  }

  /* 3. Ana İçeriği Tam Ekran Yap */
  .main-content {
    margin-left: 0 !important;
    width: 100% !important;
    padding: 1rem;
    padding-top: 80px;
  }

  .top-bar {
    flex-direction: column-reverse;
    align-items: flex-start;
    gap: 1rem;
  }

  .user-profile {
    width: 100%;
    justify-content: space-between;
  }
}

/* --- DAHA KÜÇÜK EKRANLAR (768px ve altı) --- */
@media (max-width: 768px) {

  .auth-box,
  .card,
  .modal-content,
  .stat-card {
    padding: 1rem !important;
    border-radius: 10px !important;
    font-size: 0.98rem;
  }

  .hero-title {
    font-size: 2rem !important;
  }

  .brand,
  .brand-mobile {
    font-size: 2rem !important;
  }

  .main-content {
    padding: 0.5rem !important;
    padding-top: 70px !important;
  }

  .input-group input,
  .input-group select,
  .input-group textarea {
    padding: 10px !important;
    font-size: 1rem !important;
  }

  .btn {
    padding: 8px 14px !important;
    font-size: 1rem !important;
  }

  .stats-grid {
    gap: 10px !important;
  }
}

/* --- EN KÜÇÜK EKRANLAR (480px ve altı) --- */
@media (max-width: 480px) {

  .auth-box,
  .card,
  .modal-content,
  .stat-card {
    padding: 0.5rem !important;
    border-radius: 8px !important;
  }

  .user-profile {
    flex-direction: row !important;
    gap: 8px;
    padding: 6px 8px !important;
    align-items: center !important;
    justify-content: flex-start !important;
  }

  .brand,
  .brand-mobile {
    font-size: 1.3rem !important;
  }

  .main-content {
    padding: 0.2rem !important;
    padding-top: 65px !important;
  }

  .input-group input,
  .input-group select,
  .input-group textarea {
    padding: 8px !important;
    font-size: 0.95rem !important;
  }

  .btn {
    padding: 7px 10px !important;
    font-size: 0.95rem !important;
  }

  .stats-grid {
    gap: 6px !important;
  }

  .modal-content {
    max-width: 98vw !important;
  }

  .sidebar {
    width: 90vw !important;
    min-width: 0 !important;
  }

  .user-profile {
    flex-direction: column;
    gap: 8px;
    padding: 6px 8px !important;
  }

  .top-bar {
    gap: 0.5rem !important;
  }
}

/* --- TOAST BİLDİRİMLERİ --- */
.toast {
  position: fixed;
  top: 20px;
  right: 20px;
  padding: 12px 20px;
  border-radius: 8px;
  color: white;
  font-weight: 500;
  z-index: 10000;
  opacity: 0;
  transform: translateY(-20px);
  transition:
    opacity 0.3s ease,
    transform 0.3s ease;
  max-width: 300px;
  word-wrap: break-word;
}

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

.toast-success {
  background: var(--success);
  color: white;
}

.toast-error {
  background: var(--danger);
  color: white;
}

.toast-danger {
  background: var(--danger);
  color: white;
}

.toast-warning {
  background: #dc2626;
  color: white;
}

.toast-info {
  background: #3b82f6;
  color: white;
}

.btn-whatsapp {
  background-color: #25D366 !important;
  color: white !important;
  border: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 12px;
  border-radius: 6px;
  font-size: 0.9rem;
  font-weight: 500;
  transition: background-color 0.2s;
  text-decoration: none;
}

.btn-whatsapp:hover {
  background-color: #128c7e !important;
  color: white !important;
}

.btn-whatsapp i {
  margin-right: 5px;
  font-size: 1.1rem;
}