:root {
  color-scheme: light;
  --bg: #eef3f8;
  --bg-strong: #dbe7f2;
  --panel: rgba(255, 255, 255, 0.82);
  --panel-border: rgba(12, 43, 72, 0.08);
  --panel-shadow: 0 24px 60px rgba(11, 37, 64, 0.12);
  --text: #112135;
  --text-soft: #5d6e82;
  --brand: #0f6db7;
  --brand-strong: #0b4f89;
  --accent: #18a27c;
  --warning: #b7791f;
  --danger: #b8324f;
  --radius-xl: 28px;
  --radius-lg: 20px;
  --radius-md: 14px;
  --font-main: "Sora", "Segoe UI", sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    color-scheme: dark;
    --bg: #07111d;
    --bg-strong: #0d1a2a;
    --panel: rgba(10, 22, 36, 0.82);
    --panel-border: rgba(141, 177, 214, 0.12);
    --panel-shadow: 0 24px 60px rgba(0, 0, 0, 0.35);
    --text: #f1f5fb;
    --text-soft: #99a8ba;
    --brand: #55a9ff;
    --brand-strong: #2f83d9;
    --accent: #36caa0;
    --warning: #f2bf59;
    --danger: #ff8fa0;
  }
}

* { box-sizing: border-box; }
body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font-main);
  color: var(--text);
  overflow-x: hidden;
  background:
    radial-gradient(circle at top left, rgba(15, 109, 183, 0.14), transparent 30%),
    radial-gradient(circle at bottom right, rgba(24, 162, 124, 0.12), transparent 28%),
    linear-gradient(180deg, var(--bg) 0%, var(--bg-strong) 100%);
}

body.menu-locked {
  overflow: hidden;
}

body.student-drawer-locked {
  overflow: hidden;
}

body.trainer-drawer-locked {
  overflow: hidden;
}

body.workout-drawer-locked {
  overflow: hidden;
}

a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
input, select, textarea {
  width: 100%;
  border: 1px solid var(--panel-border);
  border-radius: 14px;
  background: rgba(255,255,255,0.72);
  color: var(--text);
  padding: 0.9rem 1rem;
}
select option,
select optgroup {
  color: #112135;
  background-color: #f5f7fa;
}
select option:checked {
  color: #112135;
  background-color: #dbe7f2;
}
@media (prefers-color-scheme: dark) {
  input, select, textarea { background: rgba(6,14,24,0.76); }
}
textarea { resize: vertical; }

