/* Handouts — coach library, assigned per athlete. */

.doc-list { list-style: none; margin: 0; padding: 0; }

.doc-row {
  border-top: 1px solid var(--panel-2);
  padding: 0.8rem 0;
}
.doc-row:first-child { border-top: 0; }

.doc-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
}

.doc-title {
  background: none;
  border: 0;
  padding: 0;
  font-family: "Oswald", sans-serif;
  font-weight: 500;
  font-size: 0.95rem;
  letter-spacing: 0.01em;
  color: var(--gold);
  cursor: pointer;
  text-align: left;
}
.doc-title:hover { text-decoration: underline; }

.doc-sub {
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.72rem;
  color: var(--dim);
  margin-top: 0.2rem;
}

.doc-right {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-shrink: 0;
}

.doc-del {
  background: none;
  border: 0;
  color: var(--dim);
  font-size: 1.2rem;
  line-height: 1;
  cursor: pointer;
  padding: 0 0.2rem;
}
.doc-del:hover { color: var(--warn); }

.doc-panel {
  margin-top: 0.8rem;
  padding: 0.8rem;
  background: var(--tint);
  border-radius: 4px;
}

.doc-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
  gap: 0.4rem;
  margin-top: 0.8rem;
}

.doc-check {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.85rem;
  cursor: pointer;
  min-height: 40px;          /* thumb-sized on a phone */
}

.doc-seen {
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.62rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--dim);
  margin-left: auto;
}

.docs-upload {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.8rem;
}

@media (max-width: 480px) {
  .doc-head { flex-direction: column; gap: 0.5rem; }
  .doc-right { width: 100%; }
  .doc-grid { grid-template-columns: 1fr 1fr; }
}
/* Progress — coach-logged measurables over time. */

.prog-athlete-row { margin-bottom: 14px; }

.prog-card {
  background: var(--panel);
  border: 1px solid var(--panel-2);
  border-radius: var(--r);
  padding: 14px;
  margin-bottom: 12px;
}

.prog-card-head {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin-bottom: 8px;
}

.prog-name {
  font-family: var(--display);
  font-size: 13px;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--cream);
}

.prog-latest {
  font-family: var(--mono);
  font-size: 16px;
  color: var(--gold);
  margin-left: auto;
}

.prog-delta {
  font-family: var(--mono);
  font-size: 12px;
  padding: 2px 6px;
  border-radius: 100px;
}
.prog-delta--up   { color: var(--good); background: rgba(34,197,94,.14); }
.prog-delta--down { color: var(--bad); background: rgba(239,68,68,.14); }

.prog-spark {
  width: 100%;
  height: 32px;
  display: block;
  margin-bottom: 10px;
}

.prog-history {
  list-style: none;
  margin: 0;
  padding: 0;
  font-family: var(--mono);
  font-size: 11.5px;
  color: var(--dim);
}
.prog-history li {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 3px 0;
}

.prog-log-row {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
  margin-bottom: 16px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--panel-2);
}
.prog-log-row .select { flex: 1 1 160px; }
.prog-log-row input[type="number"] { width: 90px; }
.prog-log-row input[type="text"] { flex: 1 1 140px; }

@media (max-width: 480px) {
  .prog-log-row { flex-direction: column; align-items: stretch; }
  .prog-log-row .select,
  .prog-log-row input { width: 100%; }
}

/* --- collapsible panels ------------------------------------------------ */

.panel-collapse {
  background: none;
  border: 0;
  color: var(--dim);
  font-size: 13px;
  line-height: 1;
  cursor: pointer;
  padding: 2px 6px;
  margin-left: 6px;
  vertical-align: middle;
}
.panel-collapse:hover { color: var(--gold); }

.panel.is-collapsed > *:not(.panel__head) { display: none !important; }

/* --- progress log row: fix unstyled inputs -----------------------------
   #prog-value and #prog-note were never given the app's base input
   styling, so they fell back to raw browser defaults — which render
   noticeably taller than everything else on mobile Chrome. */

.prog-log-row select,
.prog-log-row input {
  height: 38px;
  box-sizing: border-box;
  padding: 0 11px;
  background: var(--field);
  border: 1px solid var(--panel-2);
  border-radius: var(--r);
  color: var(--cream);
  font-family: var(--body);
  font-size: 14px;
  line-height: 36px;
}
.prog-log-row input:focus,
.prog-log-row select:focus {
  outline: none;
  border-color: var(--gold);
}

/* --- progress log row, round 2 -----------------------------------------
   The class-based rule lost the cascade to something with higher
   specificity (likely a global select/textarea rule). Targeting the
   IDs directly, plus resetting native select/textarea appearance,
   which Android Chrome needs explicitly turned off to respect a
   height rule at all. */

#prog-metric,
#prog-value,
#prog-note {
  box-sizing: border-box !important;
  height: 38px !important;
  min-height: 38px !important;
  max-height: 38px !important;
  padding: 0 11px !important;
  background: var(--field) !important;
  border: 1px solid var(--panel-2) !important;
  border-radius: var(--r) !important;
  color: var(--cream) !important;
  font-family: var(--body) !important;
  font-size: 14px !important;
  line-height: 36px !important;
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  resize: none;
}

