:root {
  /* Enhanced color palette with more professional tones */
  --primary-color: #3b82f6;
  --primary-light: #93c5fd;
  --primary-dark: #1d4ed8;
  --primary-hover: #2563eb;
  --primary-bg-subtle: rgba(59, 130, 246, 0.08);
  
  /* Neutral colors - refined for better contrast */
  --neutral-50: #f9fafb;
  --neutral-100: #f3f4f6;
  --neutral-200: #e5e7eb;
  --neutral-300: #d1d5db;
  --neutral-400: #9ca3af;
  --neutral-500: #6b7280;
  --neutral-600: #4b5563;
  --neutral-700: #374151;
  --neutral-800: #1f2937;
  --neutral-900: #111827;
  
  /* UI Colors - preserved but enhanced */
  --success-color: #10b981;
  --warning-color: #f59e0b;
  --danger-color: #ef4444;
  --info-color: #0ea5e9;
  
  /* Application specific colors - reimagined sidebar */
  --sidebar-bg: #ffffff;
  --sidebar-header-bg: #f8fafc;
  --sidebar-footer-bg: #f8fafc;
  --sidebar-active-item-bg: var(--primary-bg-subtle);
  --sidebar-hover-bg: rgba(241, 245, 249, 0.7);
  --sidebar-active-item-text: var(--primary-color);
  --sidebar-icon-color: #64748b;
  --sidebar-text-color: #475569;
  --sidebar-muted-text: #64748b;
  --sidebar-category-color: #94a3b8;
  
  /* Text colors - improved from black to shaded gray */
  --text-color: #334155;
  --text-color-light: #475569;
  --text-color-lighter: #64748b;
  --text-color-muted: #94a3b8;
  
  /* Other variables */
  --sidebar-width: 250px;
  --sidebar-collapsed-width: 70px;
  --transition-speed: 0.2s;
  --border-color: #e2e8f0;
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(15, 23, 42, 0.05), 0 2px 4px -1px rgba(15, 23, 42, 0.03);
  --shadow-lg: 0 10px 15px -3px rgba(15, 23, 42, 0.08), 0 4px 6px -2px rgba(15, 23, 42, 0.04);
  --content-bg: var(--neutral-50);
  --body-font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --border-radius-sm: 4px;
  --border-radius-md: 6px;
  --border-radius-lg: 8px;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: var(--body-font);
}

html {
  font-size: 16px;
  position: relative;
  min-height: 100%;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  min-height: 100vh;
  color: var(--text-color);
  background-color: var(--content-bg);
  display: flex;
  transition: none;
  margin-left: 0;
  overflow-x: hidden;
  line-height: 1.5;
  letter-spacing: -0.01em;
}

body.sidebar-collapsed {
  margin-left: 0;
}

/* Improved sidebar styles */
.sidebar {
  position: fixed;
  top: 0;
  left: 0;
  width: var(--sidebar-width);
  height: 100vh;
  background-color: var(--sidebar-bg);
  color: var(--sidebar-text-color);
  display: flex;
  flex-direction: column;
  transition: width var(--transition-speed) ease;
  z-index: 1000;
  overflow-x: hidden;
  box-shadow: var(--shadow-md);
  border-right: 1px solid var(--border-color);
}

.sidebar.collapsed {
  width: var(--sidebar-collapsed-width);
}

/* Enhanced logo area */
.sidebar-logo {
  padding: 0 1.125rem;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--border-color);
  background-color: var(--sidebar-header-bg);
  cursor: pointer;
  transition: background-color 0.15s ease;
}

.sidebar-logo:hover {
  background-color: rgba(241, 245, 249, 0.9);
}

.sidebar-logo-content {
  display: flex;
  align-items: center;
  flex-grow: 1;
  overflow: hidden;
}

.sidebar-logo img {
  height: 28px;
  width: auto;
  transition: all var(--transition-speed) ease;
  filter: drop-shadow(0 1px 1px rgba(0, 0, 0, 0.05));
}

.sidebar-logo-text {
  margin-left: 10px;
  font-weight: 600;
  font-size: 1rem;
  color: var(--text-color);
  white-space: nowrap;
  opacity: 1;
  transition: opacity var(--transition-speed) ease, transform var(--transition-speed) ease;
  letter-spacing: -0.01em;
}

.collapsed .sidebar-logo-text {
  opacity: 0;
  transform: translateX(-10px);
}

.collapsed .sidebar-logo img {
  margin: 0 auto;
  transform: scale(1.05);
}

/* Improved nav section */
.sidebar-nav {
  display: flex;
  flex-direction: column;
  flex-grow: 1;
  padding: 1rem 0.625rem;
  overflow-y: auto;
  scrollbar-width: thin;
}

/* Modern, subtle scrollbar */
.sidebar-nav::-webkit-scrollbar {
  width: 3px;
}