.app-shell {
  display: grid;
  grid-template-columns: 320px minmax(0, 1fr);
  min-height: 100vh;
  position: relative;
}
.sidebar {
  padding: 2rem;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  gap: 1.25rem;
  overflow-y: auto;
  border-right: 1px solid var(--panel-border);
  background: rgba(4, 15, 27, 0.84);
  color: #eef4fa;
}
.sidebar-header-mobile,
.mobile-menu-button,
.sidebar-backdrop,
.mobile-bottom-nav {
  display: none;
}
.sidebar-close {
  border: 0;
  border-radius: 999px;
  padding: 0.7rem 0.95rem;
  font-weight: 700;
  background: rgba(255, 255, 255, 0.12);
  color: #eef4fa;
}
.brand-block h1 {
  margin: 0.8rem 0;
  font-size: 1.9rem;
  line-height: 1.15;
}
.brand-block p,
.sidebar-footer span { color: rgba(238, 244, 250, 0.72); }
.brand-pill {
  display: inline-flex;
  align-items: center;
  padding: 0.45rem 0.85rem;
  border-radius: 999px;
  background: rgba(85, 169, 255, 0.18);
  color: #d9ecff;
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.nav-list { display: grid; gap: 0.6rem; margin: 0; }
.nav-link {
  padding: 0.95rem 1rem;
  border-radius: 16px;
  color: rgba(238, 244, 250, 0.82);
  background: transparent;
  transition: background 0.2s ease, transform 0.2s ease;
}
.nav-link:hover, .nav-link.is-active {
  background: rgba(85, 169, 255, 0.14);
  transform: translateX(3px);
}
.sidebar-footer {
  margin-top: auto;
  padding-top: 1rem;
  border-top: 1px solid rgba(255,255,255,0.1);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}
.main-content {
  padding: 2rem;
  min-width: 0;
}
.topbar {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  margin-bottom: 1.5rem;
}
.topbar-title {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  min-width: 0;
}
.topbar-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
  justify-content: flex-end;
}
.topbar h2 { margin: 0.2rem 0 0; font-size: 2rem; }
.eyebrow {
  margin: 0;
  color: var(--text-soft);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.72rem;
}
.status-chip {
  padding: 0.75rem 1rem;
  border-radius: 999px;
  background: rgba(15, 109, 183, 0.12);
  color: var(--brand-strong);
  font-weight: 600;
}
.panel {
  background: var(--panel);
  backdrop-filter: blur(18px);
  border: 1px solid var(--panel-border);
  border-radius: var(--radius-xl);
  box-shadow: var(--panel-shadow);
  padding: 1.4rem;
}
.alert {
  margin-bottom: 1rem;
  padding: 1rem 1.1rem;
  border-radius: var(--radius-md);
  border: 1px solid transparent;
}
.alert.compact { max-width: 640px; margin: 0 auto 1rem; }
.alert.success { background: rgba(24, 162, 124, 0.11); border-color: rgba(24, 162, 124, 0.22); color: var(--accent); }
.alert.error { background: rgba(184, 50, 79, 0.11); border-color: rgba(184, 50, 79, 0.22); color: var(--danger); }
.stats-grid, .two-column, .auth-card-grid {
  display: grid;
  gap: 1.2rem;
  margin-bottom: 1.2rem;
}
.four-up { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.two-up { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.two-column { grid-template-columns: 1.5fr 1fr; }
.two-column.wide-left { grid-template-columns: 1.7fr 1fr; }
.stack-column, .stack-list, .stack-form { display: grid; gap: 1rem; }
.stat-card span, .stat-card small { color: var(--text-soft); }
.stat-card strong { display: block; font-size: 2.2rem; margin: 0.35rem 0; }
.section-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 1rem; margin-bottom: 1rem; }
.section-head h3 { margin: 0.2rem 0 0; font-size: 1.35rem; }
.section-head.split { align-items: center; }
.section-head.compact { margin-bottom: 0.8rem; }
.inline-form, .inline-action, .badge-row { display: flex; gap: 0.75rem; align-items: center; flex-wrap: wrap; }
.inline-form > * { flex: 1 1 180px; }
.inline-action > * { flex: 0 0 auto; }
.card-actions { display: flex; gap: 0.75rem; align-items: center; flex-wrap: wrap; }
.table-actions { display: flex; gap: 0.6rem; align-items: center; flex-wrap: wrap; }
.form-grid { display: grid; gap: 0.8rem; }
.form-grid.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.form-section-title {
  margin-top: 0.3rem;
  color: var(--text);
  font-size: 0.9rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.primary-button, .secondary-button, .ghost-button, .danger-button {
  border: 0;
  border-radius: 14px;
  padding: 0.9rem 1.1rem;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.primary-button { background: linear-gradient(135deg, var(--brand), var(--brand-strong)); color: white; }
.secondary-button { background: rgba(15, 109, 183, 0.11); color: var(--brand-strong); }
.ghost-button { background: rgba(17,33,53,0.07); color: var(--text); }
.danger-button { background: rgba(184, 50, 79, 0.12); color: var(--danger); }
.small-button {
  padding: 0.68rem 0.85rem;
  border-radius: 12px;
  font-size: 0.88rem;
}
.badge {
  display: inline-flex;
  padding: 0.45rem 0.75rem;
  border-radius: 999px;
  background: rgba(17, 33, 53, 0.08);
  color: var(--text);
  font-size: 0.8rem;
  font-weight: 700;
}
.badge.success { background: rgba(24,162,124,0.12); color: var(--accent); }
.badge.warning { background: rgba(183,121,31,0.14); color: var(--warning); }
.badge.info { background: rgba(15,109,183,0.14); color: var(--brand-strong); }
.badge.dark { background: rgba(17,33,53,0.16); }
.table-wrap { overflow: auto; }
.compact-table table td, .compact-table table th { white-space: nowrap; }
table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 0.9rem 0.8rem; border-bottom: 1px solid var(--panel-border); vertical-align: top; }
th { color: var(--text-soft); font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.08em; }
.workout-card, .message-card, .alert-card {
  border: 1px solid var(--panel-border);
  border-radius: 20px;
  padding: 1rem;
  background: rgba(255,255,255,0.42);
}
@media (prefers-color-scheme: dark) {
  .workout-card, .message-card, .alert-card { background: rgba(4, 15, 27, 0.44); }
}
.workout-head { display: flex; justify-content: space-between; gap: 1rem; margin-bottom: 0.75rem; }
.workout-head h4 { margin: 0; font-size: 1.05rem; }
.workout-head p, .message-card p, .exercise-list li, small { color: var(--text-soft); }
.exercise-list { margin: 0; padding-left: 1.1rem; display: grid; gap: 0.35rem; }
.workout-card.is-editing {
  border-color: rgba(15, 109, 183, 0.28);
  box-shadow: 0 18px 38px rgba(15, 109, 183, 0.12);
}
.exercise-list.detailed li {
  display: grid;
  gap: 0.15rem;
}
.exercise-list.detailed strong {
  color: var(--text);
  font-size: 0.95rem;
}
.exercise-list.detailed span {
  color: var(--text-soft);
  font-size: 0.92rem;
}
.exercise-card {
  gap: 0.9rem;
}
.exercise-meta-grid {
  display: grid;
  gap: 0.75rem;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-bottom: 0.75rem;
}
.exercise-meta-grid strong {
  display: block;
  margin-bottom: 0.12rem;
  color: var(--text);
  font-size: 0.92rem;
}
.exercise-instructions {
  margin: 0 0 0.8rem;
  color: var(--text-soft);
}
.exercise-inline-media {
  margin-top: 0.6rem;
}
.exercise-media {
  margin: 0.85rem 0;
}
.exercise-media-image,
.exercise-media-video {
  width: 100%;
  border-radius: 16px;
  border: 1px solid var(--panel-border);
  background: rgba(4, 15, 27, 0.06);
  object-fit: cover;
}
.exercise-media-image {
  max-height: 260px;
}
.exercise-media-video {
  max-height: 280px;
}
.exercise-media-embed {
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid var(--panel-border);
  background: rgba(4, 15, 27, 0.06);
}
.exercise-media-embed iframe {
  width: 100%;
  height: 100%;
  border: 0;
}
.exercise-media-image.compact {
  max-width: 280px;
  max-height: 180px;
}
.exercise-media-video.compact {
  max-width: 280px;
  max-height: 180px;
}
.exercise-media-embed.compact {
  max-width: 280px;
}
.student-mobile-hub {
  display: none;
}
.student-link-grid {
  display: grid;
  gap: 0.75rem;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}
.student-link-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 3.25rem;
  padding: 0.85rem 1rem;
  border-radius: 16px;
  border: 1px solid var(--panel-border);
  background: rgba(15, 109, 183, 0.08);
  color: var(--brand-strong);
  font-weight: 700;
  text-align: center;
}
.student-link-chip-button {
  font: inherit;
  cursor: pointer;
}
.student-focus-layout {
  margin-bottom: 1.2rem;
}
.student-drawer-trigger-row {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-bottom: 1rem;
}
.student-drawer-trigger-row > * {
  flex: 0 0 auto;
}
.student-workout-actions {
  margin: 1rem 0 0.25rem;
}
.student-section-card {
  margin-top: 1rem;
  border: 1px solid var(--panel-border);
  border-radius: 18px;
  background: rgba(255,255,255,0.26);
  overflow: hidden;
}
.student-section-card summary {
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 1rem;
  cursor: pointer;
}
.student-section-card summary::-webkit-details-marker {
  display: none;
}
.student-section-card summary span {
  color: var(--text);
  font-weight: 700;
}
.student-section-card summary small {
  margin-left: auto;
}
.student-section-card summary::after {
  content: '+';
  color: var(--brand-strong);
  font-size: 1.2rem;
  font-weight: 700;
  line-height: 1;
}
.student-section-card[open] summary::after {
  content: '-';
}
.student-section-body {
  padding: 0 1rem 1rem;
}
.student-section-card-accent {
  border-color: rgba(15, 109, 183, 0.18);
}
.student-submit-bar {
  padding-top: 0.5rem;
}
.student-drawer-shell {
  position: fixed;
  inset: 0;
  z-index: 28;
  pointer-events: none;
}
.student-drawer-overlay {
  position: absolute;
  inset: 0;
  border: 0;
  background: rgba(4, 15, 27, 0.32);
  opacity: 0;
  transition: opacity 0.24s ease;
}
.student-drawer-panel {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: min(420px, 92vw);
  padding: 1.1rem;
  display: grid;
  grid-template-rows: auto 1fr;
  gap: 1rem;
  border-left: 1px solid var(--panel-border);
  background: rgba(238, 243, 248, 0.98);
  box-shadow: -24px 0 56px rgba(11, 37, 64, 0.18);
  transform: translateX(108%);
  transition: transform 0.24s ease;
  overflow: hidden;
}
.student-drawer-shell.is-open {
  pointer-events: auto;
}
.student-drawer-shell.is-open .student-drawer-overlay {
  opacity: 1;
}
.student-drawer-panel.is-active {
  transform: translateX(0);
}
.student-drawer-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 0.75rem;
}
.student-drawer-header h3 {
  margin: 0.2rem 0 0;
  font-size: 1.25rem;
}
.student-drawer-body {
  min-height: 0;
  overflow-y: auto;
  padding-right: 0.2rem;
}
.trainer-dashboard-hub {
  margin-bottom: 1.2rem;
}
.trainer-drawer-trigger-row {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-bottom: 1rem;
}
.trainer-drawer-trigger-row > * {
  flex: 0 0 auto;
}
.trainer-hub-grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: 1.4fr 1fr;
}
.trainer-hub-stack {
  display: grid;
  gap: 1rem;
}
.trainer-drawer-shell {
  position: fixed;
  inset: 0;
  z-index: 27;
  pointer-events: none;
}
.trainer-drawer-overlay {
  position: absolute;
  inset: 0;
  border: 0;
  background: rgba(4, 15, 27, 0.28);
  opacity: 0;
  transition: opacity 0.24s ease;
}
.trainer-drawer-panel {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: min(460px, 94vw);
  padding: 1.1rem;
  display: grid;
  grid-template-rows: auto 1fr;
  gap: 1rem;
  border-left: 1px solid var(--panel-border);
  background: rgba(238, 243, 248, 0.98);
  box-shadow: -24px 0 56px rgba(11, 37, 64, 0.18);
  transform: translateX(108%);
  transition: transform 0.24s ease;
  overflow: hidden;
}
.trainer-drawer-shell.is-open {
  pointer-events: auto;
}
.trainer-drawer-shell.is-open .trainer-drawer-overlay {
  opacity: 1;
}
.trainer-drawer-panel.is-active {
  transform: translateX(0);
}
.trainer-drawer-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 0.75rem;
}
.trainer-drawer-header h3 {
  margin: 0.2rem 0 0;
  font-size: 1.25rem;
}
.trainer-drawer-body {
  min-height: 0;
  overflow-y: auto;
  padding-right: 0.2rem;
}
.trainer-workout-hub {
  margin-bottom: 1.2rem;
}
.trainer-workout-trigger-row {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}
.trainer-workout-layout {
  margin-bottom: 1.2rem;
}
.trainer-section-card {
  margin-top: 1rem;
  border: 1px solid var(--panel-border);
  border-radius: 18px;
  background: rgba(255,255,255,0.26);
  overflow: hidden;
}
.trainer-section-card summary {
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 1rem;
  cursor: pointer;
}
.trainer-section-card summary::-webkit-details-marker {
  display: none;
}
.trainer-section-card summary span {
  color: var(--text);
  font-weight: 700;
}
.trainer-section-card summary small {
  margin-left: auto;
}
.trainer-section-card summary::after {
  content: '+';
  color: var(--brand-strong);
  font-size: 1.2rem;
  font-weight: 700;
  line-height: 1;
}
.trainer-section-card[open] summary::after {
  content: '-';
}
.trainer-section-body {
  padding: 0 1rem 1rem;
}
.workout-drawer-shell {
  position: fixed;
  inset: 0;
  z-index: 29;
  pointer-events: none;
}
.workout-drawer-overlay {
  position: absolute;
  inset: 0;
  border: 0;
  background: rgba(4, 15, 27, 0.28);
  opacity: 0;
  transition: opacity 0.24s ease;
}
.workout-drawer-panel {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: min(520px, 96vw);
  padding: 1.1rem;
  display: grid;
  grid-template-rows: auto 1fr;
  gap: 1rem;
  border-left: 1px solid var(--panel-border);
  background: rgba(238, 243, 248, 0.98);
  box-shadow: -24px 0 56px rgba(11, 37, 64, 0.18);
  transform: translateX(108%);
  transition: transform 0.24s ease;
  overflow: hidden;
}
.workout-drawer-shell.is-open {
  pointer-events: auto;
}
.workout-drawer-shell.is-open .workout-drawer-overlay {
  opacity: 1;
}
.workout-drawer-panel.is-active {
  transform: translateX(0);
}
.workout-drawer-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 0.75rem;
}
.workout-drawer-header h3 {
  margin: 0.2rem 0 0;
  font-size: 1.25rem;
}
.workout-drawer-body {
  min-height: 0;
  overflow-y: auto;
  padding-right: 0.2rem;
}
.assignment-block {
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--panel-border);
}
.assignment-list {
  display: grid;
  gap: 0.75rem;
}
.exercise-load-list {
  display: grid;
  gap: 0.75rem;
}
.assignment-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.9rem;
  padding: 0.85rem 0.9rem;
  border-radius: 16px;
  border: 1px solid var(--panel-border);
  background: rgba(255,255,255,0.26);
}
@media (prefers-color-scheme: dark) {
  .assignment-item { background: rgba(4, 15, 27, 0.3); }
  .student-section-card { background: rgba(4, 15, 27, 0.3); }
  .exercise-row { background: rgba(4, 15, 27, 0.3); }
  .student-drawer-panel {
    background: rgba(7, 17, 29, 0.98);
    box-shadow: -24px 0 56px rgba(0, 0, 0, 0.34);
  }
  .trainer-drawer-panel {
    background: rgba(7, 17, 29, 0.98);
    box-shadow: -24px 0 56px rgba(0, 0, 0, 0.34);
  }
  .trainer-section-card { background: rgba(4, 15, 27, 0.3); }
  .workout-drawer-panel {
    background: rgba(7, 17, 29, 0.98);
    box-shadow: -24px 0 56px rgba(0, 0, 0, 0.34);
  }
}
.assignment-item strong {
  display: block;
  margin-bottom: 0.15rem;
}
.exercise-load-item {
  display: grid;
  gap: 0.7rem;
  padding: 0.85rem 0.9rem;
  border-radius: 16px;
  border: 1px solid var(--panel-border);
  background: rgba(255,255,255,0.26);
}
@media (prefers-color-scheme: dark) {
  .exercise-load-item { background: rgba(4, 15, 27, 0.3); }
  .history-note-card,
  .history-feedback-card { background: rgba(4, 15, 27, 0.3); }
}
.exercise-load-item strong {
  display: block;
  margin-bottom: 0.15rem;
}
.history-load-list {
  display: grid;
  gap: 0.45rem;
  margin: 0.75rem 0;
}
.trainer-history-card {
  display: grid;
  gap: 0.85rem;
}
.history-note-card,
.history-feedback-card {
  display: grid;
  gap: 0.35rem;
  padding: 0.8rem 0.9rem;
  border-radius: 14px;
  border: 1px solid var(--panel-border);
  background: rgba(17, 33, 53, 0.05);
}
.history-note-card strong,
.history-feedback-card strong {
  color: var(--text);
  font-size: 0.88rem;
}
.history-note-card p,
.history-feedback-card p {
  margin: 0;
  color: var(--text-soft);
}
.history-load-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
  padding: 0.6rem 0.75rem;
  border-radius: 12px;
  background: rgba(17, 33, 53, 0.05);
}
.history-load-item span {
  color: var(--text);
  font-size: 0.92rem;
}
.history-load-item small {
  color: var(--text-soft);
}
.exercise-builder-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.8rem;
}
.exercise-builder-header h3 {
  margin: 0.2rem 0 0;
  font-size: 1.05rem;
}
.exercise-builder { display: grid; gap: 0.9rem; }
.exercise-row {
  display: block;
  border-radius: 18px;
  border: 1px solid var(--panel-border);
  background: rgba(255,255,255,0.34);
  overflow: hidden;
}
.exercise-row-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 0.95rem;
  cursor: pointer;
  list-style: none;
}
.exercise-row-head::-webkit-details-marker {
  display: none;
}
.exercise-row-head::after {
  content: '+';
  margin-left: auto;
  color: var(--brand-strong);
  font-size: 1.2rem;
  font-weight: 700;
  line-height: 1;
}
.exercise-row[open] .exercise-row-head::after {
  content: '-';
}
.exercise-row-summary-text {
  display: grid;
  gap: 0.2rem;
}
.exercise-row-summary-text strong {
  font-size: 0.95rem;
}
.exercise-row-summary-text small {
  color: var(--text-soft);
}
.exercise-row-body {
  display: grid;
  gap: 0.7rem;
  padding: 0 0.95rem 0.95rem;
}
.exercise-fields-grid {
  display: grid;
  gap: 0.7rem;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}
