/* ============================================================
   Coach Panel Layout Shell — coach/css/layout.css
   Desktop-first: sidebar + main content
   Mobile (≤768px): bottom navbar
   ============================================================ */

/* ---- Layout CSS Variables ---- */
:root {
  --coach-sidebar-width: 240px;
  --coach-sidebar-collapsed-width: 60px;
  --coach-topbar-height: 56px;
  --coach-bottombar-height: 56px;
  --coach-transition-speed: 0.22s;
  --coach-sidebar-bg: rgba(20, 23, 34, 0.94);
  --coach-sidebar-border: rgba(255, 255, 255, 0.08);
  --coach-sidebar-item-hover: rgba(255, 255, 255, 0.06);
  --coach-sidebar-item-active: rgba(46, 229, 255, 0.12);
  --coach-sidebar-item-active-border: rgba(46, 229, 255, 0.5);
}

[data-theme="light"] {
  --coach-sidebar-bg: rgba(248, 248, 252, 0.96);
  --coach-sidebar-border: rgba(0, 0, 0, 0.1);
  --coach-sidebar-item-hover: rgba(0, 0, 0, 0.04);
  --coach-sidebar-item-active: rgba(46, 229, 255, 0.15);
}

/* ---- Body Reset for Full-Height Layout ---- */
html.coach-layout-html {
  height: 100%;
  overflow: hidden;
}

html.coach-layout-html body {
  height: 100%;
  display: flex;
  flex-direction: column;
}

/* ---- Coach Topbar ---- */
.coach-topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--coach-topbar-height);
  padding: 0 14px;
  gap: 12px;
  flex-shrink: 0;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  background: linear-gradient(to bottom, rgba(11, 11, 16, 0.85), rgba(11, 11, 16, 0.55));
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

[data-theme="light"] .coach-topbar {
  background: linear-gradient(to bottom, rgba(248, 248, 252, 0.94), rgba(248, 248, 252, 0.78));
  border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

.coach-topbar__left {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  flex-shrink: 0;
}

.coach-topbar__right {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
  position: relative;
}

.coach-topbar__center {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.coach-hamburger {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.05);
  color: var(--text);
  cursor: pointer;
  font-size: 18px;
  transition: background var(--coach-transition-speed), border-color var(--coach-transition-speed);
  flex-shrink: 0;
}

.coach-hamburger:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.2);
}

.coach-topbar__logo {
  font-size: 16px;
  font-weight: 900;
  letter-spacing: 0.2px;
  white-space: nowrap;
  background: linear-gradient(90deg, var(--gradA), var(--gradB));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  text-shadow: 0 0 22px rgba(255, 59, 189, 0.18);
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

.coach-topbar__version {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.4px;
  color: var(--gradB);
  border: 1px solid rgba(46, 229, 255, 0.35);
  background: rgba(46, 229, 255, 0.1);
  white-space: nowrap;
  flex-shrink: 0;
}

[data-theme="light"] .coach-topbar__version {
  color: #0d6f80;
  border-color: rgba(13, 111, 128, 0.35);
  background: rgba(13, 111, 128, 0.1);
}

.coach-client-context {
  display: grid;
  gap: 1px;
  min-width: 0;
  max-width: 260px;
  padding: 6px 12px;
  border: 1px solid rgba(46, 229, 255, 0.22);
  border-radius: 10px;
  background: rgba(46, 229, 255, 0.06);
  color: var(--text);
  cursor: pointer;
  text-align: left;
}

.coach-client-context:hover {
  border-color: rgba(46, 229, 255, 0.52);
  background: rgba(46, 229, 255, 0.11);
}

.coach-client-context.is-empty {
  border-color: var(--coach-sidebar-border);
  background: rgba(255, 255, 255, 0.04);
}

.coach-client-context__label,
.coach-mobile-client-bar__label {
  color: var(--muted);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.6px;
}

.coach-client-context__value {
  overflow: hidden;
  font-size: 13px;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.coach-mobile-client-bar {
  display: none;
}

.coach-client-filters {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(150px, 0.45fr) auto;
  gap: 8px;
  align-items: center;
  margin-bottom: 10px;
}

.coach-client-filters input,
.coach-client-filters select {
  min-width: 0;
}

.coach-client-filters__count {
  color: var(--muted);
  font-size: 12px;
  white-space: nowrap;
}

.coach-client-workspace {
  display: grid;
  gap: 16px;
}

.coach-client-directory,
.coach-client-profile {
  border: 1px solid var(--stroke);
  border-radius: 14px;
  background: var(--panel);
}

.coach-client-directory {
  padding: 16px;
}

.coach-client-profile {
  overflow: hidden;
}

.coach-client-directory__header,
.coach-client-profile__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}

.coach-client-directory__eyebrow {
  margin: 0 0 3px;
  color: var(--gradB);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.75px;
}

.coach-client-directory__title {
  margin: 0;
  color: var(--text);
  font-size: 18px;
  font-weight: 800;
}

.coach-client-directory__select-label,
.coach-client-profile__section-label {
  display: block;
  margin: 12px 0 7px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.35px;
  text-transform: uppercase;
}

.coach-client-directory__select {
  width: 100%;
  min-height: 42px;
}

.coach-client-profile__header {
  margin: 0;
  padding: 16px;
  border-bottom: 1px solid var(--stroke);
}

.coach-client-profile__body {
  padding: 4px 16px 16px;
}

.coach-client-profile__info {
  display: none;
  margin-top: 12px;
  color: rgba(255, 255, 255, 0.72);
  font-size: 13px;
}

.coach-client-activity {
  margin: 14px 0 2px;
  padding: 12px;
  border: 1px solid rgba(46, 229, 255, 0.2);
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(46, 229, 255, 0.09), rgba(255, 59, 122, 0.06));
}

