:root {
  --bg: #f6f3ee;
  --surface: #fffdf8;
  --surface-2: #f0eee7;
  --ink: #18211f;
  --muted: #66736f;
  --line: #ddd8cf;
  --brand: #0b76b8;
  --brand-dark: #074a75;
  --blue: #173957;
  --coral: #d6b047;
  --gold: #d6b047;
  --good: #0b8c5a;
  --warn: #c87700;
  --shadow: 0 16px 36px rgba(24, 33, 31, 0.11);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at 16% 0%, rgba(13, 124, 102, 0.16), transparent 32rem),
    linear-gradient(135deg, rgba(36, 95, 159, 0.08), transparent 34%),
    var(--bg);
  color: var(--ink);
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

.login-page {
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(320px, 1.05fr) minmax(320px, 0.95fr);
}

.login-visual {
  min-height: 100vh;
  padding: 42px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  background:
    linear-gradient(90deg, rgba(0, 0, 0, 0.82), rgba(0, 0, 0, 0.42) 46%, rgba(0, 0, 0, 0.1)),
    url("assets/paulo-hero.jpeg");
  background-size: cover;
  background-position: center top;
  color: #fffdf8;
}

.brand-mark {
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 800;
  font-size: 1.05rem;
}

.brand-logo {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: var(--brand);
  color: white;
  font-weight: 900;
}

.login-copy {
  max-width: 650px;
}

.login-copy h1 {
  margin: 0 0 16px;
  max-width: 760px;
  font-size: clamp(2.7rem, 7vw, 6.2rem);
  line-height: 0.9;
  letter-spacing: 0;
}

.login-copy p {
  max-width: 560px;
  color: rgba(255, 253, 248, 0.84);
  font-size: 1.08rem;
  line-height: 1.7;
}

.login-panel {
  min-height: 100vh;
  padding: 42px;
  display: grid;
  align-content: center;
  background: rgba(255, 253, 248, 0.88);
  backdrop-filter: blur(16px);
}

.auth-box {
  width: min(100%, 480px);
  margin: 0 auto;
}

.trainer-card {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 22px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.trainer-card img {
  width: 74px;
  height: 74px;
  border-radius: 8px;
  object-fit: cover;
  object-position: center 18%;
}

.trainer-card strong,
.trainer-card span {
  display: block;
}

.trainer-card strong {
  font-size: 1.15rem;
}

.trainer-card span {
  color: var(--muted);
  font-weight: 800;
  margin-top: 4px;
}

.auth-box h2,
.section-title h2 {
  margin: 0;
  font-size: 2rem;
}

.auth-box p,
.section-title p {
  margin: 8px 0 0;
  color: var(--muted);
  line-height: 1.55;
}

.quick-logins {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin: 24px 0;
}

.chip-button,
.ghost-button,
.primary-button,
.icon-button {
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink);
  border-radius: 8px;
  min-height: 42px;
  padding: 0 14px;
  font-weight: 700;
}

.chip-button:hover,
.ghost-button:hover,
.icon-button:hover {
  border-color: var(--brand);
}

.primary-button {
  border: 0;
  background: var(--brand);
  color: white;
}

.primary-button:hover {
  background: var(--brand-dark);
}

.icon-button {
  width: 42px;
  padding: 0;
  display: grid;
  place-items: center;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.form-grid .wide {
  grid-column: 1 / -1;
}

.form-section-title {
  margin-top: 10px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(13, 124, 102, 0.08);
  display: grid;
  gap: 4px;
}

.form-section-title span {
  color: var(--muted);
  font-size: 0.88rem;
}

.preview-mode-banner {
  margin-bottom: 16px;
  padding: 12px 14px;
  border: 1px solid rgba(22, 137, 232, 0.2);
  border-radius: 8px;
  background: rgba(22, 137, 232, 0.08);
  color: #165c8b;
  font-size: 0.9rem;
  font-weight: 700;
}

.weekday-selector {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.weekday-chip {
  position: relative;
  display: inline-flex;
  min-height: 40px;
  margin: 0;
}

.weekday-chip input {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}

.weekday-chip span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 0 14px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--muted);
  font-size: 0.84rem;
  font-weight: 800;
  transition: 0.2s ease;
}

.weekday-chip input:checked + span {
  border-color: rgba(22, 137, 232, 0.45);
  background: rgba(22, 137, 232, 0.12);
  color: var(--brand-dark);
}