.message-card.own { border-color: rgba(15,109,183,0.24); background: rgba(15,109,183,0.08); }
.message-card.incoming { border-color: rgba(24,162,124,0.18); }
.empty-state {
  border: 1px dashed var(--panel-border);
  border-radius: 18px;
  padding: 1rem;
  color: var(--text-soft);
}
.empty-state.compact {
  padding: 0.85rem;
  font-size: 0.92rem;
}
.auth-shell {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 2rem;
}
.auth-card-grid { grid-template-columns: 1.25fr 0.95fr; max-width: 1200px; margin: 0 auto; align-items: stretch; }
.auth-hero h1 { font-size: 3rem; margin: 1rem 0; line-height: 1.05; }
.auth-form-panel h2 { margin-top: 0.25rem; }
.hero-metrics { display: grid; gap: 0.8rem; margin-top: 1.5rem; }
.metric-card {
  border: 1px solid var(--panel-border);
  border-radius: 18px;
  padding: 1rem;
  background: rgba(255,255,255,0.38);
}
.metric-card strong { display: block; margin-bottom: 0.2rem; }
.auth-help ul { padding-left: 1.1rem; color: var(--text-soft); }
label { display: grid; gap: 0.45rem; color: var(--text-soft); }
label span { font-size: 0.92rem; }

@media (max-width: 1180px) {
  .four-up, .two-column, .auth-card-grid, .two-up { grid-template-columns: 1fr; }
  .trainer-hub-grid { grid-template-columns: 1fr; }
}

@media (max-width: 960px) {
  .app-shell {
    display: block;
  }

  .sidebar {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    width: min(88vw, 340px);
    max-width: 340px;
    z-index: 30;
    transform: translateX(-108%);
    transition: transform 0.24s ease;
    border-right: 1px solid rgba(255,255,255,0.1);
    border-bottom: 0;
    border-radius: 0 24px 24px 0;
    box-shadow: 0 24px 64px rgba(3, 12, 22, 0.42);
  }

  .app-shell.is-menu-open .sidebar {
    transform: translateX(0);
  }

  .sidebar-header-mobile {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1.4rem;
  }

  .sidebar-backdrop {
    display: block;
    position: fixed;
    inset: 0;
    z-index: 20;
    border: 0;
    background: rgba(4, 15, 27, 0.42);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.24s ease;
  }

  .app-shell.is-menu-open .sidebar-backdrop {
    opacity: 1;
    pointer-events: auto;
  }

  .mobile-menu-button {
    display: inline-flex;
    flex-direction: column;
    justify-content: center;
    gap: 0.28rem;
    width: 3rem;
    height: 3rem;
    padding: 0.85rem;
    border: 0;
    border-radius: 16px;
    background: rgba(15, 109, 183, 0.12);
    color: var(--brand-strong);
    flex: 0 0 auto;
  }

  .mobile-menu-button span {
    display: block;
    width: 100%;
    height: 2px;
    border-radius: 999px;
    background: currentColor;
  }

  .main-content {
    padding: 1.15rem;
  }

  .topbar {
    position: sticky;
    top: 0;
    z-index: 10;
    padding: 0.2rem 0 0.9rem;
    margin-bottom: 1rem;
    background: linear-gradient(180deg, rgba(238, 243, 248, 0.96), rgba(238, 243, 248, 0.82), transparent);
    backdrop-filter: blur(8px);
  }

  .topbar h2 {
    font-size: 1.55rem;
  }

  .topbar-actions .ghost-button,
  .topbar-actions form {
    width: auto;
  }
}

@media (max-width: 960px) and (prefers-color-scheme: dark) {
  .topbar {
    background: linear-gradient(180deg, rgba(7, 17, 29, 0.96), rgba(7, 17, 29, 0.82), transparent);
  }
}

