.sr-only {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
}

.app-topbar.app-navbar {
    display: grid;
    grid-template-columns: minmax(180px, 1fr) minmax(260px, 560px) minmax(180px, 1fr);
    align-items: center;
    gap: 24px;
    position: fixed;
    top: 0;
    right: 0;
    left: 0;
    z-index: var(--z-navbar);
    width: 100%;
    min-height: var(--app-navbar-height);
    margin: 0;
}

body:has(> .app-navbar) {
    padding-top: var(--app-navbar-height);
}

.app-navbar-brand,
.app-navbar-account,
.app-navbar-extra-actions,
.app-navbar-profile-header,
.app-navbar-profile-action {
    display: flex;
    align-items: center;
}

.app-navbar-brand { gap: 12px; min-width: 0; }
.app-navbar-account { justify-content: flex-end; gap: 8px; position: relative; }
.app-navbar-extra-actions { gap: 8px; }
.app-navbar-extra-action {
    min-height: 40px;
    padding: 0 14px;
    border-color: var(--line, #d8dee8);
    border-radius: 999px;
    white-space: nowrap;
}
.app-navbar-extra-action:hover { background: var(--brand-soft, #d6f2ef); }

.app-navbar-help-toggle,
.app-navbar-notifications-toggle {
    display: inline-grid;
    place-items: center;
    width: 44px;
    height: 44px;
    flex: 0 0 44px;
    padding: 0;
    border: 1px solid var(--line, #d8dee8);
    border-radius: 50%;
    background: var(--surface-0, #fff);
    color: var(--text-main, #1f2a37);
}
.app-navbar-help-toggle:hover,
.app-navbar-notifications-toggle:hover { background: var(--surface-2, #eef3f8); }
.app-navbar-help-toggle > i,
.app-navbar-notifications-toggle > i { font-size: 1.2rem; }

.app-navbar-search { position: relative; }
.app-navbar-search > .bi-search {
    position: absolute;
    top: 50%;
    left: 15px;
    z-index: 1;
    color: var(--text-muted);
    transform: translateY(-50%);
    pointer-events: none;
}

.app-navbar-search input {
    width: 100%;
    height: 44px;
    padding: 0 42px;
    border: 1px solid var(--line, #d8dee8);
    border-radius: 12px;
    background: var(--surface-0, #fff);
    color: var(--text-main, #1f2a37);
    font: inherit;
}

.app-navbar-search input:focus-visible,
.app-navbar-help-toggle:focus-visible,
.app-navbar-notifications-toggle:focus-visible,
.app-navbar-user-toggle:focus-visible,
.app-navbar-profile-action:focus-visible {
    outline: 3px solid color-mix(in srgb, var(--brand, #0f766e) 28%, transparent);
    outline-offset: 2px;
    border-color: var(--brand, #0f766e);
}

.app-navbar-search-results,
.app-navbar-profile-menu {
    position: absolute;
    top: calc(100% + 10px);
    z-index: var(--z-dropdown);
    border: 1px solid var(--line, #d8dee8);
    border-radius: 16px;
    background: var(--surface-0, #fff);
    box-shadow: 0 16px 40px rgba(15, 23, 42, .14);
}

.app-navbar-search-results { left: 0; right: 0; padding: 8px; }
.app-navbar-search-results[hidden],
.app-navbar-profile-menu[hidden] { display: none; }

.app-navbar-search-result {
    display: block;
    width: 100%;
    padding: 10px 12px;
    border-radius: 10px;
    color: var(--text-main, #1f2a37);
    text-decoration: none;
}
.app-navbar-search-result:hover,
.app-navbar-search-result.is-active { background: var(--brand-soft, #d6f2ef); }
.app-navbar-search-result strong,
.app-navbar-search-result small { display: block; }
.app-navbar-search-result small { margin-top: 2px; color: var(--text-muted); }
.app-navbar-search-empty { margin: 0; padding: 12px; color: var(--text-muted); }

.app-navbar-avatar,
.app-navbar-profile-initials {
    width: 44px;
    height: 44px;
    flex: 0 0 44px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--brand, #0f766e);
    background: var(--brand, #0f766e);
    color: #fff;
    font-weight: 800;
}
.app-navbar-user-toggle {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    max-width: 240px;
    min-height: 48px;
    padding: 2px 8px 2px 2px;
    border: 0;
    border-radius: 999px;
    background: transparent;
    color: var(--text-main, #1f2a37);
    cursor: pointer;
}
.app-navbar-user-toggle:hover { background: var(--surface-2); }
.app-navbar-toggle-name {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-weight: 700;
}
.app-navbar-user-toggle > i { color: var(--text-muted); font-size: .75rem; }

.app-navbar-profile-menu { right: 0; width: min(360px, calc(100vw - 32px)); padding: 16px; }
.app-navbar-profile-header { gap: 12px; padding-bottom: 14px; border-bottom: 1px solid var(--line, #d8dee8); }
.app-navbar-profile-header div { min-width: 0; }
.app-navbar-profile-header strong,
.app-navbar-profile-header span { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.app-navbar-profile-header span { margin-top: 3px; color: var(--text-muted); font-size: 13px; }
.app-navbar-usage { padding: 14px 0; border-bottom: 1px solid var(--line, #d8dee8); }
.app-navbar-usage > * { display: block; }
.app-navbar-usage span { color: var(--text-muted); font-size: 13px; }
.app-navbar-usage strong { margin-top: 4px; font-size: 18px; }
.app-navbar-usage small { margin-top: 3px; color: var(--text-muted); }

.app-navbar-profile-action {
    width: 100%;
    min-height: 44px;
    gap: 10px;
    justify-content: flex-start;
    margin-top: 8px;
    padding: 0 10px;
    border: 0;
    border-radius: 10px;
    background: transparent;
    color: var(--text-main, #1f2a37);
    cursor: pointer;
    text-decoration: none;
}
.app-navbar-profile-action:hover { background: var(--surface-2); }
.app-navbar-profile-action.is-danger { color: var(--error); }

@media (max-width: 760px) {
    .app-topbar.app-navbar { grid-template-columns: auto minmax(0, 1fr) auto; gap: 8px; padding-inline: 8px; }
    .app-navbar .app-topbar-context { display: none; }
    .app-navbar .app-topbar-school-logo { width: 44px; height: 44px; }
    .app-navbar-search { min-width: 0; }
    .app-navbar-search input { padding-right: 12px; }
    .app-navbar-search input::placeholder { color: transparent; }
    .app-navbar-search-results { position: fixed; top: var(--app-navbar-height); left: 12px; right: 12px; }
    .app-navbar-extra-actions { display: none; }
    .app-navbar-toggle-name,
    .app-navbar-user-toggle > i { display: none; }
    .app-navbar-user-toggle { padding: 2px; }
    .app-navbar-account { gap: 4px; }
}

@media (prefers-reduced-motion: reduce) {
    .app-navbar * { scroll-behavior: auto !important; transition: none !important; }
}
