:root {
    --presence-available: #32bd80;
    --presence-away: #e9b949;
    --presence-busy: #ef8b3a;
    --presence-dnd: #f05a68;
    --presence-live: #ad82f5;
    --presence-offline: #8390a1;
}
.user-presence-dot,
.presence-dot[data-status] {
    position: relative;
    display: inline-block;
    width: 10px;
    height: 10px;
    flex: 0 0 10px;
    border-radius: 50%;
    background: var(--presence-offline);
}
.navigation-avatar-presence[data-status="offline"] { background: var(--presence-offline); }
[data-status="available"].user-presence-dot,
.presence-dot[data-status="available"], .navigation-avatar-presence[data-status="available"] { background: var(--presence-available); }
[data-status="away"].user-presence-dot,
.presence-dot[data-status="away"], .navigation-avatar-presence[data-status="away"] { background: var(--presence-away); }
[data-status="busy"].user-presence-dot,
.presence-dot[data-status="busy"], .navigation-avatar-presence[data-status="busy"] { background: var(--presence-busy); }
[data-status="dnd"].user-presence-dot,
.presence-dot[data-status="dnd"], .navigation-avatar-presence[data-status="dnd"] { background: var(--presence-dnd); }
[data-status="in_call"].user-presence-dot, [data-status="in_meeting"].user-presence-dot,
.presence-dot[data-status="in_call"], .presence-dot[data-status="in_meeting"],
.navigation-avatar-presence[data-status="in_call"], .navigation-avatar-presence[data-status="in_meeting"] { background: var(--presence-live); }
.user-presence-dot[data-status="dnd"]::after,
.presence-dot[data-status="dnd"]::after,
.navigation-avatar-presence[data-status="dnd"]::after {
    content: "";
    position: absolute;
    inset: 4px 2px;
    border-radius: 1px;
    background: #fff;
}
.topbar-title-mark.topbar-profile-trigger { position: relative; overflow: visible; }
.topbar-profile-avatar {
    display: block;
    width: 100%;
    height: 100%;
    border-radius: inherit;
    overflow: hidden;
}
.topbar-profile-trigger > .user-presence-dot {
    position: absolute;
    right: -3px;
    bottom: -3px;
    width: 12px;
    height: 12px;
    border: 2px solid var(--zn-member-bg-app);
    box-sizing: border-box;
}
.topbar-profile-trigger > .user-presence-dot[data-status="dnd"]::after { inset: 3px 2px; }
.user-profile-menu .mini-profile { display: flex; align-items: center; gap: 10px; min-width: 0; }
.user-profile-menu .mini-profile-avatar { flex-shrink: 0; }
.user-profile-menu .mini-profile-copy { flex: 1; min-width: 0; }
.user-profile-menu .mini-profile-copy > strong,
.user-profile-menu .mini-profile-copy > span { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.user-profile-menu .profile-status-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    flex: 0 1 auto;
    max-width: 132px;
    padding: 7px 8px;
    border: 1px solid var(--zn-member-border-soft);
    border-radius: 9px;
    color: var(--zn-member-text-primary);
    background: transparent;
    font: inherit;
    font-size: 12px;
    cursor: pointer;
}
.profile-status-chip [data-self-presence-label] { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; text-decoration: underline; }
.user-profile-menu[data-profile-menu-active-view="menu"] .user-profile-menu-panel { width: min(390px, calc(100vw - 24px)); }
/* Concept 06: mode first, then status and duration. */
.profile-status-form { display: flex; flex-direction: column; gap: 12px; }
.user-profile-menu .profile-menu-detail-view > .profile-status-form { overflow: hidden !important; min-height: 0; }
.profile-status-modes { display: flex; gap: 4px; flex: 0 0 auto; }
.profile-status-modes button {
    flex: 1; min-height: 44px; padding: 10px 12px; border: 1px solid var(--zn-member-border);
    border-radius: var(--zn-radius-xs, 8px); background: var(--zn-member-bg-card);
    color: var(--zn-member-text-primary); font: inherit; font-size: 13px; font-weight: 500; cursor: pointer;
}
.profile-status-modes button[aria-pressed="true"] { border-color: var(--zn-member-accent); background: var(--zn-member-accent-soft); }
.profile-status-automatic, .profile-status-manual { display: grid; gap: 12px; }
.profile-status-automatic, .profile-status-manual { min-height: 0; overflow-y: auto; }
.profile-status-current { display: grid; gap: 8px; padding: 12px; border-radius: var(--user-radius-sm, 12px); background: var(--zn-member-bg-pane); }
.profile-status-current-heading { display: flex; gap: 8px; align-items: center; }
.user-profile-menu .profile-status-current-heading strong { flex: 1; color: var(--zn-member-text-primary); font-size: 16px; line-height: 24px; font-weight: 600; }
.profile-status-current-heading .user-presence-dot, .profile-status-duration-header .user-presence-dot { width: 12px; height: 12px; flex-basis: 12px; }
.profile-status-current-heading .user-presence-dot[data-status="dnd"]::after,
.profile-status-duration-header .user-presence-dot[data-status="dnd"]::after { inset: 5px 2px; }
.profile-status-auto-badge { padding: 4px 10px; border-radius: var(--zn-radius-xs, 8px); background: var(--zn-member-accent-soft); color: var(--zn-member-accent); font-size: 12px; font-weight: 500; line-height: 16px; }
.profile-status-current p, .profile-status-rules p, .profile-status-summary, .profile-status-duration-description, .profile-status-help {
    margin: 0; color: var(--zn-member-text-secondary); font-size: 13px; line-height: 18px;
}
.profile-status-current-note { padding-top: 8px; border-top: 1px solid var(--zn-member-border); }
.profile-status-rules { display: grid; gap: 8px; }
.user-profile-menu .profile-status-heading { margin: 0; color: var(--zn-member-text-primary); font-size: 13px; font-weight: 500; line-height: 18px; }
.profile-status-choices { display: grid; gap: 4px; }
.profile-status-choice { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 48px; padding: 12px;
    border: 0; border-radius: var(--zn-radius-xs, 8px); background: transparent; color: var(--zn-member-text-primary); font: inherit; font-size: 14px; text-align: left; cursor: pointer; }
