/* =====================================================================
   PROJE: HRMS VARDİYA 360 - ULTRA PREMIUM DESIGN SYSTEM & DUAL THEME ENGINE
   STİL: Modern Swiss / Minimalist SaaS (Linear & Vercel Inspired)
   TEMA: Otomatik / Çift Yönlü (Koyu Slate & Aydınlık Temiz Beyaz)
   ===================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@300;400;500;600;700;800&family=JetBrains+Mono:wght@400;500;600;700&display=swap');

/* =====================================================================
   1. DESIGN TOKENS (KOYU VE AYDINLIK TEMA DEĞİŞKENLERİ)
   ===================================================================== */

:root,
[data-theme="dark"] {
  /* Koyu Tema Renk Skalası */
  --bg-main: #080b11;
  --bg-surface: #0e131f;
  --bg-surface-glass: rgba(14, 19, 31, 0.78);
  --bg-card: rgba(18, 24, 38, 0.75);
  --bg-card-hover: rgba(28, 36, 56, 0.75);
  --bg-elevated: #161e2e;
  --bg-input: rgba(12, 17, 29, 0.85);
  
  /* Çizgi & Ayrım */
  --border-subtle: rgba(255, 255, 255, 0.08);
  --border-focus: #38bdf8;
  --border-glass: rgba(255, 255, 255, 0.12);
  --border-strong: rgba(255, 255, 255, 0.18);

  /* Tipografi */
  --text-primary: #f8fafc;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  --text-inverse: #090d16;
  --text-brand: #38bdf8;

  /* Marka & Aksan */
  --accent-primary: #0284c7;
  --accent-primary-hover: #0369a1;
  --accent-secondary: #6366f1;
  --accent-gradient: linear-gradient(135deg, #0284c7 0%, #6366f1 100%);
  --accent-glow: 0 0 25px rgba(2, 132, 199, 0.35);

  /* Vardiya & Durum Kodları (Yüksek Kontrastlı ve Ayırt Edilebilir) */
  --color-day: #0284c7;
  --color-day-bg: rgba(14, 165, 233, 0.18);
  --color-night: #7c3aed;
  --color-night-bg: rgba(124, 58, 237, 0.18);
  --color-off: #0891b2;
  --color-off-bg: rgba(8, 145, 178, 0.18);
  --color-leave: #d97706;
  --color-leave-bg: rgba(245, 158, 11, 0.22);
  --color-report: #16a34a;
  --color-report-bg: rgba(22, 163, 74, 0.22);
  --color-unpaid: #e11d48;
  --color-unpaid-bg: rgba(225, 29, 72, 0.22);
  --color-training: #4f46e5;
  --color-training-bg: rgba(79, 70, 229, 0.20);
  --color-excused: #ea580c;
  --color-excused-bg: rgba(234, 88, 12, 0.20);
  --color-danger: #e11d48;
  --color-danger-bg: rgba(225, 29, 72, 0.16);
  --color-success: #16a34a;
  --color-warning: #d97706;

  /* Gölgeler */
  --shadow-sm: 0 2px 6px rgba(0, 0, 0, 0.4);
  --shadow-md: 0 10px 25px -5px rgba(0, 0, 0, 0.6);
  --shadow-lg: 0 20px 45px -10px rgba(0, 0, 0, 0.8);
  --shadow-card: 0 4px 20px rgba(0, 0, 0, 0.4), 0 0 0 1px rgba(255, 255, 255, 0.08);

  /* Tablo ve Modal */
  --table-header-bg: #0e131f;
  --table-row-hover: rgba(30, 41, 59, 0.45);
  --modal-bg: #0e131f;
  --overlay-bg: rgba(4, 6, 10, 0.75);
}

[data-theme="light"] {
  /* Aydınlık Tema Renk Skalası */
  --bg-main: #f8fafc;
  --bg-surface: #ffffff;
  --bg-surface-glass: rgba(255, 255, 255, 0.9);
  --bg-card: rgba(255, 255, 255, 0.95);
  --bg-card-hover: #f1f5f9;
  --bg-elevated: #ffffff;
  --bg-input: #ffffff;
  
  /* Çizgi & Ayrım */
  --border-subtle: rgba(15, 23, 42, 0.08);
  --border-focus: #0284c7;
  --border-glass: rgba(15, 23, 42, 0.12);
  --border-strong: rgba(15, 23, 42, 0.2);

  /* Tipografi */
  --text-primary: #0f172a;
  --text-secondary: #475569;
  --text-muted: #94a3b8;
  --text-inverse: #f8fafc;
  --text-brand: #0284c7;

  /* Marka & Aksan */
  --accent-primary: #0284c7;
  --accent-primary-hover: #0369a1;
  --accent-secondary: #4f46e5;
  --accent-gradient: linear-gradient(135deg, #0284c7 0%, #4f46e5 100%);
  --accent-glow: 0 0 20px rgba(2, 132, 199, 0.2);

  /* Vardiya & Durum Kodları (Aydınlık Tema) */
  --color-day: #0284c7;
  --color-day-bg: rgba(14, 165, 233, 0.18);
  --color-night: #7c3aed;
  --color-night-bg: rgba(124, 58, 237, 0.18);
  --color-off: #0891b2;
  --color-off-bg: rgba(8, 145, 178, 0.18);
  --color-leave: #d97706;
  --color-leave-bg: rgba(245, 158, 11, 0.22);
  --color-report: #16a34a;
  --color-report-bg: rgba(22, 163, 74, 0.22);
  --color-unpaid: #e11d48;
  --color-unpaid-bg: rgba(225, 29, 72, 0.22);
  --color-training: #4f46e5;
  --color-training-bg: rgba(79, 70, 229, 0.20);
  --color-excused: #ea580c;
  --color-excused-bg: rgba(234, 88, 12, 0.20);
  --color-danger: #e11d48;
  --color-danger-bg: rgba(225, 29, 72, 0.16);
  --color-success: #16a34a;
  --color-warning: #d97706;
  --color-danger-bg: rgba(225, 29, 72, 0.14);
  --color-success: #059669;
  --color-warning: #d97706;

  /* Gölgeler */
  --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 6px 16px -2px rgba(0, 0, 0, 0.08);
  --shadow-lg: 0 16px 32px -4px rgba(0, 0, 0, 0.12);
  --shadow-card: 0 2px 12px rgba(0, 0, 0, 0.04), 0 0 0 1px rgba(15, 23, 42, 0.08);

  /* Tablo ve Modal */
  --table-header-bg: #f1f5f9;
  --table-row-hover: #f8fafc;
  --modal-bg: #ffffff;
  --overlay-bg: rgba(15, 23, 42, 0.45);
}

:root {
  --glass-blur: blur(16px);
  --font-sans: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 22px;
  --radius-full: 9999px;
  --transition-fast: all 0.15s cubic-bezier(0.4, 0, 0.2, 1);
  --transition: all 0.22s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-theme: background 0.3s ease, color 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

/* =====================================================================
   2. TEMEL SIFIRLAMA & SAYFA GÖVDESİ
   ===================================================================== */

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

body {
  font-family: var(--font-sans);
  background-color: var(--bg-main);
  color: var(--text-primary);
  line-height: 1.55;
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  transition: var(--transition-theme);
}

/* Arka Plan Atmosferik Işıklar */
body::before {
  content: '';
  position: fixed;
  top: -15%;
  left: 25%;
  width: 550px;
  height: 550px;
  background: radial-gradient(circle, rgba(2, 132, 199, 0.08) 0%, rgba(0,0,0,0) 70%);
  pointer-events: none;
  z-index: 0;
}

body::after {
  content: '';
  position: fixed;
  bottom: -20%;
  right: 15%;
  width: 650px;
  height: 650px;
  background: radial-gradient(circle, rgba(99, 102, 241, 0.06) 0%, rgba(0,0,0,0) 70%);
  pointer-events: none;
  z-index: 0;
}

/* Layout Kapsayıcı */
.app-container {
  display: flex;
  min-height: 100vh;
  position: relative;
  z-index: 1;
}

/* Sayfa Üstü Yükleme Çubuğu */
#globalTopLoader {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  width: 0%;
  background: linear-gradient(90deg, #38bdf8, #818cf8, #a855f7);
  z-index: 99999;
  box-shadow: 0 0 10px #38bdf8;
  transition: width 0.3s cubic-bezier(0.1, 0.9, 0.2, 1), opacity 0.3s ease;
  pointer-events: none;
}

/* Scrollbar Tasarımı */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
::-webkit-scrollbar-track {
  background: var(--bg-main);
}
::-webkit-scrollbar-thumb {
  background: var(--border-strong);
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--accent-primary);
}

/* =====================================================================
   3. SIDEBAR (YAN MENÜ)
   ===================================================================== */

.sidebar {
  width: 265px;
  background: var(--bg-surface-glass);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border-right: 1px solid var(--border-subtle);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0;
  bottom: 0;
  left: 0;
  z-index: 100;
  padding: 18px 14px;
  overflow-y: auto;
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), var(--transition-theme);
}

.brand-wrapper {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 4px 8px 18px 8px;
  text-decoration: none;
  border-bottom: 1px solid var(--border-subtle);
  margin-bottom: 14px;
}

.brand-logo-img {
  height: 38px;
  width: auto;
  max-width: 100%;
  transition: opacity 0.2s ease;
}

[data-theme="light"] .brand-logo-img {
  content: url('/assets/img/logo-light.svg');
}

.nav-menu {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex: 1;
}

.nav-item a {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 9px 12px;
  border-radius: var(--radius-md);
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.86rem;
  font-weight: 600;
  transition: var(--transition-fast);
}

.nav-item a svg {
  width: 19px;
  height: 19px;
  flex-shrink: 0;
  color: var(--text-muted);
  transition: var(--transition-fast);
}

.nav-item a:hover {
  background: var(--bg-card-hover);
  color: var(--text-primary);
}

.nav-item a:hover svg {
  color: var(--accent-primary);
  transform: translateX(2px);
}

.nav-item.active a {
  background: var(--accent-gradient);
  color: #ffffff;
  box-shadow: 0 4px 14px rgba(2, 132, 199, 0.35);
}

.nav-item.active a svg {
  color: #ffffff;
}

/* Kullanıcı Profil Kartı & Çıkış */
.user-profile-bottom {
  margin-top: auto;
  padding: 12px;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  gap: 10px;
}

.user-avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--accent-gradient);
  color: #ffffff;
  font-weight: 800;
  font-size: 0.82rem;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.user-meta {
  flex: 1;
  min-width: 0;
}