@media (max-width: 860px) {
  .responsive-table {
    overflow: visible;
  }

  .responsive-table table,
  .responsive-table thead,
  .responsive-table tbody,
  .responsive-table tr,
  .responsive-table td {
    display: block;
    width: 100%;
  }

  .responsive-table thead {
    display: none;
  }

  .responsive-table tbody {
    display: grid;
    gap: 0.9rem;
  }

  .responsive-table tr {
    padding: 0.95rem 1rem;
    border: 1px solid var(--panel-border);
    border-radius: 18px;
    background: rgba(255,255,255,0.34);
  }

  .responsive-table td {
    display: grid;
    grid-template-columns: minmax(92px, 120px) 1fr;
    gap: 0.75rem;
    align-items: start;
    padding: 0.6rem 0;
    border-bottom: 1px solid var(--panel-border);
    white-space: normal;
  }

  .responsive-table td:last-child {
    border-bottom: 0;
    padding-bottom: 0;
  }

  .responsive-table td::before {
    content: attr(data-label);
    color: var(--text-soft);
    font-size: 0.74rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
  }

  .responsive-table.compact-table table td {
    white-space: normal;
  }
}

@media (max-width: 860px) and (prefers-color-scheme: dark) {
  .responsive-table tr {
    background: rgba(4, 15, 27, 0.34);
  }
}

@media (max-width: 720px) {
  .main-content, .sidebar, .auth-shell { padding: 1rem; }
  .topbar, .workout-head, .section-head.split, .topbar-actions { flex-direction: column; }
  .topbar-title { width: 100%; }
  .topbar-title > div { min-width: 0; }
  .form-grid.two { grid-template-columns: 1fr; }
  .exercise-meta-grid { grid-template-columns: 1fr; }
  .exercise-fields-grid { grid-template-columns: 1fr; }
  .assignment-item, .exercise-builder-header, .exercise-row-head, .card-actions, .history-load-item, .table-actions, .inline-form, .inline-action { flex-direction: column; align-items: stretch; }
  .card-actions > *,
  .table-actions > *,
  .inline-form > *,
  .inline-action > * { width: 100%; }
  .panel { padding: 1.05rem; border-radius: 22px; }
  .auth-hero h1 { font-size: 2.2rem; }
  .stat-card strong { font-size: 1.8rem; }
  .workout-card, .message-card, .alert-card, .assignment-item, .exercise-load-item, .exercise-row { border-radius: 18px; }
  .status-chip { width: 100%; text-align: center; }
  .topbar-actions form, .topbar-actions .ghost-button { width: 100%; }
  .student-mobile-hub { display: block; }
  .student-link-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .student-drawer-trigger-row { display: none; }
  body.has-student-nav .main-content { padding-bottom: 6.8rem; }
  .mobile-bottom-nav {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0.6rem;
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 25;
    padding: 0.8rem 1rem;
    padding-bottom: calc(0.8rem + env(safe-area-inset-bottom));
    background: rgba(238, 243, 248, 0.96);
    border-top: 1px solid var(--panel-border);
    box-shadow: 0 -18px 42px rgba(11, 37, 64, 0.14);
    backdrop-filter: blur(12px);
  }
  .mobile-bottom-link,
  .mobile-bottom-link-button {
    min-height: 3.15rem;
    padding: 0.7rem 0.55rem;
    border: 1px solid transparent;
    border-radius: 16px;
    background: rgba(17,33,53,0.06);
    color: var(--text-soft);
    justify-content: center;
    text-align: center;
  }
  .mobile-bottom-link.is-active,
  .mobile-bottom-link-button {
    background: rgba(15, 109, 183, 0.12);
    color: var(--brand-strong);
  }
  .mobile-bottom-link-button {
    border: 0;
  }
  .mobile-bottom-link-label {
    font-size: 0.76rem;
    font-weight: 700;
    line-height: 1.2;
  }
  .student-section-card summary {
    padding: 0.95rem;
  }
  .student-section-body {
    padding: 0 0.95rem 0.95rem;
  }
  .student-workout-actions > * {
    width: 100%;
  }
  .student-submit-bar {
    position: sticky;
    bottom: 0;
    padding-top: 0.75rem;
    background: linear-gradient(180deg, rgba(238, 243, 248, 0), rgba(238, 243, 248, 0.9) 36%, rgba(238, 243, 248, 1) 100%);
  }
  .student-drawer-panel {
    width: 100vw;
    padding: 1rem;
  }
  .trainer-drawer-trigger-row {
    flex-direction: column;
    align-items: stretch;
  }
  .trainer-workout-trigger-row {
    flex-direction: column;
    align-items: stretch;
  }
  .trainer-drawer-trigger-row > * {
    width: 100%;
  }
  .trainer-workout-trigger-row > * {
    width: 100%;
  }
  .trainer-drawer-panel {
    width: 100vw;
    padding: 1rem;
  }
  .workout-drawer-panel {
    width: 100vw;
    padding: 1rem;
  }
  .responsive-table td {
    grid-template-columns: 1fr;
    gap: 0.35rem;
  }
  .responsive-table td::before {
    margin-bottom: 0.1rem;
  }
}

@media (max-width: 720px) and (prefers-color-scheme: dark) {
  .mobile-bottom-nav {
    background: rgba(7, 17, 29, 0.96);
    box-shadow: 0 -18px 42px rgba(0, 0, 0, 0.28);
  }

  .student-submit-bar {
    background: linear-gradient(180deg, rgba(7, 17, 29, 0), rgba(7, 17, 29, 0.88) 36%, rgba(7, 17, 29, 1) 100%);
  }
}

/* Phase 1 visual refresh */
:root {
  color-scheme: dark;
  --bg: #0a0f18;
  --bg-strong: #0f1521;
  --panel: rgba(19, 25, 37, 0.92);
  --panel-border: rgba(255, 255, 255, 0.08);
  --panel-shadow: 0 28px 72px rgba(0, 0, 0, 0.42);
  --text: #f5f7fa;
  --text-soft: #98a2b3;
  --brand: #e8ff2f;
  --brand-strong: #d7ff00;
  --accent: #e8ff2f;
  --warning: #f7d046;
  --danger: #ff6f8f;
  --radius-xl: 30px;
  --radius-lg: 22px;
  --radius-md: 16px;
  --font-main: "Manrope", "Segoe UI", sans-serif;
  --font-display: "Space Grotesk", "Segoe UI", sans-serif;
}

body {
  font-family: var(--font-main);
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(232, 255, 47, 0.14), transparent 18%),
    radial-gradient(circle at 85% 10%, rgba(84, 103, 255, 0.08), transparent 18%),
    radial-gradient(circle at bottom center, rgba(232, 255, 47, 0.06), transparent 24%),
    linear-gradient(180deg, #090d14 0%, #101622 100%);
}

h1, h2, h3, h4, .brand-block strong, .brand-copy strong {
  font-family: var(--font-display);
  letter-spacing: -0.03em;
}

input,
select,
textarea {
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
  padding: 1rem 1.1rem;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
}

input::placeholder,
textarea::placeholder {
  color: rgba(245, 247, 250, 0.38);
}

input:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: rgba(232, 255, 47, 0.55);
  box-shadow: 0 0 0 4px rgba(232, 255, 47, 0.12);
}

.panel {
  background: linear-gradient(180deg, rgba(20, 26, 38, 0.96), rgba(15, 21, 33, 0.94));
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: var(--panel-shadow);
}

