/* Signed-in account controls shared by the executive desktop/mobile header. */
.header-notifications,
.header-account-trigger {
    position: relative;
    min-width: 42px;
    height: 42px;
    border: 1px solid var(--line);
    background: #fff;
    color: var(--ink);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    cursor: pointer;
    box-shadow: var(--shadow-sm);
}

.header-notifications svg {
    width: 18px;
    height: 18px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.7;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.header-notifications:hover,
.header-account-trigger:hover,
.header-account.open .header-account-trigger {
    border-color: rgba(255, 171, 10, .75);
    background: var(--brand-pale);
}

.header-notification-count {
    position: absolute;
    inset-block-start: -5px;
    inset-inline-end: -5px;
    min-width: 18px;
    height: 18px;
    padding: 0 4px;
    border: 2px solid var(--paper);
    border-radius: 999px;
    background: #b42318;
    color: #fff;
    font-size: 8px;
    font-weight: 900;
    line-height: 14px;
    text-align: center;
}

.header-account {
    position: relative;
}

.header-account-trigger {
    gap: 9px;
    max-width: 190px;
    padding: 3px 12px 3px 4px;
}

.header-avatar {
    width: 34px;
    height: 34px;
    flex: 0 0 34px;
    display: grid;
    place-items: center;
    overflow: hidden;
    border-radius: 50%;
    background: var(--ink);
    color: var(--brand);
    font-size: 12px;
    font-weight: 900;
}

.header-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.header-account-name {
    overflow: hidden;
    font-size: 11px;
    font-weight: 850;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.header-account-chevron {
    font-size: 9px;
    transition: transform .2s ease;
}

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

.header-account-menu {
    position: absolute;
    inset-block-start: 52px;
    inset-inline-end: 0;
    z-index: 1250;
    width: min(290px, calc(100vw - 26px));
    padding: 8px;
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
    background: #fff;
    box-shadow: var(--shadow-lg);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-7px);
    pointer-events: none;
    transition: opacity .18s ease, transform .18s ease, visibility .18s;
}

.header-account.open .header-account-menu {
    opacity: 1;
    visibility: visible;
    transform: none;
    pointer-events: auto;
}

.header-account-summary {
    display: flex;
    align-items: center;
    gap: 11px;
    margin-bottom: 6px;
    padding: 10px;
    border-radius: 14px;
    background: var(--paper-2);
}

.header-avatar-large {
    width: 44px;
    height: 44px;
    flex-basis: 44px;
    font-size: 15px;
}

.header-account-summary small,
.header-account-summary strong {
    display: block;
}

.header-account-summary small {
    margin-bottom: 3px;
    color: var(--muted);
    font-size: 9px;
}

.header-account-summary strong {
    max-width: 190px;
    overflow: hidden;
    font-size: 12px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.header-account-menu > a {
    display: grid;
    grid-template-columns: 24px 1fr auto;
    align-items: center;
    gap: 8px;
    min-height: 38px;
    padding: 7px 10px;
    border-radius: 11px;
    font-size: 11px;
    font-weight: 750;
}

.header-account-menu > a:hover,
.header-account-menu > a:focus-visible {
    background: var(--brand-pale);
}

.header-account-menu > a > span {
    color: #8e5b00;
    font-size: 15px;
    text-align: center;
}

.header-account-menu > a > b {
    min-width: 20px;
    padding: 3px 6px;
    border-radius: 999px;
    background: var(--brand);
    font-size: 8px;
    text-align: center;
}

.header-account-menu > .header-account-logout {
    margin-top: 6px;
    border-top: 1px solid var(--line);
    border-radius: 0 0 11px 11px;
    color: #b42318;
}

.mobile-account-actions {
    display: grid;
    gap: 12px;
    padding-top: 22px;
}

.mobile-account-actions > .btn {
    width: 100%;
}

.mobile-account-actions > strong {
    font-family: var(--serif);
    font-size: 20px;
}

.mobile-account-actions > div {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}

.mobile-account-actions > div a,
.mobile-account-logout {
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: #fff;
    font-size: 11px;
    font-weight: 800;
}

.mobile-account-logout {
    color: #b42318;
    text-align: center;
}

html[dir="rtl"] .header-account-trigger {
    padding: 3px 4px 3px 12px;
}

@media (max-width: 1250px) {
    .header-account-name {
        display: none;
    }

    .header-account-trigger {
        width: 42px;
        padding: 3px;
    }

    .header-account-chevron {
        display: none;
    }
}

@media (max-width: 1150px) {
    .nav-actions .account-login {
        display: inline-flex;
    }
}

@media (max-width: 760px) {
    .nav-actions {
        gap: 7px;
    }

    .account-login {
        min-height: 40px !important;
        padding-inline: 14px !important;
    }

    .header-account-menu {
        position: fixed;
        inset-block-start: 62px;
        inset-inline: auto 13px;
    }
}

@media (max-width: 390px) {
    .nav-actions .lang-switch {
        display: none;
    }
}