label {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 0.88rem;
  font-weight: 700;
}

input,
select,
textarea {
  width: 100%;
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--ink);
  padding: 10px 12px;
  outline: none;
}

textarea {
  min-height: 96px;
  resize: vertical;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(13, 124, 102, 0.13);
}

.error-text {
  min-height: 22px;
  color: #a2291f;
  font-weight: 700;
}

.demo-note {
  margin-top: 18px;
  color: var(--muted);
  font-size: 0.9rem;
}

.app-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
}

.sidebar {
  min-height: 100vh;
  padding: 24px 18px;
  background: #18211f;
  color: white;
  position: sticky;
  top: 0;
  align-self: start;
}

.sidebar .brand-logo {
  background: #fffdf8;
  color: var(--brand-dark);
}

.sidebar small {
  color: rgba(255, 255, 255, 0.6);
}

.nav {
  display: grid;
  gap: 8px;
  margin: 32px 0;
}

.nav button {
  min-height: 46px;
  border: 0;
  border-radius: 8px;
  color: rgba(255, 255, 255, 0.76);
  background: transparent;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 12px;
  font-weight: 800;
  text-align: left;
}

.nav button.active,
.nav button:hover {
  background: rgba(255, 255, 255, 0.1);
  color: white;
}

.sidebar-footer {
  margin-top: auto;
  display: grid;
  gap: 12px;
}

.sidebar-footer .ghost-button {
  background: transparent;
  color: white;
}

.main {
  padding: 28px;
}

.topbar {
  min-height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 20px;
}

.profile-pill {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 253, 248, 0.7);
}

.coach-banner {
  min-height: 220px;
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: 22px;
  align-items: center;
  border-radius: 8px;
  background: #18211f;
  color: white;
  overflow: hidden;
  box-shadow: var(--shadow);
}

.coach-banner img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 12%;
}

.coach-banner div {
  padding: 26px 28px 26px 0;
}

.coach-banner span {
  color: var(--gold);
  font-weight: 900;
  text-transform: uppercase;
  font-size: 0.78rem;
}

.coach-banner h3 {
  margin: 8px 0;
  font-size: clamp(2rem, 4vw, 3.6rem);
  line-height: 0.95;
}

.coach-banner p {
  margin: 0;
  max-width: 620px;
  color: rgba(255, 255, 255, 0.78);
  line-height: 1.65;
}

.avatar {
  width: 40px;
  height: 40px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  background: var(--blue);
  color: white;
  font-weight: 900;
}

.photo-avatar {
  object-fit: cover;
  object-position: center 18%;
}

.view {
  display: grid;
  gap: 18px;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(160px, 1fr));
  gap: 14px;
}

.stat {
  padding: 18px;
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
  min-height: 126px;
  display: grid;
  align-content: space-between;
}

.stat span {
  color: var(--muted);
  font-weight: 800;
}

.stat strong {
  font-size: 2.1rem;
  line-height: 1;
}

.stat small {
  color: var(--good);
  font-weight: 800;
}

.content-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(320px, 0.8fr);
  gap: 18px;
}

.panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 253, 248, 0.78);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.panel-header {
  min-height: 64px;
  padding: 16px 18px;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.panel-header h3 {
  margin: 0;
  font-size: 1.05rem;
}

.panel-body {
  padding: 18px;
}

.table-wrap {
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 690px;
}

th,
td {
  padding: 14px 12px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: middle;
}

th {
  color: var(--muted);
  font-size: 0.82rem;
  text-transform: uppercase;
}

.student-cell {
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 900;
}

.status {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 900;
}

.status.active {
  background: rgba(11, 140, 90, 0.13);
  color: var(--good);
}

.status.attention {
  background: rgba(200, 119, 0, 0.14);
  color: var(--warn);
}

.status.paused {
  background: rgba(102, 115, 111, 0.14);
  color: #4d5956;
}

.progress-bar {
  height: 9px;
  background: var(--surface-2);
  border-radius: 99px;
  overflow: hidden;
}

.progress-bar span {
  display: block;
  height: 100%;
  width: var(--value);
  background: var(--brand);
  border-radius: inherit;
}

.chart {
  display: grid;
  gap: 16px;
}

.chart-row {
  display: grid;
  grid-template-columns: 78px minmax(0, 1fr) 48px;
  align-items: center;
  gap: 12px;
  color: var(--muted);
  font-weight: 800;
}

.chart-track {
  height: 28px;
  border-radius: 8px;
  background: var(--surface-2);
  overflow: hidden;
}

.chart-track span {
  display: block;
  height: 100%;
  width: var(--value);
  background: linear-gradient(90deg, var(--brand), var(--blue));
}

.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 14px;
}