.coach-client-activity__header {
  margin-bottom: 10px;
  color: var(--gradB);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.7px;
  text-transform: uppercase;
}

.coach-client-activity__stats {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) repeat(2, minmax(0, 0.85fr));
  gap: 10px;
}

.coach-client-activity__stat {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.coach-client-activity__stat span,
.coach-client-activity__loading {
  margin: 0;
  color: var(--muted);
  font-size: 11px;
}

.coach-client-activity__stat strong {
  overflow: hidden;
  color: var(--text);
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.coach-client-legacy-notice {
  margin: 14px 0 2px;
  padding: 10px 12px;
  border: 1px solid rgba(46, 229, 255, 0.24);
  border-radius: 10px;
  background: rgba(46, 229, 255, 0.07);
  color: var(--text);
  font-size: 13px;
  line-height: 1.45;
}

/* ---- Editor workflow: persistent save state and explicit actions ---- */
.editor-workflow-bar {
  position: sticky;
  top: 10px;
  z-index: 5;
  display: grid;
  gap: 14px;
  margin: 12px 0;
  padding: 10px 12px;
  border: 1px solid rgba(46, 229, 255, 0.24);
  border-radius: 12px;
  background: var(--panel);
  background: color-mix(in srgb, var(--panel) 92%, rgba(11, 11, 16, 0.9));
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.18);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.editor-workflow-bar__main {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.editor-workflow-bar__status {
  display: grid;
  min-width: 0;
  gap: 2px;
}

.editor-workflow-bar__state {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.editor-workflow-bar__state::before {
  content: '';
  width: 7px;
  height: 7px;
  margin-right: 7px;
  border-radius: 50%;
  background: currentColor;
}

.editor-workflow-bar__state[data-state="dirty"] { color: #f3b640; }
.editor-workflow-bar__state[data-state="saving"] { color: var(--gradB); }
.editor-workflow-bar__state[data-state="saved"] { color: var(--ok); }
.editor-workflow-bar__state[data-state="error"] { color: var(--danger); }

.editor-workflow-bar__meta,
.editor-workflow-bar__hint {
  overflow: hidden;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.35;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.editor-workflow-bar__hint {
  color: var(--text);
  opacity: 0.82;
}

.editor-workflow-bar__actions {
  display: flex;
  flex: 0 0 auto;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.editor-workflow-bar__actions .btn:disabled {
  cursor: not-allowed;
  opacity: 0.48;
}

.editor-week-overview {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  padding-top: 9px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.editor-week-overview[hidden] {
  display: none;
}

.editor-week-overview__label {
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.6px;
  text-transform: uppercase;
}

.editor-week-overview__days {
  display: grid;
  grid-template-columns: repeat(7, minmax(32px, 1fr));
  gap: 6px;
}

.editor-week-overview__day {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  min-height: 30px;
  border: 1px solid var(--stroke);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.035);
  color: var(--muted);
  cursor: pointer;
  font-size: 11px;
  font-weight: 800;
}

.editor-week-overview__day:hover,
.editor-week-overview__day:focus-visible {
  border-color: rgba(46, 229, 255, 0.52);
  outline: none;
}

.editor-week-overview__marker {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
  opacity: 0.8;
}

.editor-week-overview__day.is-planned {
  border-color: rgba(98, 230, 167, 0.4);
  color: var(--ok);
}

.editor-week-overview__day.is-empty {
  color: var(--muted);
}

.editor-week-day--focused {
  box-shadow: 0 0 0 2px rgba(46, 229, 255, 0.72), 0 10px 26px rgba(46, 229, 255, 0.16) !important;
}

.coach-topbar__action {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  cursor: pointer;
  font-size: 16px;
  transition: background var(--coach-transition-speed), border-color var(--coach-transition-speed);
  position: relative;
  flex-shrink: 0;
}

.coach-topbar__action:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.2);
}

.coach-topbar__action-badge {
  display: none;
  position: absolute;
  top: -4px;
  right: -4px;
  background: var(--gradA);
  color: white;
  border-radius: 50%;
  min-width: 16px;
  height: 16px;
  font-size: 9px;
  padding: 0 3px;
  align-items: center;
  justify-content: center;
  border: 2px solid var(--bg);
  line-height: 1;
  pointer-events: none;
}

.coach-topbar__action-badge.visible {
  display: flex;
}

.coach-topbar__logout {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 34px;
  padding: 0 10px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 59, 122, 0.1);
  color: var(--danger);
  cursor: pointer;
  font-size: 12px;
  font-weight: 600;
  transition: background var(--coach-transition-speed);
  flex-shrink: 0;
}

.coach-topbar__logout:hover {
  background: rgba(255, 59, 122, 0.2);
}

/* ---- Coach Multimedia (private R2 library) ---- */
.coach-media { max-width: 1120px; display: grid; gap: 16px; }
.coach-media__eyebrow { margin: 0 0 5px; color: var(--gradB); font-size: 10px; font-weight: 900; letter-spacing: .75px; }
.coach-media__usage, .coach-media__upload, .coach-media__library, .coach-media__viewer { border: 1px solid var(--stroke); border-radius: 14px; background: var(--panel); padding: 16px; }
.coach-media__usage { display: grid; gap: 12px; }
.coach-media__usage strong { display: block; font-size: 18px; color: var(--text); }
.coach-media__usage span, .coach-media__upload p, .coach-media__status { color: var(--muted); font-size: 12px; }
.coach-media__progress { height: 10px; overflow: hidden; border-radius: 999px; background: rgba(127,127,145,.22); }
.coach-media__progress i { display: block; height: 100%; min-width: 2px; border-radius: inherit; background: linear-gradient(90deg, var(--gradA), var(--gradB)); transition: width .22s ease; }
.coach-media__progress i.is-warning { background: linear-gradient(90deg, #ffb020, #f04a79); }
.coach-media__upload { display: grid; gap: 12px; }
.coach-media__upload h3 { margin: 0; color: var(--text); }
.coach-media__upload p { margin: 4px 0 0; }
.coach-media__upload-grid { display: grid; grid-template-columns: minmax(180px,1.3fr) minmax(150px,1fr) minmax(160px,1fr) 150px auto; gap: 8px; align-items: center; }
.coach-media__upload-grid input, .coach-media__upload-grid select, .coach-media__filters input, .coach-media__filters select { min-width: 0; }
.coach-media__filters { display: grid; grid-template-columns: minmax(170px,1.3fr) minmax(150px,1fr) 145px 145px auto; gap: 8px; margin-bottom: 12px; }
.coach-media__list { display: grid; gap: 8px; max-height: 560px; overflow: auto; padding-right: 2px; }
.coach-media__load-more { justify-self: center; margin: 4px 0 2px; }
.coach-media__empty { padding: 26px 12px; border: 1px dashed var(--stroke); border-radius: 10px; color: var(--muted); text-align: center; font-size: 13px; }
.coach-media-card { display: flex; align-items: center; gap: 12px; border: 1px solid var(--stroke); border-radius: 12px; padding: 10px 12px; background: rgba(255,255,255,.018); }
.coach-media-card__icon { display: grid; width: 34px; height: 34px; place-items: center; flex: 0 0 auto; border-radius: 9px; color: var(--gradB); background: rgba(46,229,255,.12); }
.coach-media-card__body { min-width: 0; display: grid; gap: 3px; flex: 1; }
.coach-media-card__body strong { overflow: hidden; color: var(--text); text-overflow: ellipsis; white-space: nowrap; }
.coach-media-card__body small { overflow: hidden; color: var(--muted); text-overflow: ellipsis; white-space: nowrap; }
.coach-media-card__actions { display: flex; gap: 7px; flex: 0 0 auto; }
.coach-media-card__delete { color: #ff668f; border-color: rgba(255,71,122,.4); }
.coach-media__viewer { display: grid; gap: 12px; }
.coach-media__viewer > div { display: flex; justify-content: space-between; align-items: center; gap: 12px; color: var(--text); }
.coach-media__viewer video { width: min(100%, 760px); max-height: 520px; border-radius: 10px; background: #050507; }
@media (max-width: 980px) { .coach-media__upload-grid { grid-template-columns: 1fr 1fr; } .coach-media__upload-grid .btn { grid-column: span 2; } .coach-media__filters { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .coach-media__upload-grid, .coach-media__filters { grid-template-columns: 1fr; } .coach-media__upload-grid .btn { grid-column: auto; } .coach-media-card { align-items: flex-start; } .coach-media-card__actions { flex-direction: column; } }

.coach-topbar__workspace {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 34px;
  padding: 0 10px;
  border: 1px solid rgba(0, 194, 255, 0.34);
  border-radius: 8px;
  background: rgba(0, 194, 255, 0.08);
  color: var(--text);
  font-size: 12px;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
  transition: background var(--coach-transition-speed), border-color var(--coach-transition-speed);
  flex-shrink: 0;
}

.coach-topbar__workspace:hover {
  background: rgba(0, 194, 255, 0.15);
  border-color: rgba(0, 194, 255, 0.66);
}

.coach-topbar__workspace > span:first-child { color: var(--gradB); font-size: 16px; line-height: 1; }

.coach-topbar__plan {
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  height: 34px;
  padding: 0 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.2px;
  white-space: nowrap;
  max-width: 140px;
  overflow: hidden;
  text-overflow: ellipsis;
  flex-shrink: 1;
}

/* ---- Layout Body: Sidebar + Main Content ---- */
.coach-layout-body {
  display: flex;
  flex: 1;
  min-height: 0;
  position: relative;
}

/* ---- Sidebar ---- */
.coach-sidebar {
  position: relative;
  z-index: 9;
  width: var(--coach-sidebar-width);
  flex-shrink: 0;
  background: var(--coach-sidebar-bg);
  border-right: 1px solid var(--coach-sidebar-border);
  display: flex;
  flex-direction: column;
  padding: 10px 0;
  gap: 2px;
  overflow-y: auto;
  overflow-x: hidden;
  transition: width var(--coach-transition-speed) ease;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

.coach-sidebar.collapsed {
  width: var(--coach-sidebar-collapsed-width);
}

.coach-sidebar__item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  margin: 0 8px;
  border-radius: 10px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 500;
  color: var(--muted);
  border: 1px solid transparent;
  transition: background var(--coach-transition-speed), color var(--coach-transition-speed), border-color var(--coach-transition-speed);
  white-space: nowrap;
  overflow: hidden;
  position: relative;
  user-select: none;
}

.coach-sidebar__item:hover {
  background: var(--coach-sidebar-item-hover);
  color: var(--text);
}

.coach-sidebar__item.active {
  background: var(--coach-sidebar-item-active);
  color: var(--gradB);
  border-color: var(--coach-sidebar-item-active-border);
  font-weight: 600;
}

.coach-sidebar__item-icon {
  font-size: 20px;
  flex-shrink: 0;
  width: 28px;
  text-align: center;
  line-height: 1;
}

.coach-sidebar__item-label {
  transition: opacity var(--coach-transition-speed), width var(--coach-transition-speed);
  overflow: hidden;
}

.coach-sidebar.collapsed .coach-sidebar__item-label {
  opacity: 0;
  width: 0;
}

.coach-sidebar.collapsed .coach-sidebar__item {
  justify-content: center;
  padding: 10px 12px;
}

.coach-sidebar__item-badge {
  display: none;
  margin-left: auto;
  background: var(--gradA);
  color: white;
  border-radius: 999px;
  min-width: 20px;
  height: 18px;
  font-size: 10px;
  padding: 0 5px;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  line-height: 1;
}

.coach-sidebar.collapsed .coach-sidebar__item-badge {
  margin-left: 0;
  position: absolute;
  top: 4px;
  right: 4px;
  min-width: 14px;
  height: 14px;
  font-size: 8px;
  padding: 0 3px;
}

.coach-sidebar__item-badge.visible {
  display: flex;
}

/* Sidebar spacer */
.coach-sidebar__spacer {
  flex: 1;
}

/* Keep desktop navigation available while the active workspace scrolls. */
@media (min-width: 769px) {
  .coach-sidebar {
    position: sticky;
    top: var(--coach-topbar-height);
    align-self: flex-start;
    height: calc(100dvh - var(--coach-topbar-height));
    max-height: calc(100dvh - var(--coach-topbar-height));
  }
}

/* ---- Main Content Area ---- */
.coach-main-content {
  flex: 1;
  min-width: 0;
  overflow-y: auto;
  overflow-x: hidden;
  display: flex;
  flex-direction: column;
}

/* ---- Page Sections ---- */
.coach-page {
  display: none;
  flex: 1;
  min-height: 0;
  padding: 18px 16px;
  overflow-y: auto;
  animation: coachPageFadeIn 0.18s ease;
}

.coach-page.active {
  display: flex;
  flex-direction: column;
}

@keyframes coachPageFadeIn {
  from { opacity: 0; transform: translateY(4px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ---- Page Inner Content ---- */
.coach-page__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.coach-page__title {
  font-size: 18px;
  font-weight: 800;
  margin: 0;
  background: linear-gradient(90deg, var(--gradA), var(--gradB));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.coach-page__subtitle {
  font-size: 12px;
  color: var(--muted);
  margin: 0;
}

/* When .app is inside page-entrenos, remove double padding */
#page-entrenos {
  padding: 0;
}

#page-entrenos .app {
  max-width: none;
  margin: 0;
  padding: 0 14px calc(40px + env(safe-area-inset-bottom)) 14px;
  zoom: var(--coach-global-scale);
}

#page-entrenos .coach-page__inner {
  height: 100%;
  overflow: visible;
}

/* Client and Library pages: cards without .app wrapper */
#page-clientes .card.full,
#page-biblioteca .card.full {
  margin: 0;
  max-width: 100%;
}

#page-clientes .coach-page__inner,
#page-biblioteca .coach-page__inner {
  width: 100%;
  max-width: 1560px;
  margin: 0 auto;
}

/* ---- Bottom Navbar (Mobile) ---- */
.coach-bottombar {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 10;
  height: var(--coach-bottombar-height);
  padding-bottom: env(safe-area-inset-bottom);
  background: var(--coach-sidebar-bg);
  border-top: 1px solid var(--coach-sidebar-border);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

.coach-bottombar__nav {
  display: flex;
  align-items: center;
  justify-content: space-around;
  height: 100%;
  padding: 0 4px;
}

.coach-bottombar__item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  padding: 4px 8px;
  border-radius: 10px;
  cursor: pointer;
  color: var(--muted);
  font-size: 10px;
  font-weight: 500;
  transition: color var(--coach-transition-speed), background var(--coach-transition-speed);
  user-select: none;
  position: relative;
  flex: 1;
  max-width: 80px;
}

.coach-bottombar__item:hover {
  color: var(--text);
}

.coach-bottombar__item.active {
  color: var(--gradB);
}

.coach-bottombar__item-icon {
  font-size: 22px;
  line-height: 1;
}

.coach-bottombar__item-label {
  line-height: 1;
}

.coach-bottombar__item-badge {
  display: none;
  position: absolute;
  top: 0;
  right: calc(50% - 24px);
  background: var(--gradA);
  color: white;
  border-radius: 999px;
  min-width: 16px;
  height: 14px;
  font-size: 9px;
  padding: 0 4px;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  line-height: 1;
}

.coach-bottombar__item-badge.visible {
  display: flex;
}

/* ---- Dashboard Page ---- */
.coach-dashboard-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 14px;
  margin-top: 8px;
}

.coach-dashboard-card {
  background: var(--panel);
  border: 1px solid var(--stroke);
  border-radius: 14px;
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  transition: border-color var(--coach-transition-speed);
  cursor: pointer;
}

.coach-dashboard-card:hover {
  border-color: rgba(46, 229, 255, 0.4);
}

.coach-dashboard-card__value {
  font-size: 32px;
  font-weight: 900;
  background: linear-gradient(135deg, var(--gradA), var(--gradB));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  line-height: 1;
}

.coach-dashboard-card__label {
  font-size: 13px;
  color: var(--muted);
  font-weight: 500;
}

.coach-dashboard-quicklink {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  border-radius: 10px;
  border: 1px solid var(--stroke);
  background: var(--panel);
  cursor: pointer;
  font-size: 14px;
  font-weight: 500;
  color: var(--text);
  transition: border-color var(--coach-transition-speed), background var(--coach-transition-speed);
  margin-top: 6px;
}

.coach-dashboard-quicklink:hover {
  border-color: rgba(46, 229, 255, 0.4);
  background: rgba(46, 229, 255, 0.06);
}

.coach-dashboard-quicklink__icon {
  font-size: 22px;
}

/* ---- Overlay Sidebar (Mobile Menu) ---- */
.coach-sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 20;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
  animation: coachOverlayFadeIn 0.15s ease;
}

.coach-sidebar-overlay.open {
  display: block;
}

@keyframes coachOverlayFadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

/* ---- Mobile Sidebar Drawer ---- */
.coach-sidebar-drawer {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  z-index: 21;
  width: 260px;
  max-width: 80vw;
  background: var(--coach-sidebar-bg);
  border-right: 1px solid var(--coach-sidebar-border);
  flex-direction: column;
  padding: 10px 0;
  gap: 2px;
  overflow-y: auto;
  transform: translateX(-100%);
  transition: transform var(--coach-transition-speed) ease;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

.coach-sidebar-drawer.open {
  transform: translateX(0);
}

.coach-sidebar-drawer__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 16px;
  border-bottom: 1px solid var(--coach-sidebar-border);
  margin-bottom: 8px;
}

.coach-sidebar-drawer__title {
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
}

.coach-sidebar-drawer__close {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.05);
  color: var(--text);
  cursor: pointer;
  font-size: 16px;
}

/* ---- Responsive: Mobile (≤768px) ---- */
@media (max-width: 768px) {
  .coach-sidebar {
    display: none;
  }

  .editor-workflow-bar {
    top: 8px;
    gap: 10px;
  }

  .editor-workflow-bar__main {
    align-items: stretch;
    flex-direction: column;
    gap: 10px;
  }

  .editor-workflow-bar__meta,
  .editor-workflow-bar__hint {
    white-space: normal;
  }

  .editor-workflow-bar__actions {
    justify-content: stretch;
  }

  .editor-workflow-bar__actions .btn {
    flex: 1 1 auto;
  }

  .coach-bottombar {
    display: block;
  }

  .coach-sidebar-drawer {
    display: flex;
  }

  .coach-page {
    padding: 14px 10px 72px 10px;
  }

  .coach-main-content {
    padding-bottom: 0;
  }

  .coach-topbar__center {
    display: none;
  }

  .coach-topbar__logo {
    font-size: 14px;
  }

  .coach-topbar__version {
    display: none;
  }

  .coach-hamburger {
    width: 32px;
    height: 32px;
    font-size: 16px;
  }

  .coach-topbar__action {
    width: 30px;
    height: 30px;
    font-size: 14px;
  }

  .coach-topbar__logout {
    height: 30px;
    padding: 0 8px;
    font-size: 11px;
  }

  .coach-topbar__workspace {
    width: 30px;
    height: 30px;
    padding: 0;
  }

  .coach-topbar__workspace > span:last-child { display: none; }

  .coach-topbar__plan {
    height: 30px;
    padding: 0 8px;
    font-size: 11px;
    max-width: 110px;
  }

  .coach-mobile-client-bar {
    display: flex;
    align-items: center;
    min-height: 46px;
    padding: 5px 10px;
    border-bottom: 1px solid var(--coach-sidebar-border);
    background: var(--coach-sidebar-bg);
  }

  .coach-mobile-client-context {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    gap: 10px;
    padding: 5px 7px;
    border: 0;
    background: transparent;
    color: var(--text);
    cursor: pointer;
    text-align: left;
  }

  .coach-mobile-client-context span:nth-child(2) {
    flex: 1;
    overflow: hidden;
    font-size: 14px;
    font-weight: 700;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .coach-client-filters {
    grid-template-columns: 1fr 1fr;
  }

  .coach-client-filters__count {
    grid-column: 1 / -1;
  }

  .coach-client-directory,
  .coach-client-profile__header,
  .coach-client-profile__body {
    padding-left: 12px;
    padding-right: 12px;
  }

  .coach-client-activity__stats {
    grid-template-columns: 1fr 1fr;
  }

  .coach-client-activity__stat:first-child {
    grid-column: 1 / -1;
  }

  .coach-mobile-client-bar__label {
    flex: 0 0 auto;
    font-size: 9px;
    font-weight: 800;
    letter-spacing: 0.55px;
    color: var(--muted);
  }

  .coach-dashboard-grid {
    grid-template-columns: 1fr 1fr;
    gap: 10px;
  }

  .coach-attention-queue {
    padding: 12px;
  }

  .coach-attention-item {
    gap: 10px;
    padding: 10px;
  }
}

.coach-attention-queue {
  margin-top: 18px;
  padding: 16px;
  border: 1px solid var(--stroke);
  border-radius: 14px;
  background: var(--panel);
}

.coach-attention-queue__header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.coach-attention-queue__title {
  margin: 0;
  color: var(--text);
  font-size: 15px;
  font-weight: 800;
}

.coach-attention-queue__summary,
.coach-attention-queue__empty {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
}

.coach-attention-queue__remaining {
  margin-top: 8px;
}

.coach-attention-queue__remaining[hidden] {
  display: none;
}

.coach-attention-queue__toggle {
  width: 100%;
  margin-top: 10px;
  padding: 9px 12px;
  border: 1px solid rgba(46, 229, 255, 0.28);
  border-radius: 10px;
  background: rgba(46, 229, 255, 0.06);
  color: var(--gradB);
  cursor: pointer;
  font-size: 12px;
  font-weight: 800;
}

.coach-attention-queue__toggle:hover {
  border-color: rgba(46, 229, 255, 0.55);
  background: rgba(46, 229, 255, 0.12);
}

.coach-attention-queue__list {
  display: grid;
  gap: 8px;
}

.coach-attention-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  gap: 14px;
  padding: 12px;
  border: 1px solid var(--stroke);
  border-radius: 11px;
  background: rgba(255, 255, 255, 0.025);
  color: var(--text);
  cursor: pointer;
  text-align: left;
  transition: border-color var(--coach-transition-speed), background var(--coach-transition-speed);
}

.coach-attention-item:hover {
  border-color: rgba(46, 229, 255, 0.42);
  background: rgba(46, 229, 255, 0.06);
}

.coach-attention-item--invite {
  border-left: 3px solid rgba(255, 59, 189, 0.9);
}

.coach-attention-item--review {
  border-left: 3px solid rgba(255, 197, 71, 0.9);
}

.coach-attention-item--plan {
  border-left: 3px solid rgba(46, 229, 255, 0.9);
}

.coach-attention-item__content {
  display: grid;
  min-width: 0;
  gap: 2px;
}

.coach-attention-item__athlete {
  overflow: hidden;
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.coach-attention-item__title {
  font-size: 12px;
  font-weight: 650;
}

.coach-attention-item__detail {
  color: var(--muted);
  font-size: 11px;
}

.coach-attention-item__action {
  flex: 0 0 auto;
  color: var(--gradB);
  font-size: 12px;
  font-weight: 800;
}

@media (min-width: 1050px) {
  .coach-client-workspace {
    grid-template-columns: minmax(290px, 0.78fr) minmax(0, 1.22fr);
    align-items: start;
  }

  .coach-client-directory {
    position: sticky;
    top: 72px;
  }
}

/* ---- Responsive: Very Small Mobile (≤480px) ---- */
@media (max-width: 480px) {
  .coach-topbar {
    padding: 0 8px;
    gap: 6px;
  }

  .coach-topbar__left {
    gap: 6px;
  }

  .coach-topbar__right {
    gap: 3px;
  }

  .coach-topbar__plan {
    max-width: 56px;
    padding: 0 6px;
    justify-content: flex-start;
  }

  .coach-topbar__workspace { width: 28px; height: 28px; }

  .coach-dashboard-grid {
    grid-template-columns: 1fr;
  }
}

/* ---- General coach ↔ athlete messages ---- */
.coach-general-chat { width: 100%; max-width: 1280px; margin: 0 auto; min-height: 0; }
.coach-general-chat__layout { display: grid; grid-template-columns: minmax(260px, .72fr) minmax(0, 1.5fr); min-height: 560px; border: 1px solid var(--border); border-radius: 16px; overflow: hidden; background: var(--card); }
.coach-general-chat__inbox { min-width: 0; padding: 12px; border-right: 1px solid var(--border); display: flex; flex-direction: column; gap: 10px; }
.coach-general-chat__inbox input { width: 100%; }
.coach-general-chat__inbox-list { overflow-y: auto; min-height: 0; max-height: 600px; display: flex; flex-direction: column; gap: 6px; }
.coach-general-chat__conversation { width: 100%; border: 1px solid transparent; border-radius: 12px; background: transparent; color: var(--text); display: flex; align-items: center; gap: 10px; padding: 10px; text-align: left; cursor: pointer; }
.coach-general-chat__conversation:hover, .coach-general-chat__conversation.is-selected { background: color-mix(in srgb, var(--gradB) 12%, transparent); border-color: color-mix(in srgb, var(--gradB) 42%, var(--border)); }
.coach-general-chat__avatar { flex: 0 0 38px; width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; overflow: hidden; background: var(--gradA); color: white; font-weight: 800; }
.coach-general-chat__avatar img { width: 100%; height: 100%; object-fit: cover; }
.coach-general-chat__conversation-copy { min-width: 0; display: grid; gap: 2px; flex: 1; }
.coach-general-chat__conversation-copy strong, .coach-general-chat__conversation-copy small { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.coach-general-chat__conversation-copy small, .coach-general-chat__conversation-meta time, .coach-general-chat__thread-header p { color: var(--muted); font-size: 11px; }
.coach-general-chat__conversation-meta { align-self: stretch; display: grid; justify-items: end; align-content: space-between; gap: 4px; }
.coach-general-chat__conversation-meta b { min-width: 18px; height: 18px; display: grid; place-items: center; border-radius: 999px; background: var(--gradA); color: white; font-size: 10px; }
.coach-general-chat__thread { min-width: 0; display: flex; flex-direction: column; min-height: 0; }
.coach-general-chat__thread-header { padding: 18px; border-bottom: 1px solid var(--border); }
.coach-general-chat__thread-header h3 { margin: 0 0 4px; font-size: 16px; }.coach-general-chat__thread-header p { margin: 0; }
.coach-general-chat__messages { flex: 1; min-height: 330px; max-height: 480px; overflow-y: auto; padding: 16px; display: flex; flex-direction: column; gap: 8px; }
.coach-general-chat__bubble { max-width: min(80%, 570px); border: 1px solid var(--border); background: var(--bg2); border-radius: 12px 12px 12px 3px; padding: 9px 11px; }.coach-general-chat__bubble.is-own { align-self: flex-end; border-color: var(--gradB); background: color-mix(in srgb, var(--gradB) 15%, var(--bg2)); border-radius: 12px 12px 3px 12px; }
.coach-general-chat__bubble p { margin: 0; white-space: normal; word-break: break-word; }.coach-general-chat__bubble small { display: block; margin-top: 5px; color: var(--muted); font-size: 10px; }
.coach-general-chat__composer { border-top: 1px solid var(--border); padding: 12px; display: flex; gap: 10px; align-items: flex-end; }.coach-general-chat__composer textarea { resize: vertical; min-height: 46px; flex: 1; }
.coach-general-chat__empty { color: var(--muted); font-size: 13px; padding: 14px; margin: 0; }.coach-general-chat__empty--thread { min-height: 250px; display: grid; place-items: center; text-align: center; }
@media (max-width: 720px) { .coach-general-chat__layout { grid-template-columns: 1fr; min-height: 0; }.coach-general-chat__inbox { border-right: 0; border-bottom: 1px solid var(--border); }.coach-general-chat__inbox-list { max-height: 180px; }.coach-general-chat__messages { min-height: 270px; max-height: 52vh; }.coach-general-chat__bubble { max-width: 90%; }.coach-general-chat__composer { padding: 9px; } }

/* ---- Account page ------------------------------------------------------- */
.coach-account-page {
  max-width: 760px;
}

.coach-account-card {
  display: grid;
  gap: 18px;
  margin-top: 14px;
  padding: 22px;
  border: 1px solid var(--stroke);
  border-radius: 16px;
  background: linear-gradient(135deg, rgba(46, 229, 255, 0.08), rgba(255, 59, 189, 0.045));
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.14);
}

.coach-account-card--actions {
  background: var(--panel);
}

.coach-account-card h3 {
  margin: 0;
  font-size: 15px;
}

.coach-account-card__identity {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.coach-account-card__avatar {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 42px;
  height: 42px;
  border: 1px solid rgba(46, 229, 255, 0.55);
  border-radius: 13px;
  color: #fff;
  font-size: 18px;
  font-weight: 900;
  background: linear-gradient(135deg, var(--gradA), var(--gradB));
}

.coach-account-card__identity strong,
.coach-account-card__identity small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.coach-account-card__identity strong {
  font-size: 17px;
}

.coach-account-card__identity small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
}

.coach-account-brand-action {
  display: flex;
}

.coach-account-inline-action,
.coach-account-action {
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  gap: 9px;
  min-height: 42px;
  padding: 10px 12px;
  border: 1px solid var(--stroke);
  border-radius: 10px;
  color: var(--text);
  font: inherit;
  font-size: 13px;
  font-weight: 750;
  text-decoration: none;
  background: rgba(255, 255, 255, 0.035);
  cursor: pointer;
  transition: border-color var(--coach-transition-speed), background var(--coach-transition-speed), transform var(--coach-transition-speed);
}

.coach-account-inline-action:hover,
.coach-account-action:hover {
  border-color: rgba(46, 229, 255, 0.55);
  background: rgba(46, 229, 255, 0.09);
}

.coach-account-inline-action:active,
.coach-account-action:active {
  transform: translateY(1px);
}

.coach-account-card__stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  overflow: hidden;
  border: 1px solid var(--stroke);
  border-radius: 12px;
}

.coach-account-card__stats > div {
  display: grid;
  align-content: center;
  gap: 5px;
  min-height: 74px;
  padding: 13px 15px;
}

.coach-account-card__stats > div + div {
  border-left: 1px solid var(--stroke);
}

.coach-account-card__stats span {
  color: var(--muted);
  font-size: 10px;
  font-weight: 850;
  letter-spacing: 0.55px;
}

.coach-account-card__stats strong {
  font-size: 23px;
}

.coach-account-plan {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  min-height: 24px;
  padding: 3px 7px;
  border-radius: 999px;
  color: var(--gradB);
  font-size: 11px;
  font-weight: 800;
  border: 1px solid rgba(46, 229, 255, 0.35);
  background: rgba(46, 229, 255, 0.08);
}

.coach-account-actions {
  display: grid;
  gap: 8px;
}

.coach-account-action {
  width: 100%;
  box-sizing: border-box;
}

.coach-account-action--danger {
  color: #ff7aa5;
  border-color: rgba(255, 59, 130, 0.42);
  background: rgba(255, 59, 130, 0.06);
}

.coach-account-action--danger:hover {
  border-color: rgba(255, 59, 130, 0.8);
  background: rgba(255, 59, 130, 0.12);
}

.coach-account-identity {
  display: none;
}

.coach-account-hint {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

[data-theme="light"] .coach-account-card {
  background: linear-gradient(135deg, rgba(46, 229, 255, 0.11), rgba(255, 59, 189, 0.05));
  box-shadow: 0 10px 26px rgba(29, 34, 54, 0.08);
}

[data-theme="light"] .coach-account-card--actions {
  background: var(--panel);
}

[data-theme="light"] .coach-account-plan {
  color: #087c8e;
  border-color: rgba(8, 124, 142, 0.3);
  background: rgba(8, 124, 142, 0.08);
}

@media (max-width: 768px) {
  .coach-account-card {
    gap: 15px;
    margin-top: 10px;
    padding: 16px;
    border-radius: 14px;
  }

  .coach-account-card__stats > div {
    min-height: 66px;
    padding: 11px 12px;
  }
}

@media (max-width: 380px) {
  .coach-account-card__stats {
    grid-template-columns: 1fr;
  }

  .coach-account-card__stats > div + div {
    border-top: 1px solid var(--stroke);
    border-left: 0;
  }
}

/* ---- Athlete context and visual directory ----------------------------- */
#coachLayoutShell:not(.has-training-context) .coach-topbar__center,
#coachLayoutShell:not(.has-training-context) .coach-mobile-client-bar { display:none; }
#coachLayoutShell.has-training-context .coach-topbar__center { overflow:visible; }
.coach-client-switcher { position:relative; min-width:0; }.coach-client-switcher__menu { position:absolute; z-index:40; top:calc(100% + 8px); left:50%; display:grid; gap:8px; width:min(360px,calc(100vw - 28px)); max-height:min(520px,72vh); padding:10px; border:1px solid rgba(46,229,255,.38); border-radius:14px; background:var(--coach-sidebar-bg); box-shadow:0 18px 48px rgba(0,0,0,.32); transform:translateX(-50%); }.coach-client-switcher__menu[hidden] { display:none; }.coach-client-switcher__search input { width:100%; box-sizing:border-box; }.coach-client-switcher__list { display:grid; gap:5px; min-height:0; max-height:315px; overflow:auto; padding-right:2px; }.coach-client-switcher__option { display:grid; grid-template-columns:34px minmax(0,1fr) auto; gap:9px; align-items:center; width:100%; padding:7px; border:1px solid transparent; border-radius:10px; color:var(--text); background:transparent; font:inherit; text-align:left; cursor:pointer; }.coach-client-switcher__option:hover,.coach-client-switcher__option:focus-visible,.coach-client-switcher__option.is-selected { outline:0; border-color:rgba(46,229,255,.46); background:rgba(46,229,255,.1); }.coach-client-switcher__option > span:nth-child(2) { display:grid; min-width:0; gap:2px; }.coach-client-switcher__option strong,.coach-client-switcher__option small { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }.coach-client-switcher__option strong { font-size:13px; }.coach-client-switcher__option small { color:var(--muted); font-size:11px; }.coach-client-switcher__option em { color:var(--gradB); font-size:10px; font-style:normal; font-weight:850; }.coach-client-switcher__avatar,.coach-client-directory__avatar { display:grid; place-items:center; overflow:hidden; border:1px solid rgba(46,229,255,.35); border-radius:10px; background:rgba(255,255,255,.09); color:var(--text); font-size:13px; font-weight:850; }.coach-client-switcher__avatar { width:34px; height:34px; }.coach-client-switcher__avatar img,.coach-client-directory__avatar img { width:100%; height:100%; object-fit:cover; }.coach-client-switcher__all { width:100%; min-height:36px; border:1px solid var(--stroke); border-radius:9px; color:var(--gradB); background:rgba(46,229,255,.06); font:inherit; font-size:12px; font-weight:800; cursor:pointer; }.coach-client-switcher__all:hover,.coach-client-switcher__all:focus-visible { outline:0; border-color:rgba(46,229,255,.56); background:rgba(46,229,255,.13); }.coach-client-switcher__empty { margin:8px; color:var(--muted); font-size:13px; text-align:center; }
.coach-client-directory__select--canonical { position:absolute; width:1px; height:1px; margin:-1px; overflow:hidden; clip:rect(0,0,0,0); }.coach-client-directory__list { display:grid; gap:6px; max-height:min(58vh,520px); overflow:auto; padding-right:3px; }.coach-client-directory__item { display:grid; grid-template-columns:40px minmax(0,1fr) auto; gap:10px; align-items:center; width:100%; min-height:60px; padding:9px; border:1px solid transparent; border-radius:11px; color:var(--text); background:transparent; font:inherit; text-align:left; cursor:pointer; }.coach-client-directory__item:hover,.coach-client-directory__item:focus-visible,.coach-client-directory__item.is-selected { outline:0; border-color:rgba(46,229,255,.44); background:rgba(46,229,255,.08); }.coach-client-directory__item.is-selected { box-shadow:inset 3px 0 0 var(--gradB); }.coach-client-directory__avatar { width:40px; height:40px; }.coach-client-directory__details { display:grid; min-width:0; gap:3px; }.coach-client-directory__details strong,.coach-client-directory__details small { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }.coach-client-directory__details small { color:var(--muted); font-size:11px; }.coach-client-directory__state { max-width:105px; overflow:hidden; color:var(--muted); font-size:10px; font-style:normal; font-weight:800; text-align:right; text-overflow:ellipsis; white-space:nowrap; }.coach-client-directory__state.is-active { color:#41d18c; }.coach-client-directory__state.is-pending { color:#f7b955; }.coach-client-directory__state.is-inactive { color:#ff7a9c; }.coach-client-directory__empty { margin:14px 4px; color:var(--muted); font-size:13px; text-align:center; }
@media (max-width:768px) { #coachLayoutShell.has-training-context .coach-mobile-client-bar { display:flex; }.coach-client-switcher--mobile { width:100%; }.coach-client-switcher__menu--mobile { position:fixed; z-index:60; top:calc(var(--coach-topbar-height) + 48px); left:50%; }.coach-client-directory__list { max-height:300px; }.coach-client-directory__state { display:none; } }

/* Clientes usa un directorio único; la ficha se abre bajo demanda en modal. */
#page-clientes .coach-client-workspace { grid-template-columns:minmax(0,1fr); max-width:960px; }.coach-client-profile-modal__card { width:min(760px,100%); max-height:min(86vh,760px); padding:0; overflow:auto; text-align:left; }.coach-client-profile-modal .coach-client-profile { border:0; border-radius:18px; background:var(--panel); }.coach-client-profile__header-actions { display:flex; align-items:center; gap:8px; }.coach-client-profile__close { display:grid; place-items:center; width:34px; height:34px; padding:0; border:1px solid var(--stroke); border-radius:9px; color:var(--text); background:transparent; font-size:22px; line-height:1; cursor:pointer; }.coach-client-profile__close:hover,.coach-client-profile__close:focus-visible { outline:0; border-color:rgba(46,229,255,.58); background:rgba(46,229,255,.1); }[data-theme="light"] .coach-client-profile-modal__card { border-color:rgba(13,111,128,.35); background:#fff; box-shadow:0 24px 70px rgba(20,30,50,.28); }[data-theme="light"] .coach-client-profile-modal .coach-client-profile { background:#fff; }
@media (max-width:768px) { #page-clientes .coach-client-workspace { max-width:none; }.coach-client-profile-modal { padding:10px; align-items:flex-end; }.coach-client-profile-modal__card { max-height:calc(100vh - 20px); border-radius:16px; }.coach-client-profile__header { padding:14px; }.coach-client-profile__body { padding:4px 14px 14px; }.coach-client-profile__header-actions .btn { padding:7px 9px; font-size:12px; } }