#prog-metric:focus,
#prog-value:focus,
#prog-note:focus {
  outline: none !important;
  border-color: var(--gold) !important;
}

/* --- drills and programs ------------------------------------------------ */

.drill-list {
  list-style: decimal;
  margin: 0 0 0 20px;
  padding: 0;
}
.drill-list li {
  padding: 6px 0;
  font-size: 14.5px;
  color: var(--cream);
}
.drill-name { font-weight: 500; }
.drill-note {
  display: block;
  font-size: 12.5px;
  color: var(--dim);
  margin-top: 2px;
}

.prog-desc {
  font-size: 13px;
  color: var(--dim);
  margin: 0 0 10px;
}

/* --- drill prescription (sets/reps/load) --------------------------------
   Prescriptive only — no completion tracking, no logging. Shown inline
   wherever a drill appears, in the program builder and in the athlete's
   assigned view. */

.rx-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  padding: 8px 0;
  border-bottom: 1px solid var(--panel-2);
}
.rx-row:last-child { border-bottom: 0; }

.rx-fields {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-left: auto;
}

.rx-sets, .rx-reps {
  width: 56px;
  height: 34px;
  box-sizing: border-box;
  padding: 0 8px;
  background: var(--field);
  border: 1px solid var(--panel-2);
  border-radius: var(--r);
  color: var(--cream);
  font-family: var(--mono);
  font-size: 13px;
}

.rx-load {
  width: 130px;
  height: 34px;
  box-sizing: border-box;
  padding: 0 8px;
  background: var(--field);
  border: 1px solid var(--panel-2);
  border-radius: var(--r);
  color: var(--cream);
  font-family: var(--body);
  font-size: 13px;
}

.rx-sets:focus, .rx-reps:focus, .rx-load:focus {
  outline: none;
  border-color: var(--gold);
}

.rx-x {
  color: var(--dim);
  font-family: var(--mono);
  font-size: 12px;
}

.drill-rx {
  display: inline-block;
  font-family: var(--mono);
  font-size: 12px;
  color: var(--gold);
  margin-left: 8px;
}

@media (max-width: 480px) {
  .rx-row { flex-direction: column; align-items: flex-start; }
  .rx-fields { margin-left: 0; width: 100%; }
  .rx-load { flex: 1; width: auto; }
}

/* --- payment tracking ---------------------------------------------------- */

.pay-balance {
  display: inline-block;
  font-family: var(--display);
  font-weight: 600;
  font-size: 20px;
  padding: 10px 18px;
  border-radius: var(--r);
  margin-bottom: 16px;
}
.pay-balance--owed   { background: rgba(239,68,68,.14); color: var(--bad); }
.pay-balance--credit { background: rgba(34,197,94,.14); color: var(--good); }
.pay-balance--even   { background: var(--panel); color: var(--dim); }

.pay-log-row {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
  margin-bottom: 20px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--panel-2);
}

#pay-type, #pay-amount, #pay-note {
  height: 38px;
  box-sizing: border-box;
  padding: 0 11px;
  background: var(--field);
  border: 1px solid var(--panel-2);
  border-radius: var(--r);
  color: var(--cream);
  font-family: var(--body);
  font-size: 14px;
}
#pay-amount { width: 100px; }
#pay-note { flex: 1 1 160px; }
#pay-type:focus, #pay-amount:focus, #pay-note:focus {
  outline: none;
  border-color: var(--gold);
}

.pay-history {
  list-style: none;
  margin: 0;
  padding: 0;
}

.pay-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--panel-2);
  font-size: 14px;
}
.pay-row:last-child { border-bottom: 0; }

.pay-date {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--dim);
  width: 52px;
  flex-shrink: 0;
}

.pay-label {
  flex: 1;
  color: var(--cream);
}

.pay-amount {
  font-family: var(--mono);
  font-weight: 500;
}
.pay-amount--charge  { color: var(--bad); }
.pay-amount--payment { color: var(--good); }

@media (max-width: 480px) {
  .pay-log-row { flex-direction: column; align-items: stretch; }
  #pay-type, #pay-amount, #pay-note { width: 100%; }
}

/* --- Pro tier logo ------------------------------------------------------ */

.app-logo {
  height: 24px;
  max-width: 140px;
  object-fit: contain;
  display: block;
}

/* PAYLINK-V1 --------------------------------------------------------- */

.pay-pending {
  margin: .4rem 0 0;
  font-size: .82rem;
  color: var(--dim);
}

.pay-row--pending {
  opacity: .78;
}

.pay-row--pending .pay-amount {
  font-style: italic;
}

.pay-external {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .5rem;
  margin-top: .85rem;
}

.pay-external-hint {
  flex-basis: 100%;
  margin: .15rem 0 0;
  font-size: .78rem;
  color: var(--dim);
}

.pay-claim-row {
  display: flex;
  gap: .5rem;
  margin-top: .6rem;
}

.pay-claim-row input {
  flex: 1 1 auto;
  min-width: 0;
}

.btn--xs {
  padding: .2rem .5rem;
  font-size: .72rem;
}

@media (max-width: 520px) {
  .pay-claim-row { flex-direction: column; align-items: stretch; }
}

.pay-external[hidden],
.pay-claim-row[hidden] { display: none; }
