/* ================================================================
   YÜKSEK UÇUŞ - SIDEBAR.CSS
   Sidebar, Navigasyon, Kullanıcı Bilgisi
   ================================================================ */

/* ==================== SIDEBAR ==================== */
.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  width: var(--sidebar-width);
  display: flex;
  flex-direction: column;
  background: var(--bg-sidebar);
  border-right: 1px solid var(--border);
  z-index: var(--z-sidebar);
  overflow: hidden;
}

.sidebar-inner {
  flex: 1;
  padding: var(--space-md);
  overflow-y: auto;
  display: flex;
  flex-direction: column;
}


/* ==================== BRAND ==================== */
.sidebar-brand {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  padding-bottom: var(--space-md);
  border-bottom: 1px solid var(--border);
  margin-bottom: var(--space-md);
}

.sidebar-brand-logo {
  width: 38px;
  height: 38px;
  border-radius: var(--radius-sm);
  overflow: hidden;
  flex-shrink: 0;
}

.sidebar-brand-logo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.sidebar-brand-info {
  flex: 1;
  min-width: 0;
}

.sidebar-brand-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sidebar-brand-subtitle {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 1px;
}


/* ==================== SEARCH ==================== */
.sidebar-search {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  padding: var(--space-sm) var(--space-sm);
  margin-bottom: var(--space-md);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg-input);
  transition: all var(--transition-fast);
}

.sidebar-search:focus-within {
  border-color: var(--border-focus);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

.sidebar-search svg {
  width: 16px;
  height: 16px;
  color: var(--text-muted);
  flex-shrink: 0;
}

.sidebar-search-input {
  background: transparent;
  border: none;
  outline: none;
  color: var(--text);
  font-size: 13px;
  flex: 1;
  min-width: 0;
}

.sidebar-search-input::placeholder {
  color: var(--text-muted);
}


/* ==================== NAVIGATION ==================== */
.sidebar-nav {
  flex: 1;
}

.nav-group {
  margin-bottom: var(--space-md);
}

.nav-label {
  font-size: 11px;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 0 var(--space-sm);
  margin-bottom: var(--space-xs);
}

.nav-stack {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.nav-item {
  width: 100%;
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  padding: 6px var(--space-sm);
  border: none;
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--text-dim);
  font-size: 13px;
  font-weight: 500;
  text-align: left;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.nav-item:hover {
  background: var(--accent-soft);
  color: var(--text);
}

.nav-item.active {
  background: var(--accent-soft);
  color: var(--accent);
  font-weight: 600;
}

.nav-item svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

.nav-item .nav-badge {
  margin-left: auto;
  background: var(--accent-soft);
  color: var(--accent);
  padding: 2px 8px;
  border-radius: var(--radius-full);
  font-size: 11px;
  font-weight: 600;
  min-width: 20px;
  text-align: center;
}


/* ==================== CLASS LIST ==================== */
.class-list {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.class-item {
  width: 100%;
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  padding: 6px var(--space-sm);
  border: none;
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--text-dim);
  font-size: 13px;
  font-weight: 500;
  text-align: left;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.class-item:hover {
  background: var(--accent-soft);
  color: var(--text);
}

.class-item.active {
  background: var(--accent-soft);
  color: var(--accent);
  font-weight: 600;
}

.class-item .class-dot {
  width: 8px;
  height: 8px;
  border-radius: var(--radius-full);
  background: var(--border-strong);
  flex-shrink: 0;
}

.class-item.active .class-dot {
  background: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

.class-item .class-name {
  flex: 1;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.class-item .class-count {
  font-size: 11px;
  color: var(--text-muted);
  flex-shrink: 0;
}


/* ==================== SIDEBAR FOOTER ==================== */
.sidebar-footer {
  padding: var(--space-md);
  border-top: 1px solid var(--border);
}

.sidebar-user {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}

.sidebar-user-avatar {
  width: 34px;
  height: 34px;
  border-radius: var(--radius-sm);
  background: var(--accent-soft);
  display: grid;
  place-items: center;
  font-weight: 700;
  font-size: 13px;
  color: var(--accent);
  flex-shrink: 0;
}

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

.sidebar-user-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sidebar-user-role {
  font-size: 11px;
  color: var(--text-muted);
}

.sidebar-logout-btn {
  width: 100%;
  margin-top: var(--space-sm);
  padding: var(--space-sm);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--text-dim);
  font-size: 13px;
  font-weight: 500;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-sm);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.sidebar-logout-btn:hover {
  border-color: var(--danger);
  color: var(--danger);
  background: var(--danger-soft);
}

.sidebar-logout-btn svg {
  width: 16px;
  height: 16px;
}


/* ==================== NETWORK STATUS ==================== */
.network-status {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: var(--radius-full);
  width: fit-content;
  margin-top: var(--space-sm);
}

.network-status.online {
  color: var(--success);
  background: var(--success-soft);
}

.network-status.offline {
  color: var(--danger);
  background: var(--danger-soft);
}

.network-status .status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: currentColor;
}


/* ==================== MOBILE SIDEBAR ==================== */
.sidebar-backdrop {
  position: fixed;
  inset: 0;
  background: var(--overlay);
  z-index: calc(var(--z-sidebar) - 1);
  opacity: 0;
  visibility: hidden;
  transition: all var(--transition-normal);
}

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

.mobile-header {
  display: none;
  position: sticky;
  top: 0;
  z-index: var(--z-header);
  height: var(--header-height);
  background: var(--bg-sidebar);
  border-bottom: 1px solid var(--border);
  align-items: center;
  justify-content: space-between;
  padding: 0 var(--space-md);
}

.mobile-header-brand {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  font-weight: 700;
  font-size: 14px;
}

.mobile-header-logo {
  width: 28px;
  height: 28px;
  object-fit: cover;
  border-radius: var(--radius-xs);
}

.mobile-menu-btn,
.mobile-close-btn {
  width: 36px;
  height: 36px;
  border: none;
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--text);
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: background var(--transition-fast);
}

.mobile-menu-btn:hover,
.mobile-close-btn:hover {
  background: var(--accent-soft);
}

.mobile-close-btn {
  display: none;
}

.mobile-menu-btn svg,
.mobile-close-btn svg {
  width: 20px;
  height: 20px;
}
