/* ============================================================
   layout.css — Sidebar, Header, Ana Grid, Hamburger Menü
   Durum localStorage'a kaydedilir (open/collapsed).
   ============================================================ */

/* ── Ana Sayfa Yapısı ────────────────────────────────────── */
.app-shell {
  display: flex;
  min-height: 100vh;
  width: 100%;
  max-width: 100%;
  position: relative;
}

/* ════════════════════════════════════════════════════════════
   SIDEBAR
   ════════════════════════════════════════════════════════════ */
.sidebar {
  width: var(--sidebar-width);
  flex-shrink: 0;
  background: linear-gradient(180deg, #080d1a 0%, #0d162a 50%, #080d19 100%);
  border-right: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 4px 0 28px rgba(0, 0, 0, 0.35);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  z-index: var(--z-sidebar);
  transition: width var(--transition-base), transform var(--transition-base);
  overflow: hidden;
}

/* Daraltılmış sidebar */
.sidebar.collapsed {
  width: var(--sidebar-collapsed-width);
}

/* ── Sidebar Header (Logo) ───────────────────────────────── */
.sidebar-header {
  min-height: 86px;
  height: auto;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 0.85rem 1rem 0.75rem 1rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.02);
  flex-shrink: 0;
  overflow: visible;
  white-space: normal;
  text-align: center;
  box-sizing: border-box;
}

.sidebar.collapsed .sidebar-header {
  padding: 0.85rem 0.25rem;
  min-height: 72px;
  align-items: center;
  justify-content: center;
}

.sidebar-logo-link {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  color: inherit;
  width: 100%;
  text-align: center;
  transition: transform 0.2s ease;
}

.sidebar-logo-link:hover {
  transform: translateY(-1px);
}

/* ── 5. Çizgi Film Çıkartması Logo Tasarımı ───────────────── */
.sidebar-brand-top {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  margin: 0 auto 0.5rem auto;
  padding: 0.2rem 0;
  overflow: visible;
  text-align: center;
}

.ky-sticker-logo {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto;
  height: 46px;
  padding: 0 14px;
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  font-weight: 900;
  font-size: 22px;
  line-height: 1;
  letter-spacing: -0.8px;
  white-space: nowrap;
  background: #FDE047;
  color: #111111;
  border: 3.5px solid #111111;
  border-radius: 14px;
  box-shadow: 4px 4px 0 #111111;
  transform: rotate(-2deg);
  transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
  text-decoration: none;
  user-select: none;
  box-sizing: border-box;
  max-width: 100%;
}

.ky-sticker-logo .ky-k,
.ky-sticker-logo .ky-y {
  display: inline-block;
  transition: all 0.4s;
}

.ky-sticker-logo .ky-y {
  color: #EC4899;
}

.ky-sticker-logo .ky-m {
  display: inline-block;
  overflow: hidden;
  max-width: 90px;
  transition: max-width 0.4s cubic-bezier(0.7, 0, 0.2, 1), opacity 0.3s, transform 0.4s;
}

.ky-sticker-logo .ky-m.ky-s {
  max-width: 65px;
}

.sidebar-logo-link:hover .ky-sticker-logo {
  transform: rotate(0deg) scale(1.03);
  box-shadow: 5px 5px 0 #111111;
}

/* ── Daralınca (Collapsed Menü) Çizgi Film Çıkartması Animasyonu ── */
.sidebar.collapsed .sidebar-brand-top {
  justify-content: center;
  padding: 0;
  margin: 0 auto;
}

.sidebar.collapsed .ky-sticker-logo {
  transform: rotate(2deg) scale(1.05);
  padding: 0 8px;
  height: 42px;
  box-shadow: 3px 3px 0 #111111;
  border-width: 3px;
  border-radius: 12px;
  margin: 0 auto;
}

.sidebar.collapsed .ky-sticker-logo .ky-m {
  max-width: 0 !important;
  opacity: 0 !important;
  transform: scale(0) !important;
  pointer-events: none;
}

.tenant-custom-logo-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  padding: 2px 0;
  background: transparent;
}

.tenant-logo-main {
  display: block;
  max-height: 46px;
  max-width: 196px;
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: 8px;
  filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.35));
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.tenant-logo-compact {
  display: none;
  width: 42px;
  height: 42px;
  max-width: 42px;
  max-height: 42px;
  object-fit: contain;
  border-radius: 10px;
  filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.35));
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.tenant-sidebar-logo {
  max-height: 44px;
  max-width: 170px;
  object-fit: contain;
  border-radius: 6px;
}

.sidebar.collapsed .tenant-logo-main,
.app-shell[data-sidebar="collapsed"] .tenant-logo-main {
  display: none !important;
}

.sidebar.collapsed .tenant-logo-compact,
.app-shell[data-sidebar="collapsed"] .tenant-logo-compact {
  display: block !important;
}

/* ── Sidebar Tenant / Kurum Rozeti (Statik Kurumsal Rozet - Tekil Menü İlkesi) ── */
.sidebar-tenant-badge {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.45rem;
  padding: 0.38rem 0.65rem;
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.12);
  transition: all 0.22s ease;
  width: 100%;
  box-sizing: border-box;
  cursor: default;
  color: inherit;
  font-family: inherit;
  text-align: left;
  user-select: none;
}

