/* Team plan pages: /teams (apply), /coach (dashboard), /admin (approvals).
   Loaded after site.css and uses its colour and type tokens. */

.narrow { max-width: 760px; }
.muted { color: var(--muted); }
.small { font-size: 14px; }
.hidden { display: none !important; }

/* ── Forms ─────────────────────────────────────────────────────────────── */
.form { display: grid; gap: 18px; margin-top: 8px; }
/* align-items/align-content: start keep a field without a hint from
   stretching to its neighbour's height, so the boxes line up. */
.form .row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; align-items: start; }
@media (max-width: 640px) { .form .row2 { grid-template-columns: 1fr; } }
.field { display: grid; gap: 8px; align-content: start; }
.field label, .field legend { font-size: 12px; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); }
.field .hint { font-size: 13px; color: var(--muted2); margin: 0; }
.field input, .field select, .field textarea {
  width: 100%; min-height: 52px; padding: 14px 16px; border-radius: var(--r-md);
  border: 1px solid var(--line); background: var(--card); color: var(--text);
  font: 400 16px/1.4 var(--body);
}
.field textarea { min-height: 110px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--gold); }
.field input[aria-invalid="true"] { border-color: #B91C1C; }
fieldset.field { border: 0; padding: 0; margin: 0; min-width: 0; }
/* Browsers place a legend outside the grid; float it so it sits like the
   other labels, with the same 8px gap above its boxes. */
fieldset.field legend { float: left; width: 100%; padding: 0; margin: 0; }
fieldset.field legend + * { clear: both; }
.choices { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (max-width: 640px) { .choices { grid-template-columns: 1fr; } }
.choice { position: relative; display: block; padding: 18px; border: 1px solid var(--line); border-radius: var(--r-md); background: var(--card); cursor: pointer; }
.field .choice { text-transform: none; letter-spacing: normal; font-weight: 400; font-size: 15px; color: var(--text); }
.choice input { position: absolute; opacity: 0; pointer-events: none; }
.choice .name { display: block; font-family: var(--display); font-size: 18px; text-transform: uppercase; }
.choice .price { display: block; margin-top: 4px; color: var(--muted); font-size: 15px; }
.choice:has(input:checked) { border-color: var(--text); background: var(--card2); }
.choice:has(input:focus-visible) { outline: 2px solid var(--gold); outline-offset: 2px; }
.check { display: flex; gap: 12px; align-items: flex-start; font-size: 15px; color: var(--muted); }
.check input { width: 20px; height: 20px; margin-top: 2px; accent-color: var(--text); flex: none; }
.form-msg { margin: 0; font-size: 15px; }
.form-msg.error { color: #E5484D; }
.form-msg.ok { color: var(--text); }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* ── Panels and team plan blocks ───────────────────────────────────────── */
.panel { background: var(--card); border: 1px solid var(--line); border-radius: var(--r-lg); padding: clamp(20px, 4vw, 32px); }
.panel + .panel { margin-top: 20px; }
.team-plans { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
@media (max-width: 760px) { .team-plans { grid-template-columns: 1fr; } }
.team-plan .label { font-size: 12px; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; color: var(--gold); margin: 0 0 12px; }
.team-plan .amount { font-family: var(--display); font-size: clamp(40px, 6vw, 56px); line-height: 1; margin: 0; }
.team-plan .per { color: var(--muted); margin: 8px 0 20px; }
.team-plan ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.team-plan li { display: flex; gap: 10px; color: var(--muted); }
.team-plan li::before { content: '✓'; color: var(--text); flex: none; }
.founding { margin-top: 20px; border-style: dashed; }

/* ── Dashboard ─────────────────────────────────────────────────────────── */
.dash-head { display: flex; flex-wrap: wrap; gap: 16px; align-items: flex-end; justify-content: space-between; margin-bottom: 24px; }
.dash-head h1 { font-size: clamp(32px, 5vw, 48px); }
.toolbar { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.seg { display: inline-flex; border: 1px solid var(--line); border-radius: var(--r-md); padding: 4px; }
.seg button { border: 0; background: none; color: var(--muted); padding: 8px 14px; border-radius: 8px; font: 600 14px var(--body); cursor: pointer; }
.seg button[aria-pressed="true"] { background: var(--text); color: var(--bg); }
.link-btn { background: none; border: 0; padding: 0; color: var(--muted); font: 600 14px var(--body); text-decoration: underline; cursor: pointer; }
.link-btn:hover { color: var(--text); }
/* .btn-ghost is made for links; as a <button> it needs the browser's grey fill removed. */
button.btn { cursor: pointer; font-weight: inherit; }
button.btn-ghost { background: transparent; }
button.btn-ghost:hover { background: var(--card); }
/* Coach sign-in: Sign in / Sign up switch across the form, button and link in a row. */
.auth-tabs { display: grid; grid-template-columns: 1fr 1fr; }
.auth-tabs button { padding: 10px 14px; }
.auth-actions { display: flex; flex-wrap: wrap; gap: 20px; align-items: center; }
.status-pill { display: inline-block; padding: 4px 12px; border-radius: var(--r-pill); font-size: 12px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; background: var(--card2); color: var(--gold); }
.team-tabs { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 20px; }
.team-tabs button { border: 1px solid var(--line); background: var(--card); color: var(--muted); border-radius: var(--r-pill); padding: 8px 16px; font: 600 14px var(--body); cursor: pointer; }
.team-tabs button[aria-pressed="true"] { border-color: var(--text); color: var(--text); }

.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--r-lg); }
table.data { width: 100%; border-collapse: collapse; font-size: 15px; }
table.data th { text-align: left; font-size: 11px; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); padding: 14px 16px; border-bottom: 1px solid var(--line); white-space: nowrap; }
table.data td { padding: 14px 16px; border-bottom: 1px solid var(--line); white-space: nowrap; }
table.data tr:last-child td { border-bottom: 0; }
table.data td.num { font-variant-numeric: tabular-nums; }
table.data .ns { color: var(--muted2); font-size: 13px; }
table.data .fresh-fresh { color: var(--text); }
table.data .fresh-tired { color: var(--gold); font-weight: 600; }
table.data .fresh-very_tired { color: #E5484D; font-weight: 600; }
table.data tbody tr.clickable { cursor: pointer; }
table.data tbody tr.clickable:hover { background: var(--card); }
.empty { padding: 28px; text-align: center; color: var(--muted); }

.code { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; letter-spacing: 0.06em; }
.codes-actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin: 0 0 20px; }
.dash-foot { margin: 32px 0 0; padding-bottom: 96px; }
.dash-foot p { margin: 0; }
.dash-foot .status-pill { background: none; padding: 0; }

.days { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; }
.day { border: 1px solid var(--line); border-radius: 10px; padding: 10px 8px; min-height: 92px; display: grid; gap: 4px; align-content: start; font-size: 13px; color: var(--muted); }
.day .d { font-size: 11px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; }
.day.trained { border-color: var(--gold); }
.day .practice { color: var(--text); }
.day.trained .d { color: var(--text); }
@media (max-width: 640px) { .days { grid-template-columns: repeat(4, minmax(0, 1fr)); } }

.notice { background: var(--card2); border-radius: var(--r-md); padding: 16px 18px; color: var(--muted); font-size: 15px; }
.notice b { color: var(--text); }

/* /teams uses the homepage's sections; these only adapt the counts. */
.steps.steps-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 1000px) { .steps.steps-3 { grid-template-columns: 1fr; } }
.plans.plans-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); max-width: 820px; }
@media (max-width: 640px) { .plans.plans-2 { grid-template-columns: 1fr; } }
#apply-form { max-width: 760px; }