.user-meta .name {
  font-weight: 700;
  font-size: 0.84rem;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.user-meta .role {
  font-size: 0.72rem;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.logout-btn {
  color: var(--text-muted);
  padding: 6px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition-fast);
}

.logout-btn:hover {
  background: var(--color-danger-bg);
  color: var(--color-danger);
}

/* =====================================================================
   4. ANA İÇERİK ALANI & ÜST BAR
   ===================================================================== */

.main-content {
  flex: 1;
  margin-left: 265px;
  padding: 24px 32px;
  min-height: 100vh;
  position: relative;
  z-index: 10;
  transition: margin-left 0.3s ease, var(--transition-theme);
}

.top-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
  gap: 16px;
}

.page-title h1 {
  font-size: 1.45rem;
  font-weight: 800;
  color: var(--text-primary);
  letter-spacing: -0.03em;
  display: flex;
  align-items: center;
  gap: 10px;
}

.page-title p {
  color: var(--text-secondary);
  font-size: 0.84rem;
  margin-top: 2px;
}

/* Üst Bar Butonları (Theme & Bell) */
.header-icon-btn,
.theme-toggle-btn {
  background: var(--bg-card);
  border: 1px solid var(--border-glass);
  border-radius: 50%;
  width: 40px;
  height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--text-primary);
  transition: var(--transition);
  box-shadow: var(--shadow-sm);
  position: relative;
  flex-shrink: 0;
}