.published-workouts-grid {
  align-content: start;
  max-height: min(1120px, calc(100vh - 210px));
  overflow-y: auto;
  padding-right: 8px;
}

.published-workouts-grid::-webkit-scrollbar {
  width: 10px;
}

.published-workouts-grid::-webkit-scrollbar-thumb {
  border-radius: 999px;
  background: rgba(18, 38, 61, 0.18);
}

.published-workouts-grid::-webkit-scrollbar-track {
  background: rgba(18, 38, 61, 0.05);
  border-radius: 999px;
}

.item-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  padding: 16px;
  display: grid;
  gap: 12px;
}

.item-card h4 {
  margin: 0;
}

.profile-summary {
  display: grid;
  gap: 16px;
  align-content: start;
}

.profile-summary img,
.profile-initials {
  width: 120px;
  height: 120px;
  border-radius: 8px;
}

.profile-summary img {
  object-fit: cover;
  object-position: center 18%;
}

.profile-initials {
  display: grid;
  place-items: center;
  background: var(--blue);
  color: white;
  font-size: 2.2rem;
  font-weight: 900;
}

.profile-summary h4 {
  margin: 0;
  font-size: 1.45rem;
}

.profile-summary p {
  margin: 6px 0 0;
  color: var(--muted);
}

.daily-workout {
  display: grid;
  gap: 14px;
}

.daily-workout h4,
.training-day-detail h4 {
  margin: 0;
  font-size: 1.2rem;
}

.daily-workout p,
.training-day-detail p {
  margin: 5px 0 0;
  color: var(--muted);
}

.daily-progress {
  height: 12px;
}

.check-item small {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-weight: 700;
}

.calendar-head {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) 42px;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}

.calendar-head strong {
  text-align: center;
  text-transform: capitalize;
}

.training-calendar {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 7px;
}

.training-calendar b {
  color: var(--muted);
  font-size: 0.78rem;
  text-align: center;
}

.training-calendar button,
.calendar-empty {
  aspect-ratio: 1;
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--ink);
  font-weight: 900;
}

.training-calendar button.trained {
  background: rgba(11, 118, 184, 0.12);
  border-color: rgba(11, 118, 184, 0.45);
  color: var(--brand-dark);
}

.training-calendar button.selected {
  background: var(--brand);
  border-color: var(--brand);
  color: white;
}

.training-day-detail {
  margin-top: 16px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-2);
}

.training-day-detail span {
  display: inline-flex;
  margin-top: 10px;
  min-height: 28px;
  align-items: center;
  padding: 0 10px;
  border-radius: 999px;
  background: rgba(11, 118, 184, 0.12);
  color: var(--brand-dark);
  font-weight: 900;
}

.comparison-controls {
  display: grid;
  grid-template-columns: repeat(4, minmax(150px, 1fr));
  gap: 12px;
  margin-bottom: 18px;
}

.comparison-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 220px;
  gap: 18px;
  align-items: stretch;
}

.comparison-chart {
  min-height: 300px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    linear-gradient(var(--surface-2) 1px, transparent 1px),
    linear-gradient(90deg, var(--surface-2) 1px, transparent 1px),
    var(--surface);
  background-size: 100% 25%, 20% 100%, auto;
  padding: 18px;
}

.comparison-chart svg {
  width: 100%;
  height: 210px;
  display: block;
}

.chart-labels {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(96px, 1fr));
  gap: 10px;
  padding-top: 12px;
}

.chart-labels span {
  min-width: 0;
  padding: 8px 10px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.78);
  border: 1px solid rgba(18, 38, 61, 0.08);
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
}

.chart-labels strong {
  display: block;
  margin-top: 3px;
  color: var(--ink);
  font-size: 0.9rem;
}

.comparison-summary {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-2);
  padding: 18px;
  display: grid;
  align-content: center;
  gap: 8px;
}