.sidebar-nav::-webkit-scrollbar-thumb {
  background-color: var(--neutral-300);
  border-radius: 4px;
}

.sidebar-nav::-webkit-scrollbar-track {
  background-color: transparent;
}

/* Navigation category */
.sidebar-category {
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  color: var(--sidebar-category-color);
  margin: 1.25rem 0 0.375rem 0.75rem;
  letter-spacing: 0.05em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: opacity var(--transition-speed) ease;
}

.sidebar-category:first-child {
  margin-top: 0.5rem;
}

.collapsed .sidebar-category {
  opacity: 0;
}

/* Enhanced navigation items */
.sidebar-nav-item {
  display: flex;
  align-items: center;
  padding: 0.625rem 0.875rem;
  color: var(--sidebar-text-color);
  text-decoration: none;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  white-space: nowrap;
  margin: 0.125rem 0;
  border-radius: var(--border-radius-md);
  font-weight: 500;
  font-size: 0.85rem;
  position: relative;
  line-height: 1.4;
  letter-spacing: 0;
}

.sidebar-nav-item:hover {
  background-color: var(--sidebar-hover-bg);
  color: var(--text-color);
  transform: translateX(2px);
}

/* Active state styles - more refined */
.sidebar-nav-item.active,
.sidebar .sidebar-nav-item.active,
.sidebar-nav-item.selected,
.sidebar-nav-item[aria-selected="true"],
.sidebar-nav-item[aria-current="page"] {
  background-color: var(--sidebar-active-item-bg) !important;
  color: var(--sidebar-active-item-text) !important;
  font-weight: 600;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.sidebar-nav-item.active::before,
.sidebar .sidebar-nav-item.active::before,
.sidebar-nav-item.selected::before,
.sidebar-nav-item[aria-selected="true"]::before,
.sidebar-nav-item[aria-current="page"]::before {
  content: '';
  position: absolute;
  left: 0;
  top: 20%;
  height: 60%;
  width: 3px;
  background-color: var(--primary-color);
  border-radius: 0 3px 3px 0;
  box-shadow: 0 0 8px rgba(59, 130, 246, 0.3);
}

.sidebar-nav-item i {
  margin-right: 0.75rem;
  font-size: 1rem;
  min-width: 20px;
  text-align: center;
  color: var(--sidebar-icon-color);
  transition: all 0.2s ease;
}

.sidebar-nav-item.active i,
.sidebar .sidebar-nav-item.active i,
.sidebar-nav-item.selected i,
.sidebar-nav-item[aria-selected="true"] i,
.sidebar-nav-item[aria-current="page"] i {
  color: var(--primary-color) !important;
  transform: scale(1.1);
}

.sidebar-nav-item:hover i {
  color: var(--primary-color);
}

/* Improved collapsed state styles */
.collapsed .sidebar-nav-item {
  padding: 0.625rem;
  justify-content: center;
  width: 42px;
  margin: 0.375rem auto;
  border-radius: 10px;
}

.collapsed .sidebar-nav-item i {
  margin-right: 0;
  font-size: 1.25rem;
}

.collapsed .sidebar-nav-item span {
  display: none;
}

.collapsed .sidebar-nav-item.active::before,
.collapsed .sidebar-nav-item.selected::before,
.collapsed .sidebar-nav-item[aria-selected="true"]::before,
.collapsed .sidebar-nav-item[aria-current="page"]::before {
  width: 3px;
  height: 40%;
  left: 0;
  top: 30%;
}

.collapsed .sidebar-nav-item:hover {
  transform: translateX(0) scale(1.05);
  background-color: var(--sidebar-hover-bg);
}

/* Enhanced sidebar footer */
.sidebar-footer {
  padding: 0.625rem;
  border-top: 1px solid var(--border-color);
  background-color: var(--sidebar-footer-bg);
}

.sidebar-logout {
  display: flex;
  align-items: center;
  padding: 0.625rem 0.875rem;
  color: var(--sidebar-text-color);
  text-decoration: none;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  border-radius: var(--border-radius-md);
  font-weight: 500;
  font-size: 0.85rem;
}

.sidebar-logout:hover {
  background-color: rgba(252, 165, 165, 0.1);
  color: #ef4444;
  transform: translateX(2px);
}

.sidebar-logout i {
  margin-right: 0.75rem;
  font-size: 1rem;
  min-width: 20px;
  text-align: center;
  color: var(--sidebar-icon-color);
  transition: all 0.2s ease;
}

.sidebar-logout:hover i {
  color: #ef4444;
}

.collapsed .sidebar-logout {
  padding: 0.625rem;
  width: 42px;
  margin: 0 auto;
  justify-content: center;
  border-radius: 10px;
}

.collapsed .sidebar-logout i {
  margin-right: 0;
  font-size: 1.25rem;
}

.collapsed .sidebar-logout span {
  display: none;
}

.collapsed .sidebar-logout:hover {
  transform: translateX(0) scale(1.05);
}

/* Improved sidebar toggle button */
.sidebar-toggle {
  position: relative;
  background-color: rgba(241, 245, 249, 0.7);
  color: var(--sidebar-icon-color);
  border: none;
  width: 26px;
  height: 26px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
  padding: 0;
  border-radius: var(--border-radius-md);
}

.sidebar-toggle:hover {
  color: var(--primary-color);
  background-color: rgba(241, 245, 249, 0.9);
  transform: scale(1.05);
}

.sidebar-toggle i {
  font-size: 0.75rem;
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.sidebar.collapsed .sidebar-toggle i {
  transform: rotate(180deg);
}

/* Main content styles - enhanced */
.main-content {
  flex: 1;
  padding: 2rem;
  width: calc(100% - var(--sidebar-width));
  transition: width var(--transition-speed) ease, margin-left var(--transition-speed) ease;
  overflow-x: hidden;
  margin-left: var(--sidebar-width);
}

body.sidebar-collapsed .main-content {
  width: calc(100% - var(--sidebar-collapsed-width));
  margin-left: var(--sidebar-collapsed-width);
}

/* Mobile menu toggle button - improved */
.mobile-menu-toggle {
  display: none;
  position: fixed;
  top: 1rem;
  left: 1rem;
  z-index: 1002;
  background-color: white;
  color: var(--sidebar-text-color);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-md);
  padding: 0.625rem;
  font-size: 1.125rem;
  cursor: pointer;
  box-shadow: var(--shadow-sm);
  transition: all 0.2s ease;
  width: 42px;
  height: 42px;
  align-items: center;
  justify-content: center;
}

.mobile-menu-toggle:hover, 
.mobile-menu-toggle:focus {
  color: var(--primary-color);
  box-shadow: var(--shadow-md);
  transform: scale(1.05);
}

.mobile-menu-toggle:active {
  transform: scale(0.95);
}

/* Adjusting for mobile - improved */
@media (max-width: 768px) {
  .main-content {
    width: 100%;
    margin-left: 0;
    padding: 1.5rem;
  }
  
  .sidebar {
    width: 0;
    box-shadow: none;
    transform: translateX(-100%);
    transition: transform var(--transition-speed) ease, 
                width var(--transition-speed) ease;
  }
  
  .sidebar.mobile-open {
    width: var(--sidebar-width);
    transform: translateX(0);
    box-shadow: var(--shadow-lg);
  }
  
  .mobile-menu-toggle {
    display: flex;
  }
  
  .sidebar.mobile-open + .main-content {
    margin-left: 0;
  }
}

/* Improved form elements */
.btn:focus, 
.btn:active:focus, 
.btn-link.nav-link:focus, 
.form-control:focus, 
.form-check-input:focus {
  box-shadow: 0 0 0 0.15rem rgba(59, 130, 246, 0.25);
  border-color: var(--primary-color);
}

.form-control {
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-md);
  padding: 0.5rem 0.75rem;
  font-size: 0.95rem;
  transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
  color: var(--text-color);
}

