/* Shared functional surfaces; no changes to the public website or portal data. */
body[data-rivl-surface="coach"] {
  --workspace-bg:#111516; --workspace-chrome:#090d0f; --workspace-raised:#1b2224;
  --workspace-line:#404b4d; --workspace-muted:#b4bec0;
}
.coach-workspace-theme .trainer-topbar { box-shadow:0 3px 12px #0003; }
.coach-workspace-theme .trainer-account-card { border-left:1px solid #364244; padding-left:16px; }
.coach-workspace-theme .trainer-notice-button { position:relative; border-left:0; }
.trainer-notice-button .online-header-badge { position:absolute; top:2px; right:2px; display:grid; place-items:center; min-width:17px; height:17px; padding:0 3px; border-radius:50%; background:#c4ff31; color:#152000; font:700 10px/1 "Sora",sans-serif; }
.client-notice-client { display:block; margin-top:4px; color:#86d9dc; font-size:11px; }
.coach-workspace-theme :is(.cc-client-card,.tr-featured-program) { background:#1b2224; border-color:#475254; }
.coach-workspace-theme .tr-featured-program { border-left-color:#c4ff31; }
.coach-workspace-theme .tr-workspace-metrics { background:#171d1f; border-color:#404b4d; }
.coach-workspace-theme :is(.cc-history-table,.cc-billing-table) thead { background:#202729; }
.coach-workspace-theme .cc-history-table tbody tr:hover { background:#1b2427; }
.coach-workspace-theme .tr-history { border-top:0; }
.coach-workspace-theme .cc-client-access + .cc-profile-activity { border-top:0; }
.portal-online .tr-root { --tr-line:#3b4642; --tr-muted:#b4bfb9; --tr-surface:#18201d; }
.portal-client-app .online-app-header { background:#101719; border-bottom-color:#52605b; box-shadow:0 3px 12px #0003; }
.portal-online .tr-heading { padding-bottom:18px; border-bottom:1px solid #3b4642; }
.portal-online .tr-metrics { padding:18px 0; border-top:1px solid #3b4642; }
.portal-online .tr-metrics dd { color:#eef3f0; }
.portal-online .tr-metrics dt { color:#b4bfb9; }
.portal-online .tr-day-row { padding-inline:12px; border-left:3px solid transparent; }
.portal-online .tr-day-row.is-suggested { background:#18221c; border-left-color:#c4ff31; }
.portal-online .tr-day-row.is-suggested .tr-day-state { color:#c4ff31; }
.portal-online .tr-history-list>.tr-log { margin-block:8px; padding:12px; border:1px solid #39453f; border-radius:6px; background:#141b18; }
.portal-online .tr-history-list>.tr-log[open] { border-color:#668179; }
.portal-online .tr-history-list>.tr-log>summary { min-height:48px; }
.portal-online .tr-log>summary small { color:#b4bfb9; }
.portal-online .tr-history-ex { border-left:2px solid #395056; padding-left:12px; }
.portal-online .tr-workout-ex { padding-block:24px; }
.portal-online .tr-workout-ex>header { border-left:3px solid #79cbd0; padding-left:12px; }
.portal-online .tr-set input:not([type=checkbox]) { background:#18201d; border-color:#55635b; }
.portal-online .tr-set.is-done { background:#18261c; }
.portal-online .tr-feedback { border-left:3px solid #79cbd0; background:#142023; padding:16px; }
.portal-online .tr-sync { color:#a5d7c6; }
.portal-client-app :is(.portal-home-coach,.portal-athlete-summary) { border-color:#3b4642; }
.portal-client-app .portal-payment-amount { color:#f4f6f5; }
.portal-client-app .portal-bottom-nav { border-top-color:#52605b!important; background:#101719!important; }

.tr-export-dialog { width:min(540px,calc(100vw - 28px)); max-height:calc(100dvh - 40px); margin:auto; padding:24px; border:1px solid #526059; border-radius:8px; background:#141b1d; overflow:auto; overscroll-behavior:contain; box-shadow:0 24px 70px #0009; }
.tr-export-dialog::backdrop { background:#030606bf; }
.tr-export-dialog .tr-heading { align-items:flex-start; }
.tr-export-dialog h2 { font-size:21px; }
.tr-export-dialog .tr-export-modes { border:0; padding:0; margin:0 0 24px; display:grid; gap:6px; }
.tr-export-modes legend { color:#b4bec0; font-size:12px; margin-bottom:10px; }
.tr-export-modes label { display:flex; align-items:center; gap:12px; min-height:46px; padding:10px 12px; border:1px solid #435052; border-radius:4px; font-size:13px; cursor:pointer; }
.tr-export-modes label:has(:checked) { border-color:#a4d74b; background:#253122; color:#dcf4b6; }
.tr-export-dialog input[type=radio] { width:18px; height:18px; min-height:18px; accent-color:#c4ff31; margin:0; padding:0; flex:0 0 18px; }
.tr-export-dialog [hidden] { display:none!important; }
.tr-export-dialog .tr-export-summary { padding:14px 0; margin-top:18px; border-top:1px solid #435052; color:#9bd3d6; font-size:12px; }
.tr-export-dialog .tr-export-error { color:#f3bf7a; font-size:12px; }
.tr-export-dialog footer { margin-top:18px; }
.tr-export-dialog footer button { width:100%; }
.tr-export-dialog .tr-export-program { margin-bottom:16px; }
.cc-billing-month { border:0; padding:0; margin:0; min-width:0; flex:0 1 280px; }
.cc-billing-month legend { color:#b4bec0; font-size:12px; margin-bottom:8px; }
.cc-billing-month > div { display:grid; grid-template-columns:minmax(0,1fr) 100px; gap:8px; }
.cc-billing-scope { display:flex; gap:24px; border-bottom:1px solid #404b4d; padding-top:20px; }
.cc-billing-scope button { display:flex; align-items:center; gap:8px; min-height:48px; padding:10px 0; color:#b4bec0; background:none; border:0; border-bottom:2px solid transparent; border-radius:0; font:500 13px/1.4 "Space Grotesk",sans-serif; }
.cc-billing-scope button[aria-pressed=true] { color:#c4ff31; border-bottom-color:#c4ff31; }
.cc-billing-scope button span { font-size:11px; font-variant-numeric:tabular-nums; color:#92a3a0; }
.cc-billing-identity { display:block; margin-top:4px; font-size:11px; color:#94aaa6; }
.cc-history-status.is-archived { color:#acb5b5; }
.cc-billing-archive-balance { display:flex; align-items:center; flex-wrap:wrap; gap:12px; padding-block:16px; border-bottom:1px solid #404b4d; color:#b4bec0; font-size:12px; }
.cc-billing-archive-balance strong { color:#e1e8e7; font-size:16px; }
.cc-billing-archive-balance > span:last-child { margin-left:auto; }
@media(max-width:480px) {
  .cc-billing-month > div { grid-template-columns:minmax(0,1fr) 104px; }
  .cc-billing-scope { gap:20px; }
}

@media (max-width:760px) {
  .coach-workspace-theme .trainer-account-actions { gap:8px; }
  .coach-workspace-theme .trainer-account-card { padding-left:8px; }
}
@media (max-width:480px) {
  .coach-workspace-theme .trainer-topbar { flex-wrap:wrap; gap:10px; }
  .coach-workspace-theme .trainer-account-actions { width:100%; justify-content:flex-end; }
  .coach-workspace-theme .trainer-month-switcher { width:100%; flex:1 0 100%; }
  .tr-export-dialog { padding:18px; }
  .tr-export-dialog .tr-form-grid { grid-template-columns:minmax(0,1fr); }
}
@media (prefers-reduced-motion:no-preference) {
  :is(.portal-client-app,.coach-workspace-theme,.tr-export-dialog,.client-notice-panel) :is(button,a,summary) { transition:background-color 140ms ease,border-color 140ms ease,color 140ms ease,box-shadow 140ms ease; }
  :is(.portal-client-app,.coach-workspace-theme,.tr-export-dialog) button:not(:disabled):active { scale:.98; }
  :is(.portal-client-app,.coach-workspace-theme) :is(input,textarea) { transition:border-color 140ms ease,background-color 140ms ease; }
  .tr-export-dialog[open],.tr-dialog[open],.cc-training-drawer[open],.client-notice-panel { animation:rivl-panel-in 180ms ease-out; }
  @keyframes rivl-panel-in { from { opacity:0; transform:translateY(8px); } to { opacity:1; transform:translateY(0); } }
}
@media (prefers-reduced-motion:reduce) {
  :is(.portal-client-app,.coach-workspace-theme,.tr-export-dialog,.client-notice-panel) * { animation:none!important; transition:none!important; scroll-behavior:auto!important; }
}
