/* Modern Renk Teması - Sade, Mavi-Gri Tonları */
:root {
    /* Ana Renkler */
    --primary-color: #2563eb;        /* Mavi */
    --primary-light: #3b82f6;        /* Açık mavi */
    --primary-dark: #1e40af;         /* Koyu mavi */
    
    /* Nötr Renkler */
    --background-color: #f8fafc;     /* Çok açık gri */
    --surface-color: #ffffff;        /* Beyaz */
    --surface-hover: #f1f5f9;        /* Hafif gri */
    
    /* Metin Renkleri */
    --text-primary: #1e293b;         /* Koyu gri */
    --text-secondary: #64748b;       /* Orta gri */
    --text-muted: #94a3b8;           /* Açık gri */
    
    /* Kenarlık ve Gölge */
    --border-color: #e2e8f0;         /* Açık gri */
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    
    /* Vurgu Renkleri */
    --accent-success: #10b981;       /* Yeşil */
    --accent-warning: #f59e0b;       /* Turuncu */
    --accent-error: #ef4444;         /* Kırmızı */
    --accent-info: #06b6d4;          /* Cyan */
    
    /* Geçiş Animasyonları */
    --transition-fast: 0.15s ease-in-out;
    --transition-normal: 0.3s ease-in-out;
    --transition-slow: 0.5s ease-in-out;
    
    /* Border Radius */
    --radius-sm: 0.375rem;
    --radius-md: 0.5rem;
    --radius-lg: 0.75rem;
    --radius-xl: 1rem;
}

/* Global Stiller */
* {
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif !important;
    background: var(--background-color) !important;
    color: var(--text-primary) !important;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Link Stiller */
a {
    color: var(--primary-color) !important;
    text-decoration: none !important;
    transition: all var(--transition-fast) !important;
}

a:hover {
    color: var(--primary-dark) !important;
}

/* Buton Stiller */
.btn {
    border-radius: var(--radius-md) !important;
    font-weight: 500 !important;
    padding: 10px 20px !important;
    transition: all var(--transition-normal) !important;
    border: none !important;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-light)) !important;
    color: white !important;
}

.btn-primary:hover {
    background: linear-gradient(135deg, var(--primary-dark), var(--primary-color)) !important;
    transform: translateY(-2px) !important;
    box-shadow: var(--shadow-md) !important;
}

.btn-secondary {
    background: var(--surface-hover) !important;
    color: var(--text-primary) !important;
    border: 1px solid var(--border-color) !important;
}

.btn-secondary:hover {
    background: var(--surface-color) !important;
    border-color: var(--primary-light) !important;
    color: var(--primary-color) !important;
}

/* Card Stiller */
.card {
    background: var(--surface-color) !important;
    border: 1px solid var(--border-color) !important;
    border-radius: var(--radius-lg) !important;
    box-shadow: var(--shadow-sm) !important;
    transition: all var(--transition-normal) !important;
}

.card:hover {
    box-shadow: var(--shadow-md) !important;
    transform: translateY(-2px) !important;
}

.card-header {
    background: var(--surface-hover) !important;
    border-bottom: 1px solid var(--border-color) !important;
    border-radius: var(--radius-lg) var(--radius-lg) 0 0 !important;
    padding: 1rem 1.5rem !important;
    font-weight: 600 !important;
}

.card-body {
    padding: 1.5rem !important;
}

/* Form Stiller */
.form-control {
    background: var(--surface-hover) !important;
    border: 1px solid var(--border-color) !important;
    border-radius: var(--radius-md) !important;
    color: var(--text-primary) !important;
    padding: 12px 16px !important;
    transition: all var(--transition-normal) !important;
}

.form-control:focus {
    background: var(--surface-color) !important;
    border-color: var(--primary-light) !important;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1) !important;
}

.form-label {
    color: var(--text-primary) !important;
    font-weight: 500 !important;
    margin-bottom: 8px !important;
}

/* Table Stiller */
.table {
    background: var(--surface-color) !important;
    border-radius: var(--radius-lg) !important;
    overflow: hidden;
    box-shadow: var(--shadow-sm) !important;
}

.table thead th {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-light)) !important;
    color: white !important;
    border: none !important;
    font-weight: 600 !important;
    padding: 1rem !important;
}

.table tbody td {
    border-color: var(--border-color) !important;
    padding: 1rem !important;
    color: var(--text-primary) !important;
}

.table tbody tr:hover {
    background: var(--surface-hover) !important;
}

/* Badge Stiller */
.badge {
    border-radius: var(--radius-md) !important;
    font-weight: 500 !important;
    padding: 6px 12px !important;
}

.badge-primary {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-light)) !important;
    color: white !important;
}

