/*
  style.css
  Lila Global Şube Takip Sistemi - Ana stil dosyası
  Versiyon: 5.1.4
  Bağımlılıklar: Bootstrap, FontAwesome, Google Fonts
*/
:root {
  /* Coffee House Palette */
  --primary-coffee: #4E342E;
  --secondary-coffee: #795548;
  --accent-gold: #FFD700;
  --accent-cream: #D7CCC8;
  --bg-cream: #F9F9F9;
  /* Neutral Off-White */

  /* Mappings */
  --primary-blue: #4E342E;
  /* Dark Coffee */
  --accent-pink: #795548;
  /* Medium Roast */
  --accent-yellow: #C5A065;
  /* Muted Gold/Bronze */
  --deep-purple: #3E2723;
  /* Espresso */
  --bg-light: #F9F9F9;
  /* Neutral Off-White instead of yellow-cream */
  --dark-text: #3E2723;
  /* Dark Brown Text */
  --light-text: #FFFFFF;
  --success-green: #388E3C;
  --warning-orange: #F57F17;
  --shadow: 0 4px 12px rgba(62, 39, 35, 0.15);
  --border-radius: 14px;
  --card-bg: #FFFFFF;
  --table-hover: #EFEBE9;
  --loading-bg: rgba(249, 249, 249, 0.95);
  --glass-bg: rgba(255, 255, 255, 0.8);
  --glass-blur: 16px;
  --transition: all 0.2s ease-out;

  /* Fuchsia Compatibility Mappings */
  --fuchsia-lightest: #F5F5F5;
  --fuchsia-light: #D7CCC8;
  --fuchsia-main: #6D4C41;
  /* Primary for buttons */
  --fuchsia-medium: #5D4037;
  --fuchsia-dark: #3E2723;
  --fuchsia-gradient: linear-gradient(135deg, #6D4C41, #3E2723);
}

body {
  font-family: 'Poppins', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  background-color: var(--bg-light);
  color: var(--dark-text);
  margin: 0;
  padding: 0;
  transition: var(--transition);
  padding-bottom: 70px;
  /* Mobil performans optimizasyonları */
  -webkit-overflow-scrolling: touch;
  touch-action: pan-y;
  will-change: scroll-position;
}

html,
body {
  overflow-x: hidden;
}

.card-header {
  background-color: var(--card-bg);
  border-bottom: 1px solid var(--primary-blue);
  padding: 0.8rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.card-header h5 {
  margin: 0;
  color: var(--primary-blue);
  font-weight: 600;
  font-size: 1.2rem;
}

.card-header h5 i {
  color: var(--accent-pink);
}

.btn.btn-primary {
  background: linear-gradient(90deg, #6D4C41 0%, #3E2723 100%) !important;
  color: #fff !important;
  border: none;
  font-weight: 600;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(62, 39, 35, 0.15);
  text-shadow: 0 1px 4px rgba(62, 39, 35, 0.15);
  transition: background 0.2s, filter 0.2s;
}

.btn.btn-primary:hover,
.btn.btn-primary:focus {
  background: linear-gradient(90deg, #5D4037 0%, #3E2723 100%) !important;
  color: #fff !important;
  filter: brightness(1.08);
}

.btn-success {
  background: linear-gradient(90deg, var(--success-green), #38f9d7);
  color: var(--light-text);
  border: none;
  font-weight: 700;
  border-radius: var(--border-radius);
  box-shadow: 0 2px 8px rgba(67, 233, 123, 0.10);
  transition: var(--transition);
}

.btn-success:hover {
  background: linear-gradient(90deg, #38f9d7, var(--success-green));
}

.btn-warning {
  background: var(--warning-orange);
  color: var(--light-text);
  border: none;
  font-weight: 700;
  border-radius: var(--border-radius);
  box-shadow: 0 2px 8px rgba(251, 169, 44, 0.10);
  transition: var(--transition);
}

.btn-warning:hover {
  background: #ffb300;
}

.table th {
  background: var(--primary-blue);
  color: var(--light-text);
  font-weight: 600;
  border-bottom: 2px solid var(--accent-yellow);
  padding: 12px 15px;
}

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

footer {
  background: rgba(245, 247, 250, 0.95);
  color: var(--primary-blue) !important;
  border-top: 1px solid #e0e7ef;
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: 0.5px;
  box-shadow: 0 -2px 12px rgba(62, 39, 35, 0.15);
  backdrop-filter: blur(8px);
  transition: var(--transition);
}

footer p {
  color: var(--deep-purple) !important;
  margin: 0;
  font-weight: 500;
}

/* Kartlar, modal, input, badge, progress ve diğer ana bileşenlerde de yeni renkler uygulanacak. Tüm eski fuchsia ve pembe tonları kaldırıldı. */

/* Diğer stiller ve responsive ayarlar aşağıda aynı şekilde devam edecek, sadece renkler yeni palete göre güncellendi. */

/* body.dark-mode ve ilgili tüm koyu mod stilleri kaldırıldı */

/* Diğer modern efektler ve açık tema devam ediyor */

/* Ana stiller */
body {
  font-family: 'Poppins', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  background-color: var(--bg-light);
  color: var(--dark-text);
  margin: 0;
  padding: 0;
  transition: all 0.3s ease;
  padding-bottom: 70px;
}

body.dark-mode {
  background: var(--dark-gradient), var(--dark-dots);
  background-blend-mode: overlay;
  color: var(--dark-text);
}

body.dark-mode .card,
body.dark-mode .main-card,
body.dark-mode .modal-content,
body.dark-mode .kpi-card,
body.dark-mode .performance-detail-card {
  background: var(--dark-card) !important;
  color: var(--dark-text) !important;
  box-shadow: var(--dark-shadow);
  border: 1px solid var(--dark-border);
  backdrop-filter: blur(var(--dark-glass-blur));
}

body.dark-mode .card-header,
body.dark-mode .modal-header {
  background: var(--dark-gradient-accent);
  color: #fff !important;
  border-bottom: 1px solid var(--dark-border);
}

body.dark-mode .btn-primary,
body.dark-mode .btn-success,
body.dark-mode .btn-secondary {
  background: var(--dark-gradient-accent) !important;
  color: #fff;
  border: none;
  box-shadow: var(--dark-btn-glow);
  transition: var(--transition);
}

body.dark-mode .btn-primary:hover,
body.dark-mode .btn-success:hover,
body.dark-mode .btn-secondary:hover {
  filter: brightness(1.08) saturate(1.2);
  box-shadow: 0 0 24px #79554877;
}

body.dark-mode .card-header h5,
body.dark-mode .modal-title,
body.dark-mode .kpi-content h3 {
  color: var(--dark-accent);
  text-shadow: 0 2px 8px #79554822;
}

body.dark-mode .kpi-icon,
body.dark-mode .card-header h5 i,
body.dark-mode .modal-title i {
  color: var(--dark-accent2) !important;
}

body.dark-mode .branch-card-stat-value,
body.dark-mode .performance-indicator .text-success,
body.dark-mode .performance-indicator .text-danger {
  color: var(--dark-accent2) !important;
}

body.dark-mode .card-header small,
body.dark-mode .modal-header small,
body.dark-mode .card-body,
body.dark-mode .performance-detail-card,
body.dark-mode .performance-indicator span,
body.dark-mode .detail-label {
  color: var(--dark-text-soft) !important;
}

body.dark-mode .table,
body.dark-mode .table th,
body.dark-mode .table td {
  background: transparent !important;
  color: var(--dark-text-soft) !important;
  border-color: var(--dark-border) !important;
}

body.dark-mode .modal-content {
  background: var(--dark-glass) !important;
  border: 1px solid var(--dark-border);
}

body.dark-mode footer {
  background: var(--dark-footer-bg);
  color: #fff !important;
  border-top: 1px solid var(--dark-footer-border);
  box-shadow: 0 -2px 24px rgba(24, 28, 40, 0.18);
}

body.dark-mode .toast {
  background: var(--dark-toast-bg);
  color: #fff;
  border: 1px solid var(--dark-toast-border);
  box-shadow: var(--dark-toast-shadow);
}

body.dark-mode #darkModeToggle {
  background: var(--dark-gradient-accent);
  color: #fff;
  box-shadow: 0 4px 24px #79554833;
}

body.dark-mode #darkModeToggle:hover {
  filter: brightness(1.1);
}

/* Navbar */
.navbar {
  box-shadow: var(--shadow);
  background: linear-gradient(90deg, #3E2723 0%, #5D4037 100%) !important;
  /* Espresso Gradient */
  padding: 10px 0;
  border-bottom: none;
  overflow-x: auto;
  white-space: nowrap;
}

.navbar .navbar-brand,
.navbar .nav-link {
  color: var(--light-text) !important;
  font-weight: 600;
  letter-spacing: 0.5px;
  font-size: 1.1rem;
  transition: color 0.2s;
  white-space: nowrap !important;
  padding-left: 0.7rem;
  padding-right: 0.7rem;
}

.navbar .nav-link:hover,
.navbar .nav-link.active {
  color: #FFD700 !important;
  /* Gold vurgu */
  text-shadow: 0 2px 8px rgba(255, 215, 0, 0.18);
}

.navbar .navbar-brand i {
  animation: pulse 2s infinite;
  color: #FFD700;
}

/* Container üst margin azaltıldı */
.container.mt-4 {
  margin-top: 10px !important;
}

/* Kartlar */
.card {
  border-radius: var(--border-radius);
  border: none;
  box-shadow: var(--shadow);
  margin-bottom: 1rem;
  overflow: hidden;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  background: var(--glass-bg);
  backdrop-filter: blur(var(--glass-blur));
  box-shadow: 0 8px 32px rgba(62, 39, 35, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.18);
  transition: var(--transition);
}

.card.main-card {
  margin-top: 10px;
}

.card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 16px rgba(121, 85, 72, 0.2);
}

.card-header {
  background-color: var(--card-bg);
  border-bottom: 1px solid var(--accent-cream);
  padding: 0.8rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.card-header h5 {
  margin: 0;
  color: var(--fuchsia-dark);
  font-weight: 600;
  font-size: 1.2rem;
}

.card-header h5 i {
  color: var(--fuchsia-medium);
}

.card-body {
  padding: 1rem;
  background-color: var(--card-bg);
  position: relative;
  /* Chart.js'in doğru boyutlandırma yapabilmesi için eklendi */
}

/* Şube Kartları */
.branch-card {
  border-radius: var(--border-radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  margin-bottom: 1.5rem;
  background-color: var(--card-bg);
  transition: all 0.3s ease;
  cursor: pointer;
  height: 100%;
  max-width: 300px;
  margin-left: auto;
  margin-right: auto;
}

.branch-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 8px 20px rgba(121, 85, 72, 0.3);
}

.branch-card-img-container {
  position: relative;
  width: 100%;
  height: 220px;
  overflow: hidden;
  background: linear-gradient(135deg, #8D6E63, #3E2723);
}

.branch-card-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center center;
  transition: all 0.3s ease;
}

.branch-card:hover .branch-card-img {
  transform: scale(1.05);
}

.branch-card-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.7), transparent);
  padding: 15px;
  color: white;
}

.branch-card-overlay h5 {
  margin: 0;
  font-weight: 600;
  font-size: 1.1rem;
}

.branch-card-body {
  padding: 15px;
}

.branch-card-stat {
  display: flex;
  align-items: center;
  margin-bottom: 8px;
}

.branch-card-stat i {
  color: var(--fuchsia-medium);
  width: 20px;
  margin-right: 8px;
}

.branch-card-stat-label {
  color: var(--dark-text);
  font-size: 0.85rem;
  font-weight: 500;
}

.branch-card-stat-value {
  margin-left: auto;
  font-weight: 600;
  color: var(--fuchsia-dark);
}

.branch-detail-img {
  width: 100%;
  max-width: 200px;
  height: 150px;
  object-fit: cover;
  border-radius: 8px;
  margin: 0 auto;
  display: block;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.branch-detail-img.default-branch-img {
  background-color: #f8f9fa;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  color: #6c757d;
}

/* Tablolar */
.table {
  border-collapse: separate;
  border-spacing: 0;
  width: 100%;
}

.table th {
  font-weight: 600;
  background-color: var(--fuchsia-lightest);
  color: var(--fuchsia-dark);
  border-bottom: 2px solid var(--fuchsia-light);
  padding: 12px 15px;
}

.table th i {
  color: var(--fuchsia-medium);
}

.table td {
  padding: 12px 15px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
  vertical-align: middle;
}

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

/* Şube Sıralama Tablosu */
#branchRankingTable {
  font-size: 0.9rem;
}

#branchRankingTable th {
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

#branchRankingTable td {
  font-size: 0.9rem;
  padding: 10px 12px;
}

#branchRankingTable tbody tr:nth-child(1) {
  background: linear-gradient(135deg, rgba(255, 215, 0, 0.1), rgba(255, 215, 0, 0.05));
  border-left: 4px solid #FFD700;
}

#branchRankingTable tbody tr:nth-child(2) {
  background: linear-gradient(135deg, rgba(192, 192, 192, 0.1), rgba(192, 192, 192, 0.05));
  border-left: 4px solid #C0C0C0;
}

#branchRankingTable tbody tr:nth-child(3) {
  background: linear-gradient(135deg, rgba(205, 127, 50, 0.1), rgba(205, 127, 50, 0.05));
  border-left: 4px solid #CD7F32;
}

/* Sıralama Badge'leri */
.badge {
  font-size: 0.75rem;
  font-weight: 600;
  padding: 4px 8px;
  border-radius: 12px;
}

.badge.bg-warning {
  background-color: #FFD700 !important;
  color: #000 !important;
}

.badge.bg-secondary {
  background-color: #6c757d !important;
  color: #fff !important;
}

.badge.bg-info {
  background-color: #8D6E63 !important;
  color: #fff !important;
}

.badge.bg-light {
  background-color: #f8f9fa !important;
  color: #6c757d !important;
  border: 1px solid #dee2e6;
}

/* Tarih filtresi */
.date-range {
  width: 100%;
  max-width: 600px;
  margin: 0 auto;
}

.input-group {
  border-radius: var(--border-radius);
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(121, 85, 72, 0.2);
}

.input-group input,
.input-group .input-group-text {
  border: 1px solid var(--fuchsia-light);
  padding: 8px 6px;
  font-size: 0.75rem;
}

.input-group .input-group-text {
  background-color: var(--fuchsia-light);
  color: white;
  border-color: var(--fuchsia-light);
}

/* Tarih inputları için özel stil */
input[type="date"] {
  font-size: 0.7rem;
  padding: 6px 4px;
  width: 100%;
}

.btn-primary {
  background-color: var(--fuchsia-main) !important;
  border-color: var(--fuchsia-main) !important;
  padding: 6px 12px;
  font-weight: 600;
  letter-spacing: 0.5px;
  font-size: 0.75rem;
  box-shadow: 0 2px 8px rgba(121, 85, 72, 0.3);
  transition: all 0.3s ease;
}

.btn-primary:hover {
  background-color: var(--fuchsia-dark) !important;
  border-color: var(--fuchsia-dark) !important;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(121, 85, 72, 0.4);
}

/* Şube Kartları Satırı İçin Margin */
#branchCards {
  margin-top: 0.5rem;
}