.sidebar-tenant-badge:hover,
.sidebar-tenant-badge:focus-visible {
  background: rgba(255, 255, 255, 0.12);
  border-color: var(--color-primary, #6366f1);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.35);
  outline: none;
}

.sidebar-tenant-badge .tenant-icon {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(99, 102, 241, 0.2);
  border: 1px solid rgba(165, 180, 252, 0.35);
  color: #93c5fd;
  flex-shrink: 0;
  transition: all 0.2s ease;
}

.sidebar-tenant-badge .tenant-icon svg {
  width: 16px;
  height: 16px;
}

.sidebar-tenant-badge:hover .tenant-icon {
  background: var(--tenant-brand-primary, #6366f1);
  border-color: rgba(255, 255, 255, 0.4);
  color: #ffffff;
  box-shadow: 0 0 10px rgba(99, 102, 241, 0.4);
}

.sidebar-tenant-badge .tenant-info-wrap {
  display: flex;
  flex-direction: column;
  min-width: 0;
  flex: 1;
  overflow: hidden;
}

.sidebar-tenant-badge .tenant-name,
.sidebar-tenant-badge .tenant-name-text {
  font-size: 0.74rem;
  font-weight: 700;
  color: #f1f5f9;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sidebar-tenant-badge .tenant-subtitle {
  font-size: 0.65rem;
  color: var(--color-sidebar-muted, #94a3b8);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sidebar-tenant-badge .tenant-role {
  font-size: 0.65rem;
  font-weight: 700;
  padding: 0.15rem 0.45rem;
  border-radius: var(--radius-full, 9999px);
  background: rgba(99, 102, 241, 0.22);
  border: 1px solid rgba(165, 180, 252, 0.35);
  color: #e0e7ff;
  white-space: nowrap;
  flex-shrink: 0;
}

.sidebar-tenant-badge .tenant-role.role-manager {
  background: rgba(99, 102, 241, 0.25);
  border-color: rgba(165, 180, 252, 0.45);
  color: #e0e7ff;
}

.sidebar-tenant-badge .tenant-role.role-superadmin {
  background: rgba(245, 158, 11, 0.25);
  border-color: rgba(251, 191, 36, 0.45);
  color: #fef3c7;
}

.sidebar-tenant-badge .tenant-role.role-teacher {
  background: rgba(34, 197, 94, 0.25);
  border-color: rgba(134, 239, 172, 0.45);
  color: #bbf7d0;
}

.sidebar-tenant-badge .tenant-role.role-student {
  background: rgba(14, 165, 233, 0.25);
  border-color: rgba(125, 211, 252, 0.45);
  color: #bae6fd;
}

.sidebar-tenant-badge .tenant-caret {
  color: rgba(255, 255, 255, 0.5);
  transition: transform 0.2s ease;
  flex-shrink: 0;
}

.sidebar-tenant-dropdown:hover .tenant-caret,
.sidebar-tenant-dropdown.open .tenant-caret {
  transform: rotate(180deg);
  color: var(--color-accent, #ff6b45);
}

/* DARALTILMIŞ / COLLAPSED SIDEBAR'DA KUSURSUZ İKON BUTONU (ASLA METİN TAŞMAZ) */
.sidebar.collapsed .sidebar-tenant-badge,
.app-shell[data-sidebar="collapsed"] .sidebar-tenant-badge {
  width: 42px !important;
  height: 42px !important;
  min-height: 42px !important;
  margin: 0.35rem auto 0 auto;
  padding: 0 !important;
  display: flex !important;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.28) 0%, rgba(30, 27, 75, 0.7) 100%);
  border: 1px solid rgba(99, 102, 241, 0.5);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.4), 0 0 10px rgba(99, 102, 241, 0.25);
}

.sidebar.collapsed .sidebar-tenant-badge .tenant-info-wrap,
.sidebar.collapsed .sidebar-tenant-badge .tenant-name,
.sidebar.collapsed .sidebar-tenant-badge .tenant-name-text,
.sidebar.collapsed .sidebar-tenant-badge .tenant-subtitle,
.sidebar.collapsed .sidebar-tenant-badge .tenant-role,
.sidebar.collapsed .sidebar-tenant-badge .tenant-caret,
.app-shell[data-sidebar="collapsed"] .sidebar-tenant-badge .tenant-info-wrap,
.app-shell[data-sidebar="collapsed"] .sidebar-tenant-badge .tenant-name,
.app-shell[data-sidebar="collapsed"] .sidebar-tenant-badge .tenant-name-text,
.app-shell[data-sidebar="collapsed"] .sidebar-tenant-badge .tenant-subtitle,
.app-shell[data-sidebar="collapsed"] .sidebar-tenant-badge .tenant-role,
.app-shell[data-sidebar="collapsed"] .sidebar-tenant-badge .tenant-caret {
  display: none !important;
}

.sidebar.collapsed .sidebar-tenant-badge .tenant-icon,
.app-shell[data-sidebar="collapsed"] .sidebar-tenant-badge .tenant-icon {
  font-size: 1.25rem;
  margin: 0;
  display: inline-block !important;
}

/* AŞAĞI DOĞRU AÇILAN KURUM MENÜSÜ */
.tenant-dropdown-menu {
  position: absolute;
  top: calc(100% + 0.45rem);
  left: 0;
  right: 0;
  z-index: 1000;
  background: linear-gradient(145deg, #0d162a 0%, #152238 60%, var(--color-sidebar, #111c33) 100%);
  border: 1px solid rgba(var(--color-primary-rgb, 99, 102, 241), 0.35);
  border-top: 3px solid var(--color-accent, #ff6b45);
  border-radius: var(--radius-lg, 12px);
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.7), 0 0 18px rgba(99, 102, 241, 0.25);
  padding: 0.75rem;
  display: none;
  flex-direction: column;
  gap: 0.45rem;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  animation: tenantDropdownSlideDown 0.22s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes tenantDropdownSlideDown {
  0% {
    opacity: 0;
    transform: translateY(-8px) scale(0.97);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* Hover veya Açık Durumda Aşağı Doğru Göster */
@media (hover: hover) and (pointer: fine) {
  .sidebar-tenant-dropdown:hover .tenant-dropdown-menu {
    display: flex;
  }
}
.sidebar-tenant-dropdown.open .tenant-dropdown-menu,
.sidebar-tenant-dropdown:focus-within .tenant-dropdown-menu {
  display: flex;
}

/* Collapsed modda sağa ve aşağı açılan kurum menüsü */
.sidebar.collapsed .tenant-dropdown-menu,
.app-shell[data-sidebar="collapsed"] .tenant-dropdown-menu {
  left: calc(var(--sidebar-collapsed-width) + 8px);
  top: 8px;
  right: auto;
  width: 270px;
}

.tenant-menu-header {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  padding-bottom: 0.4rem;
}

.tenant-menu-title-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.tenant-menu-icon {
  width: 32px;
  height: 32px;
  border-radius: 9px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(99, 102, 241, 0.2);
  border: 1px solid rgba(165, 180, 252, 0.35);
  color: #93c5fd;
  flex-shrink: 0;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
}

.tenant-menu-title {
  font-size: 0.85rem;
  font-weight: 700;
  color: #ffffff;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tenant-menu-subtitle {
  font-size: 0.68rem;
  color: var(--color-sidebar-muted, #94a3b8);
  line-height: 1.3;
}

.tenant-menu-role-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  align-self: flex-start;
  margin-top: 0.3rem;
  font-size: 0.7rem;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: var(--radius-full, 9999px);
  background: rgba(99, 102, 241, 0.25);
  border: 1px solid rgba(165, 180, 252, 0.45);
  color: #e0e7ff !important;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
  letter-spacing: 0.02em;
}

.tenant-menu-role-badge.role-manager {
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.32) 0%, rgba(79, 70, 229, 0.2) 100%);
  border-color: rgba(165, 180, 252, 0.55);
  color: #ffffff !important;
}

.tenant-menu-role-badge.role-superadmin {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.32) 0%, rgba(217, 119, 6, 0.2) 100%);
  border-color: rgba(251, 191, 36, 0.55);
  color: #ffffff !important;
}

.tenant-menu-role-badge.role-teacher {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.32) 0%, rgba(5, 150, 105, 0.2) 100%);
  border-color: rgba(52, 211, 153, 0.55);
  color: #ffffff !important;
}