.badge-success {
    background: linear-gradient(135deg, var(--accent-success), #34d399) !important;
    color: white !important;
}

.badge-warning {
    background: linear-gradient(135deg, var(--accent-warning), #fbbf24) !important;
    color: white !important;
}

.badge-danger {
    background: linear-gradient(135deg, var(--accent-error), #f87171) !important;
    color: white !important;
}

/* Alert Stiller */
.alert {
    border: none !important;
    border-radius: var(--radius-lg) !important;
    padding: 1rem 1.5rem !important;
    margin-bottom: 1rem !important;
}

.alert-primary {
    background: rgba(37, 99, 235, 0.1) !important;
    color: var(--primary-dark) !important;
    border-left: 4px solid var(--primary-color) !important;
}

.alert-success {
    background: rgba(16, 185, 129, 0.1) !important;
    color: #047857 !important;
    border-left: 4px solid var(--accent-success) !important;
}

.alert-warning {
    background: rgba(245, 158, 11, 0.1) !important;
    color: #92400e !important;
    border-left: 4px solid var(--accent-warning) !important;
}

.alert-danger {
    background: rgba(239, 68, 68, 0.1) !important;
    color: #b91c1c !important;
    border-left: 4px solid var(--accent-error) !important;
}

/* Pagination Stiller */
.pagination .page-link {
    background: var(--surface-color) !important;
    border: 1px solid var(--border-color) !important;
    color: var(--text-primary) !important;
    padding: 8px 12px !important;
    margin: 0 2px !important;
    border-radius: var(--radius-md) !important;
    transition: all var(--transition-fast) !important;
}

.pagination .page-link:hover {
    background: var(--primary-color) !important;
    border-color: var(--primary-color) !important;
    color: white !important;
}

.pagination .page-item.active .page-link {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-light)) !important;
    border-color: var(--primary-color) !important;
    color: white !important;
}

/* Breadcrumb Stiller */
.breadcrumb {
    background: var(--surface-color) !important;
    border-radius: var(--radius-lg) !important;
    padding: 1rem 1.5rem !important;
    margin-bottom: 1.5rem !important;
    box-shadow: var(--shadow-sm) !important;
}

.breadcrumb-item a {
    color: var(--primary-color) !important;
    text-decoration: none !important;
}

.breadcrumb-item.active {
    color: var(--text-secondary) !important;
}

/* Progress Bar Stiller */
.progress {
    background: var(--surface-hover) !important;
    border-radius: var(--radius-md) !important;
    height: 8px !important;
}

.progress-bar {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-light)) !important;
    border-radius: var(--radius-md) !important;
}

/* Tooltip Stiller */
.tooltip .tooltip-inner {
    background: var(--text-primary) !important;
    color: var(--surface-color) !important;
    border-radius: var(--radius-md) !important;
    padding: 8px 12px !important;
    font-weight: 500 !important;
}

/* Spinner Stiller */
.spinner-border {
    color: var(--primary-color) !important;
}

/* Utility Classes */
.text-primary {
    color: var(--primary-color) !important;
}

.text-secondary {
    color: var(--text-secondary) !important;
}

.text-muted {
    color: var(--text-muted) !important;
}

.bg-primary {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-light)) !important;
    color: white !important;
}

.bg-light {
    background: var(--surface-hover) !important;
}

.border-primary {
    border-color: var(--primary-color) !important;
}

/* Scrollbar Stiller */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: var(--surface-hover);
    border-radius: var(--radius-sm);
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, var(--primary-color), var(--primary-light));
    border-radius: var(--radius-sm);
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, var(--primary-dark), var(--primary-color));
}

/* Animasyonlar */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.fade-in {
    animation: fadeIn 0.5s ease-out;
}

.slide-in {
    animation: slideIn 0.3s ease-out;
}

/* Responsive Utilities */
@media (max-width: 768px) {
    .main-container {
        margin: 0.5rem !important;
        border-radius: var(--radius-lg) !important;
    }
    
    .card {
        margin-bottom: 1rem !important;
    }
    
    .btn {
        width: 100% !important;
        margin-bottom: 0.5rem !important;
    }
    
    .table-responsive {
        border-radius: var(--radius-lg) !important;
    }
}

/* #49243e RENK KODU TEMİZLEYİCİ - GLOBAL OVERRIDE */
/* Bu renk kodu hiçbir yerde görünmemeli */
*[style*="#49243e"],
*[style*="rgb(73, 36, 62)"],
*[style*="rgba(73, 36, 62"],
*[class*="bg-purple"],
*[class*="purple"],
.bg-purple,
.text-purple {
    background: var(--surface-color) !important;
    background-color: var(--surface-color) !important;
    color: var(--text-primary) !important;
}