.comparison-summary span {
  color: var(--muted);
  font-weight: 900;
  text-transform: uppercase;
  font-size: 0.78rem;
}

.comparison-summary strong {
  font-size: 2.4rem;
  line-height: 1;
}

.comparison-summary p {
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
  font-weight: 700;
}

.assessment-dashboard {
  overflow: hidden;
  margin-top: 22px;
  border: 1px solid rgba(12, 30, 48, 0.12);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.assessment-shell-header {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: end;
  padding: 22px;
  color: #fff;
  background:
    linear-gradient(180deg, rgba(255,255,255,0.12), rgba(255,255,255,0)),
    #12263d;
}

.assessment-shell-header span {
  color: rgba(255, 255, 255, 0.68);
  font-size: 0.76rem;
  font-weight: 900;
  text-transform: uppercase;
}

.assessment-shell-header h3 {
  margin: 6px 0 4px;
  font-size: 1.6rem;
}

.assessment-shell-header p {
  margin: 0;
  color: rgba(255, 255, 255, 0.72);
  font-weight: 700;
}

.assessment-shell-header label {
  min-width: 240px;
  color: rgba(255, 255, 255, 0.78);
  font-size: 0.78rem;
  font-weight: 900;
}

.assessment-student-badge {
  display: grid;
  gap: 4px;
  justify-items: end;
  align-self: center;
  padding: 10px 14px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.08);
}

.assessment-student-badge strong {
  color: #fff;
  font-size: 1rem;
}

.assessment-student-badge span {
  color: rgba(255, 255, 255, 0.72);
  font-size: 0.78rem;
  font-weight: 800;
}

.assessment-shell-header select {
  margin-top: 6px;
}

.assessment-tabs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
  padding: 0 22px;
  background: #12263d;
}

.assessment-tabs button {
  min-height: 46px;
  border: 0;
  border-radius: 6px 6px 0 0;
  background: #f7f9fc;
  color: var(--ink);
  font-weight: 900;
  cursor: pointer;
}

.assessment-tabs button.active {
  background: #1689e8;
  color: #fff;
}

.assessment-content {
  padding: 22px;
  background: #f4f7fb;
}

.assessment-card-list {
  display: grid;
  gap: 12px;
}

.assessment-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 40px;
  gap: 10px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 14px;
}

.assessment-card strong,
.assessment-card span {
  display: block;
}

.assessment-card strong {
  color: var(--ink);
  font-size: 0.98rem;
}

.assessment-card span {
  margin-top: 2px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
}

.assessment-card .link-button {
  justify-self: start;
  grid-column: 1 / -1;
}

.link-button {
  border: 0;
  background: transparent;
  color: var(--brand-dark);
  font-weight: 900;
  cursor: pointer;
  padding: 0;
}

.comparison-controls.compact {
  grid-template-columns: repeat(3, minmax(150px, 1fr));
}

.workout-picker {
  margin-bottom: 18px;
}

.assessment-table-panel {
  margin-top: 18px;
  border-radius: 8px;
  background: #fff;
  padding: 14px;
  border: 1px solid var(--line);
}

.assessment-table-wrap {
  overflow-x: auto;
  border-radius: 8px;
  border: 1px solid var(--line);
}

.assessment-compare-table {
  min-width: 760px;
  border-collapse: collapse;
  background: #fff;
}

.assessment-compare-table th,
.assessment-compare-table td {
  white-space: nowrap;
  border-bottom: 1px solid var(--line);
  padding: 12px 14px;
  text-align: center;
}

.assessment-compare-table thead th {
  color: var(--brand-dark);
  font-size: 0.86rem;
  font-weight: 900;
}

.assessment-compare-table tbody th {
  position: sticky;
  left: 0;
  z-index: 1;
  background: #fff;
  color: var(--ink);
  text-align: left;
  font-size: 0.88rem;
}

.assessment-compare-table tbody td {
  color: var(--muted);
  font-weight: 800;
}

.assessment-info {
  margin: 14px 0;
  border-radius: 6px;
  background: #d8f0ff;
  color: #19719c;
  padding: 14px;
  text-align: center;
  font-weight: 800;
}

.assessment-date-buttons {
  display: grid;
  gap: 8px;
  margin-top: 10px;
}