.tenant-menu-role-badge.role-student {
  background: linear-gradient(135deg, rgba(14, 165, 233, 0.32) 0%, rgba(2, 132, 199, 0.2) 100%);
  border-color: rgba(56, 189, 248, 0.55);
  color: #ffffff !important;
}

.tenant-role-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #60a5fa;
  box-shadow: 0 0 8px #60a5fa, 0 0 2px #ffffff;
}

.tenant-menu-role-badge.role-superadmin .tenant-role-dot {
  background: #fbbf24;
  box-shadow: 0 0 8px #fbbf24;
}

.tenant-menu-role-badge.role-teacher .tenant-role-dot {
  background: #34d399;
  box-shadow: 0 0 8px #34d399;
}

.tenant-menu-role-badge.role-student .tenant-role-dot {
  background: #38bdf8;
  box-shadow: 0 0 8px #38bdf8;
}

.tenant-menu-divider {
  height: 1px;
  background: rgba(255, 255, 255, 0.09);
  margin: 0.3rem 0;
}

.tenant-menu-links {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.tenant-menu-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.55rem 0.75rem;
  border-radius: 8px;
  color: #e2e8f0;
  font-size: 0.8125rem;
  font-weight: 500;
  text-decoration: none;
  background: transparent;
  border: 1px solid transparent;
  width: 100%;
  text-align: left;
  cursor: pointer;
  transition: all 0.18s ease;
  box-sizing: border-box;
}

.tenant-menu-item:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.18);
  color: #ffffff;
  transform: translateX(3px);
}

.tenant-menu-item svg {
  width: 17px;
  height: 17px;
  color: #93c5fd;
  flex-shrink: 0;
  transition: transform 0.2s ease, color 0.2s ease;
}

.tenant-menu-item:hover svg {
  color: #ffffff;
  transform: scale(1.15);
}

.tenant-logout-btn svg {
  color: #f87171 !important;
}

.tenant-logout-btn:hover {
  background: rgba(239, 68, 68, 0.18) !important;
  border-color: rgba(239, 68, 68, 0.35) !important;
  color: #ffffff !important;
}

.tenant-logout-btn:hover svg {
  color: #fca5a5 !important;
  transform: scale(1.15);
}

.sidebar-header-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
  overflow: hidden;
}

.sidebar-logo-text {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1.05rem;
  color: #ffffff;
  letter-spacing: -0.01em;
  white-space: nowrap;
  opacity: 1;
  transition: opacity var(--transition-base);
}

.sidebar-badge {
  font-size: 0.625rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #818cf8;
  background: rgba(99, 102, 241, 0.15);
  border: 1px solid rgba(99, 102, 241, 0.3);
  border-radius: var(--radius-full);
  padding: 1px 7px;
  display: inline-block;
  width: fit-content;
}

.sidebar.collapsed .sidebar-header-text {
  opacity: 0;
  pointer-events: none;
}

/* ── Sidebar Navigasyon ──────────────────────────────────── */
.sidebar-nav {
  flex: 1;
  padding: var(--sp-4) var(--sp-3) var(--sp-6) var(--sp-3);
  overflow-y: auto;
  overflow-x: hidden;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.12) transparent;
}

@supports not (scrollbar-color: auto) {
  .sidebar-nav::-webkit-scrollbar { width: 4px; }
  .sidebar-nav::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, 0.12); border-radius: 4px; }
}

.nav-group {
  margin-bottom: var(--sp-5);
}

.nav-group-label {
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(148, 163, 184, 0.75);
  padding: var(--sp-3) var(--sp-3) var(--sp-2);
  white-space: nowrap;
  overflow: hidden;
  transition: opacity var(--transition-base);
  display: flex;
  align-items: center;
  gap: var(--sp-2);
}

.sidebar.collapsed .nav-group-label {
  opacity: 0;
  height: 0;
  padding: 0;
  margin: 0;
}

/* ── Navigasyon Elemanı & Hover / Active Durumları ────────────────── */
.nav-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.5rem 0.75rem;
  border-radius: var(--radius-lg, 10px);
  color: rgba(226, 232, 240, 0.9);
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  white-space: nowrap;
  overflow: hidden;
  position: relative;
  border: 1px solid transparent;
  background: transparent;
  width: 100%;
  text-align: left;
  text-decoration: none;
  margin-bottom: 4px;
}

.nav-item:hover:not(.active) {
  background: rgba(255, 255, 255, 0.12);
  color: #ffffff !important;
  border-color: rgba(255, 255, 255, 0.18);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
  transform: translateX(4px);
}

.nav-item:hover:not(.active) .nav-label {
  color: #ffffff !important;
  font-weight: 600;
}

