.app-tabbar,
.app-tabbar * {
    box-sizing: border-box;
}

body .app-tabbar.app-tabbar {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 95;
    display: block;
    width: 100%;
    background: linear-gradient(180deg, rgba(30, 41, 59, .98) 0%, rgba(15, 23, 42, .99) 100%);
    border-top: 1px solid rgba(96, 165, 250, .30);
    box-shadow: 0 -10px 28px rgba(15, 23, 42, .24);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    isolation: isolate;
}

body .app-tabbar.app-tabbar .app-tabbar-inner {
    width: 100%;
    max-width: 720px;
    margin: 0 auto;
    padding: 6px 10px calc(6px + env(safe-area-inset-bottom, 0px));
    display: flex;
    align-items: stretch;
    gap: 4px;
}

body .app-tabbar.app-tabbar .app-tab {
    min-width: 0;
    min-height: 52px;
    flex: 1 1 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    padding: 0 4px;
    border: 0;
    border-radius: 4px;
    background: transparent;
    color: #aebbd0;
    text-decoration: none;
    font-size: 12px;
    font-weight: 700;
    line-height: 1.2;
    -webkit-tap-highlight-color: transparent;
    transition: color .16s ease, background-color .16s ease, box-shadow .16s ease, transform .16s ease;
}

body .app-tabbar.app-tabbar .app-tab svg {
    width: 22px;
    height: 22px;
    flex: 0 0 auto;
    display: block;
    stroke: currentColor;
    stroke-width: 1.8;
    fill: none;
    stroke-linecap: round;
    stroke-linejoin: round;
}

body .app-tabbar.app-tabbar .app-tab span {
    max-width: 100%;
    display: block;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

body .app-tabbar.app-tabbar .app-tab:hover {
    color: #ffffff;
    background: rgba(255, 255, 255, .08);
    transform: translateY(-1px);
}

body .app-tabbar.app-tabbar .app-tab.active,
body .app-tabbar.app-tabbar .app-tab[aria-current="page"] {
    color: #ffffff;
    background: linear-gradient(180deg, #3b82f6 0%, #2563eb 100%);
    box-shadow: 0 6px 16px rgba(37, 99, 235, .32), inset 0 1px 0 rgba(255, 255, 255, .20);
    transform: none;
}

body .app-tabbar.app-tabbar .app-tab:focus-visible {
    outline: 2px solid #bfdbfe;
    outline-offset: -3px;
}

body.calcpro-page .app-tabbar.app-tabbar {
    z-index: 55;
}

@media (max-width: 520px) {
    body .app-tabbar.app-tabbar .app-tabbar-inner {
        padding: 5px 6px calc(5px + env(safe-area-inset-bottom, 0px));
        gap: 2px;
    }

    body .app-tabbar.app-tabbar .app-tab {
        min-height: 50px;
        padding: 0 2px;
    }
}

@media (prefers-reduced-motion: reduce) {
    body .app-tabbar.app-tabbar .app-tab {
        transition: none;
    }
}
