.appbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    box-sizing: border-box;
    min-height: 56px;
    padding: 0 16px;
    background: linear-gradient(180deg, rgba(42, 42, 47, 0.98) 0%, rgba(30, 30, 34, 0.98) 100%);
    color: #ffffff;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.22);
}

.appbar__left,
.appbar__right {
    display: flex;
    align-items: center;
    gap: 14px;
}

.appbar__brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: #ffffff;
    text-decoration: none;
}

.appbar__brandLogo {
    width: 28px;
    height: 28px;
    display: block;
}

.appbar__brandName {
    font-size: 20px;
    font-weight: 700;
    line-height: 1;
}

.appbar__section {
    display: inline-flex;
    align-items: center;
    font-size: 20px;
    font-weight: 700;
    line-height: 1;
    letter-spacing: 0.01em;
}

.appbar__section--home {
    color: #6ed78c;
}

.appbar__section--settings {
    color: #6aa8ff;
}

.appbar__section--notifications {
    color: #3ba55c;
}

.appbar__section--qr {
    color: #facc15;
}

.appbar__menuWrap {
    position: relative;
    display: inline-flex;
    align-items: center;
}

.appbar__iconBtn,
.appbar__profileBtn {
    width: 34px;
    height: 34px;
    padding: 0;
    border: none;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.12);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    vertical-align: middle;
    cursor: pointer;
}

.appbar__profileBtn {
    overflow: hidden;
}

.appbar__iconBtn:hover,
.appbar__profileBtn:hover {
    background: rgba(255, 255, 255, 0.18);
}

.appbar__icon {
    width: 16px;
    height: 16px;
    display: block;
    filter: brightness(0) saturate(100%) invert(100%) sepia(5%) saturate(27%) hue-rotate(164deg) brightness(109%) contrast(92%);
}

.appbar__profileAvatar,
.appbar__profileSummaryAvatar {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
    object-position: center center;
    transform: none;
    background: linear-gradient(180deg, #ffd38f 0%, #f0b96b 100%);
}

.appbar__profileSummary {
    display: flex;
    align-items: center;
    gap: 12px;
    padding-bottom: 4px;
}

.appbar__profileSummaryAvatar {
    width: 44px;
    height: 44px;
}

.appbar__profileAvatar--default {
    object-fit: contain;
    padding: 6px;
}

.appbar__profileBtn .appbar__profileAvatar--default {
    padding: 8px;
    width: 100%;
    height: 100%;
    min-width: 100%;
    min-height: 100%;
    box-sizing: border-box;
    object-fit: contain;
}

.appbar__menuPanel {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    z-index: 30;
    min-width: 250px;
    padding: 14px;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.98);
    color: #1d1d1f;
    border: 1px solid rgba(0, 0, 0, 0.08);
    box-shadow: 0 18px 42px rgba(0, 0, 0, 0.18);
    overflow: hidden;
}

.appbar__menuPanel--apps {
    width: min(390px, calc(100vw - 28px));
    min-width: 320px;
}

.appbar__menuTitle {
    margin: 0;
    font-size: 15px;
    font-weight: 700;
}

.appbar__menuLink,
.appbar__menuAction {
    width: 100%;
    box-sizing: border-box;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    margin-top: 0;
    padding: 10px 12px;
    border: none;
    border-radius: 14px;
    background: transparent;
    color: #1d1d1f;
    text-decoration: none;
    font: inherit;
    cursor: pointer;
}

.appbar__profileSummary + .appbar__menuLink,
.appbar__profileSummary + .appbar__menuAction {
    margin-top: 8px;
}

.appbar__menuLink + .appbar__menuLink,
.appbar__menuLink + .appbar__menuAction,
.appbar__menuAction + .appbar__menuLink,
.appbar__menuAction + .appbar__menuAction {
    margin-top: 8px;
}

.appbar__appsGrid {
    margin-top: 10px;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px 6px;
}