/* AKTİF MENÜ ELEMANI: Asla soluk görünmez; canlı, derin ve yüksek kontrastlı */
.nav-item.active {
  background: linear-gradient(135deg, var(--tenant-brand-primary, #4f46e5) 0%, #6366f1 100%) !important;
  color: #ffffff !important;
  font-weight: 700 !important;
  border: 1px solid rgba(255, 255, 255, 0.3) !important;
  box-shadow: 0 4px 16px rgba(79, 70, 229, 0.45) !important;
}

.nav-item.active .nav-label {
  color: #ffffff !important;
  font-weight: 700 !important;
  opacity: 1 !important;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.35);
}

/* Aktif eleman üzerine hover yapıldığında da soluklaşmaz; daha parlak ve canlı kalır */
.nav-item.active:hover {
  background: linear-gradient(135deg, var(--tenant-brand-hover, #4338ca) 0%, var(--tenant-brand-primary, #4f46e5) 100%) !important;
  color: #ffffff !important;
  border-color: rgba(255, 255, 255, 0.5) !important;
  box-shadow: 0 6px 20px rgba(79, 70, 229, 0.6) !important;
  transform: translateX(4px);
}

.nav-item.active:hover .nav-label {
  color: #ffffff !important;
  opacity: 1 !important;
}

/* Sol kenarlık — canlı neon aktif sayfa göstergesi */
.nav-item.active::before {
  content: '';
  position: absolute;
  left: 0;
  top: 15%;
  bottom: 15%;
  width: 4px;
  background: #ffffff;
  border-radius: 0 4px 4px 0;
  box-shadow: 0 0 10px #ffffff;
}

/* Sağ kenarlık — aktif nokta göstergesi */
.nav-item.active::after {
  content: '';
  position: absolute;
  right: 12px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #ffffff;
  box-shadow: 0 0 8px #ffffff;
}

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

/* ── Navigasyon İkonu: Modern, Canlı, Temalara Göre Kusursuz Kapsayıcı ── */
.nav-icon {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #e2e8f0;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.nav-icon svg {
  width: 18px;
  height: 18px;
  stroke: currentColor;
  stroke-width: 2;
  transition: all 0.2s ease;
}

.nav-item:hover:not(.active) .nav-icon {
  background: rgba(255, 255, 255, 0.16);
  border-color: rgba(255, 255, 255, 0.3);
  color: #ffffff !important;
  transform: scale(1.08);
  box-shadow: 0 0 12px rgba(255, 255, 255, 0.2);
}

.nav-item.active .nav-icon {
  background: #ffffff !important;
  border-color: #ffffff !important;
  color: var(--tenant-brand-primary, #4f46e5) !important;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3) !important;
  transform: scale(1.04);
}

.nav-item.active .nav-icon svg {
  stroke: var(--tenant-brand-primary, #4f46e5) !important;
  stroke-width: 2.2 !important;
}

.nav-item.active:hover .nav-icon {
  background: #ffffff !important;
  border-color: #ffffff !important;
  color: var(--tenant-brand-hover, #4338ca) !important;
  transform: scale(1.08);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.45) !important;
}

.nav-item.active:hover .nav-icon svg {
  stroke: var(--tenant-brand-hover, #4338ca) !important;
}

/* ── Navigasyon Etiket metni ─────────────────────────────── */
.nav-label {
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  transition: opacity var(--transition-base), width var(--transition-base);
}

.sidebar.collapsed .nav-label {
  opacity: 0;
  width: 0;
  overflow: hidden;
}

/* ── Badge (bildirim sayısı) ─────────────────────────────── */
.nav-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  background: var(--color-danger);
  color: #fff;
  font-size: 0.625rem;
  font-weight: 700;
  border-radius: var(--radius-full);
  flex-shrink: 0;
  transition: opacity var(--transition-base);
}

.sidebar.collapsed .nav-badge { opacity: 0; }

/* ════════════════════════════════════════════════════════════
   SIDEBAR AŞAĞI DOĞRU AÇILAN TEMA DROPDOWN MENÜSÜ (COLLAPSED & HOVER)
   Tüm rollerde fare ile üzerine gelindiğinde tema rengine uygun aşağı doğru açılan kart
   ════════════════════════════════════════════════════════════ */
.sidebar-flyout-tooltip {
  position: fixed;
  z-index: 99999;
  display: block;
  min-width: 250px;
  max-width: 320px;
  padding: 0;
  background: linear-gradient(145deg, #0d162a 0%, #15203b 50%, var(--color-sidebar, #111c33) 100%);
  color: #ffffff;
  border: 1px solid rgba(var(--color-primary-rgb, 99, 102, 241), 0.35);
  border-top: 3px solid var(--color-accent, #ff6b45);
  border-radius: var(--radius-lg, 12px);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.7), 0 0 20px rgba(var(--color-primary-rgb, 99, 102, 241), 0.25);
  font-family: var(--font-sans);
  pointer-events: auto;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-8px) scale(0.97);
  transition: opacity 0.2s cubic-bezier(0.16, 1, 0.3, 1),
              transform 0.2s cubic-bezier(0.16, 1, 0.3, 1),
              visibility 0.2s;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  cursor: pointer;
  overflow: hidden;
}

.sidebar-flyout-tooltip.visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0) scale(1);
}

.sidebar-flyout-tooltip .nav-dropdown-card {
  display: flex;
  flex-direction: column;
  padding: 0.85rem 1rem;
  gap: 0.5rem;
}

.sidebar-flyout-tooltip .nav-dropdown-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}

.sidebar-flyout-tooltip .nav-dropdown-group-tag {
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--color-accent, #ff6b45);
  background: rgba(255, 107, 69, 0.12);
  border: 1px solid rgba(255, 107, 69, 0.25);
  padding: 2px 7px;
  border-radius: var(--radius-full, 9999px);
}

.sidebar-flyout-tooltip .nav-dropdown-badge {
  font-size: 0.65rem;
  font-weight: 700;
  color: #ffffff;
  background: var(--color-danger, #ef4444);
  padding: 2px 8px;
  border-radius: var(--radius-full, 9999px);
  box-shadow: 0 0 8px rgba(239, 68, 68, 0.6);
}

.sidebar-flyout-tooltip .nav-dropdown-active-pill {
  font-size: 0.65rem;
  font-weight: 700;
  color: #34d399;
  background: rgba(52, 211, 153, 0.15);
  border: 1px solid rgba(52, 211, 153, 0.3);
  padding: 2px 7px;
  border-radius: var(--radius-full, 9999px);
}

.sidebar-flyout-tooltip .nav-dropdown-title-row {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  margin-top: 0.15rem;
}

.sidebar-flyout-tooltip .nav-dropdown-icon {
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-accent, #ff6b45);
  flex-shrink: 0;
}

.sidebar-flyout-tooltip .nav-dropdown-icon svg {
  width: 20px;
  height: 20px;
  stroke: currentColor;
}

.sidebar-flyout-tooltip .nav-dropdown-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: #ffffff;
  letter-spacing: -0.01em;
}

.sidebar-flyout-tooltip .nav-dropdown-desc {
  font-size: 0.75rem;
  color: #94a3b8;
  line-height: 1.35;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding-top: 0.45rem;
}

.sidebar-flyout-tooltip .nav-dropdown-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 0.4rem;
  border-top: 1px dashed rgba(255, 255, 255, 0.1);
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--color-accent, #ff6b45);
}

.sidebar-flyout-tooltip:hover .nav-dropdown-footer {
  color: #ffffff;
}

.sidebar-flyout-tooltip .nav-dropdown-action-arrow {
  font-size: 0.85rem;
  transition: transform 0.18s ease;
}

.sidebar-flyout-tooltip:hover .nav-dropdown-action-arrow {
  transform: translateX(4px);
}

/* Sol ok ucu göstergesi */
.sidebar-flyout-tooltip .flyout-arrow {
  position: absolute;
  right: 100%;
  top: 18px;
  width: 0;
  height: 0;
  border-top: 6px solid transparent;
  border-bottom: 6px solid transparent;
  border-right: 7px solid var(--color-accent, #ff6b45);
}

/* Aktif sayfa ise parlak neon rozet */
.sidebar-flyout-tooltip.is-active {
  border-color: var(--color-primary, #6366f1);
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.8), 0 0 24px rgba(99, 102, 241, 0.35);
}

/* CSS fallback (pure CSS hover & focus) */
.sidebar.collapsed {
  overflow: visible;
}
.sidebar.collapsed .sidebar-nav {
  overflow: visible;
}
.sidebar.collapsed .nav-group {
  overflow: visible;
}
.sidebar.collapsed .nav-item {
  overflow: visible;
}
.sidebar.collapsed .nav-item:focus,
.sidebar.collapsed .nav-item:focus-visible {
  outline: 2px solid rgba(99, 102, 241, 0.85);
  outline-offset: 2px;
}

/* ── Sidebar Alt Kısım ───────────────────────────────────── */
.sidebar-footer {
  padding: var(--sp-3);
  background: rgba(255, 255, 255, 0.02);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  flex-shrink: 0;
}

.sidebar-user-card {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-lg);
  padding: 0.65rem 0.75rem;
  transition: background var(--transition-fast);
}

.sidebar-user-card:hover {
  background: rgba(255, 255, 255, 0.07);
}

.sidebar-footer-content {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  overflow: hidden;
  white-space: nowrap;
}

.sidebar-user-avatar-wrap {
  position: relative;
  flex-shrink: 0;
}

.sidebar-user-avatar {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-full);
  background: linear-gradient(135deg, #6366f1 0%, #4f46e5 100%);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8125rem;
  font-weight: 700;
  box-shadow: 0 0 10px rgba(99, 102, 241, 0.4);
}

.sidebar-user-online-dot {
  position: absolute;
  bottom: -1px;
  right: -1px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #22c55e;
  border: 2px solid #080d1a;
  box-shadow: 0 0 6px rgba(34, 197, 94, 0.8);
}

.sidebar-user-info {
  overflow: hidden;
  transition: opacity var(--transition-base);
  display: flex;
  flex-direction: column;
  gap: 2px;
}

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

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

.sidebar-user-role-badge {
  font-size: 0.65rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: var(--radius-full);
  display: inline-block;
  width: fit-content;
  letter-spacing: 0.02em;
}

.sidebar-user-role-badge.role-superadmin {
  background: rgba(245, 158, 11, 0.22);
  color: #fef3c7;
  border: 1px solid rgba(251, 191, 36, 0.45);
}

.sidebar-user-role-badge.role-manager {
  background: rgba(99, 102, 241, 0.22);
  color: #e0e7ff;
  border: 1px solid rgba(165, 180, 252, 0.45);
}

.sidebar-user-role-badge.role-teacher {
  background: rgba(34, 197, 94, 0.22);
  color: #bbf7d0;
  border: 1px solid rgba(134, 239, 172, 0.45);
}

.sidebar-user-role-badge.role-student {
  background: rgba(14, 165, 233, 0.22);
  color: #bae6fd;
  border: 1px solid rgba(125, 211, 252, 0.45);
}

.sidebar-profile-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  flex: 1;
  padding: 0.45rem 0.65rem;
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.16);
  color: #e2e8f0;
  font-size: 0.75rem;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.22s cubic-bezier(0.4, 0, 0.2, 1);
}