.assessment-date-buttons button {
  min-height: 40px;
  border: 1px solid rgba(11, 118, 184, 0.45);
  border-radius: 6px;
  background: #fff;
  color: var(--brand-dark);
  font-weight: 900;
  cursor: pointer;
}

.assessment-graph-gallery {
  display: grid;
  gap: 18px;
  margin-top: 18px;
}

.assessment-graph-section {
  display: grid;
  gap: 12px;
}

.assessment-graph-section-title {
  color: #12263d;
  font-size: 1rem;
  font-weight: 900;
}

.assessment-graph-stack {
  display: grid;
  gap: 14px;
}

.assessment-metric-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 16px;
  box-shadow: 0 8px 24px rgba(14, 34, 58, 0.06);
}

.assessment-metric-card h4 {
  margin: 0;
  text-align: center;
  font-size: 1.08rem;
}

.assessment-unit-pill {
  display: block;
  width: fit-content;
  min-width: 66px;
  margin: 12px auto 14px;
  padding: 6px 14px;
  border-radius: 999px;
  background: #1da1f2;
  color: #fff;
  text-align: center;
  font-size: 0.78rem;
  font-weight: 900;
  text-transform: lowercase;
}

.metric-mini-chart {
  min-height: 250px;
}

.metric-mini-chart svg {
  height: 190px;
}

.assessment-metric-footer {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  margin-top: 10px;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 800;
}

.assessment-metric-footer strong {
  color: var(--ink);
  font-size: 1rem;
}

.evolution-card {
  align-content: start;
}

.card-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.card-title-row .icon-button {
  width: auto;
  min-width: 48px;
  padding: 0 10px;
  font-size: 0.78rem;
}

.measure-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.measure-grid.full {
  grid-template-columns: repeat(auto-fit, minmax(126px, 1fr));
}

.measure-grid div {
  min-height: 82px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-2);
  display: grid;
  align-content: center;
  gap: 4px;
}

.measure-grid span {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 900;
  text-transform: uppercase;
}

.measure-grid strong {
  font-size: 1.22rem;
}

.measure-grid small {
  color: var(--brand-dark);
  font-weight: 900;
}

.mini-trend {
  height: 72px;
  display: flex;
  align-items: end;
  gap: 8px;
  padding: 12px;
  border-radius: 8px;
  background: linear-gradient(180deg, rgba(36, 95, 159, 0.08), rgba(13, 124, 102, 0.1));
}

.mini-trend span {
  width: 100%;
  min-height: 14px;
  border-radius: 6px 6px 0 0;
  background: var(--brand);
}

.meta-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.meta-list span {
  min-height: 28px;
  display: inline-flex;
  align-items: center;
  padding: 0 9px;
  border-radius: 999px;
  background: var(--surface-2);
  color: var(--muted);
  font-weight: 800;
  font-size: 0.82rem;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  background: rgba(11, 118, 184, 0.12);
  color: var(--brand-dark);
  font-size: 0.78rem;
  font-weight: 900;
}

.status-pill.good {
  background: rgba(11, 140, 90, 0.14);
  color: var(--good);
}

.status-pill.watch {
  background: rgba(200, 119, 0, 0.14);
  color: var(--warn);
}

.status-pill.risk {
  background: rgba(170, 44, 44, 0.12);
  color: #9c2f2f;
}

.compact-list {
  display: grid;
  gap: 8px;
  margin: 0;
  padding-left: 18px;
  color: var(--muted);
}

.exercise-list {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.exercise-list li {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
}

.exercise-list li > div {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.exercise-list li span {
  font-weight: 800;
  line-height: 1.35;
}

.exercise-list li strong {
  color: var(--ink);
  line-height: 1.35;
}

.exercise-list li:last-child {
  border-bottom: 0;
}

.exercise-media-stack {
  display: grid;
  gap: 10px;
}

.exercise-media {
  margin-top: 10px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-2);
}

.exercise-media.compact {
  max-width: 220px;
}

.exercise-media img,
.exercise-media video {
  display: block;
  width: 100%;
  max-height: 180px;
}

.exercise-media img {
  object-fit: cover;
}

.exercise-media video {
  object-fit: contain;
  background: #111;
}

.media-link {
  display: inline-flex;
  margin-top: 10px;
  color: var(--brand-dark);
  font-weight: 900;
  text-decoration: none;
}

.editable-exercise-list {
  gap: 12px;
}

.editable-exercise-row {
  grid-template-columns: minmax(0, 1fr) minmax(138px, 170px);
  align-items: center;
  gap: 14px;
  padding: 10px 0;
}

.editable-exercise-row > div {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.student-load-editor {
  display: grid;
  gap: 6px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-2);
}

.student-load-editor small {
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 900;
  text-transform: uppercase;
}

.student-load-editor input {
  width: 100%;
  min-height: 40px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-2);
  color: var(--ink);
  font-weight: 700;
}