.form-control:hover {
  border-color: var(--neutral-300);
}

.form-control:focus {
  border-color: var(--primary-color);
}

.form-label {
  font-weight: 500;
  font-size: 0.9375rem;
  color: var(--text-color-light);
  margin-bottom: 0.5rem;
}

.form-check-input {
  border: 1px solid var(--neutral-400);
}

.form-select {
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%234b5563' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m2 5 6 6 6-6'/%3e%3c/svg%3e");
  background-repeat: no-repeat;
  background-position: right 0.75rem center;
  background-size: 16px 12px;
  color: var(--text-color);
}

/* Enhanced footer styles */
.footer {
  margin-top: 2rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border-color);
  color: var(--text-color-lighter);
  font-size: 0.875rem;
}

.container {
  width: 100%;
  padding-right: 1rem;
  padding-left: 1rem;
}

/* Refined badge styles */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 0.25rem 0.55rem;
  font-size: 0.75rem;
  font-weight: 600;
  line-height: 1;
  text-align: center;
  white-space: nowrap;
  vertical-align: baseline;
  border-radius: 9999px;
}

.badge-primary {
  background-color: var(--primary-bg-subtle);
  color: var(--primary-color);
}

.badge-success {
  background-color: rgba(16, 185, 129, 0.1);
  color: var(--success-color);
}

.badge-warning {
  background-color: rgba(245, 158, 11, 0.1);
  color: var(--warning-color);
}

.badge-danger {
  background-color: rgba(239, 68, 68, 0.1);
  color: var(--danger-color);
}

