/* Shared top navigation */

.app-header {
    position: sticky;
    top: 0;
    z-index: 1030;
    border-bottom: 1px solid #2b3a50;
    background: #101623;
    box-shadow: 0 6px 24px rgb(0 0 0 / 15%);
}

.app-top-navigation {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
    align-items: center;
    gap: 20px;
    max-width: 1440px;
    margin: 0 auto;
    padding: 10px 24px;
}

.app-brand {
    justify-self: start;
    max-width: 100%;
    overflow: hidden;
    color: #edf2fb;
    text-decoration: none;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 1.1rem;
    font-weight: 700;
    letter-spacing: -0.03em;
}

    .app-brand:hover {
        color: #a7bdff;
    }

/* Main destinations */

.app-icon-navigation {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 6px;
    width: 630px;
}

.app-navigation-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    min-width: 0;
    min-height: 62px;
    padding: 8px 6px;
    border: 1px solid transparent;
    border-radius: 14px;
    color: #9cacc3;
    text-decoration: none;
}

    .app-navigation-item svg {
        width: 25px;
        height: 25px;
        fill: none;
        stroke: currentColor;
        stroke-width: 1.7;
        stroke-linecap: round;
        stroke-linejoin: round;
    }

    .app-navigation-item > span {
        font-size: 0.75rem;
        font-weight: 600;
    }

    .app-navigation-item:hover {
        background: #1b2a40;
        color: #e1ebff;
    }

    .app-navigation-item.is-active {
        border-color: #354f8b;
        background: #1b2d50;
        color: #9bbaff;
    }

        .app-navigation-item.is-active svg {
            filter: drop-shadow(0 0 5px rgb(100 148 255 / 45%));
        }

/* Account controls */

.app-account-actions {
    display: flex;
    justify-self: end;
    align-items: center;
    gap: 8px;
}

    .app-account-actions form {
        margin: 0;
    }

.app-account-link,
.app-logout-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    min-height: 44px;
    padding: 8px 12px;
    border: 1px solid transparent;
    border-radius: 10px;
    background: transparent;
    color: #c2d0e5;
    text-decoration: none;
    white-space: nowrap;
    font: inherit;
    font-size: 0.8rem;
    font-weight: 600;
}

    .app-account-link:hover,
    .app-logout-button:hover {
        background: #20314a;
        color: #fff;
    }

.app-register-link {
    border-color: #435f99;
    background: #263f76;
    color: #fff;
}

.app-logout-button svg {
    width: 19px;
    height: 19px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.7;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.app-header a:focus-visible,
.app-header button:focus-visible {
    outline: 2px solid #a7bdff;
    outline-offset: 3px;
}

/* Mobile and smaller windows */

@media (max-width: 1100px) {
    .app-top-navigation {
        grid-template-columns: minmax(0, 1fr) auto;
        gap: 8px 12px;
        padding: 8px 12px;
    }

    .app-brand {
        font-size: 1rem;
    }

    .app-account-actions {
        grid-column: 2;
        grid-row: 1;
    }

    .app-icon-navigation {
        grid-column: 1 / -1;
        grid-row: 2;
        width: 100%;
        gap: 6px;
        padding-top: 8px;
        border-top: 1px solid #253247;
    }

    .app-navigation-item {
        min-height: 58px;
        padding: 7px 4px;
        border-radius: 12px;
    }

        .app-navigation-item svg {
            width: 23px;
            height: 23px;
        }

        .app-navigation-item > span {
            font-size: 0.7rem;
        }

    .app-account-link,
    .app-logout-button {
        padding: 8px;
        font-size: 0.75rem;
    }
}

/* Park & Rev branding */

.app-brand {
    display: inline-flex;
    align-items: center;
    min-width: 0;
    min-height: 44px;
}

.app-brand-logo {
    display: block;
    width: 210px;
    max-width: 100%;
    height: auto;
}

@media (max-width: 760px) {
    .app-brand-logo {
        width: 180px;
    }
}

@media (max-width: 600px) {
    .app-icon-navigation {
        grid-template-columns: repeat(6, minmax(0, 1fr));
        gap: 4px;
        padding-bottom: 6px;
    }

    .app-navigation-item {
        padding: 7px 4px;
    }

        .app-navigation-item > span {
            font-size: clamp(0.5rem, 2.4vw, 0.65rem);
        }
}