.habit-stack {
  display: grid;
  gap: 14px;
}

.risk-card.risk {
  border-color: rgba(170, 44, 44, 0.18);
  background: linear-gradient(180deg, rgba(170, 44, 44, 0.04), rgba(255, 255, 255, 0));
}

.risk-card.watch {
  border-color: rgba(200, 119, 0, 0.2);
  background: linear-gradient(180deg, rgba(200, 119, 0, 0.05), rgba(255, 255, 255, 0));
}

.risk-card.good {
  border-color: rgba(11, 140, 90, 0.18);
  background: linear-gradient(180deg, rgba(11, 140, 90, 0.05), rgba(255, 255, 255, 0));
}

.toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}

.toolbar input,
.toolbar select {
  max-width: 280px;
}

.table-actions,
.form-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.inline-management-grid {
  margin-top: 22px;
}

.panel-nested {
  border: 1px solid var(--line);
  box-shadow: none;
  background: var(--surface-2);
}

.student-workouts-grid {
  max-height: 720px;
  overflow-y: auto;
  align-content: start;
}

.exercise-builder {
  display: grid;
  gap: 10px;
}

.exercise-row {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 10px;
  align-items: end;
}

.template-row {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 10px;
  align-items: end;
  margin-bottom: 10px;
}

.field-span-2 {
  grid-column: span 2;
}

.equipment-library-preview {
  min-height: 112px;
  display: grid;
  place-items: center;
  gap: 8px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-2);
  text-align: center;
}

.equipment-library-preview.empty {
  color: var(--muted);
  font-size: 0.84rem;
  font-weight: 700;
}

.equipment-library-preview img {
  width: 100%;
  max-width: 140px;
  height: 72px;
  object-fit: contain;
}

.equipment-library-preview strong {
  font-size: 0.82rem;
}

.row-remove-button {
  justify-self: end;
  align-self: end;
}

.exercise-row input[type="file"],
.template-row input[type="file"] {
  padding: 10px 12px;
  background: var(--surface-2);
  width: 100%;
  min-width: 0;
}

.empty-state {
  min-height: 160px;
  display: grid;
  place-items: center;
  text-align: center;
  color: var(--muted);
  border: 1px dashed var(--line);
  border-radius: 8px;
  background: rgba(255, 253, 248, 0.54);
  padding: 24px;
}

.student-hero {
  min-height: 240px;
  border-radius: 8px;
  padding: 28px;
  display: grid;
  align-content: end;
  color: white;
  background:
    linear-gradient(90deg, rgba(24, 33, 31, 0.9), rgba(24, 33, 31, 0.35)),
    url("assets/paulo-dumbbells.jpeg");
  background-size: cover;
  background-position: center 24%;
}

.student-hero h2 {
  max-width: 760px;
  margin: 0;
  font-size: clamp(2rem, 5vw, 4.2rem);
  line-height: 0.98;
}

.student-hero p {
  margin: 12px 0 0;
  max-width: 560px;
  color: rgba(255, 255, 255, 0.82);
}

.check-list {
  display: grid;
  gap: 10px;
}

.check-item {
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr);
  gap: 12px;
  align-items: start;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.check-item input {
  width: 20px;
  min-height: 20px;
  margin: 2px 0 0;
}

.exercise-check-item {
  grid-template-columns: 24px minmax(0, 1fr) minmax(118px, 142px);
  align-items: center;
}

.exercise-check-item input.exercise-load-input {
  width: 100%;
  min-height: 40px;
  margin: 0;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-2);
  color: var(--ink);
  font-weight: 700;
}

.report-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

.print-report {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
  padding: 34px;
}

.report-header {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  border-bottom: 3px solid var(--brand);
  padding-bottom: 22px;
}

.report-header h1 {
  margin: 10px 0 8px;
  font-size: 2.1rem;
}

