/* FleetHub account menu and sidebar identity */
.sidebar {
    height: 100vh;
    position: sticky;
    top: 0;
    overflow: hidden;
}

.sidebar > nav {
    min-height: 0;
    overflow-y: auto;
    overscroll-behavior: contain;
    padding-right: 4px;
    scrollbar-width: thin;
    scrollbar-color:
        rgba(255, 255, 255, .2)
        transparent;
}

.sidebar > nav::-webkit-scrollbar {
    width: 6px;
}

.sidebar > nav::-webkit-scrollbar-thumb {
    border-radius: 999px;
    background: rgba(255, 255, 255, .18);
}

.fleethub-brand {
    display: flex;
    align-items: center;
    gap: 14px;
    flex: 0 0 auto;
    min-height: 74px;
    padding: 6px 8px 24px;
    color: #ffffff;
}

.fleethub-brand-logo {
    display: block;
    width: 68px;
    max-height: 54px;
    object-fit: contain;
    object-position: left center;
}

.fleethub-brand-copy strong {
    display: block;
    color: #ffffff;
    font-size: 22px;
    font-weight: 850;
    letter-spacing: -.025em;
}

.account-menu {
    position: relative;
    z-index: 1000;
}

.account-menu-trigger {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    gap: 11px;
    align-items: center;
    min-width: 236px;
    padding: 7px 9px;
    border: 1px solid transparent;
    border-radius: 13px;
    background: transparent;
    color: var(--text);
    text-align: left;
    cursor: pointer;
    transition:
        border-color 160ms ease,
        background 160ms ease,
        box-shadow 160ms ease;
}

.account-menu-trigger:hover,
.account-menu.is-open .account-menu-trigger {
    border-color: var(--border);
    background: var(--surface-2);
}

.account-menu.is-open .account-menu-trigger {
    box-shadow: 0 10px 28px rgba(15, 23, 42, .08);
}

.account-avatar {
    display: grid;
    place-items: center;
    flex: 0 0 auto;
    width: 42px;
    height: 42px;
    overflow: hidden;
    border-radius: 50%;
    background: var(--brand);
    color: #162400;
    font-weight: 850;
}

.account-avatar-large {
    width: 54px;
    height: 54px;
}

.account-avatar-image,
.account-avatar-fallback {
    width: 100%;
    height: 100%;
}

.account-avatar-image {
    display: block;
    object-fit: cover;
}

.account-avatar-fallback {
    display: grid;
    place-items: center;
}

.account-trigger-copy {
    min-width: 0;
}

.account-trigger-copy strong,
.account-trigger-copy small {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.account-trigger-copy strong {
    font-size: 13px;
    font-weight: 850;
}

.account-trigger-copy small {
    margin-top: 2px;
    color: var(--muted);
    font-size: 10px;
    font-weight: 650;
}

.account-menu-chevron {
    color: var(--muted);
    font-size: 11px;
    transition: transform 160ms ease;
}

.account-menu.is-open .account-menu-chevron {
    transform: rotate(180deg);
}

.account-menu-panel {
    position: absolute;
    z-index: 1100;
    top: calc(100% + 10px);
    right: 0;
    width: min(370px, calc(100vw - 30px));
    overflow: hidden;
    border: 1px solid var(--border);
    border-radius: 16px;
    background: var(--surface);
    box-shadow: 0 24px 64px rgba(15, 23, 42, .2);
}

.account-panel-header {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 13px;
    align-items: center;
    padding: 18px;
    border-bottom: 1px solid var(--border);
    background:
        radial-gradient(
            circle at top right,
            rgba(147, 193, 32, .16),
            transparent 42%
        ),
        var(--surface);
}

.account-panel-header strong,
.account-panel-header small {
    display: block;
    overflow-wrap: anywhere;
}

.account-panel-header strong {
    font-size: 15px;
}

.account-panel-header small {
    margin-top: 4px;
    color: var(--muted);
    font-size: 11px;
}

.account-detail-list {
    display: grid;
    margin: 0;
    padding: 5px 18px;
}

.account-detail-list > div {
    display: grid;
    gap: 5px;
    padding: 12px 0;
    border-bottom: 1px solid var(--border);
}

.account-detail-list dt {
    display: flex;
    gap: 8px;
    align-items: center;
    color: var(--muted);
    font-size: 10px;
    font-weight: 800;
    letter-spacing: .04em;
    text-transform: uppercase;
}

.account-detail-list dt i {
    width: 14px;
    color: #719800;
    text-align: center;
}

.account-detail-list dd {
    margin: 0;
    color: var(--text);
    font-size: 12px;
    font-weight: 750;
    line-height: 1.45;
}

.account-action-list {
    display: grid;
    padding: 9px;
}

.account-action-list form {
    margin: 0;
}

.account-action {
    display: grid;
    grid-template-columns: 22px minmax(0, 1fr) auto;
    gap: 10px;
    align-items: center;
    width: 100%;
    min-height: 45px;
    padding: 10px 11px;
    border: 0;
    border-radius: 10px;
    background: transparent;
    color: var(--text);
    text-align: left;
    cursor: pointer;
}

.account-action:hover {
    background: var(--surface-2);
}

.account-action > i:first-child {
    display: grid;
    place-items: center;
    width: 22px;
    color: var(--muted);
}

.account-action span {
    font-size: 12px;
    font-weight: 750;
}

.account-action-end {
    color: var(--muted);
    font-size: 10px;
}

.account-action-logout {
    color: var(--danger);
}

.account-action-logout > i:first-child {
    color: var(--danger);
}

@media (max-width: 980px) {
    .sidebar {
        position: static;
        height: auto;
        overflow: visible;
    }

    .sidebar > nav {
        overflow: visible;
        padding-right: 0;
    }
}

@media (max-width: 700px) {
    .topbar {
        align-items: center;
    }

    .account-menu-trigger {
        min-width: 0;
        padding: 4px;
    }

    .account-trigger-copy,
    .account-menu-chevron {
        display: none;
    }

    .account-menu-panel {
        position: fixed;
        top: 76px;
        right: 14px;
        left: 14px;
        width: auto;
    }
}