.appbar__appsFooter {
    margin-top: 14px;
    padding-top: 12px;
    border-top: 1px solid rgba(0, 0, 0, 0.1);
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.appbar__appsFooterLink {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 700;
    color: #1d1d1f;
    text-decoration: none;
    box-sizing: border-box;
}

.appbar__appsFooterIcon {
    width: 17px;
    height: 17px;
    display: block;
    filter: brightness(0) saturate(100%) invert(8%) sepia(10%) saturate(520%) hue-rotate(201deg) brightness(96%) contrast(91%);
}

.appbar__appsFooterLink:hover,
.appbar__appsFooterLink:focus-visible {
    background: rgba(95, 104, 190, 0.1);
    outline: none;
}

.appbar__appTile {
    border: none;
    background: transparent;
    padding: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    font-family: 'Plus Jakarta Sans', sans-serif;
    color: #1d1d1f;
    border-radius: 12px;
    cursor: pointer;
    transition: transform 160ms ease, filter 160ms ease;
}

.appbar__appTile:hover {
    transform: translateY(-2px);
    filter: brightness(1.03);
}

.appbar__appTile:focus-visible {
    outline: 2px solid rgba(95, 104, 190, 0.52);
    outline-offset: 2px;
}

.appbar__appTile--blocked {
    opacity: 0.62;
}

.appbar__appTile--blocked .appbar__appTileIconWrap {
    border-style: dashed;
}

.appbar__appTile--blocked .appbar__appTileLabel::after {
    content: ' (indisponible)';
    font-weight: 600;
}

.appbar__appTileIconWrap {
    width: 56px;
    height: 56px;
    border-radius: 14px;
    border: 1px solid rgba(0, 0, 0, 0.08);
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.92) 0%, rgba(236, 242, 255, 0.92) 100%);
    box-shadow: 0 6px 14px rgba(0, 0, 0, 0.12);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.appbar__appTileBadge {
    position: absolute;
    top: -3px;
    right: -3px;
    width: 14px;
    height: 14px;
    border-radius: 999px;
    background: rgba(228, 38, 19, 0.58);
    pointer-events: none;
}

.appbar__appTileIcon {
    width: 26px;
    height: 26px;
    object-fit: contain;
    display: block;
    filter: brightness(0) saturate(100%) invert(9%) sepia(13%) saturate(588%) hue-rotate(197deg) brightness(95%) contrast(91%);
}

.appbar__appTileLabel {
    font-size: 11px;
    line-height: 1.2;
    font-weight: 700;
    text-align: center;
    max-width: 84px;
}

.appbar__menuLink:hover,
.appbar__menuAction:hover,
.appbar__menuLink:focus-visible,
.appbar__menuAction:focus-visible {
    background: rgba(95, 104, 190, 0.1);
    outline: none;
}

.appbar__menuLinkIcon {
    width: 18px;
    height: 18px;
    display: block;
    filter: brightness(0) saturate(100%) invert(8%) sepia(10%) saturate(520%) hue-rotate(201deg) brightness(96%) contrast(91%);
}

.appbar__menuAction--danger {
    color: #ed4245;
}

.appbar__menuAction--danger .appbar__menuLinkIcon {
    filter: brightness(0) saturate(100%) invert(41%) sepia(84%) saturate(2855%) hue-rotate(332deg) brightness(98%) contrast(90%);
    opacity: 0.88;
}

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

.releaseSplash {
    position: fixed;
    inset: 0;
    z-index: 120;
    display: grid;
    place-items: center;
    padding: 18px;
    box-sizing: border-box;
}

body.releaseSplash-open {
    overflow: hidden;
}

.releaseSplash__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(8, 10, 20, 0.56);
    backdrop-filter: blur(4px);
}

.releaseSplash__dialog {
    position: relative;
    width: min(640px, calc(100% - 28px));
    padding: 24px;
    border-radius: 20px;
    border: 1px solid rgba(0, 0, 0, 0.12);
    background: rgba(255, 255, 255, 0.98);
    box-shadow: 0 24px 56px rgba(0, 0, 0, 0.28);
}

.releaseSplash__logo {
    display: block;
    width: 42px;
    height: 42px;
    margin: 0 auto 10px;
    background-color: #5865F2;
    -webkit-mask: url('/img/update.svg') center/contain no-repeat;
    mask: url('/img/update.svg') center/contain no-repeat;
}

.releaseSplash__eyebrow {
    margin: 0 0 8px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #5865F2;
    text-align: center;
}

.releaseSplash__title {
    margin: 0;
    font-size: clamp(24px, 4vw, 32px);
    line-height: 1.1;
    color: #111111;
    text-align: center;
}

.releaseSplash__message {
    margin: 12px 0 0;
    font-size: 15px;
    line-height: 1.5;
    color: rgba(17, 17, 17, 0.76);
}

.releaseSplash__list {
    margin: 16px 0 0;
    padding: 0 0 0 20px;
    display: grid;
    gap: 8px;
    color: #1d1d1f;
    font-size: 14px;
    line-height: 1.45;
}

.releaseSplash__actions {
    margin: 24px 0 8px;
    display: block;
}

.releaseSplash__button {
    appearance: none;
    display: block;
    width: 100%;
    border: none;
    border-radius: 12px;
    padding: 10px 14px;
    font: inherit;
    font-weight: 700;
    cursor: pointer;
    background: #5865F2;
    color: #ffffff;
}