/* Modal Stilleri */
.modal-content,
.glass-modal,
.animate__animated.animate__fadeInDown {
  background: #f5f7fa !important;
  border-radius: 14px !important;
  box-shadow: 0 4px 24px rgba(62, 39, 35, 0.15);
  border: 1px solid #e3eafc;
  color: #22223B;
  backdrop-filter: blur(8px) !important;
  -webkit-backdrop-filter: blur(8px) !important;
  animation: fadeInUp 0.5s cubic-bezier(.4, 2, .6, 1);
  transition: background 0.3s, box-shadow 0.3s;
}

.modal-content h5,
.modal-content h6,
.modal-content .modal-title,
.glass-modal h5,
.glass-modal h6,
.glass-modal .modal-title {
  color: #22223B;
  font-weight: 700;
  letter-spacing: 0.5px;
  text-shadow: none;
}

.modal-header {
  background: linear-gradient(to right, var(--deep-purple), var(--secondary-coffee));
  color: white;
  border-bottom: none;
  padding: 1.5rem;
  position: relative;
}

.modal-header::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(to right, var(--fuchsia-light), var(--fuchsia-medium));
}

.modal-title {
  font-weight: 700;
  font-size: 1.5rem;
  letter-spacing: 0.5px;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.modal-title i {
  font-size: 1.2rem;
  opacity: 0.9;
}

.modal-body {
  padding: 2rem;
}

.modal .card {
  border: none;
  box-shadow: 0 4px 15px rgba(121, 85, 72, 0.1);
  transition: all 0.3s ease;
}

.modal .card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 25px rgba(121, 85, 72, 0.15);
}

.modal .card-header {
  background: transparent;
  border-bottom: 2px solid var(--fuchsia-light);
  padding: 1rem 1.5rem;
}

.modal .card-header h6 {
  color: var(--fuchsia-dark);
  font-weight: 600;
  font-size: 1.1rem;
  margin: 0;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.modal .card-header h6 i {
  color: var(--fuchsia-medium);
  font-size: 1rem;
}

.modal .card-body {
  padding: 1.5rem;
}

/* Detay Bilgileri Stilleri */
.detail-info-item {
  display: flex;
  align-items: center;
  padding: 8px;
  border-radius: 8px;
  background: rgba(121, 85, 72, 0.05);
  margin-bottom: 8px;
}

.detail-info-icon {
  width: 32px;
  height: 32px;
  min-width: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(121, 85, 72, 0.1);
  border-radius: 8px;
  margin-right: 12px;
}

.detail-info-icon i {
  color: #795548;
  font-size: 14px;
}

.detail-info-content {
  flex: 1;
  min-width: 0;
}

.detail-info-label {
  font-size: 11px;
  color: #6c757d;
  margin-bottom: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.detail-info-value {
  font-size: 13px;
  font-weight: 600;
  color: #212529;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Progress Bar Stilleri */
.progress {
  height: 8px;
  background-color: var(--fuchsia-lightest);
  border-radius: 4px;
  overflow: hidden;
  margin: 0.5rem 0;
}

.progress-bar {
  background: linear-gradient(to right, var(--fuchsia-main), var(--fuchsia-dark));
  transition: width 0.6s ease;
}

/* Grafik Konteyner Stilleri (NİHAİ DÜZENLEME) */
.chart-container {
  position: relative;
  width: 100%;
  height: 280px;
  /* Sabit bir yükseklik */
  min-height: 280px;
  /* Asla 280px'den küçük olmamasını garantile */
  padding: 10px;
  margin-bottom: 15px;
}

.chart-container canvas {
  position: absolute;
  top: 0;
  left: 0;
  width: 100% !important;
  height: 100% !important;
}

/* Chart.js Legend Stilleri */
.chartjs-legend {
  font-family: 'Poppins', sans-serif !important;
  font-weight: 500 !important;
  line-height: 1.4 !important;
  margin-top: 15px !important;
}

.chartjs-legend-item {
  margin-bottom: 8px !important;
  padding: 4px 0 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
}

.chartjs-legend-text {
  font-size: 12px !important;
  color: #333 !important;
  white-space: pre-line !important;
  text-align: center !important;
}

/* Mobilde grafik tıklama bilgisi için özel stil */
@media (max-width: 768px) {
  .chart-header h6 small {
    display: none;
    /* Mobilde tıklama bilgisini gizle */
  }

  .card-header small {
    display: none;
    /* Mobilde tıklama bilgisini gizle */
  }

  .chartjs-legend {
    margin-top: 10px !important;
  }

  .chartjs-legend-item {
    margin-bottom: 6px !important;
    padding: 3px 0 !important;
  }

  .chartjs-legend-text {
    font-size: 11px !important;
  }
}

/* Performans Göstergeleri */
.performance-indicator {
  display: flex;
  align-items: center;
  padding: 12px;
  border-radius: 8px;
  background: rgba(121, 85, 72, 0.05);
  margin-bottom: 8px;
  transition: all 0.3s ease;
}

.performance-indicator:hover {
  background: rgba(121, 85, 72, 0.1);
  transform: translateY(-2px);
}

.performance-indicator i {
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(121, 85, 72, 0.1);
  border-radius: 6px;
  margin-right: 12px;
  color: #795548;
  font-size: 14px;
  flex-shrink: 0;
}

.performance-indicator span {
  font-size: 13px;
  color: #212529;
  font-weight: 500;
}

.performance-indicator .flex-grow-1 {
  flex-grow: 1;
  min-width: 0;
}

.performance-indicator small {
  font-size: 11px;
  opacity: 0.8;
  display: block;
}

.performance-indicator .text-success {
  color: #28a745 !important;
  font-weight: 600;
}

.performance-indicator .text-danger {
  color: #dc3545 !important;
  font-weight: 600;
}

/* Footer */
footer {
  background: rgba(255, 255, 255, 0.15);
  color: #222 !important;
  border-top: 1px solid #eee;
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: 0.5px;
  box-shadow: 0 -2px 12px rgba(219, 54, 142, 0.07);
  backdrop-filter: blur(8px);
  transition: var(--transition);
}

body.dark-mode footer {
  background: rgba(24, 24, 36, 0.7);
  color: #fff !important;
  border-top: 1px solid #232336;
}

footer p {
  color: rgb(69, 11, 11) !important;
  margin: 0;
  font-weight: 500;
}

/* Yüklenme animasyonu */
.loading {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: var(--loading-bg);
  z-index: 9999;
  justify-content: center;
  align-items: center;
}

.loading.active {
  display: flex;
}

.loading-spinner {
  width: 50px;
  height: 50px;
  border: 5px solid var(--fuchsia-light);
  border-top-color: var(--fuchsia-dark);
  border-radius: 50%;
  animation: spinner 1s linear infinite;
}

/* Responsive ayarlar */
@media (max-width: 991px) {
  .card-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .date-range {
    margin-top: 15px;
    width: 100%;
    max-width: 100%;
  }

  .navbar .nav-link,
  .navbar .navbar-brand {
    font-size: 0.95rem !important;
    white-space: nowrap !important;
    padding-left: 0.7rem;
    padding-right: 0.7rem;
  }
}

@media (max-width: 768px) {
  .container {
    padding: 0 15px;
  }

  .card {
    margin-left: 0;
    margin-right: 0;
    border-radius: 8px;
  }

  .card-header,
  .card-body {
    padding: 15px;
  }

  .table th,
  .table td {
    padding: 10px;
  }

  canvas {
    /* height: auto !important; Bu kural sorun yaratabilir, kaldırıldı veya düzenlendi */
    max-width: 100%;
  }

  .row {
    margin-left: 0;
    margin-right: 0;
  }

  .col-md-6,
  .col-md-12,
  .col-md-3 {
    padding-left: 10px;
    padding-right: 10px;
  }

  .branch-card {
    max-width: 100%;
  }

  .branch-card-img-container {
    height: 200px;
  }

  h6 {
    font-size: 1rem;
    margin-top: 10px;
  }

  .navbar-brand {
    font-size: 1.2rem;
  }

  .input-group input,
  .input-group .input-group-text,
  .btn-primary {
    padding: 8px 12px;
    font-size: 0.9rem;
  }

  footer {
    margin-top: 1rem !important;
  }

  /* .chart-container için eski medya sorgusu kaldırıldı */

  #branchRankingTable {
    font-size: 0.8rem;
  }

  #branchRankingTable th,
  #branchRankingTable td {
    padding: 8px 6px;
  }

  #branchRankingTable th:nth-child(5),
  #branchRankingTable th:nth-child(6),
  #branchRankingTable th:nth-child(7),
  #branchRankingTable th:nth-child(8),
  #branchRankingTable th:nth-child(9),
  #branchRankingTable td:nth-child(5),
  #branchRankingTable td:nth-child(6),
  #branchRankingTable td:nth-child(7),
  #branchRankingTable td:nth-child(8),
  #branchRankingTable td:nth-child(9) {
    display: none;
  }

  /* KPI kartları mobilde tam genişlikte ve alt alta */
  #kpiCards {
    display: grid !important;
    grid-template-columns: repeat(3, 1fr) !important;
    gap: 0.7rem !important;
    max-width: 100%;
    margin: 0 auto 1.2rem auto;
  }

  .kpi-card {
    min-width: 0 !important;
    max-width: 100% !important;
    width: 100% !important;
    min-height: 90px;
    padding: 0.7rem 0.3rem 0.7rem 0.3rem !important;
    margin: 0 !important;
    border-radius: 10px;
    box-shadow: 0 1px 4px rgba(219, 54, 142, 0.05);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
  }

  .kpi-icon {
    font-size: 1.2rem;
    margin-bottom: 0.3rem;
  }

  .kpi-content h3 {
    font-size: 1.1rem;
    margin-bottom: 0.2rem;
  }

  .kpi-content p {
    font-size: 0.85rem;
  }

  /* Dashboard başlığı ve açıklama ortalanmış ve küçük */
  .card-header h5,
  .card-header small {
    text-align: center;
    font-size: 1rem;
    width: 100%;
    display: block;
  }

  /* Navbar ve butonlar daha büyük */
  .navbar .navbar-brand {
    font-size: 1rem;
    padding: 0.6rem 0;
  }

  .navbar .nav-link {
    font-size: 0.95rem;
    padding: 0.7rem 0.8rem;
  }

  button,
  .btn {
    font-size: 1rem;
    min-height: 44px;
    min-width: 44px;
  }

  /* Tablolar yatay kaydırılabilir ve daha küçük font/padding */
  .table-responsive {
    overflow-x: auto;
  }

  table {
    font-size: 0.92rem;
  }

  th,
  td {
    padding: 0.4rem 0.5rem;
  }

  /* Kart köşeleri ve gölgeler sade */
  .main-card,
  .kpi-card {
    border-radius: 10px;
    box-shadow: 0 1px 4px rgba(219, 54, 142, 0.05);
  }

  /* Genel dokunmatik alanlar */
  .input-group,
  .form-control,
  .form-select {
    min-height: 44px;
    font-size: 1rem;
  }

  /* Metin kısaltma ve satır atlatma */
  .kpi-content p,
  .card-header small {
    white-space: normal;
    word-break: break-word;
  }

  /* Performans Dashboard ve Ürün Satış Raporu kartları 3 sütunlu grid */
  #kpiCards,
  #productMetricsCards {
    display: grid !important;
    grid-template-columns: repeat(4, 1fr) !important;
    gap: 0.15rem;
    padding: 0;
  }

  .kpi-card {
    min-width: 0 !important;
    max-width: 100% !important;
    width: 100% !important;
    min-height: 90px;
    padding: 0.15rem 0.05rem;
    margin: 0 !important;
    border-radius: 10px;
    box-shadow: 0 1px 4px rgba(219, 54, 142, 0.05);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
  }

  .kpi-icon {
    font-size: 20px;
    margin-bottom: 0.1rem;
  }

  .kpi-content h3 {
    font-size: 0.7rem;
    margin-bottom: 0.05rem;
  }

  .kpi-content p {
    font-size: 0.55rem;
    margin-bottom: 0;
  }

  .hide-mobile {
    display: none !important;
  }

  #productBranchSelect,
  #loadProductSalesBtn {
    height: 36px !important;
    min-height: 36px !important;
    font-size: 0.95rem !important;
    display: inline-flex !important;
    align-items: center !important;
    vertical-align: middle !important;
    box-sizing: border-box;
  }

  #productBranchSelect {
    padding: 0.25rem 0.7rem !important;
    min-width: 110px !important;
    border-radius: 7px !important;
    margin-right: 0.2rem !important;
  }

  #loadProductSalesBtn {
    padding: 0.25rem 0.7rem !important;
    min-width: 90px !important;
    border-radius: 7px !important;
    justify-content: center !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
  }

  #loadProductSalesBtn i {
    font-size: 1.1rem !important;
    margin-right: 0.18rem !important;
  }

  #loadProductSalesBtn {
    font-size: 0.82rem !important;
  }
}

/* Animasyonlar */
@keyframes fadeIn {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

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

@keyframes pulse {
  0% {
    opacity: 1;
  }

  50% {
    opacity: 0.5;
  }

  100% {
    opacity: 1;
  }
}

.card,
.chart-container,
.branch-card {
  animation: fadeIn 0.5s ease-in-out;
}

/* Detay bilgileri için daha kompakt görünüm */
.branch-detail-info {
  margin-top: 1rem;
}

.branch-detail-info .row {
  margin-bottom: 0.5rem;
}

.branch-detail-info .col-md-6 {
  padding: 0.5rem;
}

/* Finansal bilgiler kartı */
.financial-info-card {
  background: #fff;
  border-radius: 8px;
  padding: 1rem;
  margin-bottom: 1rem;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

/* Ödeme dağılımı kartı */
.payment-distribution-card {
  background: #fff;
  border-radius: 8px;
  padding: 1rem;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

/* İkon ve metin boyutlarını küçült */
.branch-detail-info i {
  font-size: 0.9rem;
}

.branch-detail-info .small {
  font-size: 0.8rem;
}

.branch-detail-info .fw-bold {
  font-size: 0.95rem;
}

/* Responsive Düzenlemeler */
@media (max-width: 768px) {
  .modal-body {
    padding: 1rem;
  }

  .detail-info-item {
    padding: 0.8rem;
  }

  .detail-info-icon {
    width: 35px;
    height: 35px;
    font-size: 1rem;
  }

  .detail-info-value {
    font-size: 1rem;
  }

  .chart-container {
    padding: 1rem;
  }
}

/* Ürün Satış Raporu Stilleri */
#productSalesTable {
  font-size: 0.9rem;
}

#productSalesTable th {
  background-color: var(--fuchsia-lightest);
  color: var(--fuchsia-dark);
  font-weight: 600;
  border-bottom: 2px solid var(--fuchsia-light);
  padding: 12px 8px;
}

#productSalesTable td {
  padding: 10px 8px;
  vertical-align: middle;
  border-bottom: 1px solid var(--fuchsia-lightest);
}

#productSalesTable tbody tr:hover {
  background-color: var(--fuchsia-lightest);
  transform: scale(1.01);
  transition: all 0.2s ease;
}

#productSalesTable tbody tr:nth-child(1) {
  background-color: rgba(219, 54, 142, 0.1);
  font-weight: 600;
}

#productSalesTable tbody tr:nth-child(2) {
  background-color: rgba(199, 21, 133, 0.08);
}

#productSalesTable tbody tr:nth-child(3) {
  background-color: rgba(229, 94, 168, 0.06);
}

/* Ürün satış metrik kartları */
#productMetricsCards {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  width: 100%;
  min-width: 0;
  margin-bottom: 1rem;
  align-items: stretch;
  margin-left: auto;
  margin-right: auto;
  justify-content: center;
  border: none !important;
  box-shadow: none !important;
}

