html {
  font-size: 14px;
}

@media (min-width: 768px) {
  html {
    font-size: 16px;
  }
}

.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
  box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem #258cfb;
}

html {
  position: relative;
  min-height: 100%;
}

body {
  margin-bottom: 60px;
}

/* Sidebar Styles */
.sidebar {
  position: fixed;
  top: 0;
  left: 0;
  height: 100vh;
  width: 260px;
  background: linear-gradient(180deg, #2c3e50 0%, #34495e 100%);
  color: #fff;
  transition: all 0.3s ease;
  z-index: 1000;
  box-shadow: 2px 0 10px rgba(0, 0, 0, 0.1);
  overflow-y: auto;
}

.sidebar.collapsed {
  width: 70px;
}

.sidebar-header {
  padding: 1rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  min-height: 80px;
}

.sidebar-header h4 {
  margin: 0;
  font-size: 1.25rem;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  transition: opacity 0.3s;
}

.sidebar.collapsed .sidebar-header h4 {
  opacity: 0;
  width: 0;
}

.sidebar-logo-link {
  text-decoration: none;
  color: inherit;
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 1;
  transition: opacity 0.3s;
  width: 100%;
}

.sidebar-logo-link:hover {
  opacity: 0.8;
}

.sidebar-logo {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 1;
  width: 100%;
  background: transparent !important;
  background-color: transparent !important;
}

.sidebar-logo-img {
  width: 120px;
  height: auto;
  max-height: 60px;
  object-fit: contain;
  flex-shrink: 0;
  transition: all 0.3s;
  background: transparent !important;
  background-color: transparent !important;
  mix-blend-mode: normal;
}

.sidebar.collapsed .sidebar-logo-img {
  width: 50px;
  max-height: 50px;
}

/* Versiyon Etiketi - Sağ Alt */
.app-version {
  position: absolute;
  bottom: 5px;
  right: 10px;
  font-size: 0.6rem;
  color: rgba(255, 255, 255, 0.4);
  letter-spacing: 0.5px;
  font-weight: 500;
}

.sidebar.collapsed .app-version {
  display: none;
}

.sidebar-logo i {
  font-size: 1.5rem;
  color: #3498db;
  flex-shrink: 0;
  transition: transform 0.3s;
}

.sidebar.collapsed .sidebar-logo i {
  font-size: 1.8rem;
}

.sidebar-logo-text {
  font-size: 1.1rem;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  transition: opacity 0.3s;
}

.sidebar.collapsed .sidebar-logo-text {
  opacity: 0;
  width: 0;
}

.sidebar-toggle {
  background: none;
  border: none;
  color: #fff;
  font-size: 1.2rem;
  cursor: pointer;
  padding: 0.5rem;
  border-radius: 4px;
  transition: background 0.3s;
  position: absolute;
  top: 1rem;
  right: 1rem;
  z-index: 10;
}

.sidebar-toggle:hover {
  background: rgba(255, 255, 255, 0.1);
}

.sidebar-menu {
  padding: 1rem 0 120px 0; /* Footer için alt boşluk */
  list-style: none;
  margin: 0;
}

.sidebar-menu-item {
  margin: 0.25rem 0;
}

.sidebar-menu-link {
  display: flex;
  align-items: center;
  padding: 0.75rem 1rem;
  color: rgba(255, 255, 255, 0.8);
  text-decoration: none;
  transition: all 0.3s;
  border-left: 3px solid transparent;
  position: relative;
}

.sidebar-menu-link:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  border-left-color: #3498db;
}

.sidebar-menu-link.active {
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
  border-left-color: #3498db;
  font-weight: 600;
}

.sidebar-menu-icon {
  width: 24px;
  height: 24px;
  margin-right: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 1.2rem;
}

.sidebar.collapsed .sidebar-menu-icon {
  margin-right: 0;
}

.sidebar-menu-text {
  white-space: nowrap;
  transition: opacity 0.3s;
}

.sidebar.collapsed .sidebar-menu-text {
  opacity: 0;
  width: 0;
  overflow: hidden;
}

.sidebar-menu-badge {
  margin-left: auto;
  padding: 0.25rem 0.5rem;
  border-radius: 12px;
  font-size: 0.75rem;
  font-weight: 600;
}

.sidebar.collapsed .sidebar-menu-badge {
  position: absolute;
  top: 50%;
  right: 0.5rem;
  transform: translateY(-50%);
  margin-left: 0;
}

.sidebar-menu-dropdown {
  list-style: none;
  padding: 0;
  margin: 0;
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
}

.sidebar-menu-item.active .sidebar-menu-dropdown {
  max-height: 500px;
}