.releaseSplash__button:hover,
.releaseSplash__button:focus-visible {
    background: #4752C4;
    outline: none;
}

@media (max-width: 780px) {
    .appbar {
        flex-wrap: nowrap;
        padding: 10px 14px;
    }

    .appbar__left,
    .appbar__right {
        width: auto;
        justify-content: flex-start;
    }

    .appbar__left {
        min-width: 0;
        flex: 1;
        gap: 8px;
    }

    .appbar__right {
        flex: 0 0 auto;
        gap: 10px;
    }

    .appbar__brand {
        gap: 8px;
        min-width: 0;
    }

    .appbar__section {
        white-space: nowrap;
    }

    .appbar__menuPanel {
        right: 0;
        left: auto;
        max-width: min(280px, calc(100vw - 28px));
    }

    .appbar__menuPanel--apps {
        width: min(360px, calc(100vw - 28px));
        min-width: 0;
        right: -10px;
    }

    .appbar__appsGrid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 390px) {
    body:not(.home-page) .appbar__brandName {
        display: none;
    }

    body:not(.home-page) .appbar__brand {
        gap: 0;
    }

    body:not(.home-page) .appbar__left {
        gap: 6px;
    }
}

body.theme-dark .appbar {
    background: linear-gradient(180deg, rgba(18, 18, 22, 0.98) 0%, rgba(10, 10, 12, 0.98) 100%);
}

body.theme-dark .appbar__menuPanel {
    background: rgba(24, 24, 28, 0.98);
    color: #f5f8ff;
    border-color: rgba(255, 255, 255, 0.08);
}

body.theme-dark .appbar__appTile {
    color: #f5f8ff;
}

body.theme-dark .appbar__appTileIconWrap {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.1);
    box-shadow: 0 6px 14px rgba(0, 0, 0, 0.28);
}

body.theme-dark .appbar__appTileIcon {
    filter: brightness(0) saturate(100%) invert(96%) sepia(6%) saturate(171%) hue-rotate(184deg) brightness(104%) contrast(96%);
}

body.theme-dark .appbar__appsFooterIcon {
    filter: brightness(0) saturate(100%) invert(96%) sepia(6%) saturate(171%) hue-rotate(184deg) brightness(104%) contrast(96%);
}

body.theme-dark .appbar__appsFooter {
    border-top-color: rgba(255, 255, 255, 0.12);
}

body.theme-dark .appbar__appsFooterLink {
    color: #f5f8ff;
}

body.theme-dark .appbar__profileSummary,
body.theme-dark .appbar__menuLink,
body.theme-dark .appbar__menuAction {
    border-color: rgba(255, 255, 255, 0.08);
}

body.theme-dark .appbar__menuLink,
body.theme-dark .appbar__menuAction {
    color: #f5f8ff;
}

body.theme-dark .appbar__menuAction--danger {
    color: #ed4245;
}

body.theme-dark .appbar__menuAction--danger .appbar__menuLinkIcon {
    filter: brightness(0) saturate(100%) invert(41%) sepia(84%) saturate(2855%) hue-rotate(332deg) brightness(98%) contrast(90%);
    opacity: 0.88;
}

body.theme-dark .appbar__profileAvatar--default {
    filter: brightness(0) saturate(100%) invert(98%) sepia(4%) saturate(94%) hue-rotate(181deg) brightness(117%) contrast(92%);
    background: rgba(255, 255, 255, 0.08);
}

body.theme-dark .appbar__menuLink:hover,
body.theme-dark .appbar__menuAction:hover,
body.theme-dark .appbar__menuLink:focus-visible,
body.theme-dark .appbar__menuAction:focus-visible {
    background: rgba(106, 168, 255, 0.12);
}

body.theme-dark .appbar__menuLinkIcon {
    filter: brightness(0) saturate(100%) invert(96%) sepia(6%) saturate(171%) hue-rotate(184deg) brightness(104%) contrast(96%);
}

body.theme-dark .releaseSplash__dialog {
    background: rgba(20, 22, 30, 0.98);
    border-color: rgba(255, 255, 255, 0.12);
}

body.theme-dark .releaseSplash__eyebrow {
    color: #5865F2;
}

body.theme-dark .releaseSplash__title {
    color: #f5f8ff;
}

body.theme-dark .releaseSplash__message {
    color: rgba(245, 248, 255, 0.76);
}

body.theme-dark .releaseSplash__list {
    color: rgba(245, 248, 255, 0.9);
}

body.theme-dark .releaseSplash__button {
    background: #5865F2;
    color: #ffffff;
}

body.theme-dark .releaseSplash__button:hover,
body.theme-dark .releaseSplash__button:focus-visible {
    background: #4752C4;
}