#productMetricsCards .kpi-card {
  min-width: 0;
  min-height: 0;
  height: 100%;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  background: linear-gradient(135deg, var(--fuchsia-lightest), var(--fuchsia-light));
  border: none !important;
  box-shadow: none !important;
  border-radius: var(--border-radius);
  padding: 1rem 0.2rem;
  transition: all 0.3s ease;
  align-self: stretch;
}

#productMetricsCards .kpi-icon {
  width: 32px;
  height: 32px;
  font-size: 1.2rem;
  margin-bottom: 0.2rem;
}

#productMetricsCards .kpi-content h3 {
  font-size: 1rem;
  margin-bottom: 0.1rem;
}

#productMetricsCards .kpi-content p {
  font-size: 0.85rem;
  margin-bottom: 0;
}

@media (max-width: 768px) {
  #productMetricsCards {
    grid-template-columns: repeat(4, 1fr) !important;
    gap: 0.15rem;
    padding: 0;
  }

  #productMetricsCards .kpi-card {
    padding: 0.15rem 0.05rem;
  }

  #productMetricsCards .kpi-icon {
    width: 20px;
    height: 20px;
    font-size: 0.7rem;
    margin-bottom: 0.1rem;
  }

  #productMetricsCards .kpi-content h3 {
    font-size: 0.7rem;
    margin-bottom: 0.05rem;
  }

  #productMetricsCards .kpi-content p {
    font-size: 0.55rem;
    margin-bottom: 0;
  }
}

/* Şube seçim dropdown'u */
#productBranchSelect {
  border: 2px solid var(--fuchsia-light);
  border-radius: 8px;
  font-weight: 500;
  color: var(--fuchsia-dark);
  transition: all 0.3s ease;
}

#productBranchSelect:focus {
  border-color: var(--fuchsia-main);
  box-shadow: 0 0 0 0.2rem rgba(219, 54, 142, 0.25);
}

#productBranchSelect option {
  font-weight: 500;
}

/* Ürün satış grafikleri */
#topProductsChart,
#productSalesDistributionChart {
  border-radius: var(--border-radius);
  background-color: var(--card-bg);
}

/* Responsive tasarım */
@media (max-width: 768px) {
  #productSalesTable {
    font-size: 0.8rem;
  }

  #productSalesTable th,
  #productSalesTable td {
    padding: 8px 4px;
  }

  #productMetricsCards .kpi-card {
    padding: 0.75rem;
  }

  #productMetricsCards .kpi-icon {
    width: 40px;
    height: 40px;
    font-size: 1rem;
  }

  #productMetricsCards .kpi-content h3 {
    font-size: 1.2rem;
  }

  #productMetricsCards .kpi-content p {
    font-size: 0.8rem;
  }

  #productBranchSelect {
    width: 100% !important;
    margin-bottom: 0.5rem;
  }
}

@media (max-width: 576px) {
  #productSalesTable {
    font-size: 0.75rem;
  }

  #productSalesTable th,
  #productSalesTable td {
    padding: 6px 2px;
  }

  #productMetricsCards .kpi-card {
    padding: 0.5rem;
  }

  #productMetricsCards .kpi-icon {
    width: 35px;
    height: 35px;
    font-size: 0.9rem;
  }

  #productMetricsCards .kpi-content h3 {
    font-size: 1rem;
  }

  #productMetricsCards .kpi-content p {
    font-size: 0.75rem;
  }
}

/* Rapor sayfası stilleri */
.report-form {
  background: linear-gradient(135deg, #4E342E 0%, #795548 100%);
  border-radius: 15px;
  padding: 2rem;
  margin-bottom: 2rem;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.report-form h5 {
  color: white;
  margin-bottom: 1.5rem;
  font-weight: 600;
}

.report-form .form-label {
  color: white;
  font-weight: 500;
  margin-bottom: 0.5rem;
}

.report-form .form-control,
.report-form .form-select {
  border: none;
  border-radius: 10px;
  padding: 0.75rem 1rem;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(10px);
  transition: all 0.3s ease;
}

.report-form .form-control:focus,
.report-form .form-select:focus {
  background: white;
  box-shadow: 0 0 0 0.2rem rgba(255, 255, 255, 0.25);
  transform: translateY(-2px);
}

.report-form .form-check-label {
  color: white;
  font-weight: 500;
}

.report-form .btn {
  border-radius: 10px;
  padding: 0.75rem 2rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  transition: all 0.3s ease;
}

.report-form .btn-primary {
  background: linear-gradient(45deg, #8D6E63, #6D4C41);
  border: none;
  box-shadow: 0 4px 15px rgba(141, 110, 99, 0.3);
}

.report-form .btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(141, 110, 99, 0.4);
}

.report-form .btn-secondary {
  background: rgba(255, 255, 255, 0.2);
  border: 2px solid rgba(255, 255, 255, 0.3);
  color: white;
}

.report-form .btn-secondary:hover {
  background: rgba(255, 255, 255, 0.3);
  border-color: rgba(255, 255, 255, 0.5);
  transform: translateY(-2px);
}

/* Rapor önizleme stilleri */
.preview-card {
  background: linear-gradient(135deg, #D7CCC8 0%, #8D6E63 100%);
  border-radius: 15px;
  overflow: hidden;
}

.preview-card .card-header {
  background: rgba(255, 255, 255, 0.1);
  border-bottom: 1px solid rgba(255, 255, 255, 0.2);
  color: white;
}

.preview-content {
  padding: 1.5rem;
  color: white;
}

/* Son raporlar tablosu */
.recent-reports-table {
  background: white;
  border-radius: 15px;
  overflow: hidden;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
}

.recent-reports-table .table {
  margin-bottom: 0;
}

.recent-reports-table th {
  background: linear-gradient(45deg, #4E342E, #3E2723);
  color: white;
  font-weight: 600;
  border: none;
  padding: 1rem;
}

.recent-reports-table td {
  padding: 1rem;
  border-bottom: 1px solid #f8f9fa;
  vertical-align: middle;
}

.recent-reports-table tr:hover {
  background-color: #f8f9fa;
  transition: background-color 0.3s ease;
}

.recent-reports-table .badge {
  padding: 0.5rem 1rem;
  border-radius: 20px;
  font-weight: 500;
}

/* Loading overlay stilleri */
.loading-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.8);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 9999;
  backdrop-filter: blur(5px);
}

.loading-content {
  text-align: center;
  color: white;
}

.loading-content .spinner-border {
  width: 3rem;
  height: 3rem;
}

/* Toast mesajları */
.toast-container {
  position: fixed;
  top: 10px;
  right: 10px;
  z-index: 9999;
  max-width: 320px;
}

.toast {
  background: rgba(255, 255, 255, 0.97);
  color: #222;
  border-radius: 12px;
  box-shadow: 0 4px 16px rgba(31, 38, 135, 0.10);
  border: 1px solid #eee;
  font-size: 0.92rem;
  font-weight: 500;
  padding: 0.5rem 1rem 0.5rem 1rem;
  min-width: 180px;
  max-width: 320px;
  transition: var(--transition);
}

.toast-header {
  font-size: 0.88rem;
  padding: 0.12rem 0.45rem 0.12rem 0.45rem;
  border-radius: 7px 7px 0 0;
  min-height: 28px;
  line-height: 1.1;
}

.toast-body {
  font-size: 0.92rem;
  padding: 0.3rem 0.7rem 0.5rem 0.7rem;
}

@media (max-width: 576px) {
  .toast-container {
    top: 6px;
    right: 4px;
    max-width: 98vw;
  }

  .toast {
    font-size: 0.85rem;
    min-width: 120px;
    max-width: 98vw;
    padding: 0.35rem 0.5rem 0.35rem 0.5rem;
    border-radius: 9px;
  }

  .toast-header {
    font-size: 0.78rem;
    padding: 0.08rem 0.28rem 0.08rem 0.28rem;
    border-radius: 6px 6px 0 0;
    min-height: 22px;
  }

  .toast-body {
    font-size: 0.85rem;
    padding: 0.2rem 0.5rem 0.3rem 0.5rem;
  }
}

/* Form validasyon stilleri */
.form-control.is-invalid {
  border-color: #dc3545;
  box-shadow: 0 0 0 0.2rem rgba(220, 53, 69, 0.25);
}

.form-control.is-valid {
  border-color: #28a745;
  box-shadow: 0 0 0 0.2rem rgba(40, 167, 69, 0.25);
}

.invalid-feedback {
  color: #dc3545;
  font-size: 0.875rem;
  margin-top: 0.25rem;
}

.valid-feedback {
  color: #28a745;
  font-size: 0.875rem;
  margin-top: 0.25rem;
}

/* Animasyonlar */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.fade-in-up {
  animation: fadeInUp 0.6s ease-out;
}

/* Şube seçimi stilleri */
.branch-select-container {
  position: relative;
}

.branch-select-container .form-select {
  min-height: 120px;
}

.branch-select-container .form-text {
  color: rgba(255, 255, 255, 0.8);
  font-size: 0.875rem;
  margin-top: 0.5rem;
}

/* Rapor türü seçimi */
.report-type-select {
  background: linear-gradient(45deg, #4E342E, #3E2723);
  border-radius: 10px;
  padding: 1rem;
  margin-bottom: 1rem;
}

.report-type-select .form-label {
  color: white;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

/* Dosya formatı seçimi */
.file-format-select {
  background: linear-gradient(45deg, #D7CCC8, #8D6E63);
  border-radius: 10px;
  padding: 1rem;
  margin-bottom: 1rem;
}

.file-format-select .form-label {
  color: white;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

/* --- BAŞLIKLAR VE METİNLER --- */
.card-header h5,
.modal-title,
.kpi-content h3 {
  font-size: 1.2rem;
  font-weight: 700;
  letter-spacing: 0.5px;
  color: var(--fuchsia-dark);
  text-shadow: 0 2px 8px rgba(219, 54, 142, 0.08);
  transition: var(--transition);
}

body.dark-mode .card-header h5,
body.dark-mode .modal-title,
body.dark-mode .kpi-content h3 {
  color: var(--dark-accent);
}

/* --- BUTONLAR --- */
.btn-primary,
.btn-success,
.btn-secondary {
  border-radius: 12px;
  font-size: 1rem;
  font-weight: 700;
  box-shadow: 0 2px 12px rgba(219, 54, 142, 0.15);
  background: linear-gradient(90deg, var(--fuchsia-main), var(--fuchsia-dark));
  border: none;
  transition: var(--transition);
}

.btn-primary:hover,
.btn-success:hover,
.btn-secondary:hover {
  background: linear-gradient(90deg, var(--fuchsia-dark), var(--fuchsia-main));
  transform: scale(1.04) translateY(-2px);
  box-shadow: 0 6px 24px rgba(219, 54, 142, 0.25);
}

body.dark-mode .btn-primary,
body.dark-mode .btn-success,
body.dark-mode .btn-secondary {
  background: linear-gradient(90deg, var(--dark-accent), var(--fuchsia-main));
  color: #fff;
}

/* --- MİKRO ANİMASYONLAR - Performans Optimizasyonu --- */
.card,
.main-card,
.kpi-card,
.performance-detail-card,
.branch-card,
.modal-content {
  animation: fadeInUp 0.4s ease-out;
  will-change: transform, opacity;
}

/* --- FOOTER MODERNİZASYON --- */
footer {
  background: rgba(255, 255, 255, 0.15);
  color: #222 !important;
  border-top: 1px solid #eee;
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: 0.5px;
  box-shadow: 0 -2px 12px rgba(219, 54, 142, 0.07);
  backdrop-filter: blur(8px);
  transition: var(--transition);
}

body.dark-mode footer {
  background: rgba(24, 24, 36, 0.7);
  color: #fff !important;
  border-top: 1px solid #232336;
}

/* --- TOAST MODERNİZASYON --- */
.toast {
  background: rgba(255, 255, 255, 0.95);
  color: #222;
  border-radius: 16px;
  box-shadow: 0 8px 32px rgba(62, 39, 35, 0.15);
  border: 1px solid #eee;
  font-size: 1rem;
  font-weight: 600;
  transition: var(--transition);
}

body.dark-mode .toast {
  background: rgba(35, 35, 54, 0.95);
  color: #fff;
  border: 1px solid #232336;
}

/* --- KOYU MOD TOGGLE BUTONU --- */
#darkModeToggle {
  position: fixed;
  bottom: 32px;
  right: 32px;
  z-index: 9999;
  background: linear-gradient(90deg, var(--fuchsia-main), var(--fuchsia-dark));
  color: #fff;
  border: none;
  border-radius: 50%;
  width: 56px;
  height: 56px;
  box-shadow: 0 4px 16px rgba(219, 54, 142, 0.18);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  cursor: pointer;
  transition: var(--transition);
}

#darkModeToggle:hover {
  background: linear-gradient(90deg, var(--fuchsia-dark), var(--fuchsia-main));
  transform: scale(1.08);
}

.kpi-content p {
  font-size: 0.85rem;
  font-weight: 400;
  margin-bottom: 0;
}

.card-header small,
.modal-header small {
  font-size: 0.8rem;
}

/* Performans Dashboard KPI Grid Düzeni */
#kpiCards,
#productMetricsCards {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  width: 100%;
  min-width: 0;
  margin-bottom: 1rem;
  align-items: stretch;
  margin-left: auto;
  margin-right: auto;
  justify-content: center;
  border: none !important;
  box-shadow: none !important;
}

#kpiCards .kpi-card,
#productMetricsCards .kpi-card {
  min-width: 0;
  min-height: 0;
  height: 100%;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  background: linear-gradient(135deg, var(--fuchsia-lightest), var(--fuchsia-light));
  border: none !important;
  box-shadow: none !important;
  border-radius: var(--border-radius);
  padding: 1rem 0.2rem;
  transition: all 0.3s ease;
  align-self: stretch;
}

#kpiCards .kpi-icon,
#productMetricsCards .kpi-icon {
  width: 32px;
  height: 32px;
  font-size: 1.2rem;
  margin-bottom: 0.2rem;
}

#kpiCards .kpi-content h3,
#productMetricsCards .kpi-content h3 {
  font-size: 1rem;
  margin-bottom: 0.1rem;
}

#kpiCards .kpi-content p,
#productMetricsCards .kpi-content p {
  font-size: 0.85rem;
  margin-bottom: 0;
}

@media (max-width: 768px) {

  #kpiCards,
  #productMetricsCards {
    grid-template-columns: repeat(4, 1fr) !important;
    gap: 0.15rem;
    padding: 0;
  }

  #kpiCards .kpi-card,
  #productMetricsCards .kpi-card {
    padding: 0.15rem 0.05rem;
  }

  #kpiCards .kpi-icon,
  #productMetricsCards .kpi-icon {
    width: 20px;
    height: 20px;
    font-size: 0.7rem;
    margin-bottom: 0.1rem;
  }

  #kpiCards .kpi-content h3,
  #productMetricsCards .kpi-content h3 {
    font-size: 0.7rem;
    margin-bottom: 0.05rem;
  }

  #kpiCards .kpi-content p,
  #productMetricsCards .kpi-content p {
    font-size: 0.55rem;
    margin-bottom: 0;
  }
}

/* Şube detay modalı başlığında şube adı için kontrast ve okunabilirlik artırıldı */
#branchDetailModal .modal-title #branchDetailNameText {
  color: #fff !important;
  font-weight: 700 !important;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3) !important;
  letter-spacing: 0.3px !important;
  font-size: 1.2rem !important;
}

