* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    border: 0;
    outline: none;
}

body {
    min-height: 100vh;
    background-color: var(--md-sys-color-background);
    color: var(--md-sys-color-on-surface);
    font-family: var(--md-sys-font-brand);
    -webkit-font-smoothing: antialiased;
    transition: background-color var(--md-transition-normal), color var(--md-transition-normal);
}

::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}
::-webkit-scrollbar-track {
    background: transparent;
}
::-webkit-scrollbar-thumb {
    background: rgba(128, 128, 128, 0.25);
    border-radius: var(--md-radius-pill);
}
::-webkit-scrollbar-thumb:hover {
    background: rgba(128, 128, 128, 0.45);
}

.app-shell {
    display: grid;
    grid-template-columns: 88px 1fr;
    gap: 16px;
    padding: 16px;
    min-height: calc(100vh - 96px);
}

.app-content {
    min-width: 0;
}

.view {
    display: none;
    animation: view-fade-in var(--md-transition-expressive);
}

.view--active {
    display: block;
}

.view__head {
    margin-bottom: 16px;
}

.view__title {
    font-size: 26px;
    font-weight: 700;
    letter-spacing: -0.02em;
}

.view__subtitle {
    margin-top: 4px;
    color: var(--md-sys-color-on-surface-variant);
    font-size: 13px;
}

.login-shell {
    display: grid;
    place-items: center;
    min-height: 100vh;
    padding: 16px;
    background-color: var(--md-sys-color-background);
}

@keyframes view-fade-in {
    from {
        opacity: 0;
        transform: translateY(8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (max-width: 768px) {
    .app-header {
        margin: 8px;
        padding: 10px 14px;
        flex-wrap: wrap;
    }

    .app-header__tag {
        display: none;
    }

    .app-header__search {
        order: 3;
        width: 100%;
        max-width: 100%;
        margin-top: 6px;
    }

    .app-shell {
        grid-template-columns: 1fr;
        padding: 8px;
        padding-bottom: 80px;
    }

    .nav-rail {
        position: fixed;
        bottom: 8px;
        left: 8px;
        right: 8px;
        flex-direction: row !important;
        justify-content: space-around;
        background-color: var(--md-sys-color-surface) !important;
        padding: 6px !important;
        border-radius: var(--md-radius-pill) !important;
        box-shadow: var(--md-sys-elevation-3) !important;
        z-index: 90;
    }

    .nav-rail__item {
        padding: 8px 16px !important;
    }

    .view__title {
        font-size: 22px;
    }
}
