/* Profile-specific arrangement. Inputs, actions, disclosures and cards are native App components. */
:where(.app-profile) { max-width: 70rem; margin: 0 auto; }
:where(.app-workspace) .app-profile { max-width: none; margin: 0; }
:where(.app-profile-heading) { align-items: center; }
:where(.app-profile-sections) { display: grid; gap: var(--app-space); }
:where(.app-profile-section-content) { padding: var(--app-panel-padding); }
:where(.app-profile-passwords) { margin-top: var(--app-space); }
:where(.app-profile-passwords) > summary > .fa:last-child { display: none; }
:where(.app-profile-field-error) { color: var(--app-color-error-text); font-size: .875rem; margin: .3rem 0; }
:where(.app-profile-error) { margin-block: var(--app-space); }
:where(.app-profile-identifier) { display: flex; flex-wrap: wrap; gap: .4rem 1.2rem; margin-bottom: var(--app-space); }
:where(.app-profile-identifier) dt { color: var(--app-color-text-muted); }
:where(.app-profile-identifier) dd { font-weight: 600; overflow-wrap: anywhere; }
:where(.app-profile-readonly) { padding-top: .65rem; overflow-wrap: anywhere; white-space: pre-wrap; }
:where(.app-profile-login) { max-width: 28rem; padding: var(--app-panel-padding); margin: var(--app-space) auto; background: var(--app-color-card); border: 1px solid var(--app-color-card-border); border-radius: var(--app-radius); }
:where(.app-profile-login) h2 { font-size: 1.3rem; font-weight: 700; margin-bottom: var(--app-space); }
:where(.app-profile-login) label + label { margin-top: var(--app-space); }
:where(.app-profile-login) fieldset { padding: 0; border: 0; }
:where(.app-login-actions) { margin-top: var(--app-space); }
:where(.app-login-actions) a { font-size: .875rem; }
:where(.app-recovery-card) { width: min(100%,28rem); box-sizing: border-box; }
:where(.app-recovery-card) h1 { font-size: 1.3rem; font-weight: 700; margin-bottom: var(--app-space); }
:where(.app-recovery-card) fieldset { display: grid; gap: var(--app-space); border: 0; margin: 0; padding: 0; min-width: 0; }
:where(.app-recovery-back) { display: inline-block; margin-top: var(--app-space); }
:where(.app-profile-box) { padding: var(--app-panel-padding); text-align: center; }
:where(.app-profile-avatar) { position: relative; display: grid; place-items: center; width: 4.5rem; height: 4.5rem; min-height: 4.5rem; padding: 0; margin: 0 auto var(--app-space); border-radius: 50%; overflow: hidden; background: var(--app-color-primary); color: var(--app-color-primary-text); font-size: 1.6rem; font-weight: 700; border: 0; }
:where(.app-profile-avatar) img { width: 100%; height: 100%; object-fit: cover; }
:where(.app-profile-avatar[data-avatar-editable]) { cursor: pointer; }
:where(.app-profile-avatar) .app-avatar-edit { position: absolute; inset: auto 0 0; padding: .3rem; background: var(--app-color-primary); color: var(--app-color-primary-text); font-size: .8rem; opacity: 0; transition: opacity var(--app-motion-duration); }
:where(.app-profile-avatar):where(:hover,:focus-visible) .app-avatar-edit { opacity: 1; }
:where(.app-profile-avatar[aria-busy="true"]) { opacity: .5; }
:where(.app-profile-identity) { overflow-wrap: anywhere; font-size: .9rem; color: var(--app-color-text-muted); }
:where(.app-profile-identity) h2 { color: var(--app-color-text); font-size: 1.1rem; font-weight: 700; margin-bottom: .3rem; }
:where(.app-profile-company) { font-weight: 600; }
:where(.app-profile-phone) { margin-top: var(--app-space); }
:where(.app-profile-box) > button { margin-top: var(--app-space); justify-content: center; width: 100%; }
:where(.app-profile-navigation) { padding: var(--app-space); background: var(--app-color-navigation); color: var(--app-color-navigation-text); border: 1px solid var(--app-color-border); border-radius: var(--app-radius); }
:where(.app-profile-navigation) h2 { font-size: 1rem; }
:where(.app-profile-navigation) ul { display: grid; padding: 0; margin: 0; list-style: none; }
:where(.app-profile-navigation) a { display: flex; align-items: center; gap: .65rem; min-height: 2.75rem; padding: .6rem .7rem; border-radius: var(--app-control-radius); font-size: .9rem; text-decoration: none; color: inherit; }
:where(.app-profile-navigation) a:hover { background: var(--app-color-surface-alternate); color: var(--app-color-link); }
:where(.app-profile-navigation) [aria-current="page"] { background: var(--app-color-navigation-active); color: var(--app-color-navigation-active-text); }
:where(.app-profile-card) { display: flex; flex-direction: column; gap: var(--app-space); min-height: 100%; padding: var(--app-panel-padding); }
:where(.app-profile-card) > a { margin-top: auto; }
:where(.app-profile-card-details) { margin: 0; display: grid; grid-template-columns: minmax(0,1fr); gap: .65rem; }
:where(.app-profile-card-details) dt { color: var(--app-color-text-muted); font-size: .8rem; }
:where(.app-profile-card-details) dd { overflow-wrap: anywhere; margin: .1rem 0 0; }
/* Successful login remains pending until actual navigation; the auth controller owns its outcome. */
:where(.app-login-progress) { display: flex; align-items: center; gap: .6rem; padding: .75rem 0; }
:where(.app-profile-login[aria-busy="true"]) fieldset { opacity: .55; pointer-events: none; }
@media (prefers-reduced-motion: reduce) { :where(.app-login-progress) .fa-spin { animation: none; } }

.app-profile-nav-group { border-top: 1px solid color-mix(in srgb, currentColor 15%, transparent); }
.app-profile-nav-group > summary { display: flex; align-items: center; gap: .5rem; list-style: none; padding: .85rem .65rem; font-size: .8rem; font-weight: 650; cursor: pointer; }
.app-profile-nav-group > summary::-webkit-details-marker { display: none; }
.app-profile-nav-group > summary > span { flex: 1; }
.app-profile-nav-group > summary small { font-size: .7rem; opacity: .7; font-variant-numeric: tabular-nums; }
.app-profile-nav-group[open] > summary > .fa { transform: rotate(180deg); }
.app-profile-nav-group a { padding-inline-start: 1rem; font-size: .825rem; }
.app-profile-navigation .app-profile-overview { margin-bottom: .5rem; }
.app-profile-field-section + .app-profile-field-section { margin-top: 1.75rem; padding-top: 1.5rem; border-top: 1px solid var(--app-color-border); }
.app-profile-field-section h2 { margin: 0 0 1rem; font-size: 1rem; }
.app-profile-field-section .app-profile-fields { max-width: 46rem; }