.report-header p,
.report-footer {
  color: var(--muted);
  line-height: 1.5;
}

.report-coach {
  display: grid;
  grid-template-columns: 72px auto;
  gap: 12px;
  align-items: start;
}

.report-coach img {
  width: 72px;
  height: 72px;
  border-radius: 8px;
  object-fit: cover;
  object-position: center 18%;
}

.report-coach p {
  margin: 0 0 8px;
}

.report-badge {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 0 10px;
  border-radius: 6px;
  background: rgba(13, 124, 102, 0.12);
  color: var(--brand-dark);
  font-weight: 900;
}

.report-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin: 24px 0;
}

.metric {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-2);
  padding: 14px;
}

.metric span {
  display: block;
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 900;
  text-transform: uppercase;
}

.metric strong {
  display: block;
  margin: 8px 0 4px;
  font-size: 1.55rem;
}

.metric small {
  color: var(--brand-dark);
  font-weight: 900;
}

.report-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 22px;
}

.report-grid h2 {
  margin: 0 0 10px;
  font-size: 1.15rem;
}

.report-footer {
  margin-top: 26px;
  font-size: 0.85rem;
}

.toast {
  position: fixed;
  right: 22px;
  bottom: 22px;
  max-width: min(420px, calc(100vw - 44px));
  padding: 14px 16px;
  border-radius: 8px;
  background: #18211f;
  color: white;
  box-shadow: var(--shadow);
  transform: translateY(120px);
  opacity: 0;
  transition: 0.24s ease;
  z-index: 30;
}

.toast.show {
  transform: translateY(0);
  opacity: 1;
}

@media (max-width: 980px) {
  .login-page,
  .app-shell,
  .content-grid,
  .coach-banner {
    grid-template-columns: 1fr;
  }

  .coach-banner img {
    height: 320px;
  }

  .coach-banner div {
    padding: 0 24px 26px;
  }

  .login-visual {
    min-height: 52vh;
  }

  .sidebar {
    min-height: auto;
    position: relative;
  }

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

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

  .report-summary,
  .report-grid,
  .comparison-grid,
  .comparison-controls,
  .comparison-controls.compact,
  .assessment-shell-header {
    grid-template-columns: 1fr;
  }

  .assessment-shell-header {
    display: grid;
    align-items: stretch;
  }

  .assessment-shell-header label {
    min-width: 0;
  }

  .assessment-student-badge {
    justify-items: start;
  }
}

@media (max-width: 680px) {
  .login-visual,
  .login-panel,
  .main {
    padding: 22px;
  }

  .login-visual {
    min-height: 64vh;
    background-position: 58% top;
  }

  .quick-logins,
  .form-grid,
  .stats-grid,
  .measure-grid,
  .exercise-row,
  .template-row,
  .exercise-check-item,
  .editable-exercise-row {
    grid-template-columns: 1fr;
  }

  .field-span-2 {
    grid-column: auto;
  }

  .row-remove-button {
    justify-self: start;
  }

  .cards-grid {
    grid-template-columns: 1fr;
  }

  .published-workouts-grid {
    max-height: 980px;
    padding-right: 0;
  }

  .item-card {
    padding: 14px;
    gap: 10px;
  }

  .exercise-list li {
    grid-template-columns: 1fr;
    gap: 12px;
    padding: 12px 0;
  }

  .exercise-list li span,
  .exercise-list li strong {
    word-break: break-word;
  }

  .editable-exercise-row {
    align-items: stretch;
    gap: 12px;
  }

  .student-load-editor {
    padding: 10px;
  }

  .student-load-editor small {
    font-size: 0.7rem;
  }

  .student-load-editor input {
    min-height: 44px;
  }

  .exercise-media.compact {
    max-width: 100%;
  }

  .topbar,
  .panel-header,
  .report-header,
  .toolbar {
    align-items: stretch;
    flex-direction: column;
  }

  .toolbar input,
  .toolbar select {
    max-width: none;
  }
}

@media print {
  body {
    background: white;
  }

  .sidebar,
  .topbar,
  .no-print,
  .toast {
    display: none !important;
  }

  .app-shell {
    display: block;
  }

  .main {
    padding: 0;
  }

  .view {
    display: block;
  }

  .print-report {
    border: 0;
    border-radius: 0;
    box-shadow: none;
    padding: 0;
  }
}