.sidebar-profile-btn svg {
  color: #93c5fd;
  transition: transform 0.22s ease, color 0.22s ease;
  flex-shrink: 0;
}

.sidebar-profile-btn:hover {
  background: var(--tenant-brand-primary, #6366f1);
  border-color: rgba(255, 255, 255, 0.35);
  color: #ffffff;
  transform: translateY(-1.5px);
  box-shadow: 0 4px 12px rgba(99, 102, 241, 0.4);
}

.sidebar-profile-btn:hover svg {
  transform: scale(1.15);
  color: #ffffff;
}

.sidebar-profile-btn.active {
  background: linear-gradient(135deg, var(--tenant-brand-primary, #6366f1) 0%, #4f46e5 100%);
  border-color: #818cf8;
  color: #ffffff;
  box-shadow: 0 4px 14px rgba(99, 102, 241, 0.45);
}

.sidebar-profile-btn.active svg {
  color: #ffffff;
}

.sidebar-logout-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  width: 100%;
  padding: 0.45rem 0.65rem;
  border-radius: var(--radius-md);
  background: rgba(239, 68, 68, 0.15);
  border: 1px solid rgba(239, 68, 68, 0.3);
  color: #fca5a5;
  font-size: 0.75rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.22s cubic-bezier(0.4, 0, 0.2, 1);
}

.sidebar-logout-btn svg {
  color: #f87171;
  transition: transform 0.22s ease, color 0.22s ease;
  flex-shrink: 0;
}

.sidebar-logout-btn:hover {
  background: #dc2626;
  border-color: #ef4444;
  color: #ffffff;
  transform: translateY(-1.5px);
  box-shadow: 0 4px 12px rgba(220, 38, 38, 0.4);
}

.sidebar-logout-btn:hover svg {
  transform: translateX(2px);
  color: #ffffff;
}

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

/* ════════════════════════════════════════════════════════════
   OVERLAY (mobilde sidebar açıkken arka plan kararmasi)
   ════════════════════════════════════════════════════════════ */
.sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  z-index: calc(var(--z-sidebar) - 1);
  backdrop-filter: blur(2px);
  opacity: 0;
  transition: opacity var(--transition-base);
}

.sidebar-overlay.visible {
  display: block;
  opacity: 1;
}

/* ════════════════════════════════════════════════════════════
   ANA İÇERİK ALANI
   ════════════════════════════════════════════════════════════ */
.main-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
  width: calc(100% - var(--sidebar-width));
  max-width: calc(100% - var(--sidebar-width));
  margin-left: var(--sidebar-width);
  transition: margin-left var(--transition-base), width var(--transition-base), max-width var(--transition-base);
}