.header-icon-btn:hover,
.theme-toggle-btn:hover {
  transform: translateY(-2px);
  border-color: var(--accent-primary);
  color: var(--accent-primary);
}

.theme-toggle-btn:hover {
  transform: rotate(20deg) scale(1.08);
}

/* =====================================================================
   5. KARTLAR, GRİDLER VE BİLEŞENLER
   ===================================================================== */

.grid-wrapper-card {
  background: var(--bg-card);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-xl);
  padding: 22px;
  box-shadow: var(--shadow-card);
  transition: var(--transition-theme);
}

.kpi-grid, .stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
  margin-bottom: 24px;
}

.kpi-card, .stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-lg);
  padding: 18px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  box-shadow: var(--shadow-card);
  transition: var(--transition);
}

.kpi-card:hover, .stat-card:hover {
  transform: translateY(-3px);
  border-color: var(--border-strong);
  box-shadow: var(--shadow-md);
}

.kpi-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 10px;
}

.kpi-title {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.kpi-icon {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
}

.kpi-value {
  font-size: 1.85rem;
  font-weight: 800;
  color: var(--text-primary);
  font-family: var(--font-mono);
  letter-spacing: -0.03em;
  margin-bottom: 4px;
}

.kpi-footer {
  font-size: 0.74rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 6px;
}

/* =====================================================================
   6. BUTONLAR, FORMLAR VE INPUTLAR
   ===================================================================== */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 8px 16px;
  border-radius: var(--radius-md);
  font-family: var(--font-sans);
  font-size: 0.84rem;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  border: 1px solid transparent;
  transition: var(--transition-fast);
  white-space: nowrap;
}