@media (max-width: 992px) {
  #mobileMenuBtn {
    display: flex !important;
    align-items: center;
    justify-content: center;
    position: absolute;
    right: 1.2rem;
    top: 50%;
    transform: translateY(-50%);
    z-index: 1101;
    background: none;
    border: none;
    font-size: 2.2rem;
    color: #fff;
    height: 44px;
    width: 44px;
    padding: 0;
    margin: 0;
  }

  .navbar {
    min-height: 56px;
  }
}

.mobile-sidebar-menu {
  position: fixed;
  top: 0;
  left: 0;
  height: 100vh;
  width: 80vw;
  max-width: 320px;
  background: #f5f7fa !important;
  box-shadow: 2px 0 16px rgba(0, 0, 0, 0.13);
  z-index: 2000;
  transform: translateX(-100%);
  transition: transform 0.25s cubic-bezier(.4, 0, .2, 1);
  display: flex;
  flex-direction: column;
  padding: 2.2rem 1.2rem 1.2rem 1.2rem;
}

.mobile-sidebar-menu.open {
  transform: translateX(0);
}

.close-mobile-menu {
  position: absolute;
  top: 1rem;
  right: 1.1rem;
  background: none;
  border: none;
  font-size: 2.2rem;
  color: #795548;
  z-index: 2100;
}

.mobile-sidebar-menu .nav-link {
  font-size: 1.35rem !important;
  line-height: 2.2 !important;
  padding: 1.1rem 0.7rem !important;
  margin: 0.7rem 0 0.7rem 0 !important;
  color: #22223B !important;
  background: transparent !important;
  font-weight: 600;
  border-radius: 8px;
  transition: color 0.18s, background 0.18s;
}

.mobile-sidebar-menu .nav-link i {
  color: #22223B !important;
  transition: color 0.18s;
}

.mobile-sidebar-menu .nav-link.active,
.mobile-sidebar-menu .nav-link:active,
.mobile-sidebar-menu .nav-link:hover {
  color: #4E342E !important;
  background: #e3eafc !important;
}

.mobile-sidebar-menu .nav-link.active i,
.mobile-sidebar-menu .nav-link:active i,
.mobile-sidebar-menu .nav-link:hover i {
  color: #4E342E !important;
}

@media (min-width: 993px) {

  #mobileMenuBtn,
  .mobile-sidebar-menu {
    display: none !important;
  }
}

/* Tarih Seçimi Modalı için özel stil */
#dateModal .modal-content {
  border-radius: 18px;
  box-shadow: 0 8px 32px rgba(219, 54, 142, 0.18);
  background: linear-gradient(135deg, #fff 80%, var(--fuchsia-lightest) 100%);
}

#dateModal .modal-header {
  background: var(--primary-blue);
  color: #fff;
  border-top-left-radius: 18px;
  border-top-right-radius: 18px;
  border-bottom: none;
}

#dateModal .modal-title,
#dateModal .modal-title i {
  color: #fff !important;
}

#dateModal .btn-close {
  filter: invert(1) brightness(2);
  opacity: 0.85;
}

#dateModal .btn-close:hover {
  opacity: 1;
}

#dateModal .modal-body {
  padding: 2rem 1.5rem 1.5rem 1.5rem;
}

#dateModal .input-group input[type="date"] {
  font-size: 1rem;
  padding: 10px 8px;
}

#dateModal .btn {
  font-size: 1rem;
  padding: 10px 12px;
}

@media (max-width: 576px) {
  #dateModal .modal-dialog {
    margin: 0.5rem;
  }

  #dateModal .modal-body {
    padding: 1rem 0.5rem;
  }

  #dateModal .input-group input[type="date"] {
    font-size: 0.95rem;
    padding: 8px 4px;
  }

  #dateModal .btn {
    font-size: 0.95rem;
    padding: 8px 8px;
  }
}

/* Takvim butonu sağ üstte sabit ve öne çıkık */
#dateModalBtn {
  position: absolute;
  top: 20px;
  right: 30px;
  z-index: 1050;
}

/* Glassmorphism modal ve modern takvim butonu */
.glass-modal {
  background: rgba(255, 255, 255, 0.75) !important;
  box-shadow: 0 8px 32px rgba(121, 85, 72, 0.18);
  border-radius: 22px !important;
  backdrop-filter: blur(12px);
  border: 1.5px solid rgba(121, 85, 72, 0.12);
  transition: box-shadow 0.3s;
}

.glass-modal:focus-within {
  box-shadow: 0 12px 40px rgba(121, 85, 72, 0.25);
}

.btn-calendar {
  background: rgba(255, 255, 255, 0.7) !important;
  border: 1.5px solid #795548 !important;
  box-shadow: 0 2px 8px rgba(121, 85, 72, 0.10);
  transition: box-shadow 0.2s, border 0.2s;
}

.btn-calendar:hover,
.btn-calendar:focus {
  background: #fff !important;
  border: 1.5px solid #795548 !important;
  box-shadow: 0 4px 16px rgba(121, 85, 72, 0.18);
}

/* Modal animasyonları için animate.css kullanımı */
.animate__animated.animate__fadeInDown {
  animation-duration: 0.5s;
}

/* Modal içi input ve butonlar daha büyük ve dokunmatik uyumlu */
#dateModal .input-group input[type="date"] {
  font-size: 1.05rem;
  padding: 12px 10px;
  border-radius: 10px;
}

#dateModal .btn {
  font-size: 1.05rem;
  padding: 10px 0.75rem;
  border-radius: 10px;
}

#dateModal .modal-header {
  border-radius: 22px 22px 0 0 !important;
}

#dateModal .modal-body {
  border-radius: 0 0 22px 22px !important;
}

@media (max-width: 576px) {
  .glass-modal {
    border-radius: 16px !important;
    padding: 0.5rem 0.2rem;
  }

  #dateModal .modal-dialog {
    margin: 0.5rem;
  }

  #dateModal .input-group input[type="date"] {
    font-size: 0.98rem;
    padding: 8px 4px;
  }

  #dateModal .btn {
    font-size: 0.98rem;
    padding: 8px 8px;
  }
}

/* Başlık hizasında takvim butonu için margin ayarı */
.btn-calendar {
  margin-left: 0.5rem;
}

/* Tarih barı */
.date-bar {
  background: rgba(255, 255, 255, 0.95);
  border: 1.5px solid #f3e0ec;
  box-shadow: 0 2px 8px rgba(121, 85, 72, 0.07);
  min-height: 36px;
  font-size: 0.98rem;
}

.btn-outline-fuchsia {
  border: 1.5px solid #795548;
  color: #e75480;
  background: #fff;
  transition: all 0.2s;
}

.btn-outline-fuchsia:hover,
.btn-outline-fuchsia:focus {
  background: #795548;
  color: #fff;
  border-color: #795548;
}

.date-preset {
  background: linear-gradient(90deg, #8D6E63 0%, #5D4037 100%) !important;
  color: #fff !important;
  border: none !important;
  font-weight: 600;
  border-radius: 12px;
  margin: 0 4px 8px 0;
  box-shadow: 0 2px 8px rgba(62, 39, 35, 0.10);
  transition: background 0.18s, color 0.18s;
}

.date-preset.active,
.date-preset:hover {
  background: linear-gradient(90deg, #5D4037 0%, #3E2723 100%) !important;
  color: #fff !important;
}

#customDateRange {
  transition: opacity 0.2s;
}

@media (max-width: 576px) {
  .date-bar {
    font-size: 0.93rem;
    padding: 0.5rem 0.3rem;
  }

  .date-preset {
    padding: 4px 8px;
    font-size: 0.95rem;
  }

  .date-hint-text {
    display: none !important;
  }

  .clickable-date-bar {
    flex-direction: column;
    text-align: center;
    padding: 0.8rem 0.5rem;
  }

  .clickable-date-bar .d-flex {
    flex-direction: column;
    align-items: center;
    gap: 0.3rem;
  }

  .clickable-date-bar .me-2 {
    margin-right: 0 !important;
    margin-bottom: 0.3rem;
  }
}

.clickable-date-bar:hover,
.clickable-date-bar:focus {
  background: #EFEBE9;
  box-shadow: 0 4px 16px rgba(121, 85, 72, 0.10);
  outline: 2px solid #795548;
  transition: all 0.18s;
}

/* Modal başlığı gradientli */
.modal-title-gradient {
  font-size: 1.25rem;
  font-weight: 700;
  background: linear-gradient(90deg, #8D6E63 0%, #5D4037 100%);
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

/* Modern kapatma butonu */
.btn-close-modal {
  width: 38px;
  height: 38px;
  background: linear-gradient(135deg, #fff 60%, #EFEBE9 100%);
  border: 1.5px solid #795548;
  color: #795548;
  font-size: 1.2rem;
  box-shadow: 0 2px 8px rgba(121, 85, 72, 0.10);
  transition: all 0.18s;
}

.btn-close-modal:hover,
.btn-close-modal:focus {
  background: #795548;
  color: #fff;
  border-color: #795548;
}

.btn-close-modal i {
  pointer-events: none;
}

/* Preset butonlar modern ve gradientli */
.date-preset-group .date-preset-gradient {
  border-radius: 18px;
  border: none;
  font-weight: 600;
  font-size: 1.05rem;
  background: linear-gradient(90deg, #EFEBE9 0%, #fff 100%);
  color: #795548;
  box-shadow: 0 2px 8px rgba(121, 85, 72, 0.07);
  padding: 7px 20px;
  transition: all 0.18s;
}

.date-preset-group .date-preset-gradient.active,
.date-preset-group .date-preset-gradient:hover {
  background: linear-gradient(90deg, #8D6E63 0%, #5D4037 100%);
  color: #fff;
  box-shadow: 0 4px 16px rgba(121, 85, 72, 0.13);
}

/* Modern inputlar */
.modern-input-group {
  background: rgba(255, 255, 255, 0.85);
  border-radius: 14px;
  box-shadow: 0 2px 8px rgba(121, 85, 72, 0.07);
  border: 1.5px solid #D7CCC8;
  overflow: hidden;
}

.modern-input-icon {
  background: #EFEBE9;
  color: #795548;
  border: none;
  font-size: 1.15rem;
}

.modern-date-input {
  border: none;
  background: transparent;
  font-size: 1.08rem;
  color: #5D4037;
  font-weight: 500;
  border-radius: 0 14px 14px 0;
}

.modern-date-input:focus {
  outline: none;
  box-shadow: none;
  background: #fff;
}

/* Gradientli aksiyon butonları */
.btn-gradient-primary {
  background: linear-gradient(90deg, #8D6E63 0%, #5D4037 100%) !important;
  color: #fff !important;
  border: none;
  font-weight: 600;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(62, 39, 35, 0.15);
  text-shadow: 0 1px 4px rgba(62, 39, 35, 0.15);
  transition: background 0.2s, filter 0.2s;
}

.btn-gradient-primary:hover,
.btn-gradient-primary:focus {
  background: linear-gradient(90deg, #5D4037 0%, #3E2723 100%) !important;
  color: #fff !important;
  filter: brightness(1.08);
}

.btn-gradient-success {
  background: linear-gradient(90deg, #66BB6A 0%, #388E3C 100%);
  color: #fff;
  border: none;
  font-weight: 600;
  font-size: 1.08rem;
  border-radius: 14px;
  box-shadow: 0 2px 8px rgba(67, 233, 123, 0.10);
  transition: all 0.18s;
}

.btn-gradient-success:hover,
.btn-gradient-success:focus {
  background: linear-gradient(90deg, #388E3C 0%, #66BB6A 100%);
  color: #fff;
}

@media (max-width: 576px) {
  .modal-title-gradient {
    font-size: 1.05rem;
  }

  .date-preset-group .date-preset-gradient {
    font-size: 0.98rem;
    padding: 6px 10px;
  }

  .btn-close-modal {
    width: 32px;
    height: 32px;
    font-size: 1rem;
  }

  .btn-gradient-primary,
  .btn-gradient-success {
    font-size: 0.98rem;
    padding: 8px 0.5rem;
  }
}

@media (max-width: 768px) {
  #branchDetailModal .modal-content {
    border-radius: 12px;
    padding: 0 !important;
    box-shadow: 0 2px 12px rgba(219, 54, 142, 0.10);
  }

  #branchDetailModal .modal-header {
    padding: 0.7rem 1rem !important;
    min-height: 44px;
    border-radius: 12px 12px 0 0;
  }

  #branchDetailModal .modal-title {
    font-size: 1.1rem !important;
    gap: 0.3rem;
    color: #fff !important;
    font-weight: 700 !important;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3) !important;
  }

  #branchDetailModal .modal-title i {
    font-size: 1rem !important;
  }

  #branchDetailModal .btn-close-modal {
    width: 32px;
    height: 32px;
    font-size: 1.1rem;
    padding: 0.2rem;
  }

  #branchDetailModal .modal-body {
    flex: 1;
    /* Kalan alanı kapla */
    padding: 0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    /* Taşmayı engelle */
  }

  #branchDetailModal .card,
  #branchDetailModal .card-body,
  #branchDetailModal .card-header {
    border-radius: 10px !important;
    padding: 0.6rem 0.5rem !important;
    margin-bottom: 0.5rem !important;
  }

  #branchDetailModal .card-header h6 {
    font-size: 1rem !important;
    gap: 0.2rem;
  }

  #branchDetailModal .detail-info-item {
    padding: 6px 8px !important;
    border-radius: 7px !important;
    margin-bottom: 5px !important;
  }

  #branchDetailModal .detail-info-icon {
    width: 24px !important;
    height: 24px !important;
    min-width: 24px !important;
    font-size: 0.9rem !important;
    margin-right: 7px !important;
    border-radius: 6px !important;
  }

  #branchDetailModal .detail-info-label {
    font-size: 0.85rem !important;
  }

  #branchDetailModal .detail-info-value {
    font-size: 0.95rem !important;
  }

  #branchDetailModal .performance-indicator {
    padding: 7px 8px !important;
    border-radius: 7px !important;
    margin-bottom: 5px !important;
    font-size: 0.95rem !important;
  }

  #branchDetailModal .performance-indicator i {
    width: 20px !important;
    height: 20px !important;
    font-size: 0.95rem !important;
    margin-right: 7px !important;
    border-radius: 5px !important;
  }

  #branchDetailModal .performance-indicator span {
    font-size: 0.95rem !important;
  }
}

/* Mobil Alt Navigasyon Bar - Performans Optimizasyonu */
.mobile-bottom-nav {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  height: calc(62px + env(safe-area-inset-bottom));
  /* Safe area desteği */
  padding-bottom: env(safe-area-inset-bottom);
  /* Safe area desteği */
  will-change: transform;
  transform: translateZ(0);
  -webkit-transform: translateZ(0);
  background: #f5f7fa !important;
  border-top: 1.5px solid #e3eafc;
  box-shadow: 0 -2px 16px rgba(231, 84, 128, 0.07);
  display: flex;
  justify-content: space-around;
  align-items: center;
  /* Dikey ortalama */
  z-index: 9999;
  border-radius: 18px 18px 0 0;
  padding: 0 6px env(safe-area-inset-bottom) 6px;
  /* Alt padding safe area */
  overflow-x: auto;
  /* Sığmazsa kaydır */
  -webkit-overflow-scrolling: touch;
}