/* SIDEBAR ULTRA GÜÇLÜ OVERRIDE - #49243e YOK ET */
.sidebar,
#sidebar,
#sidebar2,
nav.sidebar,
.wrapper .sidebar,
.wrapper #sidebar,
.wrapper #sidebar2,
.wrapper nav.sidebar,
body .sidebar,
body #sidebar,
body #sidebar2,
body nav.sidebar,
body .wrapper .sidebar,
body .wrapper #sidebar,
body .wrapper #sidebar2,
body .wrapper nav.sidebar,
html body .sidebar,
html body #sidebar,
html body #sidebar2,
html body nav.sidebar,
html body .wrapper .sidebar,
html body .wrapper #sidebar,
html body .wrapper #sidebar2,
html body .wrapper nav.sidebar {
    background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%) !important;
    background-color: #ffffff !important;
    border-right: 1px solid #e2e8f0 !important;
    box-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1) !important;
    backdrop-filter: blur(10px) !important;
    color: #1e293b !important;
}

/* SIDEBAR BRAND ULTRA GÜÇLÜ OVERRIDE - #49243e YOK ET */
.sidebar .sidebar-brand,
#sidebar .sidebar-brand,
#sidebar2 .sidebar-brand,
nav.sidebar .sidebar-brand,
.wrapper .sidebar .sidebar-brand,
.wrapper #sidebar .sidebar-brand,
.wrapper #sidebar2 .sidebar-brand,
.wrapper nav.sidebar .sidebar-brand,
body .sidebar .sidebar-brand,
body #sidebar .sidebar-brand,
body #sidebar2 .sidebar-brand,
body nav.sidebar .sidebar-brand,
body .wrapper .sidebar .sidebar-brand,
body .wrapper #sidebar .sidebar-brand,
body .wrapper #sidebar2 .sidebar-brand,
body .wrapper nav.sidebar .sidebar-brand,
html body .sidebar .sidebar-brand,
html body #sidebar .sidebar-brand,
html body #sidebar2 .sidebar-brand,
html body nav.sidebar .sidebar-brand,
html body .wrapper .sidebar .sidebar-brand,
html body .wrapper #sidebar .sidebar-brand,
html body .wrapper #sidebar2 .sidebar-brand,
html body .wrapper nav.sidebar .sidebar-brand,
a.sidebar-brand {
    background: linear-gradient(135deg, #2563eb, #3b82f6) !important;
    background-color: #2563eb !important;
    color: white !important;
    padding: 1.5rem 1rem !important;
    border-bottom: 1px solid #e2e8f0 !important;
    font-weight: 700 !important;
    font-size: 1.2rem !important;
    text-decoration: none !important;
    display: flex !important;
    align-items: center !important;
    transition: all 0.3s ease-in-out !important;
}

/* SIDEBAR LINKS ULTRA GÜÇLÜ OVERRIDE - #49243e YOK ET */
.sidebar a,
#sidebar a,
#sidebar2 a,
nav.sidebar a,
.wrapper .sidebar a,
.wrapper #sidebar a,
.wrapper #sidebar2 a,
.wrapper nav.sidebar a,
body .sidebar a,
body #sidebar a,
body #sidebar2 a,
body nav.sidebar a,
body .wrapper .sidebar a,
body .wrapper #sidebar a,
body .wrapper #sidebar2 a,
body .wrapper nav.sidebar a,
html body .sidebar a,
html body #sidebar a,
html body #sidebar2 a,
html body nav.sidebar a,
html body .wrapper .sidebar a,
html body .wrapper #sidebar a,
html body .wrapper #sidebar2 a,
html body .wrapper nav.sidebar a,
.sidebar .sidebar-link,
#sidebar .sidebar-link,
#sidebar2 .sidebar-link,
nav.sidebar .sidebar-link,
a.sidebar-link {
    color: #1e293b !important;
    background: transparent !important;
    background-color: transparent !important;
    text-decoration: none !important;
    padding: 12px 1rem !important;
    border-radius: 0.5rem !important;
    margin: 0 0.5rem !important;
    transition: all 0.3s ease-in-out !important;
    border: 1px solid transparent !important;
    display: flex !important;
    align-items: center !important;
    font-weight: 500 !important;
}

/* SIDEBAR LINKS HOVER ULTRA GÜÇLÜ OVERRIDE - #49243e YOK ET */
.sidebar a:hover,
#sidebar a:hover,
#sidebar2 a:hover,
nav.sidebar a:hover,
.wrapper .sidebar a:hover,
.wrapper #sidebar a:hover,
.wrapper #sidebar2 a:hover,
.wrapper nav.sidebar a:hover,
body .sidebar a:hover,
body #sidebar a:hover,
body #sidebar2 a:hover,
body nav.sidebar a:hover,
body .wrapper .sidebar a:hover,
body .wrapper #sidebar a:hover,
body .wrapper #sidebar2 a:hover,
body .wrapper nav.sidebar a:hover,
html body .sidebar a:hover,
html body #sidebar a:hover,
html body #sidebar2 a:hover,
html body nav.sidebar a:hover,
html body .wrapper .sidebar a:hover,
html body .wrapper #sidebar a:hover,
html body .wrapper #sidebar2 a:hover,
html body .wrapper nav.sidebar a:hover,
.sidebar .sidebar-link:hover,
#sidebar .sidebar-link:hover,
#sidebar2 .sidebar-link:hover,
nav.sidebar .sidebar-link:hover,
a.sidebar-link:hover {
    background: linear-gradient(135deg, #2563eb, #3b82f6) !important;
    background-color: #2563eb !important;
    color: white !important;
    text-decoration: none !important;
    transform: translateX(8px) !important;
    border-color: #3b82f6 !important;
    box-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1) !important;
}

/* CSS DEĞİŞKENLERİNİ OVERRIDE ET */
:root {
    --sidebar-bg: #ffffff !important;
    --sidebar-color: #1e293b !important;
    --sidebar-hover-bg: linear-gradient(135deg, #2563eb, #3b82f6) !important;
    --sidebar-hover-color: white !important;
    --old-purple: #ffffff !important;
    --purple-dark: #ffffff !important;
    --bg-purple: #ffffff !important;
}

/* #49243e RENGİNİ SADECE SIDEBAR'DA TEMİZLE */
/* SIDEBAR ÖZEL OVERRIDE - #49243e YASAKLI */
.sidebar, 
#sidebar, 
#sidebar2,
nav.sidebar {
    /* #49243e rengini kesinlikle kullanma */
    background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%) !important;
    background-color: #ffffff !important;    
    color: #1e293b !important;
}

.sidebar .sidebar-brand, 
#sidebar .sidebar-brand, 
#sidebar2 .sidebar-brand,
nav.sidebar .sidebar-brand {
    /* Sadece brand için mavi gradient */
    background: linear-gradient(135deg, #2563eb, #3b82f6) !important;
    background-color: #2563eb !important;
    color: white !important;
}

.sidebar a:hover, 
#sidebar a:hover, 
#sidebar2 a:hover,
nav.sidebar a:hover,
.sidebar .sidebar-link:hover, 
#sidebar .sidebar-link:hover, 
#sidebar2 .sidebar-link:hover,
nav.sidebar .sidebar-link:hover {
    /* Hover durumunda da mavi gradient */
    background: linear-gradient(135deg, #2563eb, #3b82f6) !important;
    background-color: #2563eb !important;
    color: white !important;
}

/* SIDEBAR ÖZEL ELEMENT OVERRIDE'LARI - #49243e TEMİZLE */
.sidebar .sidebar-link,
#sidebar .sidebar-link,
#sidebar2 .sidebar-link,
nav.sidebar .sidebar-link {
    color: #1e293b !important;
    background: transparent !important;
    padding: 12px 1rem !important;
    margin: 0 0.5rem !important;
    border-radius: 0.5rem !important;
    transition: all 0.3s ease-in-out !important;
}

.sidebar .dropdown-toggle,
#sidebar .dropdown-toggle,
#sidebar2 .dropdown-toggle,
nav.sidebar .dropdown-toggle {
    background: linear-gradient(135deg, #ffffff, #f1f5f9) !important;
    border: 1px solid #e2e8f0 !important;
    color: #1e293b !important;
}

.sidebar .dropdown-toggle:hover,
#sidebar .dropdown-toggle:hover,
#sidebar2 .dropdown-toggle:hover,
nav.sidebar .dropdown-toggle:hover {
    background: linear-gradient(135deg, #2563eb, #3b82f6) !important;
    color: white !important;
}

/* HERHANGİ BİR ELEMENT #49243e KULLANIRSA OVERRIDE ET */
*[style*="#49243e"] {
    background: var(--surface-color) !important;
    background-color: var(--surface-color) !important;
    color: var(--text-primary) !important;
}

*[style*="rgb(73, 36, 62)"] {
    background: var(--surface-color) !important;
    background-color: var(--surface-color) !important;
    color: var(--text-primary) !important;
}

*[style*="rgba(73, 36, 62"] {
    background: var(--surface-color) !important;
    background-color: var(--surface-color) !important;
    color: var(--text-primary) !important;
}