/* Better notification badges */
.sidebar-nav-item .badge {
  margin-left: auto;
  font-size: 0.675rem;
  padding: 0.125rem 0.4rem;
  transition: all 0.2s ease;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.sidebar-nav-item.active .badge,
.sidebar .sidebar-nav-item.active .badge {
  background-color: white;
  color: var(--primary-color);
}

/* Improved mobile sidebar overlay */
.sidebar-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(15, 23, 42, 0.4);
  z-index: 999;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
  backdrop-filter: blur(2px);
}

.sidebar-overlay.active {
  opacity: 1;
  visibility: visible;
}

/* Improved table styles */
.table {
  width: 100%;
  margin-bottom: 1.5rem;
  border-collapse: separate;
  border-spacing: 0;
}

.table-container {
  border-radius: var(--border-radius-lg);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  margin-bottom: 1.5rem;
  background-color: white;
}

.table th {
  text-transform: uppercase;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--neutral-600);
  background-color: var(--neutral-50);
  padding: 0.75rem 1rem;
  letter-spacing: 0.05em;
  border-bottom: 1px solid var(--border-color);
}

.table td {
  padding: 0.875rem 1rem;
  vertical-align: middle;
  border-bottom: 1px solid var(--border-color);
  color: var(--neutral-700);
  font-size: 0.9375rem;
}

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

.table-striped tbody tr:nth-of-type(odd) {
  background-color: var(--neutral-50);
}

/* Button styles - enhanced */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 500;
  line-height: 1.5;
  text-align: center;
  vertical-align: middle;
  cursor: pointer;
  user-select: none;
  border: 1px solid transparent;
  padding: 0.5rem 1rem;
  font-size: 0.9375rem;
  border-radius: var(--border-radius-md);
  transition: color 0.15s ease-in-out, background-color 0.15s ease-in-out, 
              border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}

.btn-primary {
  color: #fff;
  background-color: var(--primary-color);
  border-color: var(--primary-color);
}

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

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

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

.btn-success {
  color: #fff;
  background-color: var(--success-color);
  border-color: var(--success-color);
}

.btn-danger {
  color: #fff;
  background-color: var(--danger-color);
  border-color: var(--danger-color);
}

.btn-sm {
  padding: 0.25rem 0.5rem;
  font-size: 0.875rem;
  border-radius: var(--border-radius-sm);
}

.btn-lg {
  padding: 0.75rem 1.5rem;
  font-size: 1.125rem;
  border-radius: var(--border-radius-lg);
}

.btn-icon {
  width: 2.5rem;
  height: 2.5rem;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.btn-icon.btn-sm {
  width: 2rem;
  height: 2rem;
}

/* Card styles */
.card {
  position: relative;
  display: flex;
  flex-direction: column;
  min-width: 0;
  word-wrap: break-word;
  background-color: #fff;
  background-clip: border-box;
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-lg);
  box-shadow: var(--shadow-sm);
  transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.card:hover {
  box-shadow: var(--shadow-md);
}

.card-header {
  padding: 1rem 1.25rem;
  margin-bottom: 0;
  background-color: var(--neutral-50);
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.card-header:first-child {
  border-radius: calc(var(--border-radius-lg) - 1px) calc(var(--border-radius-lg) - 1px) 0 0;
}

.card-header-title {
  margin: 0;
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--neutral-800);
}

.card-body {
  flex: 1 1 auto;
  padding: 1.25rem;
}

.card-footer {
  padding: 1rem 1.25rem;
  background-color: var(--neutral-50);
  border-top: 1px solid var(--border-color);
}

.card-footer:last-child {
  border-radius: 0 0 calc(var(--border-radius-lg) - 1px) calc(var(--border-radius-lg) - 1px);
}

/* Utility classes */
.text-primary { color: var(--primary-color) !important; }
.text-success { color: var(--success-color) !important; }
.text-warning { color: var(--warning-color) !important; }
.text-danger { color: var(--danger-color) !important; }
.text-muted { color: var(--neutral-500) !important; }

.bg-primary { background-color: var(--primary-color) !important; }
.bg-success { background-color: var(--success-color) !important; }
.bg-warning { background-color: var(--warning-color) !important; }
.bg-danger { background-color: var(--danger-color) !important; }
.bg-light { background-color: var(--neutral-50) !important; }
.bg-dark { background-color: var(--neutral-800) !important; }

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

/* Add your styles here for the user role display in the sidebar */
.sidebar-user-info {
    margin-top: 10px;
    padding: 8px 15px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.user-role {
    display: flex;
    align-items: center;
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.85rem;
}

.user-role i {
    font-size: 0.9rem;
    margin-right: 10px;
}

/* Style for admin roles */
.sidebar-user-info .user-role span:contains("Yönetici") {
    color: #ffc107;
    font-weight: 500;
}