.btn-primary {
  background: var(--accent-gradient);
  color: #ffffff;
  box-shadow: 0 4px 12px rgba(2, 132, 199, 0.35);
}

.btn-primary:hover {
  transform: translateY(-2px);
  filter: brightness(1.08);
  box-shadow: 0 6px 18px rgba(2, 132, 199, 0.45);
}

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

.btn-secondary:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-glass);
  transform: translateY(-1px);
}

.btn-success {
  background: #059669;
  color: #ffffff;
  box-shadow: 0 4px 12px rgba(5, 150, 105, 0.35);
}

.btn-success:hover {
  background: #047857;
  transform: translateY(-2px);
}

.btn-danger {
  background: #dc2626;
  color: #ffffff;
  box-shadow: 0 4px 12px rgba(220, 38, 38, 0.35);
}

.btn-danger:hover {
  background: #b91c1c;
  transform: translateY(-2px);
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 14px;
}

.form-group label {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--text-secondary);
}

.form-control, .form-select {
  width: 100%;
  padding: 9px 12px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-subtle);
  background: var(--bg-input);
  color: var(--text-primary);
  font-family: var(--font-sans);
  font-size: 0.86rem;
  transition: var(--transition-fast);
  outline: none;
}

.form-control:focus, .form-select:focus {
  border-color: var(--border-focus) !important;
  box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.2) !important;
}

/* Responsive Grid Yardımcıları */
.responsive-grid-1-2 {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 20px;
}

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

.responsive-grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

.responsive-grid-4 {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}

/* =====================================================================
   7. MODALLAR VE TOAST BİLDİRİMLERİ
   ===================================================================== */

.modal-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--overlay-bg);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

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

.modal-card {
  background: var(--modal-bg);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-xl);
  width: 100%;
  max-width: 580px;
  max-height: calc(100vh - 32px);
  overflow-y: auto;
  padding: 24px;
  box-shadow: var(--shadow-lg);
  transform: scale(0.95) translateY(10px);
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.modal-backdrop.active .modal-card {
  transform: scale(1) translateY(0);
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: 14px;
  margin-bottom: 18px;
  border-bottom: 1px solid var(--border-subtle);
}

.modal-title {
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 8px;
}

.modal-close {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
  transition: var(--transition-fast);
}

.modal-close:hover {
  color: var(--text-primary);
}

/* Toast Bildirimleri */
.toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.toast {
  background: var(--bg-surface);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-md);
  padding: 12px 18px;
  min-width: 280px;
  max-width: 420px;
  display: flex;
  align-items: center;
  gap: 12px;
  box-shadow: var(--shadow-lg);
  animation: slideUpFade 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.toast.success { border-left: 4px solid var(--color-success); }
.toast.error { border-left: 4px solid var(--color-danger); }
.toast.warning { border-left: 4px solid var(--color-warning); }

/* =====================================================================
   8. SKELETON / SHIMMER YÜKLEME EFEKTLERİ
   ===================================================================== */

@keyframes shimmer {
  0%   { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}

.skeleton {
  background: linear-gradient(90deg, rgba(255,255,255,0.04) 25%, rgba(255,255,255,0.09) 37%, rgba(255,255,255,0.04) 63%);
  background-size: 400% 100%;
  animation: shimmer 1.4s ease infinite;
  border-radius: var(--radius-sm);
}

[data-theme="light"] .skeleton {
  background: linear-gradient(90deg, rgba(0,0,0,0.04) 25%, rgba(0,0,0,0.08) 37%, rgba(0,0,0,0.04) 63%);
  background-size: 400% 100%;
}

/* =====================================================================
   9. MOBİL ÜST BAR & HAMBURGER MENÜ
   ===================================================================== */

.mobile-top-bar {
  display: none;
}

.sidebar-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--overlay-bg);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  z-index: 99;
  opacity: 0;
  transition: opacity 0.28s ease;
  pointer-events: none;
}

.sidebar-overlay.active {
  display: block;
  opacity: 1;
  pointer-events: auto;
}

.mobile-menu-btn {
  background: var(--bg-card);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-sm);
  width: 40px;
  height: 40px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 4px;
  cursor: pointer;
  padding: 8px;
  transition: var(--transition-fast);
}

.hamburger-line {
  display: block;
  width: 20px;
  height: 2px;
  background-color: var(--text-primary);
  border-radius: 2px;
  transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.2s ease;
}

