/* Coach/mother presentation. Loaded by /coach only; athlete assets remain byte-identical. */
body.athvCoach{min-height:100dvh;--coach-page:#0b100e;--coach-card:rgba(32,36,32,.9);--coach-control:rgba(42,48,44,.95);--coach-space:16px;--chat-canvas:var(--coach-page);background:var(--coach-page)!important;background-image:none!important}
body.athvCoach[data-theme=light]{--coach-page:#f1f5ef;--coach-card:rgba(255,255,255,.94);--coach-control:#e6ece5}
body.athvCoach::before{display:none!important}
body.athvCoach>header{background:transparent!important;border:0!important;box-shadow:none!important}
body.athvCoach:not(.avConversation)>header{position:relative!important;top:auto!important}
body.athvCoach:not(.avConversation) main{position:static!important;display:block!important;height:auto!important;min-height:0!important;width:100%!important;max-width:1100px!important;margin:0 auto!important;padding:16px 16px calc(112px + env(safe-area-inset-bottom,0px))!important;background:transparent!important}
html:has(body.athvCoach.modernChat:not(.avConversation)),body.athvCoach.modernChat:not(.avConversation){overflow:visible!important;overscroll-behavior:auto!important}
body.athvCoach:not(.avConversation) #content{display:block!important;margin:0!important}
body.athvCoach h1,body.athvCoach h2,body.athvCoach h3,body.athvCoach .programOpen strong{font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif!important;letter-spacing:-.025em!important}
body.athvCoach h2{font-size:20px!important;line-height:1.3!important;font-weight:750}
body.athvCoach h3{font-size:17px!important;line-height:1.35!important}
body.athvCoach .intro{padding:8px 0 20px!important;margin:0!important}
body.athvCoach .intro h1{font-size:24px!important;line-height:1.25!important;font-weight:750}
body.athvCoach .athleteHero{padding:20px!important;margin:0 0 24px!important;border-radius:18px!important}
body.athvCoach .athleteHero h2{font-size:22px!important}
body.athvCoach .programOpen strong{font-size:18px!important;line-height:1.35!important;font-weight:750!important}
body.athvCoach .programOpen .eyebrow{font-size:10px!important}
body.athvCoach #content .primary,body.athvCoach #content .secondary{min-height:44px;padding:10px 14px;font-size:14px;line-height:1.3;border-radius:12px}
body.athvCoach #coachSectionTabs,body.athvCoach:not(.avConversation) .supportTabs{display:flex!important;gap:8px!important;margin:0 0 18px!important;padding:0!important;background:transparent!important;border:0!important}
body.athvCoach #coachSectionTabs>button,body.athvCoach:not(.avConversation) .supportTabs>button{flex:1;min-height:44px!important;padding:10px 8px!important;font-size:14px!important;border-radius:12px!important;font-weight:600}
body.athvCoach:not(.avConversation) .chatWorkspace{display:block!important;margin:0!important;background:transparent!important}
body.athvCoach:not(.avConversation) .chatThread{display:none!important}
body.athvCoach:not(.avConversation) .chatInbox,body.athvCoach:not(.avConversation) .supportContacts{padding:16px!important;border:1px solid var(--ath-line)!important;border-radius:18px!important;background:var(--coach-card)!important;overflow:visible!important}
body.athvCoach:not(.avConversation) .chatFilters{gap:8px;padding:0 0 12px;margin:0 0 12px}
body.athvCoach:not(.avConversation) .chatFilters button{min-height:40px;font-size:13px;padding:8px 12px;border-radius:12px}
body.athvCoach:not(.avConversation) .chatContact{background:transparent!important;padding:14px 0!important;margin:0!important;box-shadow:none!important;border-radius:0!important}
body.athvCoach:not(.avConversation) .chatContact strong{font-size:15px;line-height:1.35}
body.athvCoach:not(.avConversation) .chatContact small{font-size:12px}
body.athvCoach #avClientTools{display:flex!important;flex-direction:column!important;gap:12px!important;margin:0 0 20px!important}
body.athvCoach #tenantInvite{width:100%!important;max-width:none!important;margin:0!important;padding:16px!important;text-align:left!important;border-radius:18px!important}
body.athvCoach #tenantInvite h3{font-size:17px!important;margin:0 0 6px!important}
body.athvCoach #tenantInvite p{font-size:13px!important;margin:0 0 12px!important}
body.athvCoach #avClientTools>[data-action=newStudent]{align-self:flex-start!important;flex:none!important;width:auto!important;height:auto!important;min-height:44px!important;padding:10px 16px!important;font-size:14px!important}
body.athvCoach #studentSearch,body.athvCoach #programSearch,body.athvCoach #chatSearch{font-size:16px!important;min-height:46px!important;padding:12px 14px!important;border-radius:12px!important}
body.athvCoach .coachAccountCard.avCompactCoachProfile{width:100%;max-width:none;padding:16px!important;gap:12px!important;grid-template-columns:44px minmax(0,1fr)!important;border-radius:18px!important;margin:0 0 20px!important}
body.athvCoach .avCompactCoachProfile .coachAccountPhoto .avatar{width:44px!important;height:44px!important}
body.athvCoach #coachAccountForm{gap:10px!important}
body.athvCoach #coachAccountForm label{font-size:13px!important;gap:4px!important;margin:0!important}
body.athvCoach #coachAccountForm input{font-size:16px!important;min-height:44px!important;padding:9px 12px!important}
body.athvCoach #coachAccountForm input[type=file]{font-size:12px!important;padding:6px!important;width:100%;border:1px solid var(--ath-line);border-radius:12px;background:var(--coach-control)!important}
body.athvCoach #coachAccountForm input[type=file]::file-selector-button{font-family:inherit;font-weight:600;font-size:12px;color:var(--text);background:var(--coach-control);border:1px solid var(--ath-line);border-radius:8px;padding:8px 10px;margin:0 8px 0 0}
body.athvCoach #coachAccountForm .muted{font-size:11px!important;margin:0!important}
body.athvCoach #coachAccountForm>.primary{justify-self:start;width:auto!important;min-height:44px!important;font-size:14px!important;padding:10px 18px!important}
body.athvCoach #content>.settings{margin:0!important;padding:16px!important;border-radius:18px!important}
body.athvCoach #content>.settings>summary{font-family:inherit;font-size:18px!important;line-height:1.4;font-weight:700}
@media(max-width:700px){
 body.athvCoach #nav.coachFixedFive{left:12px!important;right:12px!important;width:calc(100% - 24px)!important;max-width:none!important;transform:none!important;margin:0!important;padding:8px 6px!important;border-radius:32px!important}
 body.athvCoach .clientRow.avClientCompactRow{display:grid!important;grid-template-columns:minmax(0,1fr) auto!important;gap:10px!important;padding:14px!important}
 body.athvCoach .clientRow.avClientCompactRow .clientOpen{grid-column:1;min-width:0!important}
 body.athvCoach .clientRow.avClientCompactRow .statusBadge{grid-column:2}
 body.athvCoach .clientRow.avClientCompactRow .actions{grid-column:1/-1;justify-self:end;margin:0!important;gap:8px}
 body.athvCoach .clientRow.avClientCompactRow .clientText strong{white-space:normal!important;font-size:15px;line-height:1.35}
 body.athvCoach .clientRow.avClientCompactRow .actions button{min-height:40px!important;font-size:12px!important;padding:8px 12px!important}
}


/* Coach refresh: keep the approved athlete screen and unrelated Mother views intact. */
html:root body.avStaffLayout:not(.avConversation):not(.cleanCoachEditor) main:has(#content),
html:root body.avStaffMessages:not(.avConversation) main:has(#content){
 padding-top:calc(20px + env(safe-area-inset-top,0px))!important;
 padding-bottom:calc(140px + env(safe-area-inset-bottom,0px))!important;
}
html:root body.avStaffHeaderPage>header,
html:root body.avStaffHeaderPage main>.intro{display:none!important}
html:root body.avStaffHeaderPage main>#avStaffHeader{
 display:flex;align-items:center;justify-content:space-between;gap:20px;
 width:100%;max-width:720px;box-sizing:border-box;margin:0 auto 12px;
 padding:22px 0 24px;min-height:0;
}
html:root body.avStaffHeaderPage #avStaffHeader p{font-size:14px;font-weight:400;line-height:1.5;color:var(--muted,#aeb6af);margin:0 0 4px}
html:root body.avStaffHeaderPage #avStaffHeader h1{font-size:30px!important;line-height:1.15!important;letter-spacing:-.025em!important;margin:0!important;font-weight:700!important;text-align:left;text-wrap:initial;overflow-wrap:anywhere}
html:root body.avStaffHeaderPage #avStaffHeader .avAccountPhoto{display:grid;place-items:center;width:56px;height:56px;min-width:56px;min-height:56px;margin:0;padding:0!important;flex:0 0 56px;border:2px solid #c2ff45!important;border-radius:50%!important;background:transparent!important;box-shadow:none!important;overflow:hidden}
html:root body.avStaffHeaderPage #avStaffHeader .avatar{width:100%!important;height:100%!important;max-width:none;margin:0!important;border:0!important;object-fit:cover;border-radius:50%;display:grid;place-items:center;background:transparent;color:#c2ff45;font-size:18px;font-weight:600}
html:root body.avStaffMessages.avConversation #avStaffHeader{display:none!important}
html:root body.avCoachRefresh #content .avClientDisclosure{padding:16px 18px!important;margin-block:12px!important}
html:root body.avCoachRefresh #content .avClientDisclosure>summary{display:flex!important;align-items:center;gap:12px;list-style:none!important;font-size:17px!important;line-height:1.35!important;font-weight:600!important;padding:2px 0!important;margin:0!important;min-height:32px}
html:root body.avCoachRefresh #content .avClientDisclosure>summary::-webkit-details-marker{display:none}
html:root body.avCoachRefresh #content .avClientDisclosure>summary::before{display:none!important}
html:root body.avCoachRefresh .avCoachClientIcon{color:#C2FF45;display:flex;flex:0 0 22px}
html:root body.avCoachRefresh .avCoachClientIcon svg{width:22px;height:22px}
html:root body.avCoachRefresh #content .avClientDisclosure[open]>summary{margin-bottom:16px!important}
html:root body.avCoachRefresh #content .avClientDisclosure :is(p,label,dt,dd,input,select,textarea){font-size:15px}
html:root body.avCoachRefresh .avCoachMore{display:block;margin:18px auto 0;padding:10px 22px}
html:root body.avStaffMessages .supportContacts .chatContact{display:flex;align-items:center;gap:12px}
html:root body.avStaffMessages .supportContacts .avatar{width:44px;height:44px;flex:0 0 44px;object-fit:cover;border-radius:50%;display:flex;align-items:center;justify-content:center}
html:root body.avStaffMessages #content .avStaffBack{background:transparent!important;border:0!important;box-shadow:none!important;color:#C2FF45!important;padding:8px!important;width:44px;min-height:44px;display:inline-flex;align-items:center;justify-content:center}
html:root body.avStaffMessages .avStaffBack svg{width:26px;height:26px}


/* Mother: only the approved Planning/Clients header and its upper safe area. */
html:root body.avMotherHeaderPage main:has(#content){padding-top:calc(20px + env(safe-area-inset-top,0px))!important}

/* Keep the editor return beside the program name in Coach and Mother. */
html:root body.athvCoach.cleanCoachEditor>header,
html:root body.athvCoach.cleanCoachEditor main>.intro,
html:root body.athvCoach.cleanCoachEditor #avStaffHeader,
html:root body.athvCoach.cleanCoachEditor #athvCoachHero{display:none!important}
html:root body.athvCoach.cleanCoachEditor main{padding-top:calc(12px + env(safe-area-inset-top,0px))!important}
html:root body.athvCoach.cleanCoachEditor #content>.avEditorHeading{display:flex;align-items:center;gap:8px;margin:0 0 8px}
html:root body.athvCoach.cleanCoachEditor #content .avEditorHeading>.avEditorPlanName{margin:0!important;min-width:0;overflow-wrap:anywhere;font-size:clamp(18px,2.4vw,24px)!important;line-height:1.25!important}
html:root body.athvCoach.cleanCoachEditor #content .avEditorBack{display:inline-flex!important;align-items:center;justify-content:center;flex:0 0 44px;width:44px!important;min-width:44px!important;height:44px;min-height:44px!important;padding:10px!important;margin:0!important;background:transparent!important;border:0!important;border-radius:0!important;box-shadow:none!important;backdrop-filter:none!important;color:var(--accent,#c2ff45)!important}
html:root body.athvCoach.cleanCoachEditor #content .avEditorBack svg{width:24px;height:24px}

/* Routine details: one heading, one add action, compact day information. */
html:root body.athvCoach.cleanRoutineDetail #content .avPlanHeading{display:flex;align-items:center;gap:10px;min-width:0}
html:root body.athvCoach.cleanRoutineDetail #content .avPlanHeading>.eyebrow{display:none!important}
html:root body.athvCoach.cleanRoutineDetail #content .avPlanHeading h2{min-width:0;margin:0!important;overflow-wrap:anywhere}
html:root body.athvCoach.cleanRoutineDetail #content .avPlanBack{display:inline-flex!important;align-items:center;justify-content:center;flex:0 0 44px;width:44px!important;min-width:44px!important;height:44px;min-height:44px!important;padding:10px!important;margin:0!important;background:transparent!important;border:0!important;box-shadow:none!important;color:var(--accent,#c2ff45)!important}
html:root body.athvCoach.cleanRoutineDetail #content .avPlanBack svg{width:24px;height:24px}
html:root body.athvCoach.cleanRoutineDetail #content>.programTools.avRoutineActions{display:flex!important;justify-content:flex-start!important;margin:8px 0 16px!important}
html:root body.athvCoach.cleanRoutineDetail #content>.programTools.avRoutineActions>button{width:auto!important;min-height:44px!important;padding:10px 16px!important;flex:none!important}
html:root body.athvCoach.cleanRoutineDetail #content .cleanDayCard>.eyebrow{margin:0 0 4px!important}
html:root body.athvCoach.cleanRoutineDetail #content .cleanDayCard>.avProgramCoachTitle{margin:0 0 4px!important;min-height:0!important}
html:root body.athvCoach.cleanRoutineDetail #content .cleanDayCard .avProgramCoachTitle h3{margin:0!important;line-height:1.25!important}
html:root body.athvCoach.cleanRoutineDetail #content .cleanDayCard>.meta{margin:0 0 6px!important}
html:root body.athvCoach.cleanRoutineDetail #content .cleanDayActions{display:grid!important;grid-template-columns:repeat(3,minmax(0,1fr)) 44px!important;width:100%;max-width:420px;margin:12px auto 0!important;gap:8px!important;align-items:center;box-sizing:border-box}
html:root body.athvCoach.cleanRoutineDetail #content .cleanDayActions>button{margin:0!important;min-height:44px!important}
html:root body.athvCoach.cleanRoutineDetail #content .cleanDayActions>.avProgramScheduleIcon{display:inline-flex!important;align-items:center;justify-content:center;width:44px!important;height:44px!important;min-width:44px!important;padding:10px!important}

/* Keep every Coach/Mother dock icon at the same size after partial navigation. */
html:root body.athvCoach #nav button>svg.navGlyph{display:block;width:22px!important;height:22px!important;min-width:22px;max-width:22px;flex:0 0 22px}

/* Match the static Home day-card rim without tinting the dark gray surface. */
html:root body.athvCoach.cleanCoachEditor:not([data-theme=light]) #content #routineForm>.trainingBlock{position:relative;isolation:isolate;background:var(--av-subtle-card)!important;border:1px solid transparent!important;box-shadow:none!important;animation:none!important}
html:root body.athvCoach.cleanCoachEditor #content #routineForm>.trainingBlock::before{content:'';position:absolute;inset:0;width:auto;height:auto;box-sizing:border-box;padding:1.4px;border-radius:inherit;pointer-events:none;background:radial-gradient(ellipse 48% 65% at 50% 100%,rgba(224,255,173,.9) 0%,#c2ff45 16%,rgba(194,255,69,.12) 65%,transparent 100%),linear-gradient(rgba(255,255,255,.12),rgba(255,255,255,.12));-webkit-mask:linear-gradient(#fff 0 0) content-box,linear-gradient(#fff 0 0);-webkit-mask-composite:xor;mask-composite:exclude;animation:none!important}
html:root body.athvCoach.cleanCoachEditor:not([data-theme=light]) #content #routineForm .builderRow{background:var(--av-subtle-card)!important;border:1px solid rgba(255,255,255,.10)!important;box-shadow:none!important}
html:root body.athvCoach.cleanCoachEditor #content #routineForm :is(.trainingBlock,.builderRow)>legend{color:#c2ff45!important}
html:root body.athvCoach.cleanCoachEditor #content #routineForm .builderRow>.avUXFoldBar{flex-wrap:nowrap!important;align-items:flex-end;gap:12px}
html:root body.athvCoach.cleanCoachEditor #content #routineForm .avUXExerciseSelect{display:block;flex:1 1 auto;min-width:0;margin:0!important}
html:root body.athvCoach.cleanCoachEditor #content #routineForm .avUXExerciseSelect select{display:block;width:100%;box-sizing:border-box;min-height:44px}

/* Keep legends inside the rim instead of a second fieldset outline. */
html:root body.athvCoach.cleanCoachEditor #content #routineForm>.trainingBlock>legend{float:left;width:100%;box-sizing:border-box;padding:0!important;margin:0 0 12px!important}
html:root body.athvCoach.cleanCoachEditor #content #routineForm>.trainingBlock>:is(.avUXFoldBar,.fieldGrid){clear:both}

/* Match Workout greeting overflow and its small-screen name size. */
html:root body.avStaffHeaderPage #avStaffHeader .avAccountGreetingCopy{min-width:0}
@media(max-width:359px){html:root body.avStaffHeaderPage #avStaffHeader h1{font-size:27px!important}}

/* Dock and composer geometry inherit the athlete viewport rules unchanged. */
html:root body.avStaffLayout #content #avClientsHistoryCard>.navGlyph{color:#c2ff45!important;width:24px;height:24px;flex:none}
html:root body.avStaffLayout #content .avClientsProfileHero .avClientsAssignedLabel{display:inline-flex;align-items:center;min-height:0;padding:4px 8px;margin:0 0 0 6px;border:0;border-radius:999px;font:inherit;font-size:12px;background:#c2ff4526;color:#c2ff45;box-shadow:none}
html:root body.avStaffLayout #content .avClientsProfileHero .avClientsAssignLabel{display:inline-flex;align-items:center;margin-left:6px;min-height:32px;padding:4px 10px;font-size:12px;background:var(--av-subtle-card,rgba(14,14,11,.6));backdrop-filter:blur(16px);-webkit-backdrop-filter:blur(16px)}
html:root body.avStaffLayout #content #avClientsCopied{display:inline-block;margin-left:10px;color:#c2ff45;font-size:12px;font-weight:400;letter-spacing:normal;text-transform:none}
body.avStaffLayout .avClientsLabelOrder>div{display:flex;align-items:center;gap:6px;margin-top:10px}
body.avStaffLayout .avClientsLabelOrder>div>span{flex:1;min-width:0;overflow-wrap:anywhere}
body.avStaffLayout .avClientsLabelOrder svg{width:20px;height:20px;color:#c2ff45}
body.avStaffLayout .avClientsLabelOrder button{min-height:44px;padding:8px}

/* Installed mobile Coach/Mother: lower the existing stable dock by the
   63 CSS px measured against the athlete iPhone reference. */
@media(max-width:700px) and (display-mode:standalone){
 html:root body.athvCoach.avUnifiedDock:not(.avUnifiedKeyboard) #nav#nav.coachFixedFive{
  top:calc(var(--av-unified-dock-top) + 63px)!important;
 }
}

/* Staff profile camera matches the athlete badge without moving the app shell. */
html:root body.athvCoach #content .avAccountCoachHero .avProfilePhoto{position:relative;flex:none;width:60px;height:60px;margin:0 4px 6px 0}
html:root body.athvCoach #content .avAccountCoachHero .avPhotoEdit{position:absolute;display:grid;place-items:center;bottom:-2px;right:-2px;width:24px!important;height:24px!important;min-width:24px!important;min-height:24px!important;padding:4px!important;border:1px solid #161c17!important;border-radius:50%!important;background:#c2ff45!important;color:#fff!important;overflow:visible}
html:root body.athvCoach #content .avAccountCoachHero .avPhotoEdit svg{width:14px!important;height:14px!important}
html:root body.athvCoach #content .avAccountCoachHero .avPhotoEdit::after{content:'';position:absolute;inset:-10px;border-radius:50%}
html:root body.athvCoach #content .avAccountCoachHero .avPhotoEdit:focus-visible{outline:2px solid #c2ff45;outline-offset:3px}
@media(min-width:701px) and (pointer:fine),(min-width:701px) and (min-height:600px){
 html:root body.athvCoach #content.avClientsDirectoryPage{width:100%;max-width:760px;box-sizing:border-box;margin-inline:auto!important}
}
/* Keep the client's status and category on the same row beneath their name. */
html:root body.avStaffLayout #content .avClientsProfileHero .avClientsStatusRow{display:flex!important;flex-direction:row!important;align-items:center!important;justify-content:flex-start;flex-wrap:wrap;gap:6px;width:100%}
html:root body.avStaffLayout #content .avClientsProfileHero .avClientsStatusRow>:is(.statusBadge,[data-client-action=labels]){margin:0!important;flex:0 1 auto}
/* Client category picker: compact checkboxes aligned with their labels. */
html:root body dialog#modal form#avClientLabelsForm>label.checklabel{display:flex!important;flex-direction:row!important;align-items:center!important;justify-content:flex-start;gap:10px;min-height:44px;padding:8px 0!important;margin:0!important;font-family:inherit;font-size:14px!important;line-height:1.4;font-weight:500;cursor:pointer}
html:root body dialog#modal form#avClientLabelsForm>label.checklabel>input[type=checkbox]{appearance:auto!important;-webkit-appearance:checkbox!important;position:static!important;flex:0 0 18px!important;width:18px!important;height:18px!important;min-width:18px!important;max-width:18px!important;min-height:18px!important;max-height:18px!important;margin:0!important;padding:0!important;box-shadow:none!important;accent-color:#c2ff45;cursor:pointer}
