
:root {
  --navy: #0B1F33;
  --blue: #31566D;
  --slate: #586C7A;
  --steel: #7B949C;
  --gold: #D6A94D;
  --light: #F4F7F9;
  --lighter: #FAFBFC;
  --white: #FFFFFF;
  --green: #2F855A;
  --green-light: #E6F4EC;
  --red: #C0564A;
  --red-light: #FBE9E7;
  --yellow-light: #FFF6DA;
  --border: #D7E0E5;
  --text: #172A3A;
  --muted: #61717D;
  --shadow: 0 12px 32px rgba(11,31,51,.09);
  --radius: 18px;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--text);
  background: linear-gradient(180deg, #eef3f6 0, #f8fafb 320px, #f7f9fa 100%);
}
button, input, textarea { font: inherit; }
button { cursor: pointer; }
a { color: inherit; text-decoration: none; }

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  min-height: 72px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px max(20px, calc((100vw - 1180px) / 2));
  color: var(--white);
  background: rgba(11,31,51,.96);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(255,255,255,.08);
}
.brand { display: inline-flex; align-items: center; gap: 12px; }
.brand-mark {
  width: 42px; height: 42px; display: grid; place-items: center;
  border-radius: 12px; background: var(--gold); color: var(--navy);
  font-size: 22px; font-weight: 900;
}
.brand strong, .brand small { display: block; }
.brand strong { font-size: 15px; letter-spacing: .02em; }
.brand small { margin-top: 2px; color: #c7d2d9; font-size: 11px; }
.coach-link {
  padding: 9px 13px; border: 1px solid rgba(255,255,255,.25);
  border-radius: 999px; font-size: 13px; font-weight: 700;
}
.coach-link:hover { background: rgba(255,255,255,.08); }

.page-shell { width: min(1180px, calc(100% - 32px)); margin: 28px auto 64px; }
.loading-card, .error-card {
  padding: 28px; background: var(--white); border: 1px solid var(--border);
  border-radius: var(--radius); box-shadow: var(--shadow);
}
.error-card { color: var(--red); }

.hero {
  position: relative;
  overflow: hidden;
  display: grid;
  grid-template-columns: 1.6fr .8fr;
  gap: 28px;
  padding: 34px;
  color: var(--white);
  border-radius: 24px;
  background: radial-gradient(circle at 95% 5%, rgba(214,169,77,.32), transparent 32%), linear-gradient(135deg, var(--navy), #183a50);
  box-shadow: var(--shadow);
}
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  margin-bottom: 10px; color: #d4e0e6; font-size: 12px; font-weight: 800;
  letter-spacing: .12em; text-transform: uppercase;
}
.hero h1 { margin: 0 0 8px; font-size: clamp(32px, 5vw, 54px); line-height: 1; }
.hero h2 { margin: 0 0 16px; color: #d9e4e9; font-size: 19px; font-weight: 600; }
.hero p { max-width: 720px; margin: 0; color: #d2dde3; line-height: 1.65; }
.hero-side {
  align-self: stretch; display: grid; align-content: center; gap: 10px;
  padding: 20px; border: 1px solid rgba(255,255,255,.13);
  border-radius: 18px; background: rgba(255,255,255,.06);
}
.hero-side span { color: #bfcdd5; font-size: 12px; text-transform: uppercase; letter-spacing: .08em; }
.hero-side strong { font-size: 24px; }
.hero-side small { color: #d2dde3; line-height: 1.5; }

.section-heading {
  display: flex; align-items: end; justify-content: space-between; gap: 20px;
  margin: 34px 2px 14px;
}
.section-heading h2 { margin: 0; font-size: 23px; }
.section-heading p { margin: 4px 0 0; color: var(--muted); font-size: 14px; }

.session-strip {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(175px, 1fr);
  gap: 12px;
  overflow-x: auto;
  padding: 2px 2px 10px;
  scrollbar-width: thin;
}
.session-tab {
  min-height: 124px;
  padding: 15px;
  text-align: left;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: var(--white);
  box-shadow: 0 5px 16px rgba(11,31,51,.04);
}
.session-tab:hover { transform: translateY(-1px); border-color: var(--steel); }
.session-tab.active {
  color: var(--white);
  border-color: var(--navy);
  background: var(--navy);
}
.session-tab .date { font-size: 12px; font-weight: 800; text-transform: uppercase; letter-spacing: .08em; color: var(--slate); }
.session-tab.active .date { color: #c9d6dc; }
.session-tab strong { display: block; margin: 9px 0 6px; font-size: 15px; line-height: 1.25; }
.session-tab small { color: var(--muted); }
.session-tab.active small { color: #d4e0e6; }
.status-dot { display: inline-block; width: 8px; height: 8px; margin-right: 6px; border-radius: 50%; background: var(--gold); }
.status-dot.completed { background: #5BC584; }

.session-panel {
  margin-top: 14px; padding: 28px; border: 1px solid var(--border);
  border-radius: 22px; background: var(--white); box-shadow: var(--shadow);
}
.session-panel-top {
  display: grid; grid-template-columns: 1.5fr .7fr; gap: 24px; align-items: start;
}
.meta-row { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.badge {
  display: inline-flex; align-items: center; padding: 6px 10px;
  border-radius: 999px; background: var(--light); color: var(--blue);
  font-size: 12px; font-weight: 800;
}
.badge.completed { background: var(--green-light); color: var(--green); }
.session-panel h2 { margin: 0 0 8px; font-size: clamp(26px,4vw,38px); line-height: 1.1; }
.objective { margin: 0; color: var(--muted); line-height: 1.65; }
.session-facts {
  display: grid; gap: 10px; padding: 18px; border-radius: 16px;
  background: var(--light);
}
.fact { display: flex; justify-content: space-between; gap: 16px; font-size: 14px; }
.fact span { color: var(--muted); }
.fact strong { text-align: right; }

.mix-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 10px; margin: 22px 0;
}
.mix-card { padding: 13px 14px; border: 1px solid var(--border); border-radius: 14px; background: var(--lighter); }
.mix-card span { display: block; color: var(--muted); font-size: 12px; }
.mix-card strong { display: block; margin-top: 5px; font-size: 18px; }

.progress-wrap { margin: 18px 0 26px; }
.progress-label { display: flex; justify-content: space-between; margin-bottom: 7px; color: var(--muted); font-size: 13px; font-weight: 700; }
.progress-track { height: 10px; overflow: hidden; border-radius: 999px; background: #e7edf0; }
.progress-fill { height: 100%; width: 0; border-radius: inherit; background: linear-gradient(90deg, var(--gold), #e3be6a); transition: width .25s ease; }

.block { margin-top: 26px; }
.block-title {
  display: flex; align-items: center; gap: 10px; margin: 0 0 12px;
  color: var(--navy); font-size: 17px;
}
.block-title::after { content: ""; height: 1px; flex: 1; background: var(--border); }

.exercise-list { display: grid; gap: 12px; }
.exercise-card {
  display: grid; grid-template-columns: 1.3fr .9fr; gap: 22px;
  padding: 20px; border: 1px solid var(--border); border-radius: 16px;
  background: var(--white);
}
.exercise-card.done { border-color: #9fd2b2; background: #fbfefc; }
.exercise-card h3 { margin: 0 0 7px; font-size: 18px; }
.exercise-meta { display: flex; flex-wrap: wrap; gap: 7px; margin-bottom: 10px; }
.exercise-meta span { padding: 5px 8px; border-radius: 8px; background: var(--light); font-size: 12px; font-weight: 750; }
.cue { margin: 0; color: var(--muted); line-height: 1.55; }
.last-performance {
  margin-top: 12px; padding: 11px 12px; border-left: 3px solid var(--gold);
  border-radius: 0 10px 10px 0; background: var(--yellow-light);
  color: #57461d; font-size: 13px; line-height: 1.45;
}
.last-performance strong { display: block; margin-bottom: 3px; }
.video-state { margin-top: 10px; color: var(--slate); font-size: 12px; font-weight: 700; }

.log-box {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px; align-content: start;
}
.field label { display: block; margin-bottom: 5px; color: var(--muted); font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: .04em; }
.field input, .field textarea {
  width: 100%; min-height: 40px; padding: 9px 10px;
  border: 1px solid var(--border); border-radius: 10px; color: var(--text); background: var(--white);
}
.field textarea { min-height: 62px; resize: vertical; }
.field.full { grid-column: 1 / -1; }
.complete-check {
  grid-column: 1 / -1; display: flex; align-items: center; gap: 9px;
  padding: 10px; border-radius: 10px; background: var(--light); font-size: 13px; font-weight: 800;
}
.complete-check input { width: 18px; height: 18px; }

.session-actions {
  position: sticky; bottom: 12px; z-index: 10;
  display: flex; justify-content: space-between; gap: 12px; align-items: center;
  margin-top: 24px; padding: 13px 14px;
  border: 1px solid var(--border); border-radius: 15px;
  background: rgba(255,255,255,.94); backdrop-filter: blur(8px); box-shadow: var(--shadow);
}
.save-state { color: var(--muted); font-size: 13px; }
.primary-button {
  padding: 11px 17px; border: 0; border-radius: 11px;
  color: var(--navy); background: var(--gold); font-weight: 900;
}
.primary-button:hover { filter: brightness(.97); }

.notice {
  margin-top: 18px; padding: 13px 15px; border-radius: 13px;
  color: #5a491e; background: var(--yellow-light); font-size: 13px; line-height: 1.5;
}

/* Coach */
.coach-hero { margin-bottom: 20px; }
.kpi-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin: 18px 0 28px; }
.kpi { padding: 18px; border: 1px solid var(--border); border-radius: 16px; background: var(--white); box-shadow: 0 6px 18px rgba(11,31,51,.05); }
.kpi span { display: block; color: var(--muted); font-size: 12px; font-weight: 800; text-transform: uppercase; letter-spacing: .05em; }
.kpi strong { display: block; margin-top: 8px; color: var(--navy); font-size: 28px; }
.coach-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.coach-card { padding: 22px; border: 1px solid var(--border); border-radius: 18px; background: var(--white); box-shadow: var(--shadow); }
.coach-card h2 { margin: 0 0 16px; font-size: 19px; }
.bar-row { display: grid; grid-template-columns: 120px 1fr 54px; gap: 10px; align-items: center; margin: 12px 0; font-size: 13px; }
.bar-track { position: relative; height: 13px; overflow: hidden; border-radius: 999px; background: #e9eef1; }
.bar-plan, .bar-actual { position: absolute; left: 0; top: 0; height: 100%; border-radius: inherit; }
.bar-plan { background: #cbd7dd; }
.bar-actual { background: var(--gold); height: 6px; top: 3.5px; }
.data-table-wrap { overflow-x: auto; }
.data-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.data-table th { padding: 10px; text-align: left; color: var(--muted); background: var(--light); }
.data-table td { padding: 12px 10px; border-bottom: 1px solid var(--border); vertical-align: top; }
.data-table strong { display: block; }
.full-span { grid-column: 1 / -1; }
.warning-card { margin-bottom: 18px; padding: 14px 16px; border-radius: 14px; color: #6d2b24; background: var(--red-light); font-size: 13px; font-weight: 700; }

footer { padding: 26px 20px 42px; color: var(--muted); text-align: center; font-size: 12px; }

@media (max-width: 820px) {
  .hero, .session-panel-top, .exercise-card, .coach-grid { grid-template-columns: 1fr; }
  .hero { padding: 25px; }
  .hero-side { min-height: 0; }
  .kpi-grid { grid-template-columns: repeat(2,1fr); }
  .session-panel { padding: 20px; }
}
@media (max-width: 520px) {
  .page-shell { width: min(100% - 20px, 1180px); margin-top: 14px; }
  .topbar { min-height: 64px; padding: 10px 12px; }
  .brand small { display: none; }
  .coach-link { padding: 8px 10px; font-size: 11px; }
  .hero { border-radius: 18px; }
  .session-strip { grid-auto-columns: 76%; }
  .session-panel { border-radius: 18px; }
  .log-box, .kpi-grid { grid-template-columns: 1fr; }
  .session-actions { align-items: stretch; flex-direction: column; }
  .primary-button { width: 100%; }
  .bar-row { grid-template-columns: 90px 1fr 44px; }
}