.status-chip,
.badge,
.student-hero-pill {
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.badge.info,
.status-chip,
.student-hero-pill {
  background: rgba(232, 255, 47, 0.12);
  color: #f4ffb4;
  border-color: rgba(232, 255, 47, 0.26);
}

.badge.warning {
  background: rgba(247, 208, 70, 0.12);
  color: #ffe79f;
}

.badge.success {
  background: rgba(87, 214, 139, 0.14);
  color: #b8ffd1;
}

.badge.dark {
  background: rgba(255, 255, 255, 0.08);
}

.eyebrow {
  color: rgba(232, 255, 47, 0.74);
  letter-spacing: 0.16em;
}

.primary-button,
.secondary-button,
.ghost-button,
.danger-button {
  min-height: 3.35rem;
  border-radius: 18px;
  transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

.primary-button:hover,
.secondary-button:hover,
.ghost-button:hover,
.danger-button:hover {
  transform: translateY(-1px);
}

.primary-button {
  background: linear-gradient(180deg, #f1ff44 0%, #d9ff00 100%);
  color: #11161f;
  box-shadow: 0 16px 34px rgba(232, 255, 47, 0.22);
}

.secondary-button {
  background: rgba(232, 255, 47, 0.12);
  color: #f3ffac;
}

.ghost-button {
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
}

.danger-button {
  background: rgba(255, 111, 143, 0.14);
  color: #ffc7d3;
}

.app-shell {
  background:
    linear-gradient(90deg, rgba(11, 15, 23, 0.96) 0, rgba(11, 15, 23, 0.96) 320px, transparent 320px),
    linear-gradient(180deg, rgba(255, 255, 255, 0.02), transparent);
}

.sidebar {
  background:
    radial-gradient(circle at top left, rgba(232, 255, 47, 0.08), transparent 24%),
    linear-gradient(180deg, rgba(13, 18, 28, 0.98), rgba(10, 15, 24, 0.98));
  border-right: 1px solid rgba(255, 255, 255, 0.06);
  gap: 1rem;
}

.brand-block {
  display: grid;
  gap: 1rem;
}

.brand-lockup {
  display: flex;
  align-items: center;
  gap: 0.95rem;
  padding: 1rem 1.05rem;
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.brand-mark {
  width: 2.4rem;
  height: 1.4rem;
  position: relative;
  display: inline-block;
}

.brand-mark::before,
.brand-mark::after {
  content: "";
  position: absolute;
  top: 0;
  width: 1rem;
  height: 1rem;
  border: 2px solid var(--brand);
  border-radius: 0.45rem;
  transform: skewX(-18deg);
}

.brand-mark::before {
  left: 0;
}

.brand-mark::after {
  right: 0;
}

.brand-copy strong {
  display: block;
  font-size: 1.02rem;
}

.brand-copy p {
  margin: 0.24rem 0 0;
  color: rgba(245, 247, 250, 0.56);
  font-size: 0.9rem;
}

.brand-pill {
  background: rgba(232, 255, 47, 0.11);
  color: #f0ff8f;
  border: 1px solid rgba(232, 255, 47, 0.16);
  letter-spacing: 0.14em;
}

.nav-list {
  gap: 0.45rem;
}

.nav-link {
  border: 1px solid transparent;
  color: rgba(245, 247, 250, 0.72);
}

.nav-link:hover,
.nav-link.is-active {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(232, 255, 47, 0.14);
  color: #f7f8fb;
  transform: translateX(0);
}

.sidebar-footer {
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding-top: 1.15rem;
}

.sidebar-user {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  min-width: 0;
}

.sidebar-user-copy {
  display: grid;
  gap: 0.2rem;
  min-width: 0;
}

.sidebar-user-copy strong,
.sidebar-user-copy span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.main-content {
  padding: 2.2rem;
}

.topbar {
  padding: 0.4rem 0 1.35rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.topbar h2 {
  font-size: clamp(2rem, 4vw, 3rem);
}

.topbar-actions {
  gap: 0.9rem;
}

.topbar-user-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  padding: 0.45rem 0.65rem 0.45rem 0.45rem;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
}

.topbar-user-chip > span {
  max-width: 11rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 600;
}

.profile-avatar {
  position: relative;
  overflow: hidden;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background:
    radial-gradient(circle at top, rgba(232, 255, 47, 0.18), transparent 55%),
    linear-gradient(180deg, rgba(19, 26, 40, 0.98), rgba(10, 14, 24, 0.96));
  color: #f7f8fb;
  font-family: var(--font-display);
  font-weight: 700;
  text-transform: uppercase;
  flex-shrink: 0;
}

.profile-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.profile-avatar span {
  color: #f7f8fb;
  line-height: 1;
}

.profile-avatar-sidebar {
  width: 3rem;
  height: 3rem;
  font-size: 0.95rem;
}

.profile-avatar-topbar {
  width: 2.6rem;
  height: 2.6rem;
  font-size: 0.85rem;
}

.profile-avatar-row {
  width: 3.35rem;
  height: 3.35rem;
  font-size: 0.95rem;
}

.profile-avatar-xl {
  width: 6.4rem;
  height: 6.4rem;
  font-size: 1.5rem;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.28);
}

.alert {
  border-radius: 18px;
}

.alert.success {
  background: rgba(232, 255, 47, 0.12);
  border-color: rgba(232, 255, 47, 0.2);
  color: #f3ffac;
}

.alert.error {
  background: rgba(255, 111, 143, 0.12);
  border-color: rgba(255, 111, 143, 0.2);
  color: #ffc9d4;
}

.empty-state {
  background: rgba(255, 255, 255, 0.04);
  border: 1px dashed rgba(255, 255, 255, 0.08);
  color: var(--text-soft);
  border-radius: 22px;
}

.workout-card,
.message-card,
.alert-card,
.assignment-item,
.exercise-load-item {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.045), rgba(255, 255, 255, 0.025));
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.message-card.own {
  border-color: rgba(232, 255, 47, 0.22);
  background: linear-gradient(180deg, rgba(232, 255, 47, 0.08), rgba(232, 255, 47, 0.03));
}

.message-card.incoming {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.055), rgba(255, 255, 255, 0.025));
}

.auth-shell {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 2rem;
  background:
    radial-gradient(circle at top left, rgba(232, 255, 47, 0.2), transparent 20%),
    linear-gradient(180deg, #0a0f18 0%, #101722 100%);
}

.auth-card-grid {
  grid-template-columns: 1.1fr 0.92fr;
  gap: 1.4rem;
  width: min(1140px, 100%);
  margin: 0 auto;
  align-items: stretch;
}

.auth-hero,
.auth-form-panel {
  min-height: 760px;
}

.auth-hero {
  position: relative;
  overflow: hidden;
  display: grid;
  align-content: space-between;
  padding: 2rem;
  background:
    linear-gradient(180deg, rgba(232, 255, 47, 0.92) 0%, rgba(168, 190, 70, 0.72) 32%, rgba(19, 25, 37, 0.96) 100%);
}

.auth-hero::after {
  content: "";
  position: absolute;
  inset: auto -12% -22% auto;
  width: 22rem;
  height: 22rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  filter: blur(14px);
}

.auth-hero-top,
.auth-hero-content,
.hero-metrics {
  position: relative;
  z-index: 1;
}

.auth-brand-lockup {
  display: inline-flex;
  align-items: center;
  gap: 0.95rem;
  padding: 0.95rem 1.05rem;
  border-radius: 20px;
  background: rgba(7, 11, 18, 0.18);
  backdrop-filter: blur(10px);
}

.auth-brand-lockup strong {
  display: block;
  margin-top: 0.35rem;
  font-family: var(--font-display);
  font-size: 1.15rem;
  color: #121821;
}

.auth-hero .brand-pill {
  background: rgba(18, 24, 33, 0.08);
  color: #1a212d;
  border-color: rgba(18, 24, 33, 0.12);
}

.auth-hero h1 {
  max-width: 10ch;
  margin: 1.2rem 0 0.75rem;
  color: #0f151e;
  font-size: clamp(3rem, 6vw, 5rem);
  line-height: 0.98;
}

.auth-hero p {
  max-width: 30rem;
  margin: 0;
  color: rgba(18, 24, 33, 0.78);
  font-size: 1.02rem;
}

.auth-hero-quote {
  display: grid;
  gap: 0.55rem;
  max-width: 22rem;
  margin-top: 2rem;
}

.auth-hero-quote strong {
  color: #ffffff;
  font-size: clamp(2rem, 4vw, 3.3rem);
  line-height: 1.02;
}

.auth-hero-quote span {
  color: rgba(255, 255, 255, 0.76);
  font-size: 1.02rem;
}

.hero-metrics {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.85rem;
}

.metric-card {
  padding: 1rem 1.05rem;
  border-radius: 22px;
  background: rgba(11, 15, 23, 0.54);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.metric-card strong {
  display: block;
  margin-bottom: 0.25rem;
  color: #f8fbff;
  font-family: var(--font-display);
}

.metric-card span {
  color: rgba(255, 255, 255, 0.72);
  font-size: 0.92rem;
}

.auth-form-panel {
  display: grid;
  align-content: center;
  gap: 1.4rem;
  padding: 2.2rem;
}

.auth-form-head h2 {
  margin: 0.2rem 0 0.55rem;
  font-size: clamp(2.15rem, 4vw, 3rem);
}

.auth-form-head p {
  margin: 0;
  color: var(--text-soft);
  max-width: 28rem;
}

.auth-form-panel .stack-form {
  gap: 1.05rem;
}

.auth-form-panel label span {
  color: rgba(245, 247, 250, 0.8);
}

.auth-form-panel .primary-button {
  margin-top: 0.5rem;
}

.auth-help-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.9rem;
}

.auth-help-grid > div {
  padding: 1rem 1.05rem;
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.04);
}