.bottom-nav-link {
  flex: 1 1 auto;
  /* Esnek genişlik */
  min-width: 55px;
  /* Minimum genişlik */
  text-align: center;
  color: #22223B !important;
  text-decoration: none;
  font-size: 0.92rem;
  font-weight: 600;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  /* Üstten başla */
  padding: 8px 2px 4px 2px;
  border-radius: 12px;
  transition: color 0.18s, background 0.18s;
  gap: 2px;
  background: transparent !important;
  white-space: nowrap;
  /* Metin kaymasın */
}

.bottom-nav-link i,
.bottom-nav-link span:first-child {
  color: #22223B !important;
  transition: color 0.18s;
  font-size: 1.25em;
  margin-bottom: 1px;
  display: block;
}

.bottom-nav-link.active,
.bottom-nav-link:active,
.bottom-nav-link:hover {
  color: #373e98 !important;
  background: #e3eafc !important;
}

.bottom-nav-link.active i,
.bottom-nav-link.active span:first-child,
.bottom-nav-link:active i,
.bottom-nav-link:active span:first-child,
.bottom-nav-link:hover i,
.bottom-nav-link:hover span:first-child {
  color: #373e98 !important;
}

.bottom-nav-link span {
  font-size: 0.82em;
  font-weight: 500;
  margin-top: 1px;
}

@media (min-width: 993px) {
  .mobile-bottom-nav {
    display: none !important;
  }
}

@media (max-width: 576px) {
  .mobile-bottom-nav {
    height: calc(56px + env(safe-area-inset-bottom));
    padding-bottom: env(safe-area-inset-bottom);
    border-radius: 14px 14px 0 0;
    padding-left: 2px;
    padding-right: 2px;
  }

  .bottom-nav-link {
    font-size: 0.89rem;
    padding: 6px 0 2px 0;
    border-radius: 9px;
    min-width: 45px;
    /* Mobilde daha dar olabilir */
  }

  .bottom-nav-link i,
  .bottom-nav-link span:first-child {
    font-size: 1.08em;
  }

  .bottom-nav-link span {
    font-size: 0.75em;
  }
}

/* Ana Ekrana Ekle (PWA) Bildirimi */
#addToHomePrompt {
  position: fixed;
  bottom: 80px;
  /* Alt menüden yukarıda */
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  width: calc(100% - 24px);
  max-width: 380px;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  color: #2c3e50;
  padding: 12px 16px;
  border-radius: 16px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.4);
  z-index: 10000;
  display: flex;
  align-items: center;
  gap: 12px;
  opacity: 0;
  transition: opacity 0.3s ease, transform 0.3s ease;
  will-change: opacity, transform;
}

#addToHomePrompt.visible {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

#addToHomePrompt.hidden {
  opacity: 0;
  transform: translateX(-50%) translateY(20px);
}

#addToHomePrompt .prompt-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
}

#addToHomePrompt .prompt-text {
  flex-grow: 1;
  display: flex;
  flex-direction: column;
}

#addToHomePrompt .prompt-text strong {
  font-weight: 600;
  font-size: 0.95rem;
  color: #34495e;
}

#addToHomePrompt .prompt-text span {
  font-size: 0.85rem;
  color: #7f8c8d;
}

#addToHomePrompt .prompt-buttons {
  display: flex;
  align-items: center;
  gap: 8px;
}

#addToHomePrompt .btn-add {
  background-color: #e75480;
  color: #fff;
  font-weight: 700;
  border: none;
  border-radius: 12px;
  padding: 8px 18px;
  cursor: pointer;
  transition: background-color 0.2s;
}

#addToHomePrompt .btn-add:hover {
  background-color: #d94371;
}

#addToHomePrompt .btn-close {
  background: none;
  color: #95a5a6;
  font-size: 1.6rem;
  font-weight: 300;
  border: none;
  cursor: pointer;
  padding: 0 4px;
  line-height: 1;
}

#addToHomePrompt .btn-close:hover {
  color: #34495e;
  background-color: rgba(255, 255, 255, 0.2);
}

/* En Küçük Mobil Ekranlar İçin İnce Ayarlar */
@media (max-width: 400px) {

  /* Genel font boyutunu küçült */
  body {
    font-size: 0.96rem;
  }

  /* Kart başlıkları */
  .card-header h5 {
    font-size: 1.05rem;
  }

  /* KPI Kartları */
  .kpi-card {
    padding: 0.6rem;
  }

  .kpi-content h3 {
    font-size: 1.2rem;
  }

  .kpi-content p {
    font-size: 0.75rem;
  }

  .kpi-icon {
    font-size: 1.6rem;
  }

  /* Tablolar */
  .table th,
  .table td {
    padding: 0.5rem 0.3rem;
    font-size: 0.8rem;
  }

  /* Alt Navigasyon */
  .bottom-nav-link span {
    font-size: 0.7rem;
  }

  .bottom-nav-link i {
    font-size: 1.1rem;
  }

  /* Tarih çubuğu */
  .date-bar {
    padding: 0.3rem 0.5rem !important;
    font-size: 0.85rem;
  }
}

/* Ürün Satış Raporu kart başlığındaki alt çizgiyi kaldır (Daha güçlü kural) */
#product-sales-header {
  border-bottom: none !important;
}

/* Minimal ve modern fiyat güncelleme için ek stiller */
.minimal-card {
  box-shadow: 0 2px 8px rgba(219, 54, 142, 0.08);
  border-radius: 14px;
  border: 1px solid #D7CCC8;
  background: #fff;
  padding: 0.5rem 0.5rem 1rem 0.5rem;
}

.minimal-input {
  border-radius: 8px !important;
  padding: 0.35rem 0.7rem !important;
  font-size: 0.97rem !important;
  border: 1px solid #e5e5e5 !important;
  background: #faf8fa !important;
}

.btn-fuchsia {
  background: #795548;
  color: #fff;
  border-radius: 8px;
  border: none;
  font-weight: 500;
  font-size: 0.97rem;
  transition: background 0.2s;
}

.btn-fuchsia:hover,
.btn-fuchsia:focus {
  background: #5D4037;
  color: #fff;
}

.btn-outline-fuchsia {
  background: #fff;
  color: #795548;
  border: 1.5px solid #795548;
  border-radius: 8px;
  font-weight: 500;
  font-size: 0.97rem;
  transition: background 0.2s, color 0.2s;
}

.btn-outline-fuchsia:hover,
.btn-outline-fuchsia:focus {
  background: #795548;
  color: #fff;
}

.minimal-table th,
.minimal-table td {
  font-size: 0.95rem !important;
  padding: 0.35rem 0.5rem !important;
}

.minimal-table thead tr {
  background: #D7CCC8;
}

.minimal-table tbody tr {
  border-bottom: 1px solid #EFEBE9;
}

@media (max-width: 768px) {
  .minimal-card {
    padding: 0.3rem 0.2rem 0.7rem 0.2rem;
  }

  .minimal-table {
    font-size: 0.92rem;
  }

  .minimal-table th,
  .minimal-table td {
    padding: 0.25rem 0.3rem !important;
  }

  .minimal-input {
    font-size: 0.95rem !important;
    padding: 0.25rem 0.5rem !important;
  }
}

@media (max-width: 768px) {

  .minimal-table th,
  .minimal-table td {
    font-size: 0.85rem !important;
    padding: 0.18rem 0.2rem !important;
  }

  .minimal-table input.form-control-sm {
    width: 70px !important;
    padding: 0.15rem 0.3rem !important;
    font-size: 0.82rem !important;
  }

  .minimal-table .btn-outline-fuchsia {
    padding: 0.15rem 0.4rem !important;
    font-size: 0.8rem !important;
  }
}

/* Modal z-index düzeltme */
.modal-backdrop {
  z-index: 1040 !important;
}

.modal {
  z-index: 1050 !important;
}

/* Modal z-index override */
.modal {
  z-index: 99999 !important;
}

.modal-backdrop {
  z-index: 99998 !important;
}

/* Grafik detay modalı için daha yüksek z-index */
#chartDetailModal {
  z-index: 100000 !important;
}

#chartDetailModal+.modal-backdrop {
  z-index: 99999 !important;
}

.minimal-table table {
  margin-bottom: 0;
}

.minimal-table th,
.minimal-table td {
  white-space: nowrap;
  vertical-align: middle;
}

.minimal-table th:nth-child(3),
/* Ürün */
.minimal-table td:nth-child(3) {
  min-width: 200px;
}

.minimal-table th:nth-child(2),
/* Kategori */
.minimal-table td:nth-child(2) {
  min-width: 150px;
}

.minimal-table th:nth-child(5),
/* Barkod */
.minimal-table td:nth-child(5) {
  min-width: 130px;
}

.minimal-table td:nth-child(7) input {
  /* Yeni Fiyat Input */
  min-width: 100px;
  max-width: 120px;
}

.minimal-table td:nth-child(8) {
  /* Güncelle Butonu */
  min-width: 80px;
  text-align: center;
}

/* Responsive adjustments for smaller screens */
@media (max-width: 768px) {

  .minimal-table th:nth-child(3),
  .minimal-table td:nth-child(3) {
    min-width: 150px;
  }

  .minimal-table th:nth-child(2),
  .minimal-table td:nth-child(2) {
    min-width: 120px;
  }
}

/* Masaüstünde tabloya taşma ve kaydırma engeli */
.minimal-table {
  width: 100%;
}

.minimal-table .table-responsive {
  overflow-x: unset !important;
}

.minimal-table th,
.minimal-table td {
  white-space: normal;
  vertical-align: middle;
  word-break: break-word;
}

/* Sadece mobilde kaydırma ve min-width uygula */
@media (max-width: 768px) {
  .minimal-table .table-responsive {
    overflow-x: auto !important;
  }

  .minimal-table th,
  .minimal-table td {
    white-space: nowrap;
  }

  .minimal-table th:nth-child(3),
  .minimal-table td:nth-child(3) {
    min-width: 150px;
  }

  .minimal-table th:nth-child(2),
  .minimal-table td:nth-child(2) {
    min-width: 120px;
  }

  .minimal-table th:nth-child(5),
  .minimal-table td:nth-child(5) {
    min-width: 100px;
  }
}

/* Giriş ve butonlar için min/max genişlikler sabit kalsın */
.minimal-table td:nth-child(7) input {
  min-width: 80px;
  max-width: 120px;
}

.minimal-table td:nth-child(8) {
  min-width: 60px;
  text-align: center;
}

@media (max-width: 768px) {

  .minimal-table table,
  .minimal-table thead,
  .minimal-table tbody,
  .minimal-table th,
  .minimal-table td,
  .minimal-table tr {
    display: block;
    width: 100%;
  }

  .minimal-table thead tr {
    display: none;
  }

  .minimal-table tr {
    margin-bottom: 1rem;
    border: 1px solid #eee;
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.04);
    padding: 0.5rem 0.7rem;
  }

  .minimal-table td {
    position: relative;
    padding-left: 50%;
    min-height: 36px;
    border: none;
    border-bottom: 1px solid #f0f0f0;
    text-align: left;
    font-size: 1rem;
  }

  .minimal-table td:last-child {
    border-bottom: none;
  }

  .minimal-table td:before {
    position: absolute;
    left: 0.7rem;
    top: 0;
    width: 48%;
    white-space: nowrap;
    font-weight: bold;
    color: #795548;
    font-size: 0.97rem;
    content: attr(data-label);
  }
}

@media (max-width: 768px) {
  .minimal-table td {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    padding-left: 0.7rem;
    padding-top: 0.5rem;
    padding-bottom: 0.5rem;
    font-size: 1rem;
    line-height: 1.3;
    word-break: break-word;
    background: #fff;
    min-height: 36px;
    border: none;
    border-bottom: 1px solid #f0f0f0;
  }

  .minimal-table td:before {
    display: block;
    position: static;
    width: 100%;
    margin-bottom: 2px;
    font-size: 0.93rem;
    color: #795548;
    font-weight: 600;
    opacity: 0.85;
    line-height: 1.2;
    white-space: normal;
    text-align: left;
  }

  .minimal-table tr {
    padding: 0.7rem 0.5rem 0.7rem 0.5rem;
    margin-bottom: 1.2rem;
    border-radius: 8px;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.04);
    border: 1px solid #eee;
    background: #fff;
  }

  .minimal-table td input,
  .minimal-table td button {
    width: 100%;
    min-width: 0;
    margin-top: 4px;
    margin-bottom: 4px;
  }
}

.mobile-bottom-nav .bottom-nav-link {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 48px;
  font-size: 0.97rem;
  padding: 0 2px;
  /* Performans optimizasyonu */
  will-change: transform;
  transform: translateZ(0);
}

.mobile-bottom-nav .bottom-nav-link span,
.mobile-bottom-nav .bottom-nav-link i {
  display: block;
  line-height: 1.1;
}

.mobile-bottom-nav .bottom-nav-link span:first-child {
  font-size: 1.25em;
  margin-bottom: 0px;
  font-family: Arial, sans-serif;
  font-weight: bold;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 20px;
}

/* Loading Overlay Stilleri - KALDIRILDI (splash screen kullanılıyor) */
/* #loadingOverlay {
  display: none;
  position: fixed;
  z-index: 120000;
  top: 0; left: 0; width: 100vw; height: 100vh;
  background: rgba(255,255,255,0.85);
  backdrop-filter: blur(2px);
  align-items: center;
  justify-content: center;
}
#loadingOverlay .spinner-border {
  width: 3rem;
  height: 3rem;
} */

#loadProductSalesBtn,
#generateReportBtn,
#resetFormBtn {
  background: linear-gradient(90deg, #8D6E63 0%, #5D4037 100%) !important;
  color: #fff !important;
  border: none;
  font-weight: 600;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(121, 85, 72, 0.15);
  text-shadow: 0 1px 4px rgba(121, 85, 72, 0.15);
  transition: background 0.2s, filter 0.2s;
}

#loadProductSalesBtn:hover,
#loadProductSalesBtn:focus,
#generateReportBtn:hover,
#generateReportBtn:focus,
#resetFormBtn:hover,
#resetFormBtn:focus {
  background: linear-gradient(90deg, #5D4037 0%, #3E2723 100%) !important;
  color: #fff !important;
  filter: brightness(1.08);
}