.sidebar.collapsed ~ .main-content,
.app-shell[data-sidebar="collapsed"] .main-content {
  margin-left: var(--sidebar-collapsed-width);
  width: calc(100% - var(--sidebar-collapsed-width));
  max-width: calc(100% - var(--sidebar-collapsed-width));
}

/* ════════════════════════════════════════════════════════════
   HEADER (Üst Bar)
   ════════════════════════════════════════════════════════════ */
.site-header {
  height: var(--header-height);
  width: 100%;
  max-width: 100%;
  min-width: 0;
  background: var(--color-surface);
  border-bottom: 1px solid var(--color-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 var(--sp-6);
  position: sticky;
  top: 0;
  z-index: var(--z-sticky);
  gap: var(--sp-4);
  box-sizing: border-box;
}

/* ── Hamburger Butonu ────────────────────────────────────── */
.hamburger-btn {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 36px;
  height: 36px;
  cursor: pointer;
  border: none;
  background: none;
  border-radius: var(--radius-md);
  padding: var(--sp-2);
  transition: background-color var(--transition-fast);
  flex-shrink: 0;
}

.hamburger-btn:hover { background: var(--color-surface-hover); }

.hamburger-line {
  display: block;
  width: 18px;
  height: 2px;
  background: var(--color-ink-secondary);
  border-radius: var(--radius-full);
  transition:
    transform var(--transition-base),
    opacity   var(--transition-base),
    width     var(--transition-base);
  transform-origin: center;
}

/* Açık → X animasyonu */
.hamburger-btn.open .hamburger-line:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger-btn.open .hamburger-line:nth-child(2) { opacity: 0; width: 0; }
.hamburger-btn.open .hamburger-line:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ── Header Sol Grup ─────────────────────────────────────── */
.header-left {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  flex: 1 1 0%;
  min-width: 0;
  overflow: hidden;
}

/* ── Breadcrumb ──────────────────────────────────────────── */
.breadcrumb {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  font-size: var(--text-sm);
  color: var(--color-ink-muted);
  min-width: 0;
  flex: 0 1 auto;
  overflow: hidden;
}

.breadcrumb-item {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
}
.breadcrumb-item:last-child { color: var(--color-ink); font-weight: 500; }
.breadcrumb-sep { color: var(--color-ink-placeholder); font-size: var(--text-xs); flex-shrink: 0; }

/* ── Global Arama ────────────────────────────────────────── */
.header-search {
  position: relative;
  flex: 1 1 140px;
  min-width: 0;
  max-width: 280px;
  width: 100%;
}

.header-search-input {
  width: 100%;
  min-width: 0;
  height: 36px;
  background: var(--color-bgpage);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-full);
  padding: 0 var(--sp-4) 0 var(--sp-8);
  font-size: var(--text-sm);
  color: var(--color-ink);
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.header-search-input:focus {
  border-color: var(--color-accent);
  box-shadow: 0 0 0 3px var(--color-accent-light);
  background: var(--color-surface);
}

.header-search-icon {
  position: absolute;
  left: var(--sp-3);
  top: 50%;
  transform: translateY(-50%);
  color: var(--color-ink-muted);
  pointer-events: none;
}

/* ── Header Sağ Grup ─────────────────────────────────────── */
.header-right {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  flex-shrink: 0;
}

/* Tema toggle butonu */
.theme-toggle-btn {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-ink-muted);
  transition: background-color var(--transition-fast), color var(--transition-fast);
  cursor: pointer;
  border: none;
  background: none;
}

.theme-toggle-btn:hover {
  background: var(--color-surface-hover);
  color: var(--color-ink);
}

/* ── Bildirim Dropdown & Popover ────────────────────────── */
.notification-dropdown-wrap {
  position: relative;
  display: inline-flex;
}