.auth-help-grid strong {
  display: block;
  margin-bottom: 0.3rem;
}

.auth-help-grid p {
  margin: 0;
  color: var(--text-soft);
  font-size: 0.94rem;
}

.student-hero-panel {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(280px, 0.75fr);
  gap: 1.15rem;
  align-items: end;
  margin-bottom: 1.2rem;
  padding: 1.6rem;
  background:
    radial-gradient(circle at top right, rgba(232, 255, 47, 0.16), transparent 22%),
    linear-gradient(180deg, rgba(18, 24, 36, 0.98), rgba(14, 19, 30, 0.94));
}

.student-hero-copy h3 {
  margin: 0.3rem 0 0.65rem;
  font-size: clamp(2rem, 4vw, 3.1rem);
  line-height: 1.02;
}

.student-hero-copy > p:last-of-type {
  margin: 0;
  max-width: 42rem;
  color: var(--text-soft);
  font-size: 1rem;
}

.student-hero-pills {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-top: 1.2rem;
}

.student-hero-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.75rem;
  padding: 0.65rem 1rem;
  border-radius: 999px;
  font-size: 0.92rem;
  font-weight: 700;
}

.student-hero-actions {
  display: grid;
  gap: 0.8rem;
  align-self: stretch;
}

.student-hero-actions > * {
  width: 100%;
}

.student-mobile-hub {
  background: linear-gradient(180deg, rgba(20, 26, 38, 0.96), rgba(14, 19, 30, 0.94));
}

.student-link-chip {
  min-height: 3.5rem;
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.05);
  color: #f5f7fa;
}

.student-workout-panel {
  background:
    radial-gradient(circle at top right, rgba(232, 255, 47, 0.09), transparent 20%),
    linear-gradient(180deg, rgba(17, 23, 35, 0.98), rgba(13, 19, 30, 0.94));
}

.student-workout-card {
  padding: 1.2rem;
  border-radius: 24px;
}

.student-workout-card .workout-head h4 {
  font-size: 1.22rem;
}

.student-workout-card .workout-head p {
  max-width: 40rem;
}

.student-section-card {
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(255, 255, 255, 0.08);
}

.student-section-card.student-section-card-accent {
  background: linear-gradient(180deg, rgba(232, 255, 47, 0.08), rgba(255, 255, 255, 0.03));
  border-color: rgba(232, 255, 47, 0.18);
}

.student-section-card summary {
  padding: 1rem 1.1rem;
  background: rgba(255, 255, 255, 0.03);
}

.student-section-body {
  padding: 0 1.1rem 1.1rem;
}

.student-submit-bar {
  position: sticky;
  bottom: -0.2rem;
  padding-top: 1rem;
  background: linear-gradient(180deg, rgba(15, 21, 33, 0), rgba(15, 21, 33, 0.92) 34%, rgba(15, 21, 33, 1) 100%);
}

.student-submit-bar .primary-button {
  width: 100%;
}

.student-drawer-panel,
.trainer-drawer-panel,
.workout-drawer-panel {
  background: linear-gradient(180deg, rgba(12, 17, 27, 0.98), rgba(9, 13, 21, 0.98));
  border-left: 1px solid rgba(255, 255, 255, 0.08);
}

.student-drawer-header,
.trainer-drawer-header,
.workout-drawer-header {
  padding-bottom: 0.9rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.student-drawer-body,
.trainer-drawer-body,
.workout-drawer-body {
  padding-top: 0.3rem;
}

.student-drawer-body .message-card,
.trainer-drawer-body .message-card {
  border-radius: 20px;
}

.stats-grid.two-up {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.stat-card {
  background: linear-gradient(180deg, rgba(17, 23, 35, 0.98), rgba(12, 17, 27, 0.92));
}

.profile-summary-panel,
.messages-summary-panel {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
  gap: 1rem;
  align-items: center;
  margin-bottom: 1.2rem;
}

.profile-summary-copy h3 {
  margin: 0.2rem 0 0.55rem;
  font-size: clamp(1.8rem, 3vw, 2.6rem);
}

.profile-summary-copy p:last-child {
  margin: 0;
  color: var(--text-soft);
}

.profile-summary-badges {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.profile-shell .panel,
.messages-shell .panel {
  min-height: 100%;
}

.profile-main-panel form,
.profile-security-panel form,
.message-compose-panel form {
  gap: 1.1rem;
}

.message-list-panel .stack-list {
  gap: 0.85rem;
}

.message-list-panel .message-card,
.message-compose-panel,
.profile-main-panel,
.profile-security-panel {
  border-radius: 24px;
}

.message-card strong {
  color: var(--text);
}

.message-card p,
.message-card small {
  color: var(--text-soft);
}

label span {
  color: rgba(245, 247, 250, 0.72);
}

.mobile-bottom-nav {
  background: rgba(10, 15, 24, 0.94);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 -16px 40px rgba(0, 0, 0, 0.34);
}

.mobile-bottom-link {
  border-radius: 18px;
}

.mobile-bottom-link.is-active,
.mobile-bottom-link-button:hover {
  background: rgba(232, 255, 47, 0.1);
}

@media (max-width: 1180px) {
  .auth-card-grid,
  .student-hero-panel,
  .profile-summary-panel,
  .messages-summary-panel {
    grid-template-columns: 1fr;
  }

  .profile-summary-badges {
    justify-content: flex-start;
  }
}

@media (max-width: 960px) {
  .app-shell {
    background: linear-gradient(180deg, rgba(10, 15, 24, 0.98), rgba(11, 16, 26, 0.98));
  }

  .sidebar {
    background:
      radial-gradient(circle at top left, rgba(232, 255, 47, 0.08), transparent 26%),
      linear-gradient(180deg, rgba(12, 16, 25, 0.99), rgba(9, 13, 21, 0.99));
  }

  .topbar {
    position: sticky;
    top: 0;
    z-index: 20;
    padding-top: 1rem;
    background: linear-gradient(180deg, rgba(10, 15, 24, 0.98), rgba(10, 15, 24, 0.82), transparent);
    backdrop-filter: blur(10px);
  }
}

@media (max-width: 720px) {
  .main-content,
  .auth-shell,
  .sidebar {
    padding: 1rem;
  }

  .topbar h2 {
    font-size: 2rem;
  }

  .auth-hero,
  .auth-form-panel {
    min-height: auto;
  }

  .auth-hero {
    padding: 1.4rem;
    gap: 1.4rem;
  }

  .auth-hero h1 {
    max-width: none;
    font-size: 2.4rem;
  }

  .auth-hero-quote strong {
    font-size: 2rem;
  }

  .hero-metrics {
    grid-template-columns: 1fr;
  }

  .auth-form-panel {
    padding: 1.4rem;
  }

  .auth-help-grid {
    grid-template-columns: 1fr;
  }

  .student-hero-panel {
    padding: 1.2rem;
  }

  .student-hero-copy h3 {
    font-size: 2rem;
  }

  .student-hero-actions,
  .student-hero-actions > * {
    width: 100%;
  }

  .stats-grid.two-up,
  .student-link-grid {
    grid-template-columns: 1fr;
  }

  .student-mobile-hub {
    display: block;
  }

  .student-drawer-trigger-row {
    display: none;
  }

  body.has-student-nav .main-content {
    padding-bottom: 7rem;
  }

  .mobile-bottom-nav {
    display: grid;
  }

  .profile-summary-panel,
  .messages-summary-panel {
    padding: 1.2rem;
  }
}

/* Phase 2: trainer operational polish */
.trainer-overview-panel {
  display: grid;
  grid-template-columns: minmax(0, 1.18fr) minmax(280px, 0.82fr);
  gap: 1rem;
  align-items: stretch;
  margin-bottom: 1.2rem;
  background:
    radial-gradient(circle at top right, rgba(232, 255, 47, 0.06), transparent 22%),
    radial-gradient(circle at left center, rgba(73, 132, 255, 0.09), transparent 24%),
    linear-gradient(180deg, rgba(16, 22, 34, 0.98), rgba(11, 16, 26, 0.94));
  border-color: rgba(255, 255, 255, 0.08);
}

.trainer-overview-copy {
  display: grid;
  gap: 0.9rem;
  align-content: start;
}

.trainer-overview-copy h3 {
  margin: 0.15rem 0 0;
  font-size: clamp(1.9rem, 3vw, 2.7rem);
}

.trainer-overview-copy > p:last-of-type {
  margin: 0;
  max-width: 42rem;
  color: var(--text-soft);
  font-size: 1rem;
}

.trainer-overview-actions {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-top: 0.2rem;
}

.trainer-overview-actions > * {
  flex: 0 0 auto;
}

.trainer-overview-aside {
  display: grid;
  gap: 0.9rem;
}

.trainer-overview-metric {
  display: grid;
  gap: 0.35rem;
  padding: 1rem 1.05rem;
  border-radius: 22px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.04);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
}

.trainer-overview-metric strong {
  color: var(--text);
  font-size: 0.92rem;
}

.trainer-overview-metric span {
  color: var(--text);
  font-size: 1.15rem;
  font-weight: 700;
  line-height: 1.3;
}

.trainer-overview-metric small {
  color: var(--text-soft);
}

.trainer-stats-grid .stat-card {
  padding: 1.05rem 1.1rem;
  border-radius: 24px;
  border-color: rgba(255, 255, 255, 0.08);
}

.trainer-stats-grid .stat-card span {
  color: rgba(245, 247, 250, 0.72);
}

.trainer-stats-grid .stat-card strong {
  font-size: clamp(1.8rem, 3vw, 2.35rem);
}

.trainer-dashboard-hub,
.trainer-workout-hub,
.trainer-workout-list-panel,
.trainer-exercise-list-panel,
.trainer-exercise-form-panel,
.trainer-student-list-panel,
.trainer-student-form-panel,
.admin-dashboard-hub,
.admin-dashboard-list-panel,
.admin-dashboard-feed-panel,
.admin-user-list-panel,
.admin-user-form-panel {
  border-color: rgba(255, 255, 255, 0.08);
  background:
    radial-gradient(circle at top right, rgba(232, 255, 47, 0.04), transparent 18%),
    linear-gradient(180deg, rgba(16, 22, 34, 0.98), rgba(11, 16, 26, 0.94));
}

.trainer-drawer-trigger-row,
.trainer-workout-trigger-row {
  margin-top: 1rem;
}

.trainer-hub-summary {
  display: grid;
  gap: 0.8rem;
  padding: 1.15rem;
  border-radius: 24px;
  border: 1px dashed rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.03);
}

.trainer-hub-summary strong {
  color: var(--text);
  font-size: 1rem;
}

.trainer-hub-summary p {
  margin: 0;
  color: var(--text-soft);
}

.trainer-summary-pills {
  display: flex;
  gap: 0.7rem;
  flex-wrap: wrap;
}

.trainer-hub-stack .alert-card,
.trainer-assignment-glance {
  border-radius: 22px;
  border-color: rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.04);
}