.profile-status-choice > span:first-of-type { flex: 1; }
.profile-status-choice img { flex: 0 0 auto; }
.profile-status-choice[aria-expanded="true"], .profile-status-choice:hover, .profile-status-duration-choice:hover { background: var(--zn-member-bg-surface-hover); }
.profile-status-check { margin-left: auto; color: var(--zn-member-accent); font-size: 12px; }
.profile-status-summary { padding-top: 12px; border-top: 1px solid var(--zn-member-border); }
.profile-status-duration-panel { display: flex; flex-direction: column; gap: 12px; min-width: 0; min-height: 0; }
.profile-status-duration-panel > :not(.profile-status-durations) { flex: 0 0 auto; }
.user-profile-menu > .profile-status-duration-panel {
    position: fixed; z-index: 101; box-sizing: border-box; width: 286px; max-height: calc(100dvh - 24px); overflow-y: auto;
    padding: 16px; border: 1px solid var(--zn-member-border-strong, var(--zn-member-border)); border-radius: var(--user-radius-md, 16px);
    background: var(--zn-member-bg-app); color: var(--zn-member-text-primary); box-shadow: 0 22px 60px rgba(3, 8, 15, .38);
}
.profile-status-duration-header { display: flex; align-items: center; gap: 8px; }
.user-profile-menu .profile-status-duration-header h4 { flex: 1; margin: 0; color: var(--zn-member-text-primary); font-size: 13px; font-weight: 500; line-height: 18px; }
.profile-status-duration-header button { display: grid; place-items: center; flex: 0 0 32px; width: 32px; height: 32px;
    padding: 0; border: 0; border-radius: var(--zn-radius-xs, 8px); background: transparent; cursor: pointer; }
.profile-status-duration-header .profile-status-duration-back { display: none; }
.profile-status-duration-description { padding-bottom: 12px; border-bottom: 1px solid var(--zn-member-border); }
.profile-status-durations { display: grid; gap: 4px; min-height: 0; overflow-y: auto; overscroll-behavior: contain; }
.profile-status-duration-choice { display: grid; gap: 2px; padding: 8px; width: 100%; border: 0; border-radius: var(--zn-radius-xs, 8px);
    background: transparent; text-align: left; color: var(--zn-member-text-primary); font: inherit; cursor: pointer; }
.profile-status-duration-choice[aria-pressed="true"] { background: var(--zn-member-accent-soft); }
.profile-status-duration-label { display: flex; align-items: center; font-size: 13px; font-weight: 500; line-height: 18px; }
.profile-status-duration-hint { color: var(--zn-member-text-secondary); font-size: 12px; font-weight: 500; line-height: 16px; }
.profile-status-form[data-duration-open="true"][data-duration-layout="step"] [data-status-manual] { display: none; }
.profile-status-form[data-duration-layout="step"] .profile-status-duration-dismiss { display: none; }
.profile-status-form[data-duration-layout="step"] .profile-status-duration-back { display: grid; flex-basis: 44px; width: 44px; height: 44px; }
.profile-status-form[data-duration-layout="step"] .profile-status-duration-header h4 { font-size: 16px; font-weight: 600; line-height: 24px; }
.profile-status-form[data-duration-layout="step"] .profile-status-duration-choice { padding: 12px; min-height: 60px; }
.profile-status-chip:focus-visible, .profile-status-form button:focus-visible, .profile-status-duration-panel button:focus-visible { outline: 2px solid var(--zn-member-accent); outline-offset: 2px; }
.profile-status-form button:disabled, .profile-status-duration-panel button:disabled { opacity: .6; cursor: wait; }
.profile-status-form[data-connection-state="disconnected"] button:disabled,
.profile-status-duration-panel[data-connection-state="disconnected"] button:disabled { cursor: not-allowed; }
.profile-status-connection-note { margin: 0; padding: 10px 12px; border-radius: var(--zn-radius-xs, 8px);
    background: var(--zn-member-bg-surface-hover); color: var(--zn-member-text-secondary); font-size: 13px; line-height: 18px; }
.profile-status-connection-note[hidden] { display: none; }
[data-presence-feedback], [data-status-duration-feedback] { margin: 0; color: var(--zn-member-text-secondary); font-size: 13px; line-height: 18px; }
[data-presence-feedback]:empty, [data-status-duration-feedback]:empty { display: none; }
