.topbar {
    height: 72px;
    background: var(--navy);
    color: white;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 30px;
    position: sticky;
    top: 0;
    z-index: 5;
}
.brand {
    display: flex;
    align-items: center;
    gap: 12px;
}
.brandmark {
    width: 38px;
    height: 38px;
    border-radius: 12px;
    background: #3475ed;
    display: grid;
    place-items: center;
    font-weight: 800;
}
.brand strong,
.brand small {
    display: block;
}
.brand strong {
    font-size: 17px;
}
.brand small {
    font-size: 9px;
    letter-spacing: 1.5px;
    color: #b9c7db;
    margin-top: 3px;
}
.offline {
    font-size: 12px;
    color: #d7e5f8;
}
.offline i {
    display: inline-block;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #55d69b;
    margin-right: 7px;
}
.layout {
    display: flex;
    min-height: calc(100vh - 72px);
}
.sidebar {
    width: 238px;
    background: white;
    border-right: 1px solid var(--line);
    padding: 25px 14px;
    display: flex;
    flex-direction: column;
    gap: 7px;
    flex-shrink: 0;
}
.nav {
    border: 0;
    background: transparent;
    text-align: left;
    padding: 13px 14px;
    border-radius: 10px;
    color: #647188;
    font: 600 13px var(--font);
}
.nav span {
    margin-left: 9px;
}
.nav.active {
    background: var(--pale-blue);
    color: var(--blue);
}
.side-note {
    font-size: 11px;
    color: #8792a5;
    line-height: 1.6;
    margin: auto 10px 12px;
    padding-top: 20px;
}
main {
    width: min(1200px, 100%);
    padding: 34px 38px;
    margin: 0 auto;
}
.view {
    display: none;
}
.view.active {
    display: block;
}
.pagehead {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    gap: 16px;
}
.eyebrow {
    font-size: 10px;
    letter-spacing: 1.8px;
    color: var(--blue);
    font-weight: 800;
    margin: 0 0 7px;
}
h1 {
    font-size: 29px;
    margin: 0 0 6px;
    letter-spacing: -0.7px;
}
h2 {
    font-size: 17px;
    margin: 0 0 5px;
}
.muted {
    color: var(--muted);
    font-size: 13px;
    margin: 0;
}
.mobile-nav {
    display: none;
}
.mobile-footer {
    display: none;
}
.toast {
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translate(-50%, 20px);
    background: #17243a;
    color: white;
    padding: 12px 18px;
    border-radius: 9px;
    font-size: 12px;
    opacity: 0;
    pointer-events: none;
    transition: 0.2s;
    z-index: 10;
}
.toast.show {
    opacity: 1;
    transform: translate(-50%, 0);
}
@media (max-width: 800px) {
    .topbar {
        height: 62px;
        padding: 0 17px;
    }

    .topbar div.brand div strong {
        font-size: 18px;
    }
    .layout {
        min-height: calc(100vh - 62px);
    }
    .sidebar {
        display: none;
    }
    main {
        padding: 24px 16px 100px;
    }
    .mobile-footer {
        display: block;
        text-align: center;
        font-size: 11px;
        color: #8792a5;
        line-height: 1.6;
        margin-top: 24px;
        padding: 16px 12px 8px;
        border-top: 1px solid var(--line);
    }
    .pagehead {
        align-items: flex-start;
        flex-direction: column;
    }
    .pagehead > .primary {
        width: 100%;
    }
    .mobile-nav {
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        height: 66px;
        background: white;
        border-top: 1px solid var(--line);
        display: flex;
        justify-content: space-around;
        z-index: 6;
        padding-bottom: env(safe-area-inset-bottom);
    }

    .mobile-nav button {
        border: 0;
        background: transparent;
        color: #7a8799;

        display: flex;
        flex: 1;
        flex-direction: column;
        align-items: center;
        justify-content: center;

        gap: 4px;
        font-size: 18px;

        min-width: 0;
        padding: 4px 2px;
    }
    .mobile-nav button.active {
        color: var(--blue);
        background-color: #e7f3ff;
    }

    .mobile-nav small {
        font: 600 9px var(--font);
    }
    .offline {
        font-size: 10px;
    }
}

.dashboard-back {
    white-space: nowrap;
}

@media (max-width: 800px) {
    .dashboard-back {
        width: 100%;
    }
}
.app-signature {
    margin-top: 8px;
    font-weight: 600;
    color: #5b6b82;
}

.topbar {
    cursor: pointer;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
}
.topbar:focus-visible {
    outline: 3px solid #7da4f8;
    outline-offset: -3px;
}

.scroll-top {
    position: fixed;
    right: 20px;
    bottom: 24px;
    width: 52px;
    height: 52px;
    min-height: 52px;
    padding: 0;
    border: 0;
    border-radius: 50% !important;
    background: var(--blue);
    color: white;
    font-size: 26px;
    line-height: 1;
    box-shadow: 0 6px 16px rgba(16, 35, 63, 0.35);
    z-index: 7;
}
@media (max-width: 800px) {
    .scroll-top {
        right: 14px;

        bottom: calc(72px + 16px + env(safe-area-inset-bottom));
    }
}

.layout {
    align-items: stretch;
}
main {
    flex: 1 1 auto;
    width: auto;
    min-width: 0;
    max-width: none;
    margin: 0;
}
.panelhead,
.panel > h2 {
    box-sizing: border-box;
    width: calc(100% + 40px);
    max-width: none;
}
@media (max-width: 800px) {
    main {
        width: 100%;
    }
    .panelhead,
    .panel > h2 {
        width: calc(100% + 32px);
    }
}