.sidebar-menu-dropdown-link {
  display: flex;
  align-items: center;
  padding: 0.6rem 1rem 0.6rem 3rem;
  color: rgba(255, 255, 255, 0.7);
  text-decoration: none;
  transition: all 0.3s;
  font-size: 0.9rem;
}

.sidebar-menu-dropdown-link:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  padding-left: 3.5rem;
}

.sidebar-menu-dropdown-link.active {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  border-left: 3px solid #3498db;
}

/* Submenu Styles */
.sidebar-menu-group {
  position: relative;
}

.sidebar-menu-toggle {
  cursor: pointer;
  color: rgba(255, 255, 255, 0.8) !important;
}

.sidebar-menu-toggle:hover {
  color: #fff !important;
}

.sidebar-menu-arrow {
  margin-left: auto;
  transition: transform 0.3s ease;
}

.sidebar-menu-toggle[aria-expanded="true"] .sidebar-menu-arrow {
  transform: rotate(180deg);
}

.sidebar-submenu {
  list-style: none;
  padding: 0;
  margin: 0;
  background: rgba(0, 0, 0, 0.2);
  border-left: 3px solid rgba(52, 152, 219, 0.5);
}

.sidebar-submenu-item {
  margin: 0;
}

.sidebar-submenu-link {
  display: flex;
  align-items: center;
  padding: 0.6rem 1rem 0.6rem 3.5rem;
  color: rgba(255, 255, 255, 0.7);
  text-decoration: none;
  transition: all 0.3s;
  font-size: 0.9rem;
}

.sidebar-submenu-link:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  padding-left: 4rem;
}

.sidebar-submenu-link.active {
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
  border-left: 3px solid #3498db;
  font-weight: 600;
}

.sidebar.collapsed .sidebar-submenu {
  display: none;
}

.sidebar-footer {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 1rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(0, 0, 0, 0.2);
}

.sidebar-user-info {
  display: flex;
  align-items: center;
  padding: 0.5rem;
  color: rgba(255, 255, 255, 0.9);
}

.sidebar-user-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-right: 0.75rem;
  flex-shrink: 0;
}

.sidebar.collapsed .sidebar-user-avatar {
  margin-right: 0;
}

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

.sidebar-user-name {
  font-size: 0.9rem;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sidebar.collapsed .sidebar-user-name {
  opacity: 0;
  width: 0;
}

.sidebar-user-role {
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.6);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sidebar.collapsed .sidebar-user-role {
  opacity: 0;
  width: 0;
}

.sidebar-logout-btn {
  width: 100%;
  margin-top: 0.5rem;
  padding: 0.5rem;
  background: rgba(231, 76, 60, 0.2);
  border: 1px solid rgba(231, 76, 60, 0.3);
  color: #fff;
  border-radius: 4px;
  transition: all 0.3s;
  font-size: 0.85rem;
}

.sidebar-logout-btn:hover {
  background: rgba(231, 76, 60, 0.3);
  border-color: rgba(231, 76, 60, 0.5);
}

/* Main Content Area */
.main-content {
  margin-left: 260px;
  transition: margin-left 0.3s ease;
  min-height: 100vh;
  background: #f8f9fa;
}

.main-content.sidebar-collapsed {
  margin-left: 70px;
}

.top-navbar {
  background: #fff;
  padding: 1rem 2rem;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 999;
}

.top-navbar-title {
  font-size: 1.5rem;
  font-weight: 600;
  color: #2c3e50;
  margin: 0;
}

.content-wrapper {
  padding: 2rem;
}

/* Mobile Responsive */
@media (max-width: 768px) {
  .sidebar {
    transform: translateX(-100%);
  }

  .sidebar.show {
    transform: translateX(0);
  }

  .main-content {
    margin-left: 0;
  }

  .mobile-menu-toggle {
    display: block;
    background: none;
    border: none;
    font-size: 1.5rem;
    color: #2c3e50;
    cursor: pointer;
    padding: 0.5rem;
  }

  .content-wrapper {
    padding: 1rem;
  }
}

@media (min-width: 769px) {
  .mobile-menu-toggle {
    display: none;
  }
}

/* Scrollbar Styling for Sidebar */
.sidebar::-webkit-scrollbar {
  width: 6px;
}

.sidebar::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.1);
}

.sidebar::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.2);
  border-radius: 3px;
}

.sidebar::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.3);
}

/* Card Styles */
.card {
  border: none;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  margin-bottom: 1.5rem;
}

.card-header {
  background: #fff;
  border-bottom: 1px solid #e9ecef;
  padding: 1rem 1.5rem;
  font-weight: 600;
}

/* Animation */
@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateX(-10px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.sidebar-menu-item {
  animation: slideIn 0.3s ease;
}