.notification-btn {
  position: relative;
  width: 38px;
  height: 38px;
  border-radius: var(--radius-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-ink-muted);
  background: transparent;
  border: 1px solid transparent;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.notification-btn:hover,
.notification-btn[aria-expanded="true"] {
  background: var(--color-surface-hover);
  border-color: var(--color-border);
  color: var(--color-ink);
}

.notification-dot {
  position: absolute;
  top: 7px;
  right: 7px;
  width: 9px;
  height: 9px;
  background: var(--color-danger);
  border-radius: var(--radius-full);
  border: 2px solid var(--color-surface);
  box-shadow: 0 0 8px rgba(239, 68, 68, 0.6);
}

.notification-badge-count {
  position: absolute;
  top: -4px;
  right: -4px;
  min-width: 18px;
  height: 18px;
  padding: 0 4px;
  background: var(--color-accent);
  color: #fff;
  font-size: 0.625rem;
  font-weight: 700;
  border-radius: var(--radius-full);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 2px solid var(--color-surface);
  box-shadow: 0 2px 6px rgba(255, 107, 69, 0.4);
}

/* Çan titreme animasyonu (yeni bildirim geldiğinde) */
@keyframes bellRing {
  0% { transform: rotate(0); }
  15% { transform: rotate(14deg); }
  30% { transform: rotate(-14deg); }
  45% { transform: rotate(10deg); }
  60% { transform: rotate(-10deg); }
  75% { transform: rotate(4deg); }
  100% { transform: rotate(0); }
}

.animate-bell-ring {
  animation: bellRing 0.8s ease-in-out;
}

/* Popover Konteyneri */
.notification-popover {
  position: absolute;
  top: calc(100% + 8px);
  right: -10px;
  width: 360px;
  max-width: calc(100vw - 32px);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-xl);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15), 0 1px 3px rgba(0, 0, 0, 0.08);
  display: none;
  flex-direction: column;
  z-index: 1050;
  overflow: hidden;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.notification-popover.show {
  display: flex;
  animation: fadeInDown 0.2s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@media (hover: hover) and (pointer: fine) {
  .notification-dropdown-wrap:hover .notification-popover {
    display: flex;
    animation: fadeInDown 0.2s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  }
}

@keyframes fadeInDown {
  from { opacity: 0; transform: translateY(-8px) scale(0.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.notif-popover-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.875rem 1.125rem;
  border-bottom: 1px solid var(--color-border);
  background: var(--color-bgpage);
}

.notif-popover-title-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.notif-popover-title {
  font-family: var(--font-heading);
  font-size: 0.9375rem;
  font-weight: 700;
  color: var(--color-ink);
  margin: 0;
}

.notif-live-indicator {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.6875rem;
  font-weight: 600;
  color: var(--color-success);
  background: rgba(34, 197, 94, 0.12);
  padding: 0.15rem 0.45rem;
  border-radius: var(--radius-full);
}

.live-dot {
  width: 6px;
  height: 6px;
  background: var(--color-success);
  border-radius: 50%;
  box-shadow: 0 0 6px var(--color-success);
}

.notif-mark-all-btn {
  background: none;
  border: none;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--color-accent);
  cursor: pointer;
  padding: 0.2rem 0.4rem;
  border-radius: var(--radius-sm);
  transition: all var(--transition-fast);
}

.notif-mark-all-btn:hover {
  text-decoration: underline;
  background: rgba(255, 107, 69, 0.08);
}

.notif-popover-body {
  max-height: 380px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
}

.notif-popover-body {
  scrollbar-width: thin;
  scrollbar-color: var(--color-border) transparent;
}

@supports not (scrollbar-color: auto) {
  .notif-popover-body::-webkit-scrollbar {
    width: 5px;
  }
  .notif-popover-body::-webkit-scrollbar-thumb {
    background: var(--color-border);
    border-radius: var(--radius-full);
  }
}

.notification-popover-item {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 0.875rem 1.125rem;
  border-bottom: 1px solid var(--color-border);
  transition: background-color var(--transition-fast);
  position: relative;
}

.notification-popover-item:last-child {
  border-bottom: none;
}

.notification-popover-item:hover {
  background: var(--color-surface-hover);
}

.notification-popover-item.unread {
  background: rgba(255, 107, 69, 0.04);
}

.notification-popover-item.unread::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  background: var(--color-accent);
}

.notif-item-icon {
  width: 34px;
  height: 34px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-top: 2px;
}

.notif-item-icon.icon-accent {
  background: rgba(255, 107, 69, 0.12);
  color: var(--color-accent);
}

.notif-item-icon.icon-info {
  background: rgba(59, 130, 246, 0.12);
  color: var(--color-info);
}

.notif-item-icon.icon-warning {
  background: rgba(245, 158, 11, 0.12);
  color: var(--color-warning);
}

.notif-item-icon.icon-success {
  background: rgba(34, 197, 94, 0.12);
  color: var(--color-success);
}

.notif-item-body {
  flex: 1;
  min-width: 0;
}

.notif-item-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.2rem;
}

.notif-item-title {
  font-size: 0.84375rem;
  font-weight: 600;
  color: var(--color-ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.notif-item-time {
  font-size: 0.6875rem;
  color: var(--color-ink-muted);
  flex-shrink: 0;
}

.notif-item-msg {
  font-size: 0.78125rem;
  color: var(--color-ink-secondary);
  line-height: 1.4;
  margin-bottom: 0.35rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.notif-item-link {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--color-accent);
  text-decoration: none;
}

.notif-item-link:hover {
  text-decoration: underline;
}

.notif-item-check-btn {
  background: none;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  color: var(--color-ink-muted);
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
  transition: all var(--transition-fast);
}

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

.notification-empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 2.5rem 1.5rem;
  color: var(--color-ink-muted);
  text-align: center;
}

.notification-empty-state p {
  margin-top: 0.5rem;
  font-size: 0.8125rem;
}

.notification-loading-spinner {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 2rem;
  color: var(--color-ink-muted);
  font-size: 0.8125rem;
}

.notif-popover-footer {
  padding: 0.75rem 1.125rem;
  text-align: center;
  border-top: 1px solid var(--color-border);
  background: var(--color-bgpage);
}

.notif-view-all-link {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--color-ink);
  text-decoration: none;
  transition: color var(--transition-fast);
}

.notif-view-all-link:hover {
  color: var(--color-accent);
}

/* ── Tekil ve Birleşik SaaS Profil Dropdown Menüsü ── */
.profile-dropdown-container {
  position: relative;
  display: inline-flex;
  align-items: center;
}

.profile-btn {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.35rem 0.65rem 0.35rem 0.45rem;
  border-radius: var(--radius-full, 9999px);
  cursor: pointer;
  border: 1px solid var(--color-border);
  background: var(--color-surface);
  transition: all var(--transition-fast);
  color: var(--color-ink);
}