.btn.btn-primary.btn-sm {
  background: linear-gradient(90deg, #8D6E63 0%, #5D4037 100%) !important;
  color: #fff !important;
  border: none;
  font-weight: 600;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(121, 85, 72, 0.15);
  text-shadow: 0 1px 4px rgba(121, 85, 72, 0.15);
  transition: background 0.2s, filter 0.2s;
}

.btn.btn-primary.btn-sm:hover,
.btn.btn-primary.btn-sm:focus {
  background: linear-gradient(90deg, #5D4037 0%, #3E2723 100%) !important;
  color: #fff !important;
  filter: brightness(1.08);
}

.btn.btn-gradient-primary.w-100,
.btn.btn-gradient-primary {
  background: linear-gradient(90deg, #8D6E63 0%, #5D4037 100%) !important;
  color: #fff !important;
  border: none;
  font-weight: 600;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(121, 85, 72, 0.15);
  text-shadow: 0 1px 4px rgba(121, 85, 72, 0.15);
  transition: background 0.2s, filter 0.2s;
}

.btn.btn-gradient-primary.w-100:hover,
.btn.btn-gradient-primary.w-100:focus,
.btn.btn-gradient-primary:hover,
.btn.btn-gradient-primary:focus {
  background: linear-gradient(90deg, #5D4037 0%, #3E2723 100%) !important;
  color: #fff !important;
  filter: brightness(1.08);
}

@media (max-width: 600px) {
  .mobile-sidebar-menu .nav-link {
    font-size: 1.08rem !important;
    line-height: 1.6 !important;
    padding: 0.7rem 0.5rem !important;
    margin: 0.4rem 0 0.4rem 0 !important;
  }
}

@media (max-width: 400px) {
  .mobile-sidebar-menu .nav-link {
    font-size: 0.97rem !important;
    line-height: 1.3 !important;
    padding: 0.5rem 0.3rem !important;
    margin: 0.2rem 0 0.2rem 0 !important;
  }
}

/* Fiyat Güncelle sayfası için modern mavi palet */
.btn-fuchsia,
.btn-outline-fuchsia {
  background: linear-gradient(90deg, #8D6E63 0%, #5D4037 100%) !important;
  color: #fff !important;
  border: none;
  font-weight: 600;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(121, 85, 72, 0.15);
  text-shadow: 0 1px 4px rgba(121, 85, 72, 0.15);
  transition: background 0.2s, filter 0.2s;
}

.btn-fuchsia:hover,
.btn-fuchsia:focus,
.btn-outline-fuchsia:hover,
.btn-outline-fuchsia:focus {
  background: linear-gradient(90deg, #5D4037 0%, #3E2723 100%) !important;
  color: #fff !important;
  filter: brightness(1.08);
}

.minimal-card {
  background: #f5f5f5 !important;
  border: 1px solid #D7CCC8 !important;
  border-radius: 14px !important;
  box-shadow: 0 4px 24px rgba(121, 85, 72, 0.10) !important;
}

.minimal-input {
  background: #fff !important;
  border: 1px solid #D7CCC8 !important;
  color: #22223B !important;
  border-radius: 8px !important;
}

.minimal-table thead tr {
  background: #fff !important;
}

.minimal-table tbody tr {
  border-bottom: 1px solid #f5f7fa !important;
}

.text-fuchsia,
.text-muted {
  color: #5D4037 !important;
}

.text-danger {
  color: #c0392b !important;
}

.card-header h5,
.card-header h6 {
  color: #5D4037 !important;
  font-weight: 700;
  letter-spacing: 0.5px;
  text-shadow: none;
}

@media (max-width: 600px) {
  .envanter-mobile-card {
    border-radius: 10px !important;
    box-shadow: 0 1px 4px 0 rgba(121, 85, 72, 0.08) !important;
    background: #f5f5f5 !important;
    margin-bottom: 0.6rem !important;
    padding: 0.7rem 0.7rem !important;
    font-size: 0.97em !important;
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
  }

  .envanter-mobile-title {
    font-weight: 600;
    color: #5D4037 !important;
    font-size: 1.02em !important;
    margin-bottom: 0.15em;
    display: flex;
    align-items: center;
    gap: 0.3em;
  }

  .envanter-mobile-title i {
    color: #5D4037 !important;
    font-size: 1.1em !important;
    margin-right: 0.2em;
  }

  .envanter-mobile-qty {
    font-weight: 700;
    color: #8D6E63 !important;
    font-size: 1.08em !important;
    margin-left: 0.2em;
  }

  .envanter-mobile-barcode {
    color: #888 !important;
    font-size: 0.93em !important;
  }

  .envanter-mobile-card .text-muted {
    color: #6c7a89 !important;
    font-size: 0.93em !important;
  }
}

@media (max-width: 600px) {
  .user-table {
    display: block;
    width: 100%;
    overflow-x: auto;
    font-size: 0.93rem;
    min-width: 420px;
  }

  .user-table thead,
  .user-table tbody,
  .user-table tr,
  .user-table th,
  .user-table td {
    white-space: nowrap;
  }
}

@media (max-width: 600px) {

  .user-table th:nth-child(2),
  .user-table td:nth-child(2),
  .user-table th:nth-child(3),
  .user-table td:nth-child(3) {
    display: none !important;
  }
}

@media (max-width: 600px) {

  .user-table th:nth-child(4),
  .user-table td:nth-child(4) {
    display: none !important;
  }
}

.modal-content .btn-cancel,
.modal-content .btn-close,
.modal-content .btn[disabled],
.modal-content .btn:disabled {
  background: #fff !important;
  color: #5D4037 !important;
  font-weight: 600;
  border: none;
  border-radius: 8px;
  box-shadow: none;
  opacity: 1 !important;
  text-shadow: none;
  transition: background 0.18s, color 0.18s;
}

.modal-content .btn-cancel:hover,
.modal-content .btn-close:hover,
.modal-content .btn[disabled]:hover,
.modal-content .btn:disabled:hover {
  background: #D7CCC8 !important;
  color: #22223B !important;
}

.modal-content .btn.btn-secondary {
  background: #fff !important;
  color: #5D4037 !important;
  font-weight: 600;
  border: none;
  border-radius: 8px;
  box-shadow: none;
  opacity: 1 !important;
  text-shadow: none;
  transition: background 0.18s, color 0.18s;
}

.modal-content .btn.btn-secondary:hover,
.modal-content .btn.btn-secondary:focus {
  background: #D7CCC8 !important;
  color: #22223B !important;
}

/* Kullanıcı Yönetimi başlık ve vurgu renkleri modern mavi ile güncellendi */
.user-management-title,
.user-management-title i {
  color: #5D4037 !important;
  font-weight: 700;
}

.user-management-section-title {
  color: #22223B !important;
  font-weight: 600;
}

.user-management-card .form-label {
  color: #22223B !important;
}

.user-management-card .form-control {
  background: #fff !important;
  color: #22223B !important;
  border: 1.5px solid #D7CCC8 !important;
  border-radius: 8px;
  font-weight: 500;
  transition: border 0.18s;
}

.user-management-card .form-control:focus {
  border-color: #373e98 !important;
  box-shadow: 0 0 0 2px #79554833;
}

/* Çıkış butonu her zaman görünür olsun */
.logout-link {
  display: flex !important;
  opacity: 1 !important;
  visibility: visible !important;
}

.navbar .nav-link,
.navbar .navbar-brand {
  font-size: 0.95rem;
}

/* Tablet */
@media (max-width: 991px) {

  .navbar .nav-link,
  .navbar .navbar-brand {
    font-size: 0.85rem;
    padding-left: 0.5rem;
    padding-right: 0.5rem;
  }
}

/* Küçük tablet ve büyük telefon */
@media (max-width: 768px) {

  .navbar .nav-link,
  .navbar .navbar-brand {
    font-size: 0.75rem;
    padding-left: 0.3rem;
    padding-right: 0.3rem;
  }
}

/* Küçük telefon */
@media (max-width: 480px) {

  .navbar .nav-link,
  .navbar .navbar-brand {
    font-size: 0.65rem;
    padding-left: 0.15rem;
    padding-right: 0.15rem;
  }
}

/* Şube detay modalı başlık - şube ismi belirgin ve beyaz */
#branchDetailModal .modal-title {
  color: #fff !important;
  font-weight: 700 !important;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3) !important;
  background: none;
}

#branchDetailModal .modal-title #branchDetailNameText {
  color: #fff !important;
  font-weight: 700 !important;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3) !important;
  letter-spacing: 0.3px !important;
  font-size: 1.2rem !important;
}

/* Sağ üstteki çarpı butonu daha belirgin */
#branchDetailModal .btn-close,
#branchDetailModal .btn-close-modal {
  background: #f5f5f5 !important;
  border-radius: 50%;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 1 !important;
  box-shadow: 0 2px 8px rgba(121, 85, 72, 0.07);
  border: none;
}

#branchDetailModal .btn-close i,
#branchDetailModal .btn-close-modal i {
  color: #5D4037 !important;
  font-size: 1.4rem;
  transition: color 0.18s;
}

#branchDetailModal .btn-close:hover i,
#branchDetailModal .btn-close-modal:hover i {
  color: #e75480 !important;
}

/* Yeni Şube Detay Modalı - Sekmeli Tasarım */
#branchDetailModal .modal-dialog {
  max-height: 95vh;
  /* Ekran yüksekliğinin %95'i */
  margin: 0.5rem auto;
  display: flex;
  align-items: center;
  min-height: 95vh;
}

#branchDetailModal .modal-content {
  border-radius: 16px;
  border: none;
  box-shadow: 0 8px 32px rgba(55, 62, 152, 0.15);
  overflow: hidden;
  height: 100%;
  /* Modal dialog'un tam yüksekliği */
  display: flex;
  flex-direction: column;
}

#branchDetailModal .modal-header {
  background: linear-gradient(135deg, var(--primary-blue) 0%, #8D6E63 100%);
  color: white;
  border: none;
  padding: 0.8rem 1.5rem;
  position: relative;
  min-height: 60px;
  flex-shrink: 0;
}

#branchDetailModal .modal-header::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent 0%, rgba(255, 255, 255, 0.3) 50%, transparent 100%);
}

#branchDetailModal .modal-title {
  font-size: 1.3rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: #fff !important;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3) !important;
}

#branchDetailModal .modal-title i {
  color: var(--accent-pink);
  font-size: 1.2rem;
}

#branchDetailModal .btn-close {
  background: rgba(255, 255, 255, 0.2);
  border: none;
  border-radius: 50%;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
}

#branchDetailModal .btn-close:hover {
  background: rgba(255, 255, 255, 0.3);
  transform: scale(1.1);
}

#branchDetailModal .btn-close i {
  color: white;
  font-size: 1rem;
}

/* Sekme Navigasyonu */
.branch-tabs-nav {
  display: flex;
  background: #f8f9fa;
  border-bottom: 1px solid #e9ecef;
  padding: 0;
  margin: 0;
  min-height: 50px;
  flex-shrink: 0;
}

.tab-nav-item {
  flex: 1;
  padding: 1rem 0.5rem;
  text-align: center;
  cursor: pointer;
  transition: all 0.3s ease;
  border-bottom: 3px solid transparent;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.9rem;
  font-weight: 500;
  color: #6c757d;
}

.tab-nav-item:hover {
  background: rgba(121, 85, 72, 0.05);
  color: var(--primary-blue);
}

.tab-nav-item.active {
  color: var(--primary-blue);
  border-bottom-color: var(--primary-blue);
  background: white;
}

.tab-nav-item i {
  font-size: 1.1rem;
  margin-bottom: 0.2rem;
}

.tab-nav-item span {
  font-size: 0.8rem;
  font-weight: 600;
}

/* Sekme İçerikleri */
.tab-content {
  padding: 1.5rem;
  background: white;
  height: calc(95vh - 200px);
  /* Modal header ve tab nav yüksekliğini çıkar */
  overflow-y: auto;
  /* İçerik fazlaysa scroll */
}

.tab-pane {
  display: none;
  height: 100%;
  /* Tam yükseklik */
  overflow-y: auto;
  /* İçerik fazlaysa scroll */
}

.tab-pane.active {
  display: block;
}

/* Özet Sekmesi */
.overview-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 1rem;
  margin-bottom: 2rem;
}

.stat-card {
  background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
  border-radius: 12px;
  padding: 1rem;
  display: flex;
  align-items: center;
  gap: 0.8rem;
  transition: all 0.3s ease;
  border: 1px solid #e9ecef;
}

.stat-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(121, 85, 72, 0.1);
}

.stat-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--primary-blue) 0%, #8D6E63 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 1.1rem;
  flex-shrink: 0;
}

.stat-content {
  flex: 1;
}

.stat-label {
  font-size: 0.8rem;
  color: #6c757d;
  font-weight: 500;
  margin-bottom: 0.2rem;
}

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

.quick-chart {
  background: #f8f9fa;
  border-radius: 12px;
  padding: 1rem;
  border: 1px solid #e9ecef;
}

.chart-header {
  margin-bottom: 1rem;
}

.chart-header h6 {
  font-size: 1rem;
  font-weight: 600;
  color: var(--primary-blue);
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin: 0;
}

.chart-header h6 i {
  color: var(--accent-pink);
}

/* Performans Sekmesi */
.performance-metrics {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-bottom: 2rem;
}

.metric-item {
  background: white;
  border: 1px solid #e9ecef;
  border-radius: 12px;
  padding: 1rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  transition: all 0.3s ease;
}

.metric-item:hover {
  box-shadow: 0 4px 12px rgba(121, 85, 72, 0.1);
  transform: translateX(4px);
}

.metric-icon {
  width: 45px;
  height: 45px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--accent-pink) 0%, #A1887F 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 1.2rem;
  flex-shrink: 0;
}

.metric-content {
  flex: 1;
}

.metric-label {
  font-size: 0.9rem;
  color: #6c757d;
  font-weight: 500;
  margin-bottom: 0.3rem;
}

.metric-value {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--dark-text);
}

.trend-chart {
  background: #f8f9fa;
  border-radius: 12px;
  padding: 1rem;
  border: 1px solid #e9ecef;
}

/* Analiz Sekmesi */
.payment-analysis {
  background: #f8f9fa;
  border-radius: 12px;
  padding: 1rem;
  border: 1px solid #e9ecef;
}

/* Mobil Responsive */
@media (max-width: 768px) {
  #branchDetailModal .modal-dialog {
    margin: 0.25rem;
    max-width: calc(100% - 0.5rem);
    max-height: 98vh;
    /* Mobilde daha fazla alan kullan */
    min-height: 98vh;
  }

  #branchDetailModal .modal-content {
    border-radius: 12px;
    height: 100%;
    display: flex;
    flex-direction: column;
  }

  #branchDetailModal .modal-body {
    flex: 1;
    padding: 0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
  }

  #branchDetailModal .modal-header {
    padding: 0.8rem 1rem;
  }

  #branchDetailModal .modal-title {
    font-size: 1.1rem;
    color: #fff !important;
    font-weight: 700 !important;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3) !important;
  }

  .branch-tabs-nav {
    flex-direction: row;
  }

  .tab-nav-item {
    padding: 0.8rem 0.3rem;
    font-size: 0.8rem;
  }

  .tab-nav-item i {
    font-size: 1rem;
  }

  .tab-nav-item span {
    font-size: 0.75rem;
  }

  .tab-content {
    padding: 1rem;
    height: calc(95vh - 180px);
    /* Mobilde daha küçük header */
  }

  .overview-stats {
    grid-template-columns: 1fr;
    gap: 0.8rem;
  }

  .stat-card {
    padding: 0.8rem;
  }

  .stat-icon {
    width: 35px;
    height: 35px;
    font-size: 1rem;
  }

  .stat-label {
    font-size: 0.75rem;
  }

  .stat-value {
    font-size: 1rem;
  }

  .metric-item {
    padding: 0.8rem;
  }

  .metric-icon {
    width: 40px;
    height: 40px;
    font-size: 1.1rem;
  }

  .metric-label {
    font-size: 0.8rem;
  }

  .metric-value {
    font-size: 1.1rem;
  }

  .quick-chart,
  .trend-chart,
  .payment-analysis {
    padding: 0.8rem;
  }

  .chart-container {
    height: 180px !important;
  }
}

@media (max-width: 480px) {
  #branchDetailModal .modal-content {
    height: 100%;
    display: flex;
    flex-direction: column;
  }

  #branchDetailModal .modal-body {
    flex: 1;
    padding: 0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
  }

  .tab-nav-item {
    padding: 0.6rem 0.2rem;
  }

  .tab-nav-item i {
    font-size: 0.9rem;
  }

  .tab-nav-item span {
    font-size: 0.7rem;
  }

  .tab-content {
    padding: 0.8rem;
    height: calc(95vh - 160px);
    /* Çok küçük ekranlarda daha da küçük header */
  }

  .stat-card {
    padding: 0.6rem;
  }

  .metric-item {
    padding: 0.6rem;
  }
}