.mobile-menu-btn.active .hamburger-line:nth-child(1) {
  transform: translateY(6px) rotate(45deg);
}
.mobile-menu-btn.active .hamburger-line:nth-child(2) {
  opacity: 0;
  transform: scaleX(0);
}
.mobile-menu-btn.active .hamburger-line:nth-child(3) {
  transform: translateY(-6px) rotate(-45deg);
}

.mobile-project-badge {
  background: var(--color-night-bg);
  border: 1px solid var(--border-subtle);
  color: var(--accent-primary);
  font-size: 0.72rem;
  font-weight: 700;
  padding: 0 10px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  border-radius: var(--radius-full);
  white-space: nowrap;
  max-width: 125px;
  overflow: hidden;
  text-overflow: ellipsis;
}

.mobile-bell-btn {
  background: var(--bg-card);
  border: 1px solid var(--border-glass);
  border-radius: 50%;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--text-primary);
  font-size: 1.05rem;
  position: relative;
  transition: transform 0.15s ease;
}

.mobile-bell-btn:active {
  transform: scale(0.92);
}

.mobile-bell-badge {
  position: absolute;
  top: -2px;
  right: -2px;
  background: var(--color-danger);
  color: #fff;
  font-size: 0.6rem;
  font-weight: 800;
  width: 17px;
  height: 17px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid var(--bg-surface);
}

/* =====================================================================
   10. RESPONSIVE BREAKPOINTS (GENİŞ VE GÜVENLİ MARGİNLER)
   ===================================================================== */

@media (max-width: 1024px) {
  .sidebar {
    width: 250px;
  }
  .main-content {
    margin-left: 250px;
    padding: 20px 22px;
  }
  .kpi-grid, .stats-grid {
    grid-template-columns: repeat(2, 1fr) !important;
  }
  .responsive-grid-1-2 {
    grid-template-columns: 1fr !important;
  }
  .responsive-grid-4 {
    grid-template-columns: repeat(2, 1fr) !important;
  }
}

@media (max-width: 860px) {
  body::before, body::after {
    display: none !important;
  }
  .sidebar {
    width: 275px;
    transform: translateX(-100%);
    box-shadow: none !important;
    visibility: hidden;
    pointer-events: none;
  }
  .sidebar.mobile-active {
    transform: translateX(0) !important;
    box-shadow: 10px 0 35px rgba(0, 0, 0, 0.45) !important;
    visibility: visible !important;
    pointer-events: auto !important;
  }
  .main-content {
    margin-left: 0 !important;
    padding: 14px 16px 80px 16px !important; /* Ekran kenarından ferah boşluk */
    width: 100% !important;
    max-width: 100vw;
  }
  .mobile-top-bar {
    display: flex !important;
    align-items: center;
    justify-content: space-between;
    height: 56px;
    padding: 8px 16px !important;
    background: var(--bg-surface-glass);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border-bottom: 1px solid var(--border-glass);
    position: sticky;
    top: 0;
    z-index: 90;
    margin: -14px -16px 16px -16px !important;
  }
  .desktop-notification-wrapper {
    display: none !important;
  }
  .top-header {
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 12px !important;
  }
  .top-header > div:last-child {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    width: 100%;
  }
  .top-header .btn {
    flex: 1 1 auto;
  }
  .grid-wrapper-card {
    padding: 16px 14px !important;
    border-radius: var(--radius-lg);
  }
  .modal-card {
    max-width: 95vw !important;
    width: 95vw !important;
    padding: 18px 16px !important;
  }
  .modal-card [style*="grid-template-columns"] {
    grid-template-columns: 1fr !important;
  }
}

@media (max-width: 640px) {
  .kpi-grid, .stats-grid {
    grid-template-columns: 1fr !important;
  }
  .responsive-grid-2,
  .responsive-grid-3,
  .responsive-grid-4 {
    grid-template-columns: 1fr !important;
  }
  .page-title h1 {
    font-size: 1.2rem !important;
  }
}

@media (max-width: 480px) {
  .main-content {
    padding: 12px 14px 44px 14px !important;
  }
  .mobile-top-bar {
    margin: -12px -14px 16px -14px !important;
    padding: 10px 14px !important;
  }
}

/* =====================================================================
   11. ANİMASYONLAR
   ===================================================================== */

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes slideUpFade {
  from { opacity: 0; transform: translateY(16px) scale(0.98); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes pulseGlow {
  0%, 100% {
    box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.5);
    transform: scale(1);
  }
  50% {
    box-shadow: 0 0 0 6px rgba(239, 68, 68, 0);
    transform: scale(1.04);
  }
}
