:root {
  --sidebar-width: 260px;
  --sidebar-width-collapsed: 80px;
  --header-height: 70px;
  --primary-color: #0d6efd;
  --light-color: #f8f9fa;
  --dark-color: #212529;
  --text-color: #495057;
  --border-color: #e9ecef;
  --transition-speed: 0.3s;
}

body.dashboard-layout {
  background-color: var(--light-color);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    "Helvetica Neue", Arial, sans-serif;
}

/* Ana Layout Yapısı */
.modern-sidebar {
  position: fixed;
  top: 0;
  left: 0;
  width: var(--sidebar-width);
  height: 100vh;
  background: #ffffff;
  border-right: 1px solid var(--border-color);
  z-index: 1031;
  transition: width var(--transition-speed);
  display: flex;
  flex-direction: column;
}

.sidebar-header {
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
}

.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
}

.brand-icon {
  font-size: 1.5rem;
  color: var(--primary-color);
}

.brand-text {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--dark-color);
}

.sidebar-nav {
  flex: 1;
  padding: 1rem 0;
  overflow-y: auto;
}

.nav-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.nav-item {
  padding: 0 1rem;
}

.nav-link {
  display: flex;
  align-items: center;
  padding: 0.75rem 1rem;
  border-radius: 8px;
  color: var(--text-color);
  text-decoration: none;
  transition: background-color var(--transition-speed),
    color var(--transition-speed);
  font-weight: 500;
}

.nav-link:hover {
  background-color: var(--light-color);
  color: var(--primary-color);
}

.nav-link.active {
  background-color: var(--primary-color);
  color: #ffffff;
  box-shadow: 0 4px 8px rgba(13, 110, 253, 0.3);
}

.nav-icon {
  width: 20px;
  text-align: center;
  margin-right: 1rem;
  font-size: 1.1rem;
}

.sidebar-footer {
  padding: 1rem;
  border-top: 1px solid var(--border-color);
}

.modern-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--header-height);
  background: #ffffff;
  border-bottom: 1px solid var(--border-color);
  z-index: 1030; /* offcanvas'ın (1040) altında kalması için ayarlandı */
  transition: none;
  display: flex;
  align-items: center;
  padding: 0 1.5rem;
}

.header-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
}

.header-left,
.header-right {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.sidebar-toggle {
  background: none;
  border: none;
  font-size: 1.25rem;
  cursor: pointer;
  color: var(--text-color);
}

.user-dropdown {
  position: relative;
}

.user-btn {
  background: none;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.user-menu {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  background: #ffffff;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  min-width: 180px;
  z-index: 1040;
  display: none; /* Varsayılan olarak gizli */
}

.user-menu.show {
  display: block; /* JS ile gösterilecek */
}

.user-menu-item {
  display: block;
  padding: 0.75rem 1.25rem;
  color: var(--text-color);
  text-decoration: none;
}

.user-menu-item:hover {
  background-color: var(--light-color);
}

.dashboard-main {
  padding-top: var(--header-height);
}

.dashboard-content {
  /* Üst padding, .dashboard-main tarafından zaten sağlanıyor.
     Burada sadece yan ve alt boşlukları veriyoruz. */
  padding: 0 1.5rem 1.5rem;
}

.page-header {
  margin-bottom: 1.5rem;
}

.page-title {
  font-size: 1.75rem;
  font-weight: 600;
  color: var(--dark-color);
}

/* Sidebar Daraltıldığında (Bu bölüm offcanvas ile gereksiz hale geldi) */
