/* Bootstrap 5 Scoped Styles for Sidebar - Mobile Optimized */
      /* Dar "kart" sidebar — SADECE masaüstü. Mobil max-width kuralları body html #sidebar
         ile aynı özgüllükte olmadığı için bu blok tüm genişliklerde kalırsa kapatınca 70px kart görünür kalıyordu. */
      @media (min-width: 1025px) {
      body #sidebar,
      html body #sidebar,
      body html #sidebar,
      body .sidebar#sidebar,
      html .sidebar#sidebar,
      .sidebar#sidebar,
      #sidebar,
      #sidebar.sidebar,
      body #sidebar,
      html #sidebar {
        position: fixed !important;
        top: 12.5vh !important; /* Üstten ekran yüksekliğinin 1/8'i kadar boşluk */
        left: 0px !important; /* Sola yapıştır, 0px boşluk */
        right: auto !important;
        width: 70px !important;
        height: 75vh !important; /* Ekran yüksekliğinin %75'i kadar */
        background: rgba(255, 255, 255, 0.94) !important;
        backdrop-filter: none;
        -webkit-backdrop-filter: none;
        box-shadow: 0 8px 24px rgba(15, 23, 42, 0.08) !important;
        z-index: var(--tm-z-sidebar) !important;
        display: flex !important;
        flex-direction: column !important;
        /* transition: all, accordion max-height ile çakışıp çift scroll kayması yaratmasın */
        transition: width 0.3s cubic-bezier(0.4, 0, 0.2, 1),
          box-shadow 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
        /* Kaydırma tek yerde: .sidebar-nav. İkili overflow-auto scrollbar yanıp sönmesini önler */
        overflow-x: hidden !important;
        overflow-y: hidden !important;
        border-radius: 16px !important;
        border: 1px solid rgba(148, 163, 184, 0.22) !important;
        transform: translateY(0) !important; /* Global CSS'deki translateY'yi ezeriz */
      }
  
  
      /* HOVER STATES - ULTRA SPECIFIC TO OVERRIDE GLOBAL.CSS */
      body #sidebar:hover,
      html body #sidebar:hover,
      body .sidebar#sidebar:hover,
      html .sidebar#sidebar:hover,
      .sidebar#sidebar:hover,
      #sidebar:hover,
      #sidebar.sidebar:hover,
      body #sidebar:hover,
      html #sidebar:hover {
        width: 280px !important; /* Hover'da geniş */
        left: 0px !important; /* Sola yapıştır */
        right: auto !important;
        top: 12.5vh !important; /* Hover'da da aynı konum */
        height: 75vh !important; /* Hover'da da aynı boyut */
        box-shadow: 0 12px 48px rgba(0, 0, 0, 0.15) !important; /* Baklava enhanced shadow */
        transform: translateY(0) !important; /* Global CSS'i ezeriz */
      }
      }
  
      /* Collapsed state - SADECE DESKTOP */
      @media (min-width: 1025px) {
        #sidebar.collapsed {
          width: 70px;
        }
      }
      
      /* MOBİLDE collapsed DEVRE DIŞI */
      @media (max-width: 1024px) {
        #sidebar.collapsed {
          width: min(85vw, 320px) !important;
        }
      }
  
      /* Sidebar Header */
      #sidebar .sidebar-header {
        background: var(--tm-surface, #ffffff);
        padding: 1rem;
        display: flex;
        align-items: center;
        justify-content: center;
        border-bottom: 1px solid var(--tm-border, #e5e7eb);
        min-height: 60px;
        flex-shrink: 0;
        position: sticky;
        top: 0;
        z-index: 10;
        box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
      }
  
      #sidebar:hover .sidebar-header {
        justify-content: flex-start; /* Sol hizalama */
        padding: 1rem 1.25rem;
      }
      
      #sidebar:hover .brand-subtitle {
        opacity: 1 !important;
        width: auto !important;
        transition: opacity 0.3s ease, width 0.3s ease;
      }
  
      #sidebar .sidebar-brand {
        display: flex;
        align-items: center;
        gap: 0.75rem;
        flex: 1;
      }
  
      /* Brand text varsayılan durumda gizli - SADECE DESKTOP */
      @media (min-width: 1025px) {
        body #sidebar .brand-text,
        html body #sidebar .brand-text,
        #sidebar .brand-text {
          flex: 1;
          opacity: 0 !important;
          width: 0 !important;
          overflow: hidden !important;
          transition: all 0.3s ease !important;
        }
    
        /* Hover'da brand text görünür */
        body #sidebar:hover .brand-text,
        html body #sidebar:hover .brand-text,
        #sidebar:hover .brand-text {
          opacity: 1 !important;
          width: auto !important;
          flex: 1 !important; /* Kalan alanı kapla */
          text-align: left !important; /* Sol hizalama */
        }
      }
      
      /* MOBİLDE brand text HER ZAMAN görünür */
      @media (max-width: 1024px) {
        body #sidebar .brand-text,
        html body #sidebar .brand-text,
        #sidebar .brand-text,
        #sidebar:not(:hover) .brand-text,
        #sidebar.collapsed .brand-text {
          opacity: 1 !important;
          width: auto !important;
          flex: 1 !important;
          overflow: visible !important;
          visibility: visible !important;
        }
      }
  
      #sidebar .brand-title {
        font-size: 1.25rem;
        font-weight: 700;
        color: var(--tm-text-primary, #1e293b);
        margin: 0;
        line-height: 1.2;
        letter-spacing: -0.5px;
        white-space: nowrap;
      }
  
      #sidebar .brand-subtitle {
        font-size: 0.75rem;
        color: rgba(255, 255, 255, 0.9);
        margin: 0;
        line-height: 1.2;
      }
  
      /* Sidebar Toggle Buttons */
      #sidebar .sidebar-toggle,
      #sidebar .mobile-sidebar-close {
        background: var(--tm-bg-secondary, #f1f5f9);
        border: none;
        color: var(--tm-text-muted, #64748b);
        width: 36px;
        height: 36px;
        border-radius: 8px;
        display: none;
        align-items: center;
        justify-content: center;
        cursor: pointer;
        transition: all 0.3s ease;
        opacity: 0;
      }
  
      #sidebar:hover .sidebar-toggle {
        display: flex;
        opacity: 1;
      }
  
      #sidebar .sidebar-toggle:hover,
      #sidebar .mobile-sidebar-close:hover {
        background: var(--tm-border, #e2e8f0);
        color: #475569;
        transform: scale(1.05);
      }
  
      #sidebar .mobile-sidebar-close {
        display: none;
      }
  
      /* Navigation */
      #sidebar .sidebar-nav {
        flex: 1;
        min-height: 0; /* flex içinde scroll için gerekli; accordion kapanınca layout zıplamasını azaltır */
        padding: 0.5rem 0.25rem; /* Padding azaltıldı */
        padding-bottom: 0.25rem; /* Alt padding eklendi */
        overflow-y: auto;
        overflow-x: hidden;
      }
  
      /* Nav Links - varsayılan durumda center */
      body #sidebar .nav-link,
      html body #sidebar .nav-link,
      #sidebar .nav-link {
        display: flex !important;
        align-items: center !important;
        gap: 0.5rem !important; /* İkon ve yazı arası boşluk azaltıldı */
        padding: 0.5rem 0.375rem !important; /* Daha dar padding */
        color: #475569 !important;
        text-decoration: none !important;
        border-radius: 8px !important;
        transition: all 0.2s ease !important;
        margin-bottom: 0.125rem !important; /* Linkler arası boşluk azaltıldı */
        font-weight: 500 !important;
        font-size: 0.9375rem !important;
        position: relative !important;
        justify-content: center !important; /* İkonları ortala */
        text-align: center !important;
      }
      
  
      /* Hover'da normal hizalama */
      body #sidebar:hover .nav-link,
      html body #sidebar:hover .nav-link,
      #sidebar:hover .nav-link {
        justify-content: flex-start !important;
        padding: 0.5rem 0.75rem !important; /* Hover padding azaltıldı */
        text-align: left !important; /* Sol hizalama */
      }
  
      #sidebar .nav-link:hover {
        background: rgba(var(--color-primary-rgb), 0.12) !important; /* Baklava Primary Light */
        color: var(--color-primary) !important; /* Baklava Primary */
        border-radius: 8px !important; /* Baklava border-radius-sm */
        padding: 0.5rem 0.75rem !important;
      }
      
      /* Active buton hover durumunda farklı stil */
      #sidebar .nav-link.active:hover {
        background: var(--color-primary-hover) !important; /* Baklava Primary Hover */
        color: var(--tm-surface, #ffffff) !important;
      }
  
      #sidebar .nav-link.active {
        background: var(--color-primary) !important;
        color: var(--tm-surface, #ffffff) !important;
        font-weight: 600 !important;
        border-radius: 8px !important; /* Baklava border-radius-sm */
        border-left: none !important;
        box-shadow: none !important;
      }
  
      #sidebar .nav-link.logout {
        color: #ef4444;
      }
   
      #sidebar .nav-link.logout:hover {
        background: rgba(239, 35, 60, 0.12); /* Baklava Danger Light */
        color: #EF233C; /* Baklava Danger */
      }
  
      #sidebar .nav-icon {
        width: 32px;
        height: 32px;
        min-width: 32px;
        display: flex;
        align-items: center;
        justify-content: center;
        flex-shrink: 0;
        margin-right: 0;
        border-radius: 12px;
        transition: background 0.3s ease, color 0.3s ease;
      }
  
      /* Hover durumunda icon margin'i kaldır */
      body #sidebar:hover .nav-icon,
      html body #sidebar:hover .nav-icon,
      #sidebar:hover .nav-icon {
        margin-right: 0;
      }
  
      #sidebar .nav-link.active .nav-icon,
      #sidebar .nav-sublink.active .nav-icon {
        background: rgba(var(--color-primary-rgb), 0.45);
        color: var(--tm-surface, #ffffff);
      }
  
      /* Varsayılan durumda text'ler gizli - SADECE DESKTOP */
      @media (min-width: 1025px) {
        body #sidebar .nav-label,
        html body #sidebar .nav-label,
        #sidebar .nav-label {
          flex: 1;
          white-space: nowrap;
          opacity: 0 !important;
          width: 0 !important;
          overflow: hidden !important;
          transition: all 0.3s ease !important;
        }
    
        /* Hover'da text'ler görünür */
        body #sidebar:hover .nav-label,
        html body #sidebar:hover .nav-label,
        #sidebar:hover .nav-label {
          opacity: 1 !important;
          width: auto !important;
          flex: 1 !important; /* Kalan alanı kapla */
          text-align: left !important; /* Sol hizalama */
          white-space: nowrap !important; /* Tek satırda kal */
        }
      }
      
      /* MOBİLDE text'ler HER ZAMAN görünür */
      @media (max-width: 1024px) {
        body #sidebar .nav-label,
        html body #sidebar .nav-label,
        #sidebar .nav-label,
        #sidebar:not(:hover) .nav-label,
        #sidebar.collapsed .nav-label {
          opacity: 1 !important;
          width: auto !important;
          flex: 1 !important;
          overflow: visible !important;
          visibility: visible !important;
          display: inline-block !important;
          text-align: left !important;
          white-space: nowrap !important;
        }
      }
  
      /* Nav Groups (Accordion) */
      #sidebar .nav-group {
        margin-bottom: 0.25rem; /* Grup arası boşluk azaltıldı */
      }
  
      /* Sidebar collapsed durumda sublink'leri gizle - SADECE DESKTOP */
      @media (min-width: 1025px) {
        #sidebar.collapsed .nav-group-content,
        #sidebar.collapsed .nav-group.expanded .nav-group-content,
        #sidebar:not(:hover) .nav-group-content {
          max-height: 0 !important;
          padding: 0 !important;
          overflow: hidden !important;
        }
    
        #sidebar.collapsed .nav-group .nav-sublink.active,
        #sidebar:not(:hover) .nav-group .nav-sublink.active {
          display: none !important;
        }
    
        #sidebar.collapsed .nav-group:has(.nav-sublink.active) .nav-group-header,
        #sidebar:not(:hover) .nav-group:has(.nav-sublink.active) .nav-group-header {
          background: rgba(var(--color-primary-rgb), 0.12) !important; /* Baklava Primary Light */
          color: var(--color-primary) !important; /* Baklava Primary */
          font-weight: 600 !important;
        }

        /*
          #products / #admin-operations / #promotion-profit için
          `#sidebar .nav-group.expanded #… { max-height: none !important }` özgüllüğü,
          `#sidebar:not(:hover) .nav-group-content { max-height: 0 }` kuralını yeniyordu;
          mini sidebar’da içerik kapanmıyor, seçili sublink’ler dar sütunda şişiyordu.
        */
        #sidebar:not(:hover) .nav-group.expanded #products,
        #sidebar:not(:hover) .nav-group.expanded #admin-operations,
        #sidebar:not(:hover) .nav-group.expanded #promotion-profit,
        #sidebar.collapsed .nav-group.expanded #products,
        #sidebar.collapsed .nav-group.expanded #admin-operations,
        #sidebar.collapsed .nav-group.expanded #promotion-profit {
          max-height: 0 !important;
          min-height: 0 !important;
          padding-top: 0 !important;
          overflow: hidden !important;
          overflow-y: hidden !important;
        }
      }
  
      #sidebar .nav-group-header {
        display: flex;
        align-items: center;
        gap: 0.5rem; /* Header gap azaltıldı */
        padding: 0.5rem 0.375rem; /* Header padding azaltıldı */
        width: 100%;
        background: transparent;
        border: none;
        color: #475569;
        text-align: left;
        border-radius: 10px;
        cursor: pointer;
        transition: all 0.2s ease;
        font-weight: 500;
        font-size: 0.9375rem;
        margin-bottom: 0.125rem; /* Header margin azaltıldı */
        justify-content: center; /* Varsayılan durumda ortala */
        position: relative;
      }
      
      /* Expanded accordion header styling */
      #sidebar .nav-group.expanded .nav-group-header {
        background: rgba(var(--color-primary-rgb), 0.1) !important; /* Baklava Primary Light */
        color: var(--color-primary) !important; /* Baklava Primary */
        font-weight: 600 !important;
        border-radius: 8px !important;
      }
  
      /* Hover durumunda header hizalaması */
      body #sidebar:hover .nav-group-header,
      html body #sidebar:hover .nav-group-header,
      #sidebar:hover .nav-group-header {
        justify-content: flex-start !important; /* Hover'da sol hizalama */
        padding: 0.5rem 0.75rem !important; /* Hover'da daha geniş padding */
      }
  
      #sidebar .nav-group-header:hover {
        background: rgba(100, 116, 139, 0.1) !important;
        color: var(--tm-text-muted, #64748b) !important;
        border-radius: 8px !important;
      }
      
      /* Expanded accordion header hover */
      #sidebar .nav-group.expanded .nav-group-header:hover {
        background: rgba(14, 165, 233, 0.2) !important;
        color: #0369a1 !important;
      }
  
      #sidebar .nav-group-header.admin-accordion {
        background: #fee2e2;
        color: #991b1b;
        border: none;
      }
  
      #sidebar .nav-group-header.admin-accordion:hover {
        background: #fecaca;
      }
  
      /* Nav arrow varsayılan durumda gizli - SADECE DESKTOP */
      @media (min-width: 1025px) {
        body #sidebar .nav-arrow,
        html body #sidebar .nav-arrow,
        #sidebar .nav-arrow {
          margin-left: auto;
          transition: all 0.3s ease !important;
          width: 16px;
          height: 16px;
          opacity: 0 !important;
          width: 0 !important;
          overflow: hidden !important;
        }
    
        /* Hover'da nav arrow görünür */
        body #sidebar:hover .nav-arrow,
        html body #sidebar:hover .nav-arrow,
        #sidebar:hover .nav-arrow {
          opacity: 1 !important;
          width: 16px !important;
          margin-left: auto !important; /* Arrow'u sağa yasla */
        }
    
        #sidebar .nav-group.expanded .nav-arrow {
          transform: rotate(180deg);
        }
      }
      
      /* MOBİLDE nav arrow HER ZAMAN görünür */
      @media (max-width: 1024px) {
        body #sidebar .nav-arrow,
        html body #sidebar .nav-arrow,
        #sidebar .nav-arrow,
        #sidebar:not(:hover) .nav-arrow,
        #sidebar.collapsed .nav-arrow {
          opacity: 1 !important;
          width: 24px !important;
          height: 24px !important;
          overflow: visible !important;
          visibility: visible !important;
          margin-left: auto !important;
        }
        
        #sidebar .nav-group.expanded .nav-arrow {
          transform: rotate(180deg) !important;
        }
      }
  
      #sidebar .nav-group-content {
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.3s ease;
        padding-left: 0.5rem;
      }
  
      #sidebar .nav-group.expanded .nav-group-content {
        max-height: 2000px;
        padding-top: 0.5rem;
      }
      
      /* Products accordion için özel stil - tüm butonlar görünsün */
      #sidebar #products {
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.3s ease;
      }
      
      #sidebar .nav-group.expanded #products {
        max-height: none !important; /* Sınırsız yükseklik - tüm butonlar görünsün */
        overflow-y: auto;
        overflow-x: hidden;
        padding-top: 0.5rem;
      }
      
      /* Admin accordion için özel stil - daha fazla alan (artırıldı) */
      #sidebar #admin-operations {
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.3s ease;
      }
      
      #sidebar .nav-group.expanded #admin-operations {
        max-height: none !important; /* Sınırsız yükseklik - tüm butonlar görünsün */
        overflow-y: auto;
        overflow-x: hidden;
        padding-top: 0.5rem;
      }
      
      /* Promosyon Kârlılık Analizi accordion için özel stil */
      #sidebar #promotion-profit {
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.3s ease;
      }
      
      #sidebar .nav-group.expanded #promotion-profit {
        max-height: none !important; /* Sınırsız yükseklik - tüm butonlar görünsün */
        overflow-y: auto;
        overflow-x: hidden;
        padding-top: 0.5rem;
      }
      
      /* Scroll bar styling for products */
      #sidebar #products::-webkit-scrollbar {
        width: 4px;
      }
      
      #sidebar #products::-webkit-scrollbar-track {
        background: transparent;
      }
      
      #sidebar #products::-webkit-scrollbar-thumb {
        background: rgba(0, 0, 0, 0.2);
        border-radius: 2px;
      }
      
      #sidebar #products::-webkit-scrollbar-thumb:hover {
        background: rgba(0, 0, 0, 0.3);
      }
      
      /* Scroll bar styling for admin operations */
      #sidebar #admin-operations::-webkit-scrollbar {
        width: 4px;
      }
      
      #sidebar #admin-operations::-webkit-scrollbar-track {
        background: transparent;
      }
      
      #sidebar #admin-operations::-webkit-scrollbar-thumb {
        background: rgba(0, 0, 0, 0.2);
        border-radius: 2px;
      }
      
      #sidebar #admin-operations::-webkit-scrollbar-thumb:hover {
        background: rgba(0, 0, 0, 0.3);
      }
      
      /* Scroll bar styling for promotion profit */
      #sidebar #promotion-profit::-webkit-scrollbar {
        width: 4px;
      }
      
      #sidebar #promotion-profit::-webkit-scrollbar-track {
        background: transparent;
      }
      
      #sidebar #promotion-profit::-webkit-scrollbar-thumb {
        background: rgba(0, 0, 0, 0.2);
        border-radius: 2px;
      }
      
      #sidebar #promotion-profit::-webkit-scrollbar-thumb:hover {
        background: rgba(0, 0, 0, 0.3);
      }
  
      #sidebar .nav-sublink {
        display: flex;
        align-items: center;
        gap: 0.5rem; /* Sublink gap azaltıldı */
        padding: 0.5rem 0.75rem 0.5rem 1.75rem; /* Sublink padding azaltıldı */
        color: var(--tm-text-muted, #64748b);
        text-decoration: none;
        border-radius: 8px;
        transition: all 0.2s ease;
        margin-bottom: 0.1rem; /* Sublink margin azaltıldı */
        font-size: 0.875rem;
        font-weight: 400;
        position: relative;
      }
      
      #sidebar .nav-sublink span:not([style*="Temel+"]):not([style*="Profesyonel+"]) {
        flex: 1;
      }
  
      #sidebar .nav-sublink:hover {
        background: rgba(var(--color-primary-rgb), 0.12) !important; /* Baklava Primary Light */
        color: var(--color-primary) !important; /* Baklava Primary */
        border-radius: 6px !important;
        padding-left: 1.75rem !important;
      }
      
      /* Active sublink hover durumunda farklı stil */
      #sidebar .nav-sublink.active:hover {
        background: var(--color-primary-hover) !important; /* Baklava Primary Hover */
        color: var(--tm-surface, #ffffff) !important;
      }

      #sidebar .nav-sublink.active {
        background: var(--color-primary) !important;
        color: var(--tm-surface, #ffffff) !important;
        font-weight: 600 !important;
        border-radius: 6px !important;
        border-left: none !important;
        box-shadow: none !important;
      }

      /* AI görsel araçları — tek vurgulu kısayol (içerik/beta satırı yok) */
      #sidebar .nav-sublink.pia-sidebar-cta {
        background: var(--color-primary) !important;
        color: var(--tm-surface, #ffffff) !important;
        font-weight: 600 !important;
      }
      #sidebar .nav-sublink.pia-sidebar-cta:hover {
        background: #ea580c !important;
        color: var(--tm-surface, #ffffff) !important;
      }
      #sidebar .nav-sublink.pia-sidebar-cta i,
      #sidebar .nav-sublink.pia-sidebar-cta span {
        color: var(--tm-surface, #ffffff) !important;
      }
      #sidebar .nav-sublink.pia-sidebar-cta.active {
        box-shadow: none;
      }

      /* Masaüstü: satırlar daha opak — hedef/tıklama alanı net */
      @media (min-width: 1025px) {
        html:not(.dark-mode) #sidebar .nav-link:not(.active) {
          background: rgba(255, 255, 255, 0.94) !important;
          border: none !important;
          box-shadow: none !important;
        }

        /* :not(.active) — aktif sayfa + hover’da şeftali zemin beyaz yazıyı okunamaz yapıyordu */
        html:not(.dark-mode) #sidebar .nav-link:hover:not(.active) {
          background: rgba(255, 247, 237, 0.98) !important;
        }

        html:not(.dark-mode) #sidebar .nav-link.active {
          border: none !important;
          box-shadow: none !important;
        }

        html:not(.dark-mode) #sidebar .nav-link.logout:not(:hover) {
          background: rgba(255, 255, 255, 0.94) !important;
          border: none !important;
        }

        html:not(.dark-mode) #sidebar .nav-link.logout:hover {
          background: rgba(254, 242, 242, 0.98) !important;
        }

        html:not(.dark-mode) #sidebar .nav-group-header:not(.admin-accordion) {
          background: rgba(255, 255, 255, 0.92) !important;
          border: none !important;
        }

        html:not(.dark-mode) #sidebar .nav-group.expanded .nav-group-header:not(.admin-accordion) {
          background: rgba(255, 243, 224, 0.96) !important;
        }

        html:not(.dark-mode) #sidebar .nav-group-header:hover:not(.admin-accordion) {
          background: rgba(248, 250, 252, 0.99) !important;
        }

        html:not(.dark-mode) #sidebar .nav-group.expanded .nav-group-header:hover:not(.admin-accordion) {
          background: rgba(224, 242, 254, 0.96) !important;
        }

        html:not(.dark-mode) #sidebar .nav-sublink:not(.active):not(.pia-sidebar-cta) {
          background: rgba(255, 255, 255, 0.91) !important;
          border: none !important;
        }

        html:not(.dark-mode) #sidebar .nav-sublink:hover:not(.active):not(.pia-sidebar-cta) {
          background: rgba(255, 237, 213, 0.97) !important;
        }

        /* Dar rail: seçili alt sayfa varken grup başlığı turuncu ipucu kalsın */
        html:not(.dark-mode) #sidebar.collapsed .nav-group:has(.nav-sublink.active) .nav-group-header:not(.admin-accordion),
        html:not(.dark-mode) #sidebar:not(:hover) .nav-group:has(.nav-sublink.active) .nav-group-header:not(.admin-accordion) {
          background: rgba(255, 243, 224, 0.96) !important;
          color: var(--color-primary) !important;
        }
      }
  
      #sidebar .nav-sublink i {
        width: 16px;
        height: 16px;
        flex-shrink: 0;
      }
      
      /* Plan feature lock icons */
      #sidebar .nav-link i[data-lucide="lock"],
      #sidebar .nav-sublink i[data-lucide="lock"] {
        width: 14px;
        height: 14px;
        flex-shrink: 0;
        opacity: 0.7;
      }
      
      #sidebar .nav-sublink {
        position: relative;
      }
      
      /* Plan badge styles for sidebar */
      #sidebar .nav-link span[style*="Temel+"],
      #sidebar .nav-link span[style*="Profesyonel+"],
      #sidebar .nav-sublink span[style*="Temel+"],
      #sidebar .nav-sublink span[style*="Profesyonel+"] {
        display: inline-flex;
        align-items: center;
        padding: 0.15rem 0.4rem;
        border-radius: 8px;
        font-size: 0.65rem !important;
        font-weight: 600 !important;
        text-transform: uppercase;
        letter-spacing: 0.3px;
        margin-left: 0.5rem;
      }
      
      #sidebar .nav-link span[style*="Temel+"] {
        background: rgba(var(--color-primary-rgb), 0.12);
        color: var(--color-primary) !important; /* Baklava Primary */
        border: 1px solid rgba(var(--color-primary-rgb), 0.2); /* Baklava Primary */
      }
      
      #sidebar .nav-link span[style*="Profesyonel+"],
      #sidebar .nav-sublink span[style*="Profesyonel+"] {
        background: rgba(168, 85, 247, 0.1);
        color: #a855f7 !important;
        border: 1px solid rgba(168, 85, 247, 0.2);
      }
  
      /* Mobile Specific Styles - KRITIK OVERRIDES */
      @media (max-width: 1024px) {
        /* Force text visibility - HER ZAMAN */
        #sidebar .nav-label,
        #sidebar span,
        #sidebar .nav-link span,
        #sidebar .nav-sublink span,
        #sidebar.collapsed .nav-label,
        #sidebar.collapsed span,
        #sidebar.collapsed .nav-link span,
        #sidebar.collapsed .nav-sublink span,
        #sidebar:not(:hover) .nav-label,
        #sidebar:not(:hover) span,
        #sidebar:not(:hover) .nav-link span,
        #sidebar:not(:hover) .nav-sublink span {
          opacity: 1 !important;
          width: auto !important;
          visibility: visible !important;
          display: inline-block !important;
          flex: 1 !important;
        }
        
        /* Mobilde collapsed durumunu TAMAMEN devre dışı bırak */
        #sidebar.collapsed,
        #sidebar.collapsed.mobile-open {
          width: min(85vw, 320px) !important;
        }
        
        /* Mobilde :not(:hover) kurallarını TAMAMEN devre dışı bırak */
        #sidebar:not(:hover) .nav-group-content,
        #sidebar.collapsed .nav-group-content {
          /* Mobilde bu kurallar GEÇERSİZ - V3 stilleri geçerli */
        }
        
        /* Accordion content mobilde DAIMA düzgün çalışsın */
        #sidebar .nav-group.expanded .nav-group-content,
        #sidebar.collapsed .nav-group.expanded .nav-group-content,
        #sidebar:not(:hover) .nav-group.expanded .nav-group-content {
          max-height: 3000px !important;
          overflow: visible !important;
          opacity: 1 !important;
          pointer-events: auto !important;
        }
        
        /* Aktif sublink'ler mobilde DAIMA görünsün */
        #sidebar .nav-sublink.active,
        #sidebar.collapsed .nav-sublink.active,
        #sidebar:not(:hover) .nav-sublink.active,
        #sidebar .nav-group .nav-sublink.active,
        #sidebar.collapsed .nav-group .nav-sublink.active,
        #sidebar:not(:hover) .nav-group .nav-sublink.active {
          display: flex !important;
          visibility: visible !important;
          opacity: 1 !important;
        }
        
        /* İkon ve metin HER ZAMAN görünsün */
        #sidebar .nav-icon,
        #sidebar.collapsed .nav-icon,
        #sidebar:not(:hover) .nav-icon {
          opacity: 1 !important;
          visibility: visible !important;
          display: flex !important;
        }
      }
  
      /* Scrollbar Styling */
      #sidebar .sidebar-nav::-webkit-scrollbar {
        width: 6px;
      }
  
      #sidebar .sidebar-nav::-webkit-scrollbar-track {
        background: var(--tm-bg-secondary, #f1f5f9);
        border-radius: 10px;
      }
  
      #sidebar .sidebar-nav::-webkit-scrollbar-thumb {
        background: var(--tm-border-strong, #cbd5e1);
        border-radius: 10px;
      }
  
      #sidebar .sidebar-nav::-webkit-scrollbar-thumb:hover {
        background: var(--tm-text-muted, #94a3b8);
      }
  
      /* Collapsed State - SADECE DESKTOP */
      @media (min-width: 1025px) {
        #sidebar.collapsed:not(.mobile-open) {
          transform: translateX(-100%);
        }
      }

      /* Desktop Expanded State - ULTRA SPECIFIC */
      @media (min-width: 1025px) {
        body #sidebar:hover,
        html body #sidebar:hover,
        body .sidebar#sidebar:hover,
        html .sidebar#sidebar:hover,
        .sidebar#sidebar:hover,
        #sidebar:hover,
        #sidebar.sidebar:hover,
        body #sidebar:hover,
        html #sidebar:hover {
          width: 280px !important;
          height: 75vh !important; /* Desktop hover'da da %75 yükseklik */
          transform: translateY(0) !important; /* Global CSS'i ezeriz */
        }
        
        #sidebar:not(.collapsed) {
          transform: translateX(0) !important;
        }
      }
  
      /* ============================================================
         MOBİL SIDEBAR V3 - YENİDEN TASARLANMIŞ
         Modern, kullanıcı dostu ve sorunsuz
      ============================================================ */
      @media (max-width: 1024px) {
        /* Ana container - Tam ekran panel (masaüstü body html #sidebar ile aynı özgüllük) */
        body #sidebar,
        html body #sidebar,
        body html #sidebar,
        body .sidebar#sidebar,
        html .sidebar#sidebar,
        .sidebar#sidebar,
        #sidebar,
        #sidebar.sidebar,
        body #sidebar,
        html #sidebar {
          position: fixed !important;
          top: 0 !important;
          left: -100% !important;
          bottom: 0 !important;
          height: 100dvh !important;
          width: min(85vw, 320px) !important;
          max-width: 320px !important;
          min-width: 280px !important;
          padding: 0 !important;
          border-radius: 0 !important;
          overflow: hidden !important;
          display: flex !important;
          flex-direction: column !important;
          background: var(--tm-surface, #ffffff) !important;
          background-color: var(--tm-surface, #ffffff) !important;
          background-image: none !important;
          box-shadow: 4px 0 32px rgba(0, 0, 0, 0.15) !important;
          backdrop-filter: none !important;
          z-index: var(--tm-z-sidebar) !important;
          transition: left 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
          transform: none !important;
        }

        /* Sidebar açık durumu */
        body #sidebar.mobile-open,
        html body #sidebar.mobile-open,
        body html #sidebar.mobile-open,
        body .sidebar#sidebar.mobile-open,
        html .sidebar#sidebar.mobile-open,
        #sidebar.mobile-open,
        #sidebar.sidebar.mobile-open,
        body #sidebar.mobile-open,
        html #sidebar.mobile-open,
        #sidebar.mobile-open,
        #sidebar.collapsed.mobile-open {
          left: 0 !important;
          top: 0 !important;
          height: 100dvh !important;
          width: min(85vw, 320px) !important;
          display: flex !important;
          opacity: 1 !important;
          visibility: visible !important;
          pointer-events: auto !important;
          transform: none !important;
          background: var(--tm-surface, #ffffff) !important;
          background-color: var(--tm-surface, #ffffff) !important;
          background-image: none !important;
        }

        /* Header — açık zemin + turuncu marka yazısı (okunabilirlik) */
        #sidebar .sidebar-header {
          display: flex !important;
          align-items: center !important;
          justify-content: space-between !important;
          flex-shrink: 0 !important;
          padding: 16px 20px !important;
          min-height: 70px !important;
          background: var(--tm-surface, #ffffff) !important;
          border-bottom: 2px solid var(--color-primary) !important;
          position: sticky !important;
          top: 0 !important;
          z-index: 100 !important;
          border-radius: 0 !important;
          color: var(--tm-text-primary, #0f172a) !important;
        }

        /* Kapatma butonu - Görünür ve tıklanabilir */
        /* Masaüstü chevron — mobil drawer'da yalnızca X kullanılsın; hover ile görünüp yanlışlıkla kapanmayı önler */
        #sidebar .sidebar-toggle {
          display: none !important;
          pointer-events: none !important;
          visibility: hidden !important;
        }

        #sidebar .mobile-sidebar-close {
          display: inline-flex !important;
          opacity: 1 !important;
          visibility: visible !important;
          pointer-events: auto !important;
          background: #fff7ed !important;
          border: none !important;
          color: #9a3412 !important;
          width: 40px !important;
          height: 40px !important;
          border-radius: 12px !important;
          box-shadow: none !important;
          transition: all 0.2s ease !important;
          align-items: center !important;
          justify-content: center !important;
          cursor: pointer !important;
          z-index: 101 !important;
        }
        
        #sidebar .mobile-sidebar-close:hover,
        #sidebar .mobile-sidebar-close:active {
          background: #ffedd5 !important;
          transform: scale(1.05) !important;
        }
        
        #sidebar .mobile-sidebar-close i,
        #sidebar .mobile-sidebar-close svg {
          width: 20px !important;
          height: 20px !important;
          color: #c2410c !important;
        }

        /* Logo/Avatar alanı */
        #sidebar .sidebar-brand {
          display: flex !important;
          align-items: center !important;
          gap: 12px !important;
        }

        #sidebar .sidebar-user-avatar,
        #sidebar .brand-logo {
          width: 42px !important;
          height: 42px !important;
          margin-right: 0 !important;
          border: none !important;
          border-radius: 12px !important;
          box-shadow: none !important;
        }

        body #sidebar .brand-text,
        html body #sidebar .brand-text,
        #sidebar .brand-text,
        #sidebar.collapsed .brand-text,
        #sidebar.mobile-open .brand-text {
          opacity: 1 !important;
          width: auto !important;
          max-width: none !important;
          flex: 1 !important;
          min-width: 0 !important;
          overflow: visible !important;
          visibility: visible !important;
          display: flex !important;
          flex-direction: column !important;
          -webkit-text-fill-color: initial !important;
        }

        #sidebar .brand-title,
        #sidebar.collapsed .brand-title,
        #sidebar.mobile-open .brand-title {
          font-size: 1.2rem !important;
          font-weight: 800 !important;
          line-height: 1.25 !important;
          color: var(--color-primary) !important;
          -webkit-text-fill-color: var(--color-primary) !important;
          text-shadow: none !important;
          opacity: 1 !important;
          visibility: visible !important;
          display: block !important;
        }
        
        #sidebar .brand-subtitle {
          display: block !important;
          font-size: 0.75rem !important;
          color: var(--tm-text-muted, #64748b) !important;
          opacity: 1 !important;
          width: auto !important;
          max-width: 100% !important;
          overflow: hidden !important;
          text-overflow: ellipsis !important;
          white-space: nowrap !important;
          margin-top: 2px !important;
        }

        /* Navigasyon alanı */
        #sidebar .sidebar-nav {
          flex: 1 1 auto !important;
          min-height: 0 !important;
          padding: 12px 0 max(24px, calc(env(safe-area-inset-bottom, 0px) + 16px)) 0 !important;
          margin: 0 !important;
          border-radius: 0 !important;
          overflow-y: auto !important;
          overflow-x: hidden !important;
          -webkit-overflow-scrolling: touch;
          max-height: none !important;
          background: var(--tm-bg-secondary, #f8fafc) !important;
        }

        /* Ana menü öğeleri - Kompakt ve temiz */
        body #sidebar .nav-link,
        html body #sidebar .nav-link,
        #sidebar .nav-link {
          width: calc(100% - 24px) !important;
          min-height: 52px !important;
          padding: 12px 14px !important;
          margin: 4px 12px !important;
          border-radius: 12px !important;
          font-size: 0.9375rem !important;
          font-weight: 500 !important;
          gap: 12px !important;
          box-shadow: none !important;
          background: var(--tm-surface, #ffffff) !important;
          border: none !important;
          outline: none !important;
          transform: none !important;
          line-height: 1.4 !important;
          color: var(--tm-text-primary, #1e293b) !important;
          transition: all 0.2s ease !important;
          justify-content: flex-start !important;
          text-align: left !important;
          display: flex !important;
          align-items: center !important;
        }
        
        /* Accordion başlıkları */
        body #sidebar .nav-group-header,
        html body #sidebar .nav-group-header,
        #sidebar .nav-group-header {
          width: calc(100% - 24px) !important;
          min-height: 52px !important;
          padding: 12px 14px !important;
          margin: 4px 12px !important;
          border-radius: 12px !important;
          font-size: 0.9375rem !important;
          font-weight: 500 !important;
          gap: 12px !important;
          box-shadow: none !important;
          background: var(--tm-surface, #ffffff) !important;
          border: none !important;
          transform: none !important;
          line-height: 1.4 !important;
          color: var(--tm-text-primary, #1e293b) !important;
          transition: all 0.2s ease !important;
          justify-content: flex-start !important;
          display: flex !important;
          align-items: center !important;
          cursor: pointer !important;
        }

        #sidebar.mobile-open .nav-group-header,
        #sidebar.collapsed.mobile-open .nav-group-header {
          width: calc(100% - 24px) !important;
          min-height: 52px !important;
          padding: 12px 14px !important;
          margin: 4px 12px !important;
          border-radius: 12px !important;
          background: var(--tm-surface, #ffffff) !important;
          border: none !important;
          box-shadow: none !important;
          transform: none !important;
          justify-content: flex-start !important;
          display: flex !important;
          align-items: center !important;
          gap: 12px !important;
          cursor: pointer !important;
        }

        /* İkon kutusu - Yuvarlak, tutarlı boyut */
        #sidebar .nav-icon {
          width: 36px !important;
          height: 36px !important;
          min-width: 36px !important;
          max-width: 36px !important;
          background: var(--color-primary) !important;
          border-radius: 10px !important;
          display: flex !important;
          align-items: center !important;
          justify-content: center !important;
          transition: transform 0.2s ease !important;
          flex-shrink: 0 !important;
          padding: 0 !important;
          box-sizing: border-box !important;
        }
        
        #sidebar .nav-icon i,
        #sidebar .nav-icon svg {
          width: 18px !important;
          height: 18px !important;
          min-width: 18px !important;
          max-width: 18px !important;
          color: var(--tm-surface, #ffffff) !important;
          flex-shrink: 0 !important;
        }
        
        /* Lucide ikonları için özel stil */
        #sidebar .nav-icon .lucide,
        #sidebar .nav-icon [data-lucide] {
          width: 18px !important;
          height: 18px !important;
          stroke-width: 2 !important;
        }

        /* Alt menü öğeleri */
        #sidebar .nav-sublink {
          width: calc(100% - 32px) !important;
          min-height: 44px !important;
          padding: 10px 12px 10px 16px !important;
          margin: 2px 16px !important;
          border-radius: 10px !important;
          font-size: 0.875rem !important;
          font-weight: 400 !important;
          box-shadow: none !important;
          background: var(--tm-surface, #ffffff) !important;
          border: none !important;
          color: #475569 !important;
          transition: all 0.15s ease !important;
          display: flex !important;
          align-items: center !important;
          gap: 10px !important;
        }

        /* Pseudo elementleri kaldır */
        #sidebar .nav-link::before,
        #sidebar .nav-group-header::before,
        #sidebar.mobile-open .nav-group-header::before {
          content: none !important;
          display: none !important;
        }

        /* Hover - Hafif vurgu */
        #sidebar .nav-link:hover,
        #sidebar .nav-group-header:hover {
          background: #fff7ed !important;
          border: none !important;
          box-shadow: none !important;
          transform: none !important;
        }
        
        #sidebar .nav-link:hover .nav-icon,
        #sidebar .nav-group-header:hover .nav-icon {
          transform: scale(1.05) !important;
        }
        
        #sidebar .nav-sublink:hover {
          background: #fff7ed !important;
          border: none !important;
          color: #c2410c !important;
          transform: none !important;
        }
        
        /* ===== MOBİL DOKUNMA GERİ BİLDİRİMİ (TOUCH FEEDBACK) ===== */
        
        /* Nav link aktif (pressed) durumu */
        #sidebar .nav-link:active {
          background: #fed7aa !important;
          border: none !important;
          transform: scale(0.98) !important;
          box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.1) !important;
          transition: all 0.1s ease !important;
        }
        
        #sidebar .nav-link:active .nav-icon {
          transform: scale(0.95) !important;
          box-shadow: none !important;
        }
        
        /* Accordion header aktif (pressed) durumu */
        #sidebar .nav-group-header:active {
          background: #fed7aa !important;
          border: none !important;
          transform: scale(0.98) !important;
          box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.1) !important;
          transition: all 0.1s ease !important;
        }
        
        #sidebar .nav-group-header:active .nav-icon {
          transform: scale(0.95) !important;
        }
        
        #sidebar .nav-group-header:active .nav-arrow {
          transform: scale(0.9) !important;
        }
        
        /* Expanded accordion header aktif durumu */
        #sidebar .nav-group.expanded .nav-group-header:active {
          background: #fdba74 !important;
        }
        
        #sidebar .nav-group.expanded .nav-group-header:active .nav-arrow {
          transform: rotate(180deg) scale(0.9) !important;
        }
        
        /* Sublink aktif (pressed) durumu */
        #sidebar .nav-sublink:active {
          background: #fed7aa !important;
          border: none !important;
          transform: scale(0.97) !important;
          box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.1) !important;
          transition: all 0.1s ease !important;
        }
        
        /* Aktif sublink pressed durumu */
        #sidebar .nav-sublink.active:active {
          background: #ea580c !important;
          transform: scale(0.97) !important;
          box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.2) !important;
        }
        
        /* Kapatma butonu pressed durumu */
        #sidebar .mobile-sidebar-close:active {
          background: rgba(255, 255, 255, 0.4) !important;
          transform: scale(0.9) !important;
          transition: all 0.1s ease !important;
        }
        
        /* Touch-action optimize et */
        #sidebar .nav-link,
        #sidebar .nav-group-header,
        #sidebar .nav-sublink,
        #sidebar .mobile-sidebar-close {
          touch-action: manipulation !important;
          -webkit-tap-highlight-color: transparent !important;
          user-select: none !important;
          -webkit-user-select: none !important;
        }

        /* Aktif sayfa - Turuncu vurgu */
        #sidebar .nav-link.active {
          background: #fff7ed !important;
          color: #c2410c !important;
          border: none !important;
          box-shadow: none !important;
          margin: 4px 12px !important;
          width: calc(100% - 24px) !important;
          border-radius: 12px !important;
          font-weight: 600 !important;
          transform: none !important;
          border-left: 4px solid var(--color-primary) !important;
          padding-left: 10px !important;
        }
        
        #sidebar .nav-link.active .nav-icon {
          background: var(--color-primary) !important;
          box-shadow: none !important;
        }
        
        #sidebar .nav-sublink.active {
          background: var(--color-primary) !important;
          color: var(--tm-surface, #ffffff) !important;
          font-weight: 500 !important;
          border: none !important;
          border-radius: 10px !important;
          margin: 2px 16px !important;
          width: calc(100% - 32px) !important;
          box-shadow: none !important;
        }
        
        #sidebar .nav-sublink.active i,
        #sidebar .nav-sublink.active svg {
          color: var(--tm-surface, #ffffff) !important;
        }

        /* Açık accordion başlığı */
        #sidebar .nav-group.expanded .nav-group-header,
        #sidebar.mobile-open .nav-group.expanded .nav-group-header {
          background: #fff7ed !important;
          color: #c2410c !important;
          border: none !important;
          box-shadow: none !important;
          transform: none !important;
          font-weight: 600 !important;
          border-bottom-left-radius: 0 !important;
          border-bottom-right-radius: 0 !important;
          margin-bottom: 0 !important;
        }

        /* Nav Group - Accordion Container */
        #sidebar .nav-group {
          position: relative !important;
          z-index: auto !important;
          overflow: visible !important;
          margin: 0 !important;
        }

        /* Accordion içeriği - Modern card style */
        #sidebar .nav-group-content,
        #sidebar.mobile-open .nav-group-content {
          max-height: 0 !important;
          overflow: hidden !important;
          padding: 0 !important;
          margin: 0 12px 4px 12px !important;
          border: none !important;
          transition: max-height 0.35s cubic-bezier(0.4, 0, 0.2, 1), 
                      opacity 0.25s ease,
                      padding 0.25s ease !important;
          opacity: 0 !important;
          background: var(--tm-surface, #ffffff) !important;
          position: relative !important;
          z-index: 1 !important;
          pointer-events: none !important;
          border-radius: 0 0 12px 12px !important;
        }
        
        #sidebar .nav-group.expanded .nav-group-content,
        #sidebar.mobile-open .nav-group.expanded .nav-group-content {
          max-height: 3000px !important;
          padding: 8px 0 !important;
          margin: 0 12px 4px 12px !important;
          opacity: 1 !important;
          background: var(--tm-surface, #ffffff) !important;
          border-radius: 0 0 12px 12px !important;
          border: none !important;
          overflow: visible !important;
          pointer-events: auto !important;
          box-shadow: none !important;
        }
        
        /* Sublinks inside accordion */
        #sidebar .nav-group-content .nav-sublink {
          width: calc(100% - 16px) !important;
          min-height: 42px !important;
          padding: 10px 12px !important;
          margin: 2px 8px !important;
          border-radius: 8px !important;
          pointer-events: auto !important;
          cursor: pointer !important;
          position: relative !important;
          z-index: 2 !important;
          background: var(--tm-bg-secondary, #f8fafc) !important;
          border: none !important;
        }
        
        #sidebar .nav-group-content .nav-sublink:hover {
          background: #fff7ed !important;
          border: none !important;
        }
        
        #sidebar .nav-group-content .nav-sublink.active {
          background: var(--color-primary) !important;
          border: none !important;
        }
        
        /* Ensure all clickable elements work */
        #sidebar .nav-link,
        #sidebar .nav-group-header,
        #sidebar .nav-sublink,
        #sidebar .mobile-sidebar-close {
          pointer-events: auto !important;
          cursor: pointer !important;
          position: relative !important;
        }
        
        /* Sublink icons */
        #sidebar .nav-sublink i,
        #sidebar .nav-sublink svg {
          width: 16px !important;
          height: 16px !important;
          flex-shrink: 0 !important;
          color: var(--tm-text-muted, #64748b) !important;
        }
        
        #sidebar .nav-sublink:hover i,
        #sidebar .nav-sublink:hover svg {
          color: #c2410c !important;
        }
        
        #sidebar .nav-sublink.active i,
        #sidebar .nav-sublink.active svg {
          color: var(--tm-surface, #ffffff) !important;
        }

        /* Etiketler */
        #sidebar .nav-label,
        #sidebar .nav-link span,
        #sidebar .nav-sublink span {
          font-size: 0.9375rem !important;
          flex: 1 !important;
          line-height: 1.4 !important;
        }
        
        #sidebar .nav-sublink span {
          font-size: 0.875rem !important;
        }

        /* Ok ikonu - Modern ve görünür */
        body #sidebar .nav-arrow,
        html body #sidebar .nav-arrow,
        #sidebar .nav-arrow {
          opacity: 1 !important;
          width: 24px !important;
          height: 24px !important;
          min-width: 24px !important;
          overflow: visible !important;
          margin-left: auto !important;
          display: inline-flex !important;
          align-items: center !important;
          justify-content: center !important;
          visibility: visible !important;
          transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
          color: var(--tm-text-muted, #94a3b8) !important;
          background: var(--tm-bg-secondary, #f1f5f9) !important;
          border-radius: 6px !important;
        }
        
        #sidebar .nav-group.expanded .nav-arrow {
          transform: rotate(180deg) !important;
          color: var(--color-primary) !important;
          background: #fff7ed !important;
        }

        #sidebar .nav-group-header {
          justify-content: flex-start !important;
        }
        
        /* Admin menüsü - Kırmızı ikon */
        #sidebar .nav-group-header.admin-accordion {
          background: var(--tm-surface, #ffffff) !important;
          color: var(--tm-text-primary, #1e293b) !important;
          border: none !important;
        }
        
        #sidebar .nav-group-header.admin-accordion .nav-icon {
          background: #ef4444 !important;
        }
        
        #sidebar .nav-group-header.admin-accordion:hover {
          background: #fef2f2 !important;
        }
        
        #sidebar .nav-group.expanded .nav-group-header.admin-accordion {
          background: #fef2f2 !important;
          border-bottom-left-radius: 0 !important;
          border-bottom-right-radius: 0 !important;
        }
        
        /* Çıkış butonu */
        #sidebar .nav-link.logout {
          background: var(--tm-surface, #ffffff) !important;
          color: #dc2626 !important;
          border: none !important;
          margin-top: 12px !important;
        }
        
        #sidebar .nav-link.logout .nav-icon {
          background: #fecaca !important;
        }
        
        #sidebar .nav-link.logout .nav-icon i,
        #sidebar .nav-link.logout .nav-icon svg {
          color: #dc2626 !important;
        }
        
        #sidebar .nav-link.logout:hover {
          background: #fef2f2 !important;
        }
        
        /* Alt grup başlıkları */
        #sidebar .nav-subgroup-title {
          font-size: 0.65rem !important;
          font-weight: 700 !important;
          text-transform: uppercase !important;
          letter-spacing: 0.08em !important;
          color: var(--tm-text-muted, #64748b) !important;
          padding: 12px 12px 6px 12px !important;
          background: transparent !important;
        }
        
        /* Kilit ikonları */
        #sidebar .nav-link i[data-lucide="lock"],
        #sidebar .nav-sublink i[data-lucide="lock"] {
          width: 14px !important;
          height: 14px !important;
          color: var(--tm-border-strong, #cbd5e1) !important;
          margin-left: auto !important;
        }
        
        /* AI görsel araçları CTA */
        #sidebar .nav-sublink.pia-sidebar-cta {
          background: #fff7ed !important;
          color: #c2410c !important;
          font-weight: 500 !important;
          border: none !important;
        }
        
        #sidebar .nav-sublink.pia-sidebar-cta:hover {
          background: #fed7aa !important;
        }
        
        #sidebar .nav-sublink.pia-sidebar-cta i,
        #sidebar .nav-sublink.pia-sidebar-cta span {
          color: #c2410c !important;
        }
        
        /* Scrollbar - İnce ve şık */
        #sidebar .sidebar-nav::-webkit-scrollbar {
          width: 4px !important;
        }
        
        #sidebar .sidebar-nav::-webkit-scrollbar-track {
          background: transparent !important;
        }
        
        #sidebar .sidebar-nav::-webkit-scrollbar-thumb {
          background: var(--tm-border, #e2e8f0) !important;
          border-radius: 4px !important;
        }
        
        #sidebar .sidebar-nav::-webkit-scrollbar-thumb:hover {
          background: var(--tm-border-strong, #cbd5e1) !important;
        }
        
        #sidebar .sidebar-nav {
          scrollbar-width: thin !important;
          scrollbar-color: var(--tm-border, #e2e8f0) transparent !important;
        }
      }

      /* ========================================
         MOBİL SIDEBAR V3 - DARK MODE
         Yeni modern tasarım için dark theme
      ======================================== */
      
      @media (max-width: 1024px) {
        /* Container - Dark Mode */
        html.dark-mode body #sidebar,
        html.dark-mode html body #sidebar,
        html.dark-mode body html #sidebar,
        html.dark-mode #sidebar,
        html.dark-mode #sidebar,
        html.dark-mode #sidebar.mobile-open {
          background: var(--tm-bg-card, #0f172a) !important;
          background-color: var(--tm-bg-card, #0f172a) !important;
          background-image: none !important;
          box-shadow: 4px 0 32px rgba(0, 0, 0, 0.5) !important;
        }
        
        /* User Avatar - Dark Mode */
        html.dark-mode #sidebar .sidebar-user-avatar,
        html.dark-mode #sidebar .brand-logo {
          border: none !important;
        }
        
        /* Brand — mobil dark: turuncu başlık, açık üst şerit */
        html.dark-mode #sidebar .sidebar-header {
          background: var(--tm-bg-card, #1e293b) !important;
          border-bottom-color: var(--color-primary) !important;
          color: var(--tm-text-primary, #f1f5f9) !important;
        }
        
        html.dark-mode #sidebar .brand-title {
          color: #fb923c !important;
          -webkit-text-fill-color: #fb923c !important;
        }
        
        html.dark-mode #sidebar .brand-subtitle {
          color: var(--tm-text-muted, #94a3b8) !important;
        }
        
        html.dark-mode #sidebar .mobile-sidebar-close {
          background: var(--tm-text-secondary, #334155) !important;
          border: none !important;
          color: var(--tm-border, #e2e8f0) !important;
        }
        
        html.dark-mode #sidebar .mobile-sidebar-close i,
        html.dark-mode #sidebar .mobile-sidebar-close svg {
          color: var(--tm-text-primary, #f1f5f9) !important;
        }
        
        html.dark-mode #sidebar .mobile-sidebar-close:hover,
        html.dark-mode #sidebar .mobile-sidebar-close:active {
          background: #475569 !important;
        }
        
        /* Nav Container - Dark Mode */
        html.dark-mode #sidebar .sidebar-nav {
          background: var(--tm-bg-card, #1e293b) !important;
        }
        
        /* Nav Links - Dark Mode */
        html.dark-mode #sidebar .nav-link,
        html.dark-mode #sidebar.mobile-open .nav-link {
          background: var(--tm-bg-card, #0f172a) !important;
          border: none !important;
          color: var(--tm-border, #e2e8f0) !important;
        }
        
        /* Nav Icon - Dark Mode - Renkli kalacak */
        html.dark-mode #sidebar .nav-icon {
          background: var(--color-primary) !important;
        }
        
        html.dark-mode #sidebar .nav-icon i,
        html.dark-mode #sidebar .nav-icon svg {
          color: var(--tm-surface, #ffffff) !important;
        }
        
        /* Nav Link Hover - Dark Mode */
        html.dark-mode #sidebar .nav-link:hover,
        html.dark-mode #sidebar.mobile-open .nav-link:hover {
          background: var(--tm-bg-card, #1e293b) !important;
        }
        
        /* Nav Link Active - Dark Mode */
        html.dark-mode #sidebar .nav-link.active,
        html.dark-mode #sidebar.mobile-open .nav-link.active {
          background: rgba(var(--color-primary-rgb), 0.2) !important;
          border: none !important;
          color: #fdba74 !important;
          border-left: 4px solid var(--color-primary) !important;
        }
        
        html.dark-mode #sidebar .nav-link.active .nav-icon {
          box-shadow: none !important;
        }
        
        /* Accordion Header - Dark Mode */
        html.dark-mode #sidebar .nav-group-header,
        html.dark-mode #sidebar.mobile-open .nav-group-header {
          background: var(--tm-bg-card, #0f172a) !important;
          border: none !important;
          color: var(--tm-border, #e2e8f0) !important;
        }
        
        html.dark-mode #sidebar .nav-group-header:hover {
          background: var(--tm-bg-card, #1e293b) !important;
        }
        
        /* Expanded Accordion - Dark Mode */
        html.dark-mode #sidebar .nav-group.expanded .nav-group-header {
          background: rgba(var(--color-primary-rgb), 0.15) !important;
          border: none !important;
          color: #fdba74 !important;
        }
        
        /* Arrow - Dark Mode */
        html.dark-mode #sidebar .nav-arrow {
          color: var(--tm-text-muted, #64748b) !important;
          background: var(--tm-bg-card, #1e293b) !important;
        }
        
        html.dark-mode #sidebar .nav-group.expanded .nav-arrow {
          color: var(--color-primary) !important;
          background: rgba(var(--color-primary-rgb), 0.15) !important;
        }
        
        /* Accordion Content - Dark Mode */
        html.dark-mode #sidebar .nav-group-content,
        html.dark-mode #sidebar.mobile-open .nav-group-content {
          background: var(--tm-bg-card, #0f172a) !important;
          border-color: transparent !important;
        }
        
        html.dark-mode #sidebar .nav-group.expanded .nav-group-content {
          background: var(--tm-bg-card, #0f172a) !important;
          border: none !important;
        }
        
        /* Sublinks - Dark Mode */
        html.dark-mode #sidebar .nav-sublink {
          background: var(--tm-bg-card, #1e293b) !important;
          border: none !important;
          color: var(--tm-text-muted, #94a3b8) !important;
        }
        
        html.dark-mode #sidebar .nav-sublink:hover {
          background: var(--tm-text-secondary, #334155) !important;
          color: var(--tm-border, #e2e8f0) !important;
        }
        
        html.dark-mode #sidebar .nav-sublink.active {
          background: var(--color-primary) !important;
          border: none !important;
          color: var(--tm-surface, #ffffff) !important;
        }
        
        html.dark-mode #sidebar .nav-sublink i,
        html.dark-mode #sidebar .nav-sublink svg {
          color: var(--tm-text-muted, #64748b) !important;
        }
        
        html.dark-mode #sidebar .nav-sublink:hover i,
        html.dark-mode #sidebar .nav-sublink:hover svg {
          color: var(--tm-text-muted, #94a3b8) !important;
        }
        
        html.dark-mode #sidebar .nav-sublink.active i,
        html.dark-mode #sidebar .nav-sublink.active svg {
          color: var(--tm-surface, #ffffff) !important;
        }
        
        /* Admin Accordion - Dark Mode */
        html.dark-mode #sidebar .nav-group-header.admin-accordion {
          background: var(--tm-bg-card, #0f172a) !important;
          border: none !important;
        }
        
        html.dark-mode #sidebar .nav-group-header.admin-accordion .nav-icon {
          background: #ef4444 !important;
        }
        
        html.dark-mode #sidebar .nav-group-header.admin-accordion:hover {
          background: rgba(127, 29, 29, 0.3) !important;
        }
        
        html.dark-mode #sidebar .nav-group.expanded .nav-group-header.admin-accordion {
          background: rgba(127, 29, 29, 0.4) !important;
        }
        
        /* Logout - Dark Mode */
        html.dark-mode #sidebar .nav-link.logout {
          background: var(--tm-bg-card, #0f172a) !important;
          border: none !important;
          color: #f87171 !important;
        }
        
        html.dark-mode #sidebar .nav-link.logout .nav-icon {
          background: #7f1d1d !important;
        }
        
        html.dark-mode #sidebar .nav-link.logout .nav-icon i,
        html.dark-mode #sidebar .nav-link.logout .nav-icon svg {
          color: #fecaca !important;
        }
        
        html.dark-mode #sidebar .nav-link.logout:hover {
          background: rgba(127, 29, 29, 0.2) !important;
        }
        
        /* Subgroup Title - Dark Mode */
        html.dark-mode #sidebar .nav-subgroup-title {
          color: var(--tm-text-muted, #64748b) !important;
          background: var(--tm-bg-card, #1e293b) !important;
        }
        
        /* AI CTA - Dark Mode */
        html.dark-mode #sidebar .nav-sublink.pia-sidebar-cta {
          background: rgba(var(--color-primary-rgb), 0.2) !important;
          color: #fdba74 !important;
        }
        
        html.dark-mode #sidebar .nav-sublink.pia-sidebar-cta:hover {
          background: rgba(var(--color-primary-rgb), 0.3) !important;
        }
        
        /* Lock icons - Dark Mode */
        html.dark-mode #sidebar .nav-link i[data-lucide="lock"],
        html.dark-mode #sidebar .nav-sublink i[data-lucide="lock"] {
          color: #475569 !important;
        }
      }
      
      /* Desktop Sidebar Dark Mode — yalnız masaüstü; aksi halde mobilde arka plan/renk çakışması */
      @media (min-width: 1025px) {
      html.dark-mode body #sidebar,
      html.dark-mode html body #sidebar,
      html.dark-mode body html #sidebar,
      html.dark-mode #sidebar {
        background: var(--tm-bg-card, #1e293b) !important;
      }
      
      html.dark-mode #sidebar .sidebar-header {
        background: var(--tm-bg-card, #1e293b) !important;
      }
      
      html.dark-mode #sidebar .brand-title {
        color: var(--tm-text-primary, #f1f5f9) !important;
      }
      
      html.dark-mode #sidebar .brand-subtitle {
        color: var(--tm-text-muted, #94a3b8) !important;
      }
      
      html.dark-mode #sidebar .nav-link:not(.active) {
        background: rgba(30, 41, 59, 0.94) !important;
        border: none !important;
        box-shadow: none !important;
        color: var(--tm-text-muted, #94a3b8) !important;
      }

      html.dark-mode #sidebar .nav-link:hover {
        background: rgba(51, 65, 85, 0.97) !important;
        color: var(--color-primary) !important;
      }

      html.dark-mode #sidebar .nav-link.active {
        background: var(--color-primary) !important;
        border: none !important;
        box-shadow: none !important;
        color: var(--tm-surface, #ffffff) !important;
      }

      html.dark-mode #sidebar .nav-group-header:not(.admin-accordion) {
        background: rgba(30, 41, 59, 0.92) !important;
        border: none !important;
        color: var(--tm-text-muted, #94a3b8) !important;
      }

      html.dark-mode #sidebar .nav-group-header:hover:not(.admin-accordion) {
        background: rgba(51, 65, 85, 0.95) !important;
        color: var(--tm-border, #e2e8f0) !important;
      }

      html.dark-mode #sidebar .nav-group.expanded .nav-group-header:not(.admin-accordion) {
        background: rgba(51, 65, 85, 0.93) !important;
        color: var(--color-primary) !important;
      }

      html.dark-mode #sidebar .nav-sublink:not(.active):not(.pia-sidebar-cta) {
        background: rgba(15, 23, 42, 0.9) !important;
        border: none !important;
        color: var(--tm-text-muted, #64748b) !important;
      }

      html.dark-mode #sidebar .nav-sublink:hover:not(.active):not(.pia-sidebar-cta) {
        background: rgba(51, 65, 85, 0.92) !important;
        color: var(--color-primary) !important;
      }

      html.dark-mode #sidebar .nav-sublink.active {
        background: var(--color-primary) !important;
        border: none !important;
        color: var(--tm-surface, #ffffff) !important;
      }

      html.dark-mode #sidebar .nav-link.logout:not(:hover) {
        background: rgba(30, 41, 59, 0.94) !important;
        border: none !important;
        color: #f87171 !important;
      }

      html.dark-mode #sidebar .nav-link.logout:hover {
        background: rgba(69, 10, 10, 0.55) !important;
        color: #ef4444 !important;
      }

      html.dark-mode #sidebar.collapsed .nav-group:has(.nav-sublink.active) .nav-group-header:not(.admin-accordion),
      html.dark-mode #sidebar:not(:hover) .nav-group:has(.nav-sublink.active) .nav-group-header:not(.admin-accordion) {
        background: rgba(51, 65, 85, 0.93) !important;
        color: var(--color-primary) !important;
      }
      
      html.dark-mode #sidebar .sidebar-nav::-webkit-scrollbar-track {
        background: var(--tm-bg-card, #0f172a) !important;
      }
      
      html.dark-mode #sidebar .sidebar-nav::-webkit-scrollbar-thumb {
        background: #475569 !important;
      }
      
      html.dark-mode #sidebar .sidebar-nav::-webkit-scrollbar-thumb:hover {
        background: var(--tm-text-muted, #64748b) !important;
      }
      }

      /* Mobil: #sidebar ile en yüksek özgüllük — başka kuralların şeffaf bıraktığı durumu kapatır */
      @media (max-width: 1024px) {
        html body #sidebar.mobile-open,
        html body #sidebar {
          background-color: var(--tm-surface, #ffffff) !important;
          background-image: none !important;
          background-clip: border-box !important;
          -webkit-background-clip: border-box !important;
          opacity: 1 !important;
        }
        html body #sidebar.mobile-open .sidebar-nav,
        html body #sidebar .sidebar-nav {
          background-color: var(--tm-bg-secondary, #f8fafc) !important;
        }
        html.dark-mode html body #sidebar.mobile-open,
        html.dark-mode html body #sidebar {
          background-color: var(--tm-bg-card, #0f172a) !important;
        }
        html.dark-mode html body #sidebar .sidebar-nav {
          background-color: var(--tm-bg-card, #1e293b) !important;
        }

        #sidebar .sidebar-nav {
          position: relative !important;
          z-index: 1 !important;
        }
      }
