.app-sidebar { display: flex; flex-direction: column; height: 100vh; height: 100dvh; padding: 18px 12px 12px; }
.sidebar-brand-row { display: flex; align-items: center; flex-shrink: 0; gap: 8px; }
.sidebar-brand-row .brand { flex: 1; min-width: 0; padding: 0 8px 18px; font-size: 1rem; }
.sidebar-brand-row .brand-logo { flex-shrink: 0; width: 40px; height: 40px; }
.sidebar-search { display: none; align-items: center; gap: 8px; flex-shrink: 0; margin: 0 5px 14px; padding: 0 10px; border: 1px solid #ffffff26; border-radius: 9px; background: #ffffff08; color: #a9b9ca; }
html.navigation-ready .sidebar-search { display: flex; }
.sidebar-search:focus-within { border-color: #5bcac5; box-shadow: 0 0 0 2px #5bcac526; }
.sidebar-search input { width: 100%; min-width: 0; height: 38px; border: 0; outline: 0; background: transparent; color: #f1f5f9; font-size: .81rem; }
.sidebar-search input::placeholder { color: #a4b4c5; opacity: 1; }
.sidebar-search input::-webkit-search-cancel-button { filter: grayscale(1) brightness(2); }
.sidebar-nav { display: block; min-height: 0; flex: 1; overflow-y: auto; overflow-x: hidden; overscroll-behavior: contain; scrollbar-width: thin; scrollbar-color: #476078 transparent; padding: 0 3px 8px; }
.sidebar-group { margin: 0 0 15px; }
.sidebar-group-title { margin: 0; padding: 0 10px 7px; font-size: .64rem; font-weight: 700; line-height: 1.5; letter-spacing: .09em; text-transform: uppercase; color: #9aafc5; }
.sidebar-group-links { display: grid; gap: 3px; }
.sidebar-nav a { min-height: 39px; padding: 8px 10px; gap: 11px; font-size: .88rem; line-height: 1.35; }
.sidebar-nav a > i { display: inline-flex; justify-content: center; width: 20px; font-size: 1.05rem; color: #a7bed5; }
.sidebar-nav a > span { min-width: 0; white-space: normal; overflow-wrap: anywhere; }
.sidebar-nav a:hover > i, .sidebar-nav a.is-active > i { color: #78ded6; }
.sidebar-nav a:focus-visible { outline: 2px solid #78ded6; outline-offset: -2px; background: var(--sidebar-2); color: #fff; }
.sidebar-nav a.is-active { font-weight: 650; }
.sidebar-nav [hidden] { display: none !important; }
.sidebar-search-empty { margin: 10px; color: #c3d1df; font-size: .84rem; line-height: 1.6; }
.sidebar-footer { flex-shrink: 0; padding-top: 10px; border-top: 1px solid #ffffff1c; }
.sidebar-toggle { position: static; display: flex; align-items: center; justify-content: flex-start; gap: 11px; width: 100%; height: 39px; padding: 0 13px; border: 1px solid transparent; border-radius: 8px; background: transparent; color: #afc1d2; font-size: .8rem; box-shadow: none; }
.sidebar-toggle:hover { transform: none; background: var(--sidebar-2); color: #fff; }
.sidebar-toggle:focus-visible { outline: 2px solid #78ded6; outline-offset: -2px; }
.sidebar-toggle-label { white-space: nowrap; }
.sidebar-close, .mobile-menu-toggle, .sidebar-backdrop { display: none; }
.topbar-leading { display: flex; align-items: center; flex: 1; min-width: 0; gap: 12px; }
.topbar-leading .global-search { flex: 1; max-width: 460px; min-width: 0; }
.navigation-tooltip { --bs-tooltip-bg: #1b3046; --bs-tooltip-color: #fff; --bs-tooltip-opacity: 1; font-size: .82rem; }
@media (min-width: 981px) {
  html.sidebar-is-collapsed .sidebar-brand-row .brand { padding: 0 0 16px; }
  html.sidebar-is-collapsed .sidebar-search { display: none; }
  html.sidebar-is-collapsed .sidebar-group { padding-top: 10px; margin-bottom: 10px; border-top: 1px solid #ffffff1c; }
  html.sidebar-is-collapsed .sidebar-group:first-child { padding-top: 0; border-top: 0; }
  html.sidebar-is-collapsed .sidebar-group-title { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); padding: 0; }
  html.sidebar-is-collapsed .sidebar-nav { padding-right: 0; padding-left: 0; }
  html.sidebar-is-collapsed .sidebar-nav a { min-height: 41px; }
  html.sidebar-is-collapsed .sidebar-nav a > span,
  html.sidebar-is-collapsed .sidebar-nav a:hover > span,
  html.sidebar-is-collapsed .sidebar-nav a:focus-visible > span { position: absolute; top: auto; left: auto; width: 1px; height: 1px; padding: 0; overflow: hidden; clip-path: inset(50%); transform: none; opacity: 0; }
  html.sidebar-is-collapsed .sidebar-toggle { justify-content: center; gap: 0; padding: 0; }
  html.sidebar-is-collapsed .sidebar-toggle-label { display: none; }
}
@media (max-width: 980px) {
  .app-sidebar { position: static; width: 100%; height: auto; }
  .sidebar-nav { grid-template-columns: none; max-height: 65vh; }
  .sidebar-nav a > span { overflow: visible; text-overflow: clip; }
  .sidebar-footer { display: none; }
  html.navigation-ready .app-sidebar { position: fixed; inset: 0 auto 0 0; z-index: 1100; width: min(300px, calc(100vw - 42px)); height: 100vh; height: 100dvh; visibility: hidden; transform: translateX(-105%); transition: transform 180ms ease; box-shadow: 12px 0 40px #0004; padding-top: max(18px, env(safe-area-inset-top)); padding-bottom: max(12px, env(safe-area-inset-bottom)); }
  .sidebar-nav a { min-height: 44px; font-size: .92rem; }
  html.navigation-ready .sidebar-nav { max-height: none; }
  html.navigation-ready .sidebar-close { display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; align-self: flex-start; width: 36px; height: 36px; border: 1px solid #ffffff26; border-radius: 8px; color: #dae5f1; background: transparent; }
  html.navigation-ready .sidebar-close:focus-visible { outline: 2px solid #78ded6; outline-offset: 2px; }
  html.navigation-ready .mobile-menu-toggle { display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; gap: 6px; width: auto; min-width: 42px; padding: 0 10px; }
  .mobile-menu-toggle > i { font-size: 1.2rem; }
  .mobile-menu-toggle > span { font-size: .8rem; font-weight: 650; }
  .sidebar-backdrop:not([hidden]) { display: block; position: fixed; inset: 0; z-index: 1090; background: #07101d99; backdrop-filter: blur(2px); }
  html.sidebar-mobile-open { overflow: hidden; }
  html.sidebar-mobile-open body { overflow: hidden; }
  html.sidebar-mobile-open .app-sidebar { visibility: visible; transform: translateX(0); }
  .topbar { position: sticky; top: 0; display: flex; flex-direction: row; align-items: center; gap: 14px; padding: 12px 18px; }
  .topbar-actions { min-width: 0; gap: 8px; flex-wrap: nowrap; }
  .topbar-actions .icon-button { flex-shrink: 0; }
}
@media (max-width: 740px) {
  .topbar { flex-direction: column; align-items: stretch; gap: 10px; }
  .topbar-leading { flex: none; width: 100%; }
  .topbar-leading .global-search { max-width: none; }
  .topbar-leading .global-search-preview { left: auto; right: 0; width: min(640px, calc(100vw - 36px)); }
  .topbar-actions { width: 100%; justify-content: space-between; }
  .topbar-actions .user-chip { flex: 1; min-width: 0; max-width: 220px; }
  .topbar-actions .identity-text { min-width: 0; }
  .topbar-actions .identity-text strong { max-width: 100%; }
  .topbar-actions .icon-button { width: 38px; height: 38px; }
  .topbar-actions .language-switcher select { min-height: 38px; padding: 0 6px; }
}
@media (prefers-reduced-motion: reduce) { html.navigation-ready .app-sidebar { transition: none; } }