.profile-btn:hover,
.profile-dropdown-container.open .profile-btn {
  background: var(--color-surface-hover);
  border-color: rgba(99, 102, 241, 0.4);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.profile-avatar {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-full, 9999px);
  background: linear-gradient(135deg, #6366f1 0%, #4f46e5 100%);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8125rem;
  font-weight: 700;
  box-shadow: 0 0 8px rgba(99, 102, 241, 0.35);
  flex-shrink: 0;
}

.profile-name {
  font-size: 0.84375rem;
  font-weight: 600;
  color: var(--color-ink);
  max-width: 110px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.profile-role-badge {
  font-size: 0.65rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: var(--radius-full, 9999px);
  display: inline-block;
  letter-spacing: 0.02em;
}

.profile-caret {
  color: var(--color-ink-muted);
  transition: transform var(--transition-fast);
  flex-shrink: 0;
}

.profile-dropdown-container:hover .profile-caret,
.profile-dropdown-container.open .profile-caret {
  transform: rotate(180deg);
  color: var(--color-accent);
}

/* Profil Menü Popover Paneli */
.profile-dropdown-menu {
  min-width: 260px;
  max-width: 300px;
  padding: 0.5rem 0;
  right: 0;
  left: auto;
  border-radius: var(--radius-xl, 14px);
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.16), 0 2px 6px rgba(0, 0, 0, 0.08);
}

.profile-menu-user-card {
  padding: 0.75rem 1rem 0.6rem;
  background: var(--color-bgpage);
  border-bottom: 1px solid var(--color-border);
  margin-top: -0.5rem;
  border-top-left-radius: var(--radius-xl, 14px);
  border-top-right-radius: var(--radius-xl, 14px);
}

.profile-card-top {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.5rem;
}

.profile-card-avatar {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-full, 9999px);
  background: linear-gradient(135deg, #6366f1 0%, #4f46e5 100%);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9375rem;
  font-weight: 700;
  box-shadow: 0 0 10px rgba(99, 102, 241, 0.4);
  flex-shrink: 0;
}

.profile-card-details {
  flex: 1;
  min-width: 0;
}

.profile-card-name {
  font-size: 0.875rem;
  font-weight: 700;
  color: var(--color-ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.25;
}

.profile-card-tenant {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.71875rem;
  color: var(--color-ink-muted);
  margin-top: 0.2rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.profile-card-tenant svg {
  flex-shrink: 0;
  color: var(--color-accent);
}

.profile-card-badge-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}

.profile-card-role-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.6875rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: var(--radius-full, 9999px);
}

/* Rol rozeti renkleri (Profil Butonu ve Menü Kartı için) */
.profile-role-badge.role-manager,
.profile-card-role-badge.role-manager {
  background: rgba(99, 102, 241, 0.14);
  color: #4f46e5;
  border: 1px solid rgba(99, 102, 241, 0.3);
}

.profile-role-badge.role-superadmin,
.profile-card-role-badge.role-superadmin {
  background: rgba(245, 158, 11, 0.14);
  color: #d97706;
  border: 1px solid rgba(245, 158, 11, 0.3);
}

.profile-role-badge.role-teacher,
.profile-card-role-badge.role-teacher {
  background: rgba(16, 185, 129, 0.14);
  color: #059669;
  border: 1px solid rgba(16, 185, 129, 0.3);
}

.profile-role-badge.role-student,
.profile-card-role-badge.role-student {
  background: rgba(14, 165, 233, 0.14);
  color: #0284c7;
  border: 1px solid rgba(14, 165, 233, 0.3);
}

[data-theme="dark"] .profile-role-badge.role-manager,
[data-theme="dark"] .profile-card-role-badge.role-manager {
  background: rgba(99, 102, 241, 0.28);
  color: #c7d2fe;
  border-color: rgba(165, 180, 252, 0.45);
}

[data-theme="dark"] .profile-role-badge.role-superadmin,
[data-theme="dark"] .profile-card-role-badge.role-superadmin {
  background: rgba(245, 158, 11, 0.28);
  color: #fde68a;
  border-color: rgba(251, 191, 36, 0.45);
}

[data-theme="dark"] .profile-role-badge.role-teacher,
[data-theme="dark"] .profile-card-role-badge.role-teacher {
  background: rgba(16, 185, 129, 0.28);
  color: #a7f3d0;
  border-color: rgba(52, 211, 153, 0.45);
}

[data-theme="dark"] .profile-role-badge.role-student,
[data-theme="dark"] .profile-card-role-badge.role-student {
  background: rgba(14, 165, 233, 0.28);
  color: #bae6fd;
  border-color: rgba(56, 189, 248, 0.45);
}

.profile-card-online-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.6875rem;
  font-weight: 600;
  color: #16a34a;
}

.online-indicator-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #22c55e;
  box-shadow: 0 0 6px rgba(34, 197, 94, 0.7);
}

.profile-logout-form {
  margin: 0;
  padding: 0;
}

.profile-logout-item {
  color: var(--color-danger, #ef4444);
  width: 100%;
  border: none;
  background: none;
  text-align: left;
  font-family: inherit;
  font-size: 0.84375rem;
  font-weight: 600;
}

.profile-logout-item svg {
  color: var(--color-danger, #ef4444);
  transition: transform var(--transition-fast);
}

.profile-logout-item:hover {
  background-color: rgba(239, 68, 68, 0.08);
  color: #dc2626;
}

.profile-logout-item:hover svg {
  transform: translateX(3px);
  color: #dc2626;
}

/* ════════════════════════════════════════════════════════════
   SAYFA İÇERİĞİ
   ════════════════════════════════════════════════════════════ */
.page-content {
  flex: 1;
  padding: var(--sp-6) var(--sp-8);
  max-width: 1440px;
  width: 100%;
  margin: 0 auto;
  box-sizing: border-box;
}

/* Sayfa başlık bölümü */
.page-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--sp-4);
  margin-bottom: var(--sp-6);
  flex-wrap: wrap;
}

.page-title-group { flex: 1; min-width: 0; }

.page-title {
  font-family: var(--font-heading);
  font-size: var(--text-xl);
  font-weight: 700;
  color: var(--color-ink);
  margin-bottom: var(--sp-1);
}

.page-subtitle {
  font-size: var(--text-sm);
  color: var(--color-ink-muted);
}

.page-actions {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  flex-wrap: wrap;
}

/* Bölüm Grid ─────────────────────────────────────────────── */
.section-hidden { display: none !important; }
.section-active { display: block; }

/* ════════════════════════════════════════════════════════════
   MOBİL ALT NAVİGASYON (Öğrenci Paneli)
   ════════════════════════════════════════════════════════════ */
.mobile-bottom-nav {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: var(--mobile-nav-height);
  background: var(--color-surface);
  border-top: 1px solid var(--color-border);
  z-index: var(--z-sticky);
  padding: var(--sp-2) 0 env(safe-area-inset-bottom);
}

.mobile-bottom-nav ul {
  display: flex;
  justify-content: space-around;
  height: 100%;
}

.mobile-nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  padding: 0 var(--sp-4);
  color: var(--color-ink-muted);
  font-size: 0.625rem;
  font-weight: 500;
  cursor: pointer;
  border: none;
  background: none;
  border-radius: var(--radius-lg);
  transition: color var(--transition-fast);
  text-decoration: none;
  position: relative;
}

.mobile-nav-item.active {
  color: var(--color-accent);
}

.mobile-nav-item.active svg {
  filter: drop-shadow(0 0 4px var(--color-accent-glow));
}

.mobile-nav-badge {
  position: absolute;
  top: 2px;
  right: calc(50% - 14px);
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  background: var(--color-danger);
  color: #fff;
  font-size: 0.5rem;
  font-weight: 700;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
}