/* Grafik detay modalı için özel stiller */
#chartDetailModal .modal-body {
  padding: 20px;
}

#chartDetailModal canvas {
  width: 100% !important;
  height: 100% !important;
  max-height: 420px;
}

/* Modal içindeki grafiklerde datalabels daha büyük olsun */
#chartDetailModal .chartjs-datalabels {
  font-size: 16px !important;
  font-weight: 700 !important;
}

/* PWA Splash Screen Animasyonu - Güncellenmiş */
.pwa-splash-screen {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: linear-gradient(135deg, #4E342E 0%, #795548 50%, #D7CCC8 100%);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 99999;
  animation: splashFadeOut 1.2s ease-in-out 3s forwards;
  backdrop-filter: blur(10px);
}

.pwa-splash-logo {
  width: 140px;
  height: 140px;
  background: rgba(255, 255, 255, 0.95);
  border-radius: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.3);
  animation: logoBounce 1.5s ease-out 0.5s both;
  position: relative;
  overflow: hidden;
  backdrop-filter: blur(15px);
  border: 3px solid rgba(255, 255, 255, 0.4);
}

.pwa-splash-logo::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(45deg, #4E342E, #795548, #D7CCC8);
  border-radius: 24px;
  animation: logoGradient 2s ease-in-out infinite;
}

.pwa-splash-logo i {
  font-size: 3rem;
  color: #4E342E;
  z-index: 2;
  position: relative;
  animation: iconPulse 1.5s ease-in-out infinite;
}

.pwa-logo-image {
  width: 100px;
  height: 100px;
  object-fit: contain;
  z-index: 2;
  position: relative;
  animation: logoPulse 2s ease-in-out infinite;
  filter: drop-shadow(0 6px 12px rgba(0, 0, 0, 0.3)) brightness(1.2) contrast(1.3);
  background: rgba(255, 255, 255, 0.15);
  border-radius: 16px;
  padding: 12px;
}

.pwa-splash-title {
  margin-top: 2.5rem;
  color: white;
  font-size: 2.2rem;
  font-weight: 800;
  text-align: center;
  text-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
  animation: titleSlideUp 1.2s ease-out 1s both;
  letter-spacing: 1px;
}

.pwa-splash-subtitle {
  margin-top: 0.8rem;
  color: rgba(255, 255, 255, 0.95);
  font-size: 1.2rem;
  font-weight: 500;
  text-align: center;
  animation: subtitleSlideUp 1.2s ease-out 1.2s both;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.pwa-splash-loading {
  margin-top: 3rem;
  width: 80px;
  height: 6px;
  background: rgba(255, 255, 255, 0.3);
  border-radius: 3px;
  overflow: hidden;
  position: relative;
  animation: loadingBar 2.5s ease-in-out infinite;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.pwa-splash-loading::after {
  content: '';
  position: absolute;
  top: 0;
  left: -60px;
  width: 60px;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.8), transparent);
  animation: loadingShimmer 2s ease-in-out infinite;
}

/* Animasyonlar */
@keyframes splashFadeOut {
  0% {
    opacity: 1;
    transform: scale(1);
  }

  100% {
    opacity: 0;
    transform: scale(1.1);
    visibility: hidden;
  }
}

@keyframes logoBounce {
  0% {
    transform: scale(0) rotate(-180deg);
    opacity: 0;
  }

  50% {
    transform: scale(1.2) rotate(0deg);
    opacity: 1;
  }

  100% {
    transform: scale(1) rotate(0deg);
    opacity: 1;
  }
}

@keyframes logoGradient {

  0%,
  100% {
    opacity: 0.1;
  }

  50% {
    opacity: 0.3;
  }
}

@keyframes iconPulse {

  0%,
  100% {
    transform: scale(1);
  }

  50% {
    transform: scale(1.1);
  }
}

@keyframes logoPulse {

  0%,
  100% {
    transform: scale(1);
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.2)) brightness(1.1) contrast(1.2);
  }

  50% {
    transform: scale(1.05);
    filter: drop-shadow(0 6px 12px rgba(0, 0, 0, 0.3)) brightness(1.2) contrast(1.3);
  }
}

@keyframes titleSlideUp {
  0% {
    transform: translateY(30px);
    opacity: 0;
  }

  100% {
    transform: translateY(0);
    opacity: 1;
  }
}

@keyframes subtitleSlideUp {
  0% {
    transform: translateY(20px);
    opacity: 0;
  }

  100% {
    transform: translateY(0);
    opacity: 1;
  }
}

@keyframes loadingBar {
  0% {
    width: 0;
  }

  50% {
    width: 60px;
  }

  100% {
    width: 60px;
  }
}

@keyframes loadingShimmer {
  0% {
    left: -60px;
  }

  100% {
    left: 100%;
  }
}

/* Mobil için optimize edilmiş animasyonlar */
@media (max-width: 768px) {
  .pwa-splash-logo {
    width: 100px;
    height: 100px;
    border-radius: 20px;
  }

  .pwa-splash-logo i {
    font-size: 2.5rem;
  }

  .pwa-logo-image {
    width: 70px;
    height: 70px;
    padding: 6px;
    filter: drop-shadow(0 3px 6px rgba(0, 0, 0, 0.2)) brightness(1.1) contrast(1.2);
  }

  .pwa-splash-title {
    font-size: 1.5rem;
    margin-top: 1.5rem;
  }

  .pwa-splash-subtitle {
    font-size: 0.9rem;
    margin-top: 0.4rem;
  }

  .pwa-splash-loading {
    width: 50px;
    height: 3px;
  }
}

/* Dark mode desteği */
@media (prefers-color-scheme: dark) {
  .pwa-splash-screen {
    background: linear-gradient(135deg, #1a1a2e 0%, #3e2723 50%, #4e342e 100%);
  }

  .pwa-splash-logo {
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(15px);
    border: 2px solid rgba(255, 255, 255, 0.2);
  }

  .pwa-logo-image {
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.3)) brightness(1.3) contrast(1.4);
    background: rgba(255, 255, 255, 0.2);
  }
}

/* Güncelleme Toast Stilleri */
.update-toast {
  min-width: 350px;
  max-width: 400px;
  box-shadow: 0 8px 32px rgba(121, 85, 72, 0.2);
  border: none;
  border-radius: 12px;
  animation: toastSlideIn 0.5s ease-out;
}

.update-toast .toast-header {
  background: linear-gradient(135deg, #4E342E 0%, #795548 100%) !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 12px 12px 0 0;
  padding: 12px 16px;
}

.update-toast .toast-body {
  padding: 16px;
  background: #ffffff;
  border-radius: 0 0 12px 12px;
}

.update-toast .btn-close {
  filter: brightness(0) invert(1);
  opacity: 0.8;
  transition: opacity 0.2s;
}

.update-toast .btn-close:hover {
  opacity: 1;
}

@keyframes toastSlideIn {
  0% {
    transform: translateX(100%);
    opacity: 0;
  }

  100% {
    transform: translateX(0);
    opacity: 1;
  }
}

/* Toast container pozisyonu */
.toast-container {
  z-index: 99999;
}

/* ===== BASİT TARİH SEÇİMİ MODALI ===== */
.simple-date-modal {
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
  max-width: 400px;
  margin: 0 auto;
}

.simple-header {
  background: #f9fafb;
  border-bottom: 1px solid #e5e7eb;
  padding: 16px 20px;
  border-radius: 12px 12px 0 0;
}

.simple-header .modal-title {
  font-size: 1rem;
  font-weight: 600;
  margin: 0;
  color: #374151;
  display: flex;
  align-items: center;
  gap: 6px;
}

.simple-header .modal-title i {
  font-size: 0.9rem;
  color: #6b7280;
}

.btn-close-simple {
  background: #f3f4f6;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #6b7280;
  font-size: 12px;
  transition: all 0.2s ease;
}

.btn-close-simple:hover {
  background: #e5e7eb;
  color: #374151;
  transform: scale(1.05);
}

.simple-body {
  padding: 20px;
  background: #ffffff;
}

/* Hızlı Seçim Bölümü */
.simple-quick-select {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
  margin-bottom: 20px;
}

.simple-quick-btn {
  background: #f9fafb;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  padding: 10px 12px;
  font-size: 0.875rem;
  font-weight: 500;
  color: #374151;
  transition: all 0.2s ease;
  cursor: pointer;
}

.simple-quick-btn:hover {
  background: #f3f4f6;
  border-color: #d1d5db;
  color: #1f2937;
}

.simple-quick-btn:active {
  background: #e5e7eb;
  transform: scale(0.98);
}

/* Tarih Giriş Alanları */
.simple-date-inputs {
  margin-bottom: 20px;
}

.simple-input-group {
  margin-bottom: 12px;
}

.simple-label {
  display: block;
  font-size: 0.875rem;
  font-weight: 500;
  color: #374151;
  margin-bottom: 6px;
}

.simple-date-input {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  font-size: 0.875rem;
  color: #374151;
  background: #ffffff;
  transition: all 0.2s ease;
}

.simple-date-input:focus {
  outline: none;
  border-color: #795548;
  box-shadow: 0 0 0 3px rgba(121, 85, 72, 0.1);
}

.simple-date-input:hover {
  border-color: #9ca3af;
}

/* Aksiyon Butonları */
.simple-actions {
  display: flex;
  gap: 10px;
  align-items: center;
}

.simple-primary-btn {
  flex: 1;
  background: #4E342E;
  border: none;
  border-radius: 8px;
  padding: 10px 16px;
  font-size: 0.875rem;
  font-weight: 500;
  color: #ffffff;
  transition: all 0.2s ease;
  cursor: pointer;
}

.simple-primary-btn:hover {
  background: #3E2723;
  transform: translateY(-1px);
}

.simple-primary-btn:active {
  transform: translateY(0);
}

.simple-secondary-btn {
  background: #f3f4f6;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #6b7280;
  font-size: 14px;
  transition: all 0.2s ease;
  cursor: pointer;
}

.simple-secondary-btn:hover {
  background: #e5e7eb;
  color: #374151;
  transform: scale(1.05);
}

.simple-secondary-btn:active {
  transform: scale(0.95);
}

/* Responsive Tasarım */
@media (max-width: 576px) {
  .simple-date-modal {
    margin: 10px;
    max-width: none;
  }

  .simple-body {
    padding: 16px;
  }

  .simple-quick-select {
    grid-template-columns: repeat(2, 1fr);
    gap: 6px;
  }

  .simple-quick-btn {
    padding: 8px 10px;
    font-size: 0.8rem;
  }

  .simple-actions {
    flex-direction: column;
    gap: 8px;
  }

  .simple-secondary-btn {
    width: 100%;
    height: 36px;
  }
}

/* ===== TARİH FİLTRELEME YÜKLEME OVERLAY ===== */

/* ===== TARİH FİLTRELEME YÜKLEME OVERLAY ===== */
.date-filter-loading-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 99999;
  animation: filterLoadingFadeIn 0.3s ease-out;
}

.date-filter-loading-content {
  background: #ffffff;
  border-radius: 20px;
  padding: 40px;
  text-align: center;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  max-width: 400px;
  width: 90%;
  animation: filterLoadingSlideUp 0.5s ease-out;
}

.date-filter-loading-logo {
  width: 80px;
  height: 80px;
  background: linear-gradient(135deg, #4E342E 0%, #795548 100%);
  border-radius: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 24px;
  animation: filterLoadingLogoBounce 1s ease-out;
}

.date-filter-loading-logo i {
  font-size: 2rem;
  color: white;
  animation: filterLoadingIconPulse 1.5s ease-in-out infinite;
}

.date-filter-loading-title {
  font-size: 1.4rem;
  font-weight: 600;
  color: #1e293b;
  margin-bottom: 8px;
  animation: filterLoadingTitleSlideUp 0.8s ease-out 0.3s both;
}

.date-filter-loading-subtitle {
  font-size: 0.95rem;
  color: #64748b;
  margin-bottom: 32px;
  line-height: 1.5;
  animation: filterLoadingSubtitleSlideUp 0.8s ease-out 0.5s both;
}

.date-filter-loading-bar {
  width: 100%;
  height: 6px;
  background: #e2e8f0;
  border-radius: 3px;
  overflow: hidden;
  position: relative;
  animation: filterLoadingBarAppear 0.8s ease-out 0.7s both;
}

.date-filter-loading-progress {
  width: 0%;
  height: 100%;
  background: linear-gradient(90deg, #4E342E 0%, #795548 100%);
  border-radius: 3px;
  animation: filterLoadingProgress 2s ease-in-out infinite;
  position: relative;
}

.date-filter-loading-progress::after {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.6), transparent);
  animation: filterLoadingShimmer 2s ease-in-out infinite;
}

/* Tarih Filtreleme Yükleme Animasyonları */
@keyframes filterLoadingFadeIn {
  0% {
    opacity: 0;
  }

  100% {
    opacity: 1;
  }
}

@keyframes filterLoadingSlideUp {
  0% {
    transform: translateY(30px);
    opacity: 0;
  }

  100% {
    transform: translateY(0);
    opacity: 1;
  }
}

@keyframes filterLoadingLogoBounce {
  0% {
    transform: scale(0) rotate(-180deg);
    opacity: 0;
  }

  50% {
    transform: scale(1.2) rotate(0deg);
    opacity: 1;
  }

  100% {
    transform: scale(1) rotate(0deg);
    opacity: 1;
  }
}

@keyframes filterLoadingIconPulse {

  0%,
  100% {
    transform: scale(1);
  }

  50% {
    transform: scale(1.1);
  }
}

@keyframes filterLoadingTitleSlideUp {
  0% {
    transform: translateY(20px);
    opacity: 0;
  }

  100% {
    transform: translateY(0);
    opacity: 1;
  }
}

@keyframes filterLoadingSubtitleSlideUp {
  0% {
    transform: translateY(15px);
    opacity: 0;
  }

  100% {
    transform: translateY(0);
    opacity: 1;
  }
}

@keyframes filterLoadingBarAppear {
  0% {
    opacity: 0;
    transform: scaleX(0);
  }

  100% {
    opacity: 1;
    transform: scaleX(1);
  }
}

@keyframes filterLoadingProgress {
  0% {
    width: 0%;
  }

  50% {
    width: 70%;
  }

  100% {
    width: 100%;
  }
}

@keyframes filterLoadingShimmer {
  0% {
    left: -100%;
  }

  100% {
    left: 100%;
  }
}

/* Dark Mode Desteği */
@media (prefers-color-scheme: dark) {
  .date-filter-loading-content {
    background: #1e293b;
    color: #f1f5f9;
  }

  .date-filter-loading-title {
    color: #f1f5f9;
  }

  .date-filter-loading-subtitle {
    color: #94a3b8;
  }

  .date-filter-loading-bar {
    background: #334155;
  }
}

/* Responsive Tasarım */
@media (max-width: 576px) {
  .date-filter-loading-content {
    padding: 32px 24px;
    margin: 16px;
  }

  .date-filter-loading-logo {
    width: 70px;
    height: 70px;
    margin-bottom: 20px;
  }

  .date-filter-loading-logo i {
    font-size: 1.8rem;
  }

  .date-filter-loading-title {
    font-size: 1.2rem;
  }

  .date-filter-loading-subtitle {
    font-size: 0.9rem;
  }
}

