/* Employee portal · account menu (tap on the employee in the header).
   Header with name, email and company chip; rows with coloured icon tiles;
   logout separated in red. Shared by the web portal and the app. */
.portal-account-menu .portal-account-dropdown { width: min(17.5rem, calc(100vw - 1.5rem)); padding: .4rem; border-color: #dceaf4; border-radius: 1rem; box-shadow: 0 18px 40px rgba(11, 39, 69, .16), 0 2px 6px rgba(11, 39, 69, .05); transform-origin: top right; }
.portal-account-menu .portal-account-dropdown .pam-head { display: grid; gap: .12rem; margin: 0 0 .3rem; padding: .7rem .7rem .75rem; border: 0; border-radius: .75rem; background: #f1f8fd; }
.pam-head strong { color: #0b2745; font-size: .9rem; font-weight: 780; line-height: 1.25; overflow-wrap: anywhere; }
.pam-head .pam-email { display: block; overflow: hidden; margin: 0; color: #647c90; font-size: .72rem; font-weight: 500; text-overflow: ellipsis; white-space: nowrap; }
.pam-company { display: inline-flex; align-items: center; gap: .3rem; justify-self: start; max-width: 100%; margin-top: .3rem; padding: .15rem .5rem; border-radius: 1rem; background: #ffffff; color: #0f4f80; font-size: .7rem; font-weight: 720; }
.pam-company > span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pam-company > :is(i, svg) { flex: none; color: #1d7fc1; font-size: .68rem; }

/* Rows */
.portal-account-menu .portal-account-dropdown > a,
.portal-account-menu .portal-account-dropdown > button,
.portal-account-menu .portal-account-dropdown > form > button,
.portal-account-menu .portal-account-dropdown .space-controls > button { gap: .7rem; min-height: 2.75rem; padding: .35rem .45rem; border-radius: .65rem; font-size: .84rem; font-weight: 680; transition: background-color 140ms ease, transform 140ms ease; }
.portal-account-menu .portal-account-dropdown > a:active,
.portal-account-menu .portal-account-dropdown > button:active,
.portal-account-menu .portal-account-dropdown > form > button:active { transform: scale(.98); }

/* Icon tiles: font icons on the web, svg icons in the app */
.portal-account-menu .portal-account-dropdown > a > :is(i, svg),
.portal-account-menu .portal-account-dropdown > button > :is(i, svg),
.portal-account-menu .portal-account-dropdown > form > button > :is(i, svg),
.portal-account-menu .portal-account-dropdown .space-controls > button > svg { flex: none; box-sizing: border-box; display: inline-grid; place-items: center; width: 2rem; height: 2rem; padding: .48rem; border-radius: .6rem; background: #e2f0fc; color: #1d7fc1; font-size: .82rem; line-height: 1; }
.portal-account-menu .portal-account-dropdown .pam-item--company > :is(i, svg),
.portal-account-menu .portal-account-dropdown .space-controls > button > svg { background: #f0effb; color: #6763aa; }

/* Logout: separated and red */
.portal-account-menu .portal-account-dropdown > form,
.portal-account-menu .portal-account-dropdown > .pam-logout { margin-top: .3rem; padding-top: .3rem; border-top: 1px solid #e9f0f6; }
.portal-account-menu .portal-account-dropdown > .pam-logout { width: 100%; border-radius: 0 0 .65rem .65rem; }
.portal-account-menu .portal-account-dropdown > form > button,
.portal-account-menu .portal-account-dropdown > .pam-logout { color: #c23a4e; }
.portal-account-menu .portal-account-dropdown > form > button > i,
.portal-account-menu .portal-account-dropdown > .pam-logout > svg { background: #fdecef; color: #cc4256; }
.portal-account-menu .portal-account-dropdown > form > button:hover,
.portal-account-menu .portal-account-dropdown > .pam-logout:hover { background: #fff4f5; }

/* Entrance: the panel pops from the avatar, rows follow */
@keyframes pam-pop { from { opacity: 0; transform: translateY(-4px) scale(.96); } }
@keyframes pam-row { from { opacity: 0; transform: translateY(-3px); } }
.portal-account-menu[open] .portal-account-dropdown,
.portal-account-menu[data-open="true"] .portal-account-dropdown { animation: pam-pop 200ms cubic-bezier(.16, 1, .3, 1) both; }
.portal-account-menu[open] .portal-account-dropdown > *,
.portal-account-menu[data-open="true"] .portal-account-dropdown > * { animation: pam-row 220ms cubic-bezier(.16, 1, .3, 1) 40ms both; }

@media (prefers-reduced-motion: reduce) {
  .portal-account-menu .portal-account-dropdown, .portal-account-menu .portal-account-dropdown * { animation: none !important; transition: none !important; }
}