/* What coaches see: three items with an icon, laid out like the steps. */
.sees { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 44px 40px; }
.sees li { display: grid; align-content: start; justify-items: center; text-align: center; gap: 0; }
.sees-icon { display: block; color: var(--gold); margin-bottom: 18px; line-height: 0; }
.sees-icon .ic { width: 30px; height: 30px; }
.sees h3 { margin: 0 0 10px; }
.sees p { margin: 0; color: var(--muted); font-size: 15px; }
@media (max-width: 860px) { .sees { grid-template-columns: 1fr; gap: 32px; } }

/* Team prices sit in the middle of the page. */
.plans.plans-2 { margin-inline: auto; }


/* ── Price calculator on /teams (€4 per player per month) ──────────────── */
.calc { padding: 28px; border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--card); display: flex; flex-direction: column; gap: 10px; }
.calc-row { display: flex; justify-content: space-between; align-items: baseline; }
.calc-row label { font-size: 12px; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); }
.calc-row output { font-family: var(--display); font-size: 28px; line-height: 1; font-variant-numeric: tabular-nums; }
.calc input[type="range"] { width: 100%; margin: 4px 0 14px; accent-color: var(--text); height: 28px; cursor: pointer; }
.calc input[type="range"]:focus-visible { outline: 2px solid var(--gold); outline-offset: 4px; }
.calc-total { border-top: 1px solid var(--line); padding-top: 18px; margin-bottom: 8px; }
.calc-amount { margin: 0; font-family: var(--display); font-size: 48px; line-height: 1; font-variant-numeric: tabular-nums; }
.calc-sum { margin: 8px 0 0; color: var(--muted2); font-size: 15px; }
.calc .btn { align-self: flex-start; }
.form-total { margin: -6px 0 0; font-size: 14px; color: var(--muted); }
.add-panel { max-width: 520px; padding: 20px; margin: 0 0 20px; border: 1px solid var(--line); border-radius: var(--r-md); background: var(--card); display: grid; gap: 12px; }
.add-panel p { margin: 0; }
.add-panel .codes-actions { margin: 0; }
/* The plan card shares rows with its neighbour (site.css subgrid); the
   calculator spans all of them so it doesn't stretch the first row. */
@media (min-width: 901px) { .plans.plans-2 .plan { grid-column: 1; } .plans.plans-2 .calc { grid-column: 2; grid-row: 1 / span 5; align-self: start; } }
/* Our own dropdown arrow, inset like the text (the browser's sits on the edge). */
.field select {
  appearance: none; -webkit-appearance: none; cursor: pointer; padding-right: 48px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 512 512'%3E%3Cpath fill='none' stroke='%23A8A09A' stroke-linecap='round' stroke-linejoin='round' stroke-width='48' d='M112 184l144 144 144-144'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 18px center; background-size: 16px;
}