/* Mobil ipucu metni için stiller */
.date-hint-mobile {
  background: rgba(231, 84, 128, 0.05);
  border-radius: 8px;
  padding: 0.3rem 0.5rem;
  border: 1px dashed rgba(231, 84, 128, 0.2);
  display: none;
}

.date-hint-mobile small {
  color: #e75480 !important;
  font-weight: 500;
  letter-spacing: 0.3px;
}

@media (max-width: 576px) {
  .date-hint-mobile {
    display: block;
  }
}

.date-hint-mobile small {
  color: #e75480 !important;
  font-weight: 500;
  letter-spacing: 0.3px;
}

@media (max-width: 480px) {
  .date-hint-mobile {
    padding: 0.25rem 0.4rem;
  }

  .date-hint-mobile small {
    font-size: 0.75rem !important;
  }
}

@media (max-width: 360px) {
  .date-hint-mobile {
    padding: 0.2rem 0.3rem;
  }

  .date-hint-mobile small {
    font-size: 0.7rem !important;
  }
}

@media (max-width: 480px) {
  .date-hint-text {
    font-size: 0.8rem !important;
    line-height: 1.2;
  }

  .clickable-date-bar {
    padding: 0.6rem 0.4rem;
  }

  .clickable-date-bar .d-flex {
    gap: 0.2rem;
  }
}

@media (max-width: 360px) {
  .preset-cards {
    grid-template-columns: 1fr 1fr;
    gap: 3px;
  }

  .preset-card {
    padding: 6px;
    min-height: 35px;
    gap: 4px;
  }

  .preset-icon {
    width: 18px;
    height: 18px;
    font-size: 8px;
  }

  .preset-title {
    font-size: 9px;
  }

  .preset-desc {
    font-size: 7px;
  }

  .modern-body {
    padding: 10px;
  }

  .modern-header {
    padding: 8px 10px;
  }

  .modern-close {
    width: 18px;
    height: 18px;
    font-size: 9px;
    border-radius: 3px;
  }

  .modern-footer {
    padding: 8px 10px;
  }

  .modern-date-selector {
    padding: 8px;
  }

  .date-display {
    padding: 6px 8px;
  }

  .date-icon {
    width: 25px;
    height: 25px;
    font-size: 10px;
  }

  .date-label {
    font-size: 8px;
  }

  .date-value {
    font-size: 10px;
  }

  .quick-date-buttons {
    gap: 3px;
    margin-top: 6px;
  }

  .quick-btn {
    padding: 2px 4px;
    font-size: 8px;
    border-radius: 12px;
  }

  .quick-btn span {
    display: inline;
    font-size: 7px;
  }

  .quick-btn i {
    font-size: 7px;
    margin-right: 2px;
  }
}

/* Modal açıkken arka planda kaydırmayı engelle */
body.modal-open {
  overflow: hidden !important;
  position: fixed !important;
  width: 100% !important;
  height: 100% !important;
}

.modal {
  overflow: hidden;
}

.modal-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 1040;
  width: 100vw;
  height: 100vh;
  background-color: rgba(0, 0, 0, 0.5);
}

/* Mobil cihazlarda touch scroll optimizasyonu */
@media (max-width: 768px) {
  body.modal-open {
    touch-action: pan-y !important;
    -webkit-overflow-scrolling: touch !important;
  }

  /* Mobil scroll performansı */
  * {
    -webkit-overflow-scrolling: touch;
  }

  /* Animasyonları azalt */
  .card,
  .main-card,
  .kpi-card,
  .performance-detail-card,
  .branch-card {
    animation: none !important;
    transition: transform 0.15s ease-out !important;
  }
}

/* ===== MOBİL PERFORMANS OPTİMİZASYONLARI ===== */
@media (max-width: 768px) {

  /* GPU hızlandırması */
  .card,
  .main-card,
  .kpi-card,
  .performance-detail-card,
  .branch-card,
  .modal-content {
    transform: translateZ(0);
    -webkit-transform: translateZ(0);
  }

  /* Scroll performansı */
  .tab-content,
  .tab-pane {
    -webkit-overflow-scrolling: touch;
  }

  /* Animasyonları basitleştir */
  .btn,
  .card,
  .modal-content {
    transition: transform 0.1s ease-out, opacity 0.1s ease-out !important;
  }

  /* Hover efektlerini mobilde kaldır */
  .card:hover,
  .btn:hover {
    transform: none !important;
  }
}

/* ===== MODERN DATE SELECTOR STYLES ===== */
.modern-date-selector {
  background: linear-gradient(135deg, #4E342E 0%, #795548 100%);
  border-radius: 15px;
  padding: 15px;
  box-shadow: 0 8px 25px rgba(121, 85, 72, 0.3);
  margin-bottom: 20px;
}

.date-display {
  background: rgba(255, 255, 255, 0.95);
  border-radius: 12px;
  padding: 12px 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  transition: all 0.3s ease;
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.date-display:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
  background: rgba(255, 255, 255, 1);
}

.date-icon {
  background: linear-gradient(135deg, #4E342E, #795548);
  color: white;
  width: 40px;
  height: 40px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  box-shadow: 0 3px 12px rgba(121, 85, 72, 0.4);
}

.date-content {
  flex: 1;
}

.date-label {
  font-size: 12px;
  color: #666;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 2px;
}

.date-value {
  font-size: 16px;
  color: #333;
  font-weight: 600;
}

.date-arrow {
  color: #999;
  font-size: 14px;
  transition: transform 0.3s ease;
}

.date-display:hover .date-arrow {
  transform: translateY(2px);
}

.quick-date-buttons {
  display: flex;
  gap: 10px;
  margin-top: 15px;
  flex-wrap: wrap;
}

.quick-btn {
  background: rgba(255, 255, 255, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.3);
  color: white;
  border-radius: 25px;
  padding: 8px 16px;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  gap: 6px;
  backdrop-filter: blur(10px);
  text-decoration: none;
}

.quick-btn:hover {
  background: rgba(255, 255, 255, 0.3);
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.quick-btn.active {
  background: rgba(255, 255, 255, 0.9);
  color: #795548;
  font-weight: 600;
  box-shadow: 0 4px 15px rgba(255, 255, 255, 0.3);
}

.quick-btn i {
  font-size: 12px;
}

/* Modern Date Modal */
.modern-date-modal {
  border-radius: 15px;
  border: none;
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.2);
  overflow: hidden;
  max-height: 90vh;
}

.modern-header {
  background: linear-gradient(135deg, #4E342E 0%, #795548 100%);
  color: white;
  border: none;
  padding: 15px 20px;
}

.modern-header .modal-title {
  font-weight: 600;
  font-size: 16px;
}

.modern-close {
  background: rgba(255, 255, 255, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.3);
  color: white;
  width: 24px;
  height: 24px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  font-size: 12px;
  backdrop-filter: blur(10px);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.modern-close:hover {
  background: rgba(255, 255, 255, 0.25);
  border-color: rgba(255, 255, 255, 0.5);
  transform: scale(1.05);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.modern-close:active {
  transform: scale(0.95);
}

.modern-body {
  padding: 20px;
  max-height: calc(90vh - 140px);
  overflow-y: auto;
}

.preset-cards {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-bottom: 20px;
  width: 100%;
}

.preset-card {
  background: #f8f9fa;
  border: 2px solid #e9ecef;
  border-radius: 12px;
  padding: 12px;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 60px;
  width: 100%;
}

.preset-card:hover {
  border-color: #795548;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(121, 85, 72, 0.15);
}

.preset-card.selected {
  border-color: #795548;
  background: linear-gradient(135deg, rgba(121, 85, 72, 0.1), rgba(121, 85, 72, 0.1));
}

.preset-icon {
  background: linear-gradient(135deg, #4E342E, #795548);
  color: white;
  width: 30px;
  height: 30px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  flex-shrink: 0;
}

.preset-content {
  flex: 1;
}

.preset-title {
  font-weight: 600;
  color: #333;
  margin-bottom: 2px;
  font-size: 13px;
  line-height: 1.2;
}

.preset-desc {
  font-size: 10px;
  color: #666;
  line-height: 1.2;
}

.custom-date-section {
  background: #f8f9fa;
  border-radius: 12px;
  padding: 15px;
  border: 1px solid #e9ecef;
}

.section-title {
  font-weight: 600;
  color: #333;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  font-size: 14px;
}

.date-inputs {
  display: flex;
  align-items: end;
  gap: 12px;
  flex-wrap: wrap;
}

.date-input-group {
  flex: 1;
  min-width: 150px;
}

.input-label {
  display: block;
  font-size: 12px;
  font-weight: 500;
  color: #666;
  margin-bottom: 6px;
  display: flex;
  align-items: center;
}

.modern-date-input {
  width: 100%;
  padding: 10px 12px;
  border: 2px solid #e9ecef;
  border-radius: 8px;
  font-size: 13px;
  transition: all 0.3s ease;
  background: white;
}

.modern-date-input:focus {
  outline: none;
  border-color: #795548;
  box-shadow: 0 0 0 2px rgba(121, 85, 72, 0.1);
}

.date-separator {
  display: flex;
  align-items: center;
  justify-content: center;
  color: #999;
  font-size: 14px;
  margin-bottom: 6px;
}

.modern-footer {
  background: #f8f9fa;
  border: none;
  padding: 15px 20px;
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

.modern-footer .btn {
  border-radius: 8px;
  padding: 8px 16px;
  font-weight: 500;
  transition: all 0.3s ease;
  font-size: 13px;
}

.modern-footer .btn-primary {
  background: linear-gradient(135deg, #4E342E, #795548);
  border: none;
}

.modern-footer .btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(121, 85, 72, 0.3);
}

/* Responsive Design */
@media (max-width: 768px) {
  .modern-date-selector {
    padding: 12px;
    border-radius: 15px;
  }

  .date-display {
    padding: 10px 12px;
  }

  .date-icon {
    width: 35px;
    height: 35px;
    font-size: 14px;
  }

  .date-content {
    flex: 1;
    min-width: 0;
  }

  .date-label {
    font-size: 10px;
  }

  .date-value {
    font-size: 12px;
  }

  .quick-date-buttons {
    gap: 6px;
    margin-top: 10px;
  }

  .quick-btn {
    padding: 4px 8px;
    font-size: 10px;
    border-radius: 20px;
  }

  .quick-btn span {
    display: inline;
    font-size: 9px;
  }

  .quick-btn i {
    font-size: 10px;
    margin-right: 4px;
  }

  .preset-cards {
    grid-template-columns: 1fr 1fr;
    gap: 6px;
  }

  .preset-card {
    padding: 10px;
    gap: 8px;
    min-height: 50px;
  }

  .preset-icon {
    width: 25px;
    height: 25px;
    font-size: 10px;
  }

  .preset-title {
    font-size: 12px;
  }

  .preset-desc {
    font-size: 9px;
  }

  .date-inputs {
    flex-direction: column;
    gap: 10px;
  }

  .date-input-group {
    min-width: 100%;
  }

  .date-separator {
    transform: rotate(90deg);
    margin: 5px 0;
  }

  .modern-body {
    padding: 15px;
    max-height: calc(90vh - 120px);
  }

  .modern-header {
    padding: 12px 15px;
  }

  .modern-close {
    width: 20px;
    height: 20px;
    font-size: 10px;
    border-radius: 4px;
  }

  .modern-footer {
    padding: 12px 15px;
  }

  .modern-footer .btn {
    padding: 6px 12px;
    font-size: 12px;
  }
}

@media (max-width: 480px) {
  .modern-date-modal {
    margin: 10px;
    max-height: calc(100vh - 20px);
  }

  .modern-date-selector {
    padding: 10px;
  }

  .date-display {
    padding: 8px 10px;
  }

  .date-icon {
    width: 30px;
    height: 30px;
    font-size: 12px;
  }

  .date-label {
    font-size: 9px;
  }

  .date-value {
    font-size: 11px;
  }

  .quick-date-buttons {
    gap: 4px;
    margin-top: 8px;
  }

  .quick-btn {
    padding: 3px 6px;
    font-size: 9px;
    border-radius: 15px;
  }

  .quick-btn span {
    display: inline;
    font-size: 8px;
  }

  .quick-btn i {
    font-size: 8px;
    margin-right: 3px;
  }

  .preset-cards {
    grid-template-columns: 1fr 1fr;
    gap: 4px;
  }

  .preset-card {
    padding: 8px;
    min-height: 40px;
    gap: 6px;
  }

  .preset-icon {
    width: 20px;
    height: 20px;
    font-size: 9px;
  }

  .preset-title {
    font-size: 10px;
  }

  .preset-desc {
    font-size: 8px;
  }

  .custom-date-section {
    padding: 10px;
  }

  .modern-date-input {
    padding: 6px 8px;
    font-size: 11px;
  }
}

/* Modal Ürün Satışları Stilleri */
.product-sales-content {
  padding: 1rem 0;
}

.product-sales-content .kpi-card {
  margin-bottom: 1rem;
}

.product-sales-content .table-responsive {
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.product-sales-content .table {
  margin-bottom: 0;
}

.product-sales-content .table th {
  background-color: #f8f9fa;
  border-bottom: 2px solid #dee2e6;
  font-weight: 600;
  color: #495057;
  padding: 0.75rem;
}

.product-sales-content .table td {
  padding: 0.75rem;
  vertical-align: middle;
}

.product-sales-content .chart-container {
  position: relative;
  height: 300px;
  margin-top: 1rem;
}

.product-sales-content .card {
  border: none;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  border-radius: 8px;
}

.product-sales-content .card-header {
  background: linear-gradient(135deg, #4E342E 0%, #795548 100%);
  color: white;
  border: none;
  padding: 1rem;
  border-radius: 8px 8px 0 0;
}

.product-sales-content .card-header span {
  font-weight: 600;
}

.product-sales-content .btn-gradient-primary {
  background: linear-gradient(135deg, #4E342E 0%, #795548 100%);
  border: none;
  color: white;
  padding: 0.375rem 0.75rem;
  border-radius: 6px;
  transition: all 0.3s ease;
}

.product-sales-content .btn-gradient-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(121, 85, 72, 0.4);
}

/* Modal içindeki grafikler için responsive ayarlar */
@media (max-width: 768px) {
  .product-sales-content .chart-container {
    height: 250px;
  }

  .product-sales-content .table th,
  .product-sales-content .table td {
    padding: 0.5rem;
    font-size: 0.875rem;
  }

  .product-sales-content .kpi-card {
    margin-bottom: 0.75rem;
  }
}

/* Grafik büyütme butonları için özel stiller */
.chart-expand-btn {
  border: 2px solid #795548;
  background: rgba(255, 255, 255, 0.95);
  color: #795548;
  font-weight: 600;
  padding: 0.375rem 0.75rem;
  border-radius: 0.375rem;
  transition: all 0.3s ease;
  font-size: 0.875rem;
  backdrop-filter: blur(10px);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.chart-expand-btn:hover {
  background: #795548;
  color: white;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(121, 85, 72, 0.4);
  border-color: #5D4037;
}

.chart-expand-btn:active {
  transform: translateY(0);
  box-shadow: 0 2px 6px rgba(121, 85, 72, 0.4);
}

.chart-expand-btn i {
  transition: transform 0.3s ease;
}

.chart-expand-btn:hover i {
  transform: scale(1.1);
}