/* Session tools stay local; business administration opens independently. */
.trainer-workspace .trainer-quick-actions {
  display:flex; flex-wrap:wrap; align-items:center; gap:6px;
  margin:8px 0; min-width:0;
}
.trainer-workspace .trainer-quick-actions .pill {
  display:inline-flex; align-items:center; justify-content:center; gap:7px;
  min-height:44px; height:auto; padding:8px 12px; min-width:0;
  color:var(--ink); border:1px solid var(--line); background:var(--panel);
  text-decoration:none; font-size:12px; line-height:1.3; font-weight:800;
  white-space:normal; overflow-wrap:anywhere; cursor:pointer;
}
.trainer-workspace .trainer-quick-actions [hidden] { display:none; }
.trainer-workspace .trainer-quick-actions #adminBackoffice { margin-left:auto; }
.trainer-workspace .trainer-quick-actions .trainer-save-status {
  color:var(--ink); border-color:var(--orange); background:var(--panel2);
}
.trainer-workspace .settings-panel .settings-title { margin:0 0 8px; font-size:16px; }
.trainer-workspace .settings-panel .settings-section + .settings-section {
  margin-top:14px; padding-top:12px; border-top:1px solid var(--line);
}
.trainer-workspace .settings-panel .settings-section-label {
  margin:0 0 6px; color:var(--muted); font-size:12px; font-weight:800;
}
.trainer-workspace .settings-panel .settings-actions { margin-top:0; }
.trainer-workspace .settings-panel .settings-actions .pill {
  min-height:44px; height:auto; padding:10px 8px; font-size:12px; overflow-wrap:normal;
}
.trainer-workspace .settings-panel .settings-info { border:0; padding:6px 0; }
.trainer-workspace .settings-panel .settings-info strong { font-size:13px; line-height:1.5; }
.trainer-workspace .settings-panel .db-status { white-space:normal; letter-spacing:normal; text-transform:none; }
.trainer-workspace .settings-panel .db-status::before { background:currentColor; box-shadow:none; }
#historyModal:has(.trainer-user-lookup) #historyAvatar { color:var(--ink); background:var(--panel2); }
#historyModal:has(.weekly-wizard-card) #historyAvatar,
#historyModal:has(.variables-manager) #historyAvatar,
#historyModal:has(#exerciseEditorContent) #historyAvatar { color:var(--ink); background:var(--panel2); cursor:default; }
/* Native scrollbars and zoom reduce the editor's actual content width. Let
 * resistance labels shrink/wrap, and actions wrap before their text overflows. */
#historyModal .weekly-wizard-card .band-difficulty-grid { min-width:0; }
#historyModal .weekly-wizard-card .band-difficulty-item { min-width:0; grid-template-columns:16px minmax(0,1fr) auto; }
#historyModal .weekly-wizard-card .band-difficulty-item strong { min-width:0; overflow-wrap:anywhere; }
#historyModal .weekly-wizard-card .band-difficulty-item > span:last-child { white-space:nowrap; }
#historyModal .weekly-wizard-actions { flex-wrap:wrap; }
#historyModal .weekly-wizard-actions button { min-width:0; max-width:100%; overflow-wrap:anywhere; }
#historyModal .weekly-wizard-actions .weekly-save { flex:1 1 160px; width:auto; height:auto; margin-top:0; padding-block:12px; }
#historyModal .variables-section { min-width:0; }
#historyModal .variables-section-head { flex-wrap:wrap; }
#historyModal .variables-section-head > div { flex:1 1 160px; min-width:0; }
#historyModal .variables-add { min-width:0; max-width:100%; overflow-wrap:anywhere; }
.trainer-workspace .settings-technical { margin-top:8px; }
.trainer-workspace .settings-technical summary {
  min-height:44px; display:flex; align-items:center; gap:8px;
  cursor:pointer; color:var(--ink); font-size:12px; font-weight:800;
}
.trainer-workspace .settings-technical summary::before { content:"›"; font-size:20px; }
.trainer-workspace .settings-technical[open] summary::before { transform:rotate(90deg); }
#historyModal .trainer-user-lookup { min-width:0; }
#historyModal .trainer-user-lookup label { display:block; font-size:13px; font-weight:800; margin:10px 0; }
#historyModal .trainer-user-lookup input {
  width:100%; box-sizing:border-box; min-height:48px; border:1px solid var(--line);
  border-radius:12px; padding:12px; color:var(--ink); background:var(--panel2); font:inherit;
}
#historyModal .trainer-user-lookup input::placeholder { color:var(--muted); }
#historyModal .trainer-lookup-note, #historyModal #trainerUserCount { color:var(--muted); font-size:13px; }
#historyModal #trainerUserList { display:grid; gap:8px; }
#historyModal .trainer-lookup-row {
  display:flex; align-items:stretch; gap:8px; padding:6px;
  border:1px solid var(--line); border-radius:14px; background:var(--panel2);
}
#historyModal .trainer-lookup-row button {
  display:flex; flex:1; align-items:center; text-align:left; min-width:0; gap:12px;
  border:0; background:transparent; color:var(--ink); padding:8px;
  min-height:52px; cursor:pointer; font:inherit; border-radius:10px;
}
#historyModal .trainer-lookup-row button > span:nth-child(2) { flex:1; min-width:0; }
#historyModal .trainer-lookup-row strong, #historyModal .trainer-lookup-row small { display:block; overflow-wrap:anywhere; }
#historyModal .trainer-lookup-row small { color:var(--muted); font-size:12px; margin-top:4px; }
#historyModal .trainer-lookup-initials {
  display:grid; place-items:center; flex:0 0 36px; height:36px;
  border-radius:12px; background:var(--panel); font-size:12px; font-weight:900;
}
#historyModal .trainer-lookup-row a {
  align-self:center; display:flex; align-items:center; justify-content:center; min-height:44px;
  border:1px solid var(--line); padding:4px 10px; border-radius:10px;
  color:var(--ink); font-size:12px; font-weight:800; text-decoration:none;
}
#historyModal .trainer-user-lookup button:focus-visible,
#historyModal .trainer-user-lookup a:focus-visible,
.trainer-workspace .trainer-quick-actions .pill:focus-visible {
  outline:3px solid var(--red); outline-offset:2px;
}
@media (max-width:480px) {
  .trainer-workspace .trainer-quick-actions { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); }
  .trainer-workspace .trainer-quick-actions #adminBackoffice { margin-left:0; }
  #historyModal .trainer-lookup-row { flex-wrap:wrap; }
  #historyModal .trainer-lookup-row button { flex-basis:100%; }
  #historyModal .trainer-lookup-row a { margin-left:56px; }
}
