/* ═══════════════════════════════════════════════
   GLOBAL SIDEBAR — Tüm sayfalarda sabit yan menü
   ═══════════════════════════════════════════════ */

/* ─── ANA LAYOUT ─── */
.app-layout {
  display: flex;
  min-height: 100vh;
}

.app-content {
  flex: 1;
  min-width: 0;
  /* overflow taşmasını engelle */
  display: flex;
  flex-direction: column;
}

/* ─── SIDEBAR ─── */
.app-sidebar {
  width: 260px;
  min-width: 260px;
  background: linear-gradient(180deg, #f8fbff 0%, #eef4fc 100%);
  border-right: 1px solid rgba(13, 110, 253, 0.08);
  padding: 0 0 1.5rem 0;
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
  z-index: 10;
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Sidebar Logo / Brand */
.sidebar-brand {
  padding: 1.25rem 1.25rem 1rem;
  border-bottom: 1px solid rgba(13, 110, 253, 0.08);
}

.sidebar-brand a {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  text-decoration: none;
  font-size: 1.25rem;
  font-weight: 700;
  color: #0d6efd;
  transition: opacity 0.2s ease;
}

.sidebar-brand a:hover {
  opacity: 0.85;
}

.sidebar-brand i {
  font-size: 1.4rem;
}

/* Sidebar Header */
.sidebar-header {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 1rem 1.25rem 0.75rem;
  font-size: 0.8rem;
  font-weight: 600;
  color: #8898aa;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.sidebar-header i {
  font-size: 0.9rem;
}

/* Sidebar Nav */
.sidebar-nav {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  padding: 0 0.75rem;
}

.sidebar-link {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.7rem 1rem;
  border-radius: 0.65rem;
  color: #344767;
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  transition: all 0.2s ease;
  position: relative;
}

.sidebar-link:hover {
  background: rgba(13, 110, 253, 0.08);
  color: #0d6efd;
  transform: translateX(3px);
}

.sidebar-link:hover .sidebar-icon {
  background: #0d6efd;
  color: #fff;
  box-shadow: 0 4px 12px rgba(13, 110, 253, 0.25);
}

.sidebar-link:hover .sidebar-arrow {
  opacity: 1;
  transform: translateX(2px);
}

/* Sidebar Icons */
.sidebar-icon {
  width: 34px;
  height: 34px;
  border-radius: 0.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(13, 110, 253, 0.08);
  color: #0d6efd;
  font-size: 0.95rem;
  flex-shrink: 0;
  transition: all 0.2s ease;
}

.sidebar-icon-profile {
  background: rgba(13, 110, 253, 0.08);
  color: #0d6efd;
}

.sidebar-icon-danger {
  background: rgba(220, 53, 69, 0.08);
  color: #dc3545;
}

/* Danger link hover */
.sidebar-link-danger:hover {
  background: rgba(220, 53, 69, 0.08);
  color: #dc3545;
}

.sidebar-link-danger:hover .sidebar-icon-danger {
  background: #dc3545;
  color: #fff;
  box-shadow: 0 4px 12px rgba(220, 53, 69, 0.25);
}

.sidebar-link-danger .sidebar-arrow {
  color: #dc3545;
}

/* Sidebar Arrow */
.sidebar-arrow {
  margin-left: auto;
  font-size: 0.7rem;
  opacity: 0;
  color: #0d6efd;
  transition: all 0.2s ease;
}

/* Divider */
.sidebar-divider {
  height: 1px;
  background: rgba(13, 110, 253, 0.1);
  margin: 0.75rem 1.25rem;
}

/* Bottom nav (Profilim, Çıkış) */
.sidebar-nav-bottom {
  margin-top: auto;
}

/* ─── MOBİL SIDEBAR TOGGLE ─── */
.sidebar-toggle {
  position: fixed;
  bottom: 1.5rem;
  left: 1.5rem;
  z-index: 1050;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: none;
  background: linear-gradient(135deg, #0d6efd, #4e8cff);
  color: #fff;
  font-size: 1.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 16px rgba(13, 110, 253, 0.35);
  cursor: pointer;
  transition: all 0.3s ease;
}

.sidebar-toggle:hover {
  transform: scale(1.1);
  box-shadow: 0 6px 24px rgba(13, 110, 253, 0.45);
}

.sidebar-toggle.toggle-active {
  background: linear-gradient(135deg, #dc3545, #ff6b7a);
  box-shadow: 0 4px 16px rgba(220, 53, 69, 0.35);
}

.sidebar-toggle.toggle-active i::before {
  content: "\F62A";
}

/* Overlay (mobile) */
.sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.4);
  z-index: 1030;
  backdrop-filter: blur(2px);
}

.sidebar-overlay.active {
  display: block;
}

/* ─── RESPONSIVE ─── */
@media (max-width: 991.98px) {
  .app-sidebar {
    position: fixed;
    top: 0;
    left: 0;
    right: auto;
    height: 100vh;
    transform: translateX(-100%);
    z-index: 1040;
    box-shadow: 4px 0 24px rgba(0, 0, 0, 0.15);
    background: #fff;
    border-right: 1px solid rgba(13, 110, 253, 0.08);
  }

  .app-sidebar.sidebar-open {
    transform: translateX(0);
  }
}

/* ─── NO SIDEBAR LAYOUT (giriş yapmamış kullanıcılar) ─── */
.app-layout-nosidebar {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.app-layout-nosidebar .app-content {
  flex: 1;
}
