/* Coach login, dashboard, and admin pages. Uses the variables in styles.css. */
.portal-main { background: var(--gray-50); min-height: 60vh; padding: 2.2rem 0 3.5rem; }
.portal-wrap { max-width: 1080px; }
.portal-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 1rem; margin-bottom: 1.2rem; }
.portal-head h1 { font-size: clamp(1.6rem, 3.4vw, 2.3rem); margin: 0; }
.portal-head .who { color: var(--gray-500); font-size: .93rem; margin: .2rem 0 0; }
.portal-card { background: var(--white); border: 1px solid var(--gray-200); border-radius: var(--radius); box-shadow: var(--shadow); padding: clamp(1.1rem, 3vw, 1.8rem); margin-bottom: 1.2rem; }
.portal-card h2 { font-size: clamp(1.25rem, 2.4vw, 1.55rem); margin: 0 0 .8rem; }
.portal-card h3 { font-size: 1.05rem; margin: 1.2rem 0 .6rem; }
.login-card { max-width: 460px; margin: 0 auto; }
.tabs { display: flex; flex-wrap: wrap; gap: .4rem; border-bottom: 2px solid var(--gray-200); margin-bottom: 1.2rem; }
[role="tabpanel"] { padding: 0; }
.tabs [role="tab"] { background: none; border: 0; border-bottom: 3px solid transparent; margin-bottom: -2px; padding: .7rem 1rem; font: inherit; font-weight: 700; color: var(--gray-700); cursor: pointer; }
.tabs [role="tab"][aria-selected="true"] { color: var(--blue-700); border-bottom-color: var(--blue-500); }
.tabs [role="tab"] .count { display: inline-block; min-width: 1.4rem; padding: 0 .35rem; margin-left: .3rem; border-radius: 999px; background: var(--blue-500); color: var(--white); font-size: .75rem; line-height: 1.4rem; text-align: center; }
.pill { display: inline-block; padding: .18rem .65rem; border-radius: 999px; font-size: .78rem; font-weight: 700; letter-spacing: .02em; background: var(--silver-100); color: var(--gray-700); white-space: nowrap; }
.pill.ok { background: #e3f5ea; color: #17643a; }
.pill.wait { background: #fff4d6; color: #7a5300; }
.pill.bad { background: #fdecea; color: #8a1c14; }
.pill.info { background: #e7f0ff; color: var(--blue-700); }
.banner { border-radius: 12px; padding: .9rem 1.1rem; margin-bottom: 1.2rem; font-size: .95rem; }
.banner.wait { background: #fff4d6; color: #5c3f00; }
.banner.info { background: #e7f0ff; color: #12307f; }
.banner.bad { background: #fdecea; color: #8a1c14; }
.banner.good { background: #e6f6ec; color: #145c2e; }
.banner p:last-child { margin-bottom: 0; }
.athlete-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 1rem; }
.athlete-card { border: 1px solid var(--gray-200); border-radius: 12px; padding: 1rem; background: var(--white); display: flex; flex-direction: column; gap: .45rem; }
.athlete-card h3 { margin: 0; font-size: 1.1rem; }
.athlete-card .meta { color: var(--gray-500); font-size: .9rem; margin: 0; }
.athlete-card .btn-row { margin-top: auto; padding-top: .4rem; }
.btn-sm { padding: .5rem 1rem; font-size: .9rem; }
.list { list-style: none; margin: 0; padding: 0; }
.list > li { border: 1px solid var(--gray-200); border-radius: 12px; padding: 1rem; margin-bottom: .8rem; background: var(--white); }
.list .row-top { display: flex; flex-wrap: wrap; justify-content: space-between; gap: .5rem; align-items: center; }
.list .row-top strong { font-size: 1.02rem; }
.small { font-size: .88rem; color: var(--gray-500); }
.stat-table { width: 100%; border-collapse: collapse; margin: .6rem 0; font-size: .93rem; }
.stat-table th, .stat-table td { text-align: left; padding: .45rem .6rem; border-bottom: 1px solid var(--gray-200); vertical-align: top; }
.stat-table th { font-size: .78rem; text-transform: uppercase; letter-spacing: .06em; color: var(--gray-500); }
.stat-rows { display: grid; gap: .5rem; }
.stat-row { display: grid; grid-template-columns: 1.3fr 1fr auto; gap: .5rem; align-items: center; }
.stat-row button { background: none; border: 0; color: var(--gray-500); font-size: 1.3rem; cursor: pointer; padding: 0 .4rem; }
.label-chips { display: flex; flex-wrap: wrap; gap: .35rem; margin: .4rem 0 .2rem; }
.label-chips button { border: 1px dashed var(--blue-500); background: none; color: var(--blue-700); border-radius: 999px; padding: .25rem .7rem; font: inherit; font-size: .82rem; cursor: pointer; }
.compare { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.compare > div { background: var(--gray-50); border-radius: 10px; padding: .8rem; }
.compare h4 { margin: 0 0 .4rem; font-size: .85rem; text-transform: uppercase; letter-spacing: .06em; color: var(--gray-500); }
.photo-thumb { width: 96px; height: 96px; object-fit: cover; border-radius: 12px; border: 1px solid var(--gray-200); background: var(--gray-50); }
.form-msg { margin-top: .8rem; font-weight: 600; font-size: .93rem; }
.form-msg.ok { color: #17643a; }
.form-msg.err { color: #8a1c14; }
.verify-hint { margin-top: .3rem; font-size: .88rem; font-weight: 600; }
.panel { border: 2px solid var(--blue-500); border-radius: 14px; padding: 1.1rem; background: var(--white); margin-bottom: 1.2rem; }
.panel-head { display: flex; justify-content: space-between; align-items: center; gap: .6rem; flex-wrap: wrap; }
.linklike { background: none; border: 0; padding: 0; font: inherit; color: var(--blue-700); text-decoration: underline; font-weight: 600; cursor: pointer; }
.empty { color: var(--gray-500); font-style: italic; }
.side-links { display: flex; flex-wrap: wrap; gap: .6rem; }
.otp-input { letter-spacing: .4em; font-size: 1.3rem; text-align: center; }
[hidden] { display: none !important; }
@media (max-width: 760px) {
  .compare { grid-template-columns: 1fr; }
  .stat-row { grid-template-columns: 1fr 1fr auto; }
  .tabs [role="tab"] { padding: .6rem .7rem; font-size: .93rem; }
  .stat-table { font-size: .88rem; }
}

/* Position-specific stat fields (stat-fields.js) */
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.stat-groups { display: grid; gap: .8rem; }
.stat-group { border: 1px solid var(--gray-200); border-radius: 12px; padding: .7rem .9rem .9rem; margin: 0; min-width: 0; background: var(--white); }
.stat-group legend { font-family: var(--font-head); text-transform: uppercase; letter-spacing: .04em; font-size: .95rem; padding: 0 .35rem; color: var(--black-900); }
.stats-editor > .stat-group { margin-top: .8rem; }
details.stat-group summary { cursor: pointer; font-family: var(--font-head); text-transform: uppercase; letter-spacing: .04em; font-size: .95rem; color: var(--black-900); padding: .1rem 0; }
details.stat-group[open] summary { margin-bottom: .5rem; }
.stat-field-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: .55rem .7rem; }
.stat-field { display: flex; flex-direction: column; gap: .2rem; min-width: 0; }
.stat-field label { font-size: .8rem; font-weight: 700; color: var(--gray-700); line-height: 1.25; }
.stat-field input { width: 100%; min-width: 0; }
.stat-set { margin-bottom: .6rem; }
.stat-table tr.grp th { background: var(--gray-50); color: var(--blue-700); font-size: .74rem; padding-top: .55rem; }
.compare-table tr.changed td { background: #fff4d6; }
.compare-table tr.changed td:last-child { font-weight: 700; }
@media (max-width: 560px) {
  .stat-field-grid { grid-template-columns: 1fr 1fr; }
  .compare-table th, .compare-table td { padding: .4rem .35rem; }
}
.stat-field input { padding: .5rem .6rem; font-size: .95rem; border-radius: 8px; }

/* Upload stat sheet instead (coach) + sheet box (admin) */
.mode-pick { border: 0; padding: 0; margin: 1rem 0 .4rem; display: flex; flex-wrap: wrap; gap: .5rem; }
.mode-pick legend { font-family: var(--font-head); text-transform: uppercase; letter-spacing: .04em; font-size: 1rem; color: var(--black-900); margin-bottom: .45rem; padding: 0; }
.mode-opt { display: inline-flex; align-items: center; gap: .45rem; border: 2px solid var(--gray-200); border-radius: 999px; padding: .45rem .95rem; cursor: pointer; font-weight: 700; font-size: .92rem; background: var(--white); }
.mode-opt input { width: auto; margin: 0; accent-color: var(--blue-500); }
.mode-opt:has(input:checked) { border-color: var(--blue-500); color: var(--blue-700); background: #e7f0ff; }
.upload-box > div { border: 2px dashed var(--blue-500); border-radius: 14px; padding: 1rem 1.1rem; background: #f5f9ff; margin-top: .6rem; }
.upload-box h3 { margin-top: 0; }
.sheet-picked { margin: .5rem 0 0; color: #145c2e; font-weight: 700; word-break: break-word; }
.sheet-picked.bad { color: #8a1c14; }
.sheet-box { border: 1px solid var(--gray-200); border-radius: 10px; padding: .7rem .85rem; margin: .4rem 0 .6rem; background: var(--gray-50); word-break: break-word; }
.mini-h { margin: .6rem 0 0; font-size: .8rem; text-transform: uppercase; letter-spacing: .06em; color: var(--gray-500); }

/* Auto-publish model: flag reasons, recent live edits */
.flag-list { margin: .4rem 0 .4rem 1.1rem; padding: 0; }
.flag-list li { margin: .15rem 0; }
.flag-chips { display: flex; flex-wrap: wrap; gap: .35rem; margin: .4rem 0; }
.flag-chip { display: inline-block; padding: .2rem .6rem; border-radius: 6px; background: #fff4d6; color: #7a5300; font-size: .8rem; font-weight: 600; }
.live-edit .row-top { gap: .5rem; }
.live-edit .meta-line { color: var(--gray-700); }
.banner .small { display: block; margin-top: .3rem; }
/* Height / weight source tags (Oct 18, 2026) */
.size-line { margin: .3rem 0 .4rem; }
.src-tag { display: inline-block; padding: .05rem .5rem; border-radius: 999px; font-size: .7rem; font-weight: 700; letter-spacing: .02em; vertical-align: 1px; }
.src-tag.family { background: var(--silver-100); color: var(--gray-700); }
.src-tag.coach { background: #e3f5ea; color: #17643a; }
.size-edit { margin-top: .35rem; font-size: .9rem; }
.size-edit summary { cursor: pointer; color: var(--blue-700); }
.size-edit input { width: 5rem; }
/* Camp-verified results (Oct 18, 2026) */
.src-tag.camp { background: #fff1e0; color: #8a4b00; }
.camp-block { margin-top: 1rem; }
.camp-card { border: 1px solid var(--silver-100); border-radius: 10px; padding: .6rem .8rem; margin: .5rem 0; }
.camp-card .stat-table { margin-top: .3rem; }
.muted { color: var(--gray-500); }
.compare-table td { overflow-wrap: anywhere; word-break: break-word; }
.compare-table { table-layout: fixed; width: 100%; }