.trainer-workout-card,
.trainer-exercise-card {
  padding: 1.2rem;
  border-radius: 26px;
  border-color: rgba(255, 255, 255, 0.08);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.045), rgba(255, 255, 255, 0.025));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
}

.trainer-workout-card.is-editing {
  border-color: rgba(232, 255, 47, 0.28);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.03),
    0 0 0 1px rgba(232, 255, 47, 0.08);
}

.trainer-workout-card .workout-head,
.trainer-exercise-card .workout-head {
  align-items: flex-start;
}

.trainer-workout-card .workout-head h4,
.trainer-exercise-card .workout-head h4 {
  font-size: 1.2rem;
}

.trainer-workout-card .workout-head p,
.trainer-exercise-card .workout-head p {
  max-width: 42rem;
  color: var(--text-soft);
}

.trainer-workout-card .card-actions,
.trainer-exercise-card .card-actions {
  margin-top: 1rem;
}

.trainer-section-card,
.exercise-row,
.assignment-item,
.exercise-load-item,
.history-note-card,
.history-feedback-card,
.history-load-item {
  border-color: rgba(255, 255, 255, 0.08);
}

.trainer-section-card {
  background: rgba(255, 255, 255, 0.04);
}

.trainer-section-card summary,
.exercise-row-head {
  background: rgba(255, 255, 255, 0.03);
}

.assignment-item,
.exercise-load-item {
  background: rgba(255, 255, 255, 0.04);
}

.trainer-exercise-shell > .panel {
  min-height: 100%;
}

.trainer-student-shell > .panel,
.admin-dashboard-shell > .panel,
.admin-user-shell > .panel {
  min-height: 100%;
}

.trainer-exercise-shell .stack-list {
  gap: 0.95rem;
}

.trainer-search-form {
  gap: 0.75rem;
  flex-wrap: wrap;
}

.trainer-search-form input[type="search"] {
  min-width: min(22rem, 100%);
}

.trainer-exercise-card .exercise-meta-grid {
  margin-top: 1rem;
  padding: 0.9rem 0.95rem;
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.03);
}

.trainer-exercise-card .exercise-instructions {
  margin: 0.95rem 0 0;
  color: var(--text-soft);
}

.trainer-exercise-form-panel form {
  gap: 1rem;
}

.trainer-student-form-panel form,
.admin-user-form-panel form {
  gap: 1rem;
}

.trainer-exercise-form-panel small {
  color: var(--text-soft);
}

.trainer-student-form-panel small,
.admin-user-form-panel small {
  color: var(--text-soft);
}

.trainer-management-table {
  border-radius: 22px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.03);
  overflow: hidden;
}

.trainer-management-table table thead th {
  background: rgba(255, 255, 255, 0.03);
}

.trainer-management-table table tbody tr:hover {
  background: rgba(255, 255, 255, 0.025);
}

.trainer-student-form-panel .empty-state,
.admin-dashboard-hub .empty-state,
.admin-user-form-panel .empty-state {
  background: rgba(255, 255, 255, 0.03);
  border-style: solid;
  border-color: rgba(255, 255, 255, 0.08);
}

.admin-user-form-panel .form-section-title {
  margin-top: 0.4rem;
  padding-top: 0.9rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  color: rgba(245, 247, 250, 0.72);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 0.78rem;
  font-weight: 700;
}

.trainer-student-list-panel .table-actions,
.admin-user-list-panel .table-actions {
  align-items: center;
}

.admin-dashboard-feed-panel .message-card {
  border-radius: 22px;
  border-color: rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.04);
}

.messages-summary-panel-desktop {
  background:
    radial-gradient(circle at top right, rgba(232, 255, 47, 0.06), transparent 20%),
    radial-gradient(circle at left center, rgba(73, 132, 255, 0.08), transparent 22%),
    linear-gradient(180deg, rgba(16, 22, 34, 0.98), rgba(11, 16, 26, 0.94));
  border-color: rgba(255, 255, 255, 0.08);
}

.messages-shell-desktop .panel {
  border-color: rgba(255, 255, 255, 0.08);
  background:
    radial-gradient(circle at top right, rgba(232, 255, 47, 0.04), transparent 18%),
    linear-gradient(180deg, rgba(16, 22, 34, 0.98), rgba(11, 16, 26, 0.94));
}

.message-contact-panel {
  margin-bottom: 1.2rem;
  border-color: rgba(255, 255, 255, 0.08);
  background:
    radial-gradient(circle at top right, rgba(232, 255, 47, 0.04), transparent 18%),
    linear-gradient(180deg, rgba(16, 22, 34, 0.98), rgba(11, 16, 26, 0.94));
}

.message-contact-grid {
  display: grid;
  gap: 0.9rem;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.message-contact-item {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  min-width: 0;
  padding: 0.95rem 1rem;
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.04);
}

.message-contact-item .entity-identity-copy strong {
  color: var(--text);
}

.message-contact-item .entity-identity-copy small {
  color: var(--text-soft);
}

.message-list-panel-desktop .stack-list {
  gap: 1rem;
}

.message-list-panel-desktop .message-card {
  padding: 1rem 1.05rem;
  border-radius: 22px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.02);
}

.message-card-head,
.trainer-history-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
}

.message-card-head {
  margin-bottom: 0.75rem;
}

.message-card-head .entity-identity-copy strong,
.trainer-history-head .entity-identity-copy strong {
  color: var(--text);
}

.message-card-head .entity-identity-copy small,
.trainer-history-head .entity-identity-copy p {
  margin: 0;
  color: var(--text-soft);
}

.trainer-history-head .badge-row {
  justify-content: flex-end;
}

.message-compose-panel-desktop {
  position: sticky;
  top: 1.2rem;
  align-self: start;
}

.message-compose-hint {
  margin-bottom: 1rem;
}

@media (max-width: 1180px) {
  .trainer-overview-panel {
    grid-template-columns: 1fr;
  }

  .message-compose-panel-desktop {
    position: static;
  }

  .message-card-head,
  .trainer-history-head {
    flex-direction: column;
  }

  .trainer-history-head .badge-row {
    justify-content: flex-start;
  }
}

