.trainer-profile-dialog {
    --profile-ink: #44577A; --profile-muted: #596B87; --profile-border: #CCD9EA; --profile-accent: #44577A;
    box-sizing: border-box; width: min(520px, calc(100vw - 32px)); max-height: calc(100dvh - 32px);
    margin: auto; padding: 26px; border: 1px solid var(--profile-border); border-radius: 20px;
    background: #fff; color: var(--profile-ink); box-shadow: 0 24px 80px #293B5940; overflow: auto;
    font-family: inherit; font-size: 16px; line-height: 1.5;
}
.trainer-profile-dialog::backdrop { background: rgba(18,24,33,.12); backdrop-filter: none; }
.trainer-profile-dialog header { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 24px; }
.trainer-profile-dialog h2 { margin: 0; font-size: 24px; }
.trainer-profile-dialog label { display: block; margin-bottom: 8px; font-weight: 700; }
.trainer-profile-dialog input, .trainer-profile-dialog select { box-sizing: border-box; width: 100%; min-height: 48px; padding: 10px 12px; border: 1px solid #8DA5C7; border-radius: 10px; background: #fff; color: var(--profile-ink); font: inherit; }
.trainer-profile-dialog p { color: var(--profile-muted); margin: 10px 0 18px; }
.trainer-profile-dialog .trainer-profile-email { overflow-wrap: anywhere; margin: 24px 0; }
.trainer-profile-dialog button { min-height: 44px; padding: 10px 14px; border: 1px solid var(--profile-border); border-radius: 10px; background: #EDF3FC; color: var(--profile-ink); cursor: pointer; font: inherit; }
.trainer-profile-dialog button[data-save] { background: var(--profile-accent); color: #fff; border-color: var(--profile-accent); font-weight: 700; }
.trainer-profile-dialog button:disabled { cursor: default; opacity: .6; }
.trainer-profile-dialog :focus-visible { outline: 3px solid #44577A; outline-offset: 3px; }
.trainer-profile-dialog [aria-invalid=true] { border-color: #a22525; }
.trainer-profile-dialog .error { color: #9d2525; }
.trainer-profile-dialog [data-status] { min-height: 24px; margin-bottom: 0; }
.trainer-profile-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.trainer-profile-advanced { margin: 24px 0; border-top: 1px solid var(--profile-border); padding-top: 8px; }
.trainer-profile-advanced summary { min-height: 44px; padding: 10px 0; box-sizing: border-box; cursor: pointer; font-size: 14px; color: var(--profile-muted); }
.trainer-profile-advanced[open] summary { margin-bottom: 8px; }
.trainer-profile-advanced p { font-size: 14px; }
.trainer-profile-dialog [hidden] { display: none !important; }
@media (max-width: 420px) { .trainer-profile-dialog { padding: 18px; } .trainer-profile-dialog h2 { font-size: 22px; } }

/* Neutral backdrop keeps the trainer colours intact. */
#settingsModal { background: rgba(18,24,33,.12); backdrop-filter: none !important; }
.profile-field-title,.trainer-profile-dialog label.profile-field-title,.profile-password-button{display:flex;align-items:center;gap:10px}
.profile-svg{flex:none;transition:transform .18s ease}
.trainer-profile-dialog label:active .profile-svg,.trainer-profile-dialog summary:active .profile-svg,.profile-password-button:active .profile-svg{transform:translateY(-2px) rotate(-8deg)}
.trainer-profile-advanced summary.profile-field-title{list-style:none}
.trainer-profile-advanced summary.profile-field-title::-webkit-details-marker{display:none}
.trainer-profile-advanced summary.profile-field-title::after{content:"";width:7px;height:7px;border-right:1.5px solid currentColor;border-bottom:1.5px solid currentColor;transform:rotate(45deg);margin-left:auto;transition:transform .18s ease}
.trainer-profile-advanced[open] summary.profile-field-title::after{transform:rotate(225deg)}
.student-profile-entry{display:flex;align-items:center;gap:12px;text-align:left}.student-profile-entry svg{flex:none}.student-profile-entry>span{display:grid;gap:3px}.student-profile-entry small{font-size:12px;opacity:.75;font-weight:400}
.student-profile-entry:active svg{transform:translateY(-2px);transition:transform .18s ease}
@media(prefers-reduced-motion:reduce){.profile-svg,.student-profile-entry svg,.trainer-profile-advanced summary.profile-field-title::after{transition:none!important;transform:none!important}}

.student-personal-settings{display:grid;gap:12px;margin-top:24px;padding-top:20px;border-top:1px solid #CCD9EA}
