.topbar .menu,
.topbar .nbell__menu,
.topbar .kurum-sec__menu,
.topbar .ou-switch__menu {
  animation: none;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(-8px) scale(0.97);
  transform-origin: top right;
  transition:
    opacity 0.16s ease,
    transform 0.22s var(--ease-bounce),
    visibility 0s linear 0.22s;
}

.topbar .menu.is-acik,
.topbar .nbell__menu.is-acik,
.topbar .kurum-sec__menu.is-acik,
.topbar .ou-switch__menu.is-acik {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: none;
  transition:
    opacity 0.16s ease,
    transform 0.24s var(--ease-bounce),
    visibility 0s;
}

.topbar .menu.acilir--yukari,
.topbar .nbell__menu.acilir--yukari,
.topbar .kurum-sec__menu.acilir--yukari,
.topbar .ou-switch__menu.acilir--yukari {
  transform-origin: bottom right;
  transform: translateY(8px) scale(0.97);
}

.topbar .menu.acilir--yukari.is-acik,
.topbar .nbell__menu.acilir--yukari.is-acik,
.topbar .kurum-sec__menu.acilir--yukari.is-acik,
.topbar .ou-switch__menu.acilir--yukari.is-acik {
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  .topbar .menu,
  .topbar .nbell__menu,
  .topbar .kurum-sec__menu,
  .topbar .ou-switch__menu,
  .topbar .menu.is-acik,
  .topbar .nbell__menu.is-acik,
  .topbar .kurum-sec__menu.is-acik,
  .topbar .ou-switch__menu.is-acik {
    transform: none;
    transition:
      opacity 0.01s linear,
      visibility 0s;
  }
}

/* Bağlam seçicisinin tabanı; masaüstünde mevcut iki seçici kullanılır. */
.ubg { display: none; }
.ubg__sayfa {
  position: absolute;
  top: calc(100% + var(--acilir-kayma, 10px));
  right: 0;
  z-index: 73;
  width: 360px;
  max-width: calc(100vw - 24px);
  max-height: 76dvh;
  overflow-y: auto;
  padding: 14px;
  background: var(--yuzey);
  border: 1px solid var(--hat-kart);
  border-radius: 0 0 16px 16px;
  box-shadow: var(--panel-golge);
  visibility: hidden;
  pointer-events: none;
}
.ubg__sayfa.is-acik { visibility: visible; pointer-events: auto; }
.ubg__scrim { position: fixed; inset: 0; z-index: 66; background: var(--scrim); }
.ubg__bas { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.ubg__bolum { font-size: 11px; color: var(--basari-metin); margin: 16px 0 8px; }
.ubg .ustbar-sheet-kapat { display: inline-flex; min-height: 44px; align-items: center; gap: 6px; }
.topbar .brand:focus-visible,
.topbar .nbell .nbell__btn:focus-visible,
.topbar .avatar:focus-visible,
.topbar .ubg__btn:focus-visible { outline: 2px solid var(--ust-dolu); outline-offset: 3px; }

/* Hesap kimliği ve başlık yalnız telefon alt sayfasında görünür. */
.ustbar-kimlik, .ustbar-sheet-baslik > span { display: none; }
@media (min-width: 641px) {
  .topbar .ustbar-sheet-baslik { display: contents; }
}
@media (min-width: 641px) and (max-width: 1023px), (min-width: 1024px) and (max-width: 1279px) and (hover: none) and (pointer: coarse) {
  body.edulive-cihaz .scrim,
  body.edulive-cihaz .nbell__scrim,
  body.edulive-cihaz .kurum-sec__scrim,
  body.edulive-cihaz .ou-switch__scrim,
  body.edulive-cihaz .ubg__scrim,
  body.edulive-cihaz .app-ms__scrim,
  body.edulive-cihaz .ase__perde { background: var(--scrim); }
  body.edulive-cihaz .topbar .menu,
  body.edulive-cihaz .topbar .nbell__menu,
  body.edulive-cihaz .topbar .kurum-sec__menu,
  body.edulive-cihaz .topbar .ou-switch__menu,
  body.edulive-cihaz .topbar .ubg__sayfa {
    top: calc(100% + var(--acilir-kayma));
    right: 0;
    left: auto;
    max-width: calc(100vw - 24px);
    border: 1px solid var(--hat-kart);
    border-radius: 0 0 16px 16px;
    background: var(--yuzey);
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    box-shadow: var(--panel-golge);
  }
  body.edulive-cihaz .topbar .menu button,
  body.edulive-cihaz .topbar .nbell__item,
  body.edulive-cihaz .topbar .nbell__all,
  body.edulive-cihaz .topbar .kurum-sec__item,
  body.edulive-cihaz .topbar .ou-switch__item { min-height: 44px; }
}

/* ═══════════════════════════════════════════════════════════════════════════
   HESAP MENÜSÜ · KURUM/OKUL BAĞLAMI (2026-09-25)
   Üst bardaki iki geniş hap (.kurum-sec / .ou-switch) barda çok yer kaplıyordu;
   MainLayout'tan kaldırıldı. Bağlam artık hesap menüsünde iki satır: satıra
   basınca ORTAK liste bileşeni aynı menüde açılır. Dar ekranda (.ubg görünürken)
   bu satırlar gizlenir — kurum değişimi tek kapıdan yürür.
   ═══════════════════════════════════════════════════════════════════════════ */
.topbar .menu {
  min-width: 304px;
}

.hb {
  display: grid;
  gap: 2px;
}

.hb__bolum[hidden],
.hb__panel[hidden] {
  display: none;
}

.hb__satir {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 8px 10px;
  border-radius: 10px;
  background: transparent;
  color: var(--fg-soft);
  text-align: left;
  cursor: pointer;
  transition:
    background 0.15s,
    color 0.15s;
}

.hb__satir--dural {
  cursor: default;
}

.topbar .menu .hb__satir:hover:not(.hb__satir--dural),
.topbar .menu .hb__satir.is-acik {
  background: color-mix(in srgb, var(--brand) 8%, transparent);
  color: var(--fg);
}

.hb__satir:focus-visible {
  outline: 2px solid var(--marka-400);
  outline-offset: -2px;
}

.hb__ikon {
  display: grid;
  place-items: center;
  flex: 0 0 28px;
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: var(--glass);
  border: 1px solid var(--line);
  color: var(--brand-strong);
}

.hb__yazi {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 1px;
  min-width: 0;
}

.hb__etiket {
  font-size: 10.5px;
  font-weight: 700;
  line-height: 1;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.hb__ad {
  overflow: hidden;
  font-size: 13.5px;
  font-weight: 650;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.hb__ok {
  flex: 0 0 auto;
  opacity: 0.7;
  transition: transform 0.18s var(--ease-bounce);
}

.hb__satir.is-acik .hb__ok {
  transform: rotate(180deg);
}

/* Açılan liste menünün içinde kalır: kendi kaydırma alanı, menüyü uzatmaz. */
.hb__panel {
  margin: 2px 0 4px;
  padding: 4px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: color-mix(in srgb, var(--n-100) 55%, transparent);
}

.topbar .menu .hb__panel .kurum-sec__liste,
.topbar .menu .hb__panel .ou-switch__liste {
  max-height: 216px;
}

@media (prefers-reduced-motion: reduce) {
  .hb__satir,
  .hb__ok {
    transition: none;
  }
}

/* Dar ekranda üst bardaki .ubg düğmesi aynı işi görür — çift kapı olmasın. */
@media (max-width: 1023px) {
  body.edulive-cihaz .topbar .menu .hb {
    display: none;
  }
}