@media (max-width: 720px) {
  .trainer-overview-panel,
  .trainer-dashboard-hub,
  .trainer-workout-hub,
  .trainer-workout-list-panel,
  .trainer-exercise-list-panel,
  .trainer-exercise-form-panel,
  .trainer-student-list-panel,
  .trainer-student-form-panel,
  .admin-dashboard-hub,
  .admin-dashboard-list-panel,
  .admin-dashboard-feed-panel,
  .admin-user-list-panel,
  .admin-user-form-panel {
    padding: 1.2rem;
  }

  .trainer-overview-copy h3 {
    font-size: 2rem;
  }

  .trainer-overview-actions,
  .trainer-overview-actions > * {
    width: 100%;
  }

  .trainer-drawer-trigger-row,
  .trainer-workout-trigger-row {
    display: grid;
    gap: 0.75rem;
  }

  .trainer-drawer-trigger-row > *,
  .trainer-workout-trigger-row > * {
    width: 100%;
  }

  .trainer-search-form {
    width: 100%;
  }

  .trainer-search-form input[type="search"],
  .trainer-search-form button {
    width: 100%;
  }
}

/* Phase 2.5: profile desktop + micro polish */
input:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: rgba(232, 255, 47, 0.34);
  box-shadow:
    0 0 0 1px rgba(232, 255, 47, 0.08),
    0 0 0 4px rgba(232, 255, 47, 0.06);
}

.primary-button:focus-visible,
.secondary-button:focus-visible,
.ghost-button:focus-visible,
.danger-button:focus-visible,
.nav-link:focus-visible,
.mobile-bottom-link:focus-visible,
.mobile-bottom-link-button:focus-visible {
  outline: none;
  box-shadow:
    0 0 0 1px rgba(232, 255, 47, 0.22),
    0 0 0 4px rgba(232, 255, 47, 0.08);
}

.card-actions,
.table-actions,
.badge-row,
.inline-form,
.inline-action {
  row-gap: 0.7rem;
}

.panel + .panel {
  margin-top: 0;
}

.table-wrap {
  border-radius: 22px;
}

table tbody tr {
  transition: background 0.18s ease;
}

table tbody tr:hover {
  background: rgba(255, 255, 255, 0.022);
}

.profile-summary-panel-desktop {
  background:
    radial-gradient(circle at top right, rgba(232, 255, 47, 0.06), transparent 20%),
    radial-gradient(circle at left center, rgba(73, 132, 255, 0.08), transparent 24%),
    linear-gradient(180deg, rgba(16, 22, 34, 0.98), rgba(11, 16, 26, 0.94));
  border-color: rgba(255, 255, 255, 0.08);
}

.profile-summary-aside {
  display: grid;
  gap: 0.85rem;
}

.profile-summary-metric {
  display: grid;
  gap: 0.35rem;
  padding: 1rem 1.05rem;
  border-radius: 22px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.04);
}

.profile-summary-metric strong {
  color: var(--text);
  font-size: 0.92rem;
}

.profile-summary-metric span {
  color: var(--text);
  font-size: 1.05rem;
  font-weight: 700;
  line-height: 1.35;
}

.profile-summary-metric small {
  color: var(--text-soft);
}

.profile-main-panel,
.profile-security-panel {
  border-color: rgba(255, 255, 255, 0.08);
  background:
    radial-gradient(circle at top right, rgba(232, 255, 47, 0.04), transparent 18%),
    linear-gradient(180deg, rgba(16, 22, 34, 0.98), rgba(11, 16, 26, 0.94));
}

.profile-profile-form,
.profile-security-form {
  gap: 1rem;
}

.profile-inline-note {
  background: rgba(255, 255, 255, 0.03);
  border-style: solid;
  border-color: rgba(255, 255, 255, 0.08);
}

.profile-main-panel .form-section-title,
.profile-security-panel .form-section-title {
  margin-top: 0.4rem;
  padding-top: 0.9rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  color: rgba(245, 247, 250, 0.72);
  font-size: 0.78rem;
}

.profile-photo-card {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 1.1rem;
  align-items: center;
  padding: 1rem 1.05rem;
  border-radius: 22px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.04);
}

.profile-photo-copy {
  display: grid;
  gap: 0.65rem;
}

.profile-photo-copy strong {
  color: var(--text);
  font-size: 1rem;
}

.profile-photo-copy p {
  margin: 0;
  color: var(--text-soft);
  line-height: 1.6;
}

.profile-photo-card.compact {
  grid-template-columns: auto minmax(0, 1fr);
}

.profile-file-field {
  display: grid;
  gap: 0.45rem;
}

.profile-file-field input[type="file"] {
  padding: 0.85rem 0.95rem;
}

.checkbox-inline {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  color: var(--text-soft);
  font-size: 0.95rem;
}

.checkbox-inline input[type="checkbox"] {
  width: 1rem;
  height: 1rem;
  margin: 0;
}

.entity-identity {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  min-width: 0;
}

.entity-identity-copy {
  display: grid;
  gap: 0.18rem;
  min-width: 0;
}

.entity-identity-copy strong,
.entity-identity-copy small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.profile-form-actions {
  margin-top: 0.25rem;
}

.profile-form-actions > .primary-button,
.profile-form-actions > .secondary-button {
  min-width: 12rem;
}

@media (max-width: 960px) {
  .profile-summary-aside {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 860px) {
  .responsive-table tr {
    padding: 1rem 1rem 0.95rem;
    border-radius: 20px;
    background:
      linear-gradient(180deg, rgba(255, 255, 255, 0.045), rgba(255, 255, 255, 0.025));
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.025);
  }

  .responsive-table td {
    padding: 0.7rem 0;
  }

  .responsive-table td::before {
    color: var(--text-soft);
  }

  .table-actions {
    justify-content: flex-start;
  }
}

@media (max-width: 720px) {
  .profile-summary-panel-desktop,
  .profile-main-panel,
  .profile-security-panel {
    padding: 1.2rem;
  }

  .profile-photo-card {
    grid-template-columns: 1fr;
    justify-items: flex-start;
  }

  .profile-form-actions,
  .profile-form-actions > * {
    width: 100%;
  }
}

/* Phase 2.6: shared copy and visual consistency */
.brand-copy p,
.trainer-overview-copy > p:last-of-type,
.profile-summary-copy p:last-child,
.student-hero-copy > p:last-of-type,
.messages-summary-panel .profile-summary-copy p:last-child {
  line-height: 1.65;
}

.student-hero-pill,
.badge,
.trainer-overview-metric,
.profile-summary-metric {
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
}

.trainer-overview-copy h3,
.profile-summary-copy h3,
.student-hero-copy h3 {
  letter-spacing: -0.03em;
}

/* Phase 2.7: treino de hoje */
.student-plan-stack {
  gap: 1.35rem;
}

.student-plan-group {
  display: grid;
  gap: 1rem;
}

.student-plan-note {
  border: 1px solid rgba(232, 255, 47, 0.16);
  background:
    linear-gradient(180deg, rgba(232, 255, 47, 0.08), rgba(255, 255, 255, 0.02)),
    rgba(13, 18, 24, 0.92);
  color: var(--text-soft);
}

.field-hint {
  display: block;
  margin-top: 0.55rem;
  color: var(--text-soft);
  font-size: 0.78rem;
  line-height: 1.5;
}

.trainer-history-card.is-pending {
  border-color: rgba(232, 255, 47, 0.18);
  background:
    linear-gradient(180deg, rgba(232, 255, 47, 0.08), rgba(255, 255, 255, 0.02)),
    rgba(13, 18, 24, 0.94);
}

.trainer-history-card.is-reviewed {
  border-color: rgba(255, 255, 255, 0.08);
}

.trainer-queue-glance {
  border-color: rgba(232, 255, 47, 0.18);
}

.trainer-workout-card.is-assignment-focus {
  border-color: rgba(232, 255, 47, 0.26);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.03),
    0 0 0 1px rgba(232, 255, 47, 0.08);
}

.trainer-assignment-context {
  margin-bottom: 1rem;
  border-color: rgba(232, 255, 47, 0.18);
}

.trainer-safe-edit-note {
  margin-bottom: 1rem;
  border-color: rgba(255, 196, 95, 0.24);
  background:
    linear-gradient(180deg, rgba(255, 196, 95, 0.08), rgba(255, 255, 255, 0.02)),
    rgba(13, 18, 24, 0.94);
}

@media (max-width: 720px) {
  .student-plan-group {
    gap: 0.8rem;
  }
}
