/* Harrastajate moodul - mobiilisõbralik tume teema (nagu algajad) */
:root {
    --bg: #121212;
    --surface: #1e1e1e;
    --surface-2: #2a2a2a;
    --text: #e0e0e0;
    --muted: #a3a3a3;
    --border: #333;
    --accent: #C49A00;
    --accent-hover: #d9ab0a;
    --notice-bg: #3b1d1d;
    --notice-text: #fca5a5;
}
* { box-sizing: border-box; }
body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font-family: system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
    line-height: 1.5;
    padding-bottom: env(safe-area-inset-bottom);
}
a { color: var(--accent); }
.topbar {
    position: sticky; top: 0; z-index: 10;
    display: flex; align-items: center; justify-content: space-between; gap: 12px;
    padding: 10px 16px; padding-top: max(10px, env(safe-area-inset-top));
    background: rgba(18, 18, 18, .95);
    border-bottom: 1px solid var(--border);
}
.topbar .brand { display: flex; align-items: center; gap: 10px; color: var(--text); text-decoration: none; font-weight: 800; letter-spacing: .5px; }
.topbar .brand img { width: 36px; height: 36px; object-fit: contain; }
.topbar .back { color: var(--muted); text-decoration: none; font-size: 14px; white-space: nowrap; }
.topbar .back:hover { color: var(--accent); }
main { max-width: 720px; margin: 0 auto; padding: 20px 16px 40px; }
h1 { margin: 8px 0 4px; font-size: 1.7rem; border-left: 4px solid var(--accent); padding-left: 12px; }
.lead { color: var(--muted); margin: 0 0 20px; }
.notice {
    background: var(--notice-bg); color: var(--notice-text);
    border-radius: 10px; padding: 10px 14px; margin-bottom: 10px; font-weight: 600;
}
.actions { display: grid; grid-template-columns: 1fr; gap: 10px; margin: 20px 0 24px; }
@media (min-width: 560px) { .actions { grid-template-columns: repeat(3, 1fr); } }
.action {
    display: flex; flex-direction: column; gap: 2px;
    background: var(--surface); border: 1px solid var(--border); border-radius: 12px;
    padding: 14px 16px; text-decoration: none; color: var(--text);
    transition: border-color .15s, transform .15s;
}
.action:hover { border-color: var(--accent); transform: translateY(-2px); }
.action strong { font-size: 1.05rem; }
.action span { color: var(--muted); font-size: .9rem; }
.action.primary { background: var(--accent); border-color: var(--accent); color: #111; }
.action.primary span { color: #3a2e00; }
.action.primary:hover { background: var(--accent-hover); }
.card {
    background: var(--surface); border: 1px solid var(--border); border-radius: 12px;
    padding: 6px 16px 14px; margin-bottom: 16px;
}
.card h2 { font-size: 1.15rem; margin: 12px 0 4px; }
/* partials/adult_trainings.php sisu */
.card h3 { font-size: 1rem; margin: 16px 0 4px; color: var(--accent); }
.card p { color: var(--muted); }
.card .list { margin: 6px 0 0; padding-left: 18px; }
.card .list li { margin: 2px 0; }
footer { text-align: center; color: var(--muted); font-size: .85rem; padding: 20px 16px 32px; }

/* --- Vormid (sisselogimine) --- */
.auth-card {
    background: var(--surface); border: 1px solid var(--border); border-radius: 14px;
    padding: 20px 18px; margin: 12px 0 20px;
}
.auth-card h2 { margin: 0 0 6px; font-size: 1.25rem; }
.auth-card p { color: var(--muted); margin: 0 0 14px; }
.field { display: block; margin-bottom: 14px; }
.field span { display: block; font-size: .9rem; color: var(--muted); margin-bottom: 6px; }
.field input {
    width: 100%; padding: 14px; font-size: 16px; /* 16px: iOS ei suumi */
    background: var(--surface-2); color: var(--text);
    border: 1px solid var(--border); border-radius: 10px;
}
.field input:focus { outline: 2px solid var(--accent); border-color: var(--accent); }
.field input.code { font-size: 26px; letter-spacing: 8px; text-align: center; font-variant-numeric: tabular-nums; }
.btn-block {
    display: block; width: 100%; padding: 14px; font-size: 1rem; font-weight: 700;
    background: var(--accent); color: #111; border: none; border-radius: 10px; cursor: pointer;
    text-align: center; text-decoration: none;
}
.btn-block:hover { background: var(--accent-hover); }
.btn-block.secondary { background: transparent; color: var(--text); border: 1px solid var(--border); }
.btn-block.secondary:hover { border-color: var(--accent); background: transparent; }
.btn-row { display: grid; gap: 10px; }
.link-btn { background: none; border: none; color: var(--accent); cursor: pointer; padding: 0; font: inherit; text-decoration: underline; }
.alert { border-radius: 10px; padding: 10px 14px; margin-bottom: 14px; }
.alert.error { background: var(--notice-bg); color: var(--notice-text); }
.alert.ok { background: #12301f; color: #86efac; }
.choice-list { display: grid; gap: 10px; margin-bottom: 14px; }
.choice-list button {
    display: flex; justify-content: space-between; align-items: center; width: 100%;
    padding: 14px 16px; font-size: 1rem; text-align: left;
    background: var(--surface-2); color: var(--text); border: 1px solid var(--border); border-radius: 10px; cursor: pointer;
}
.choice-list button:hover { border-color: var(--accent); }
.choice-list button::after { content: "See olen mina →"; color: var(--accent); font-size: .85rem; font-weight: 600; }
.muted-small { color: var(--muted); font-size: .85rem; }
.topbar .user { display: flex; align-items: center; gap: 12px; font-size: 14px; }
.topbar .user form { margin: 0; }

/* --- Avaleht: treeningud, võistlused --- */
.actions.two { grid-template-columns: 1fr 1fr; }
.section-title { font-size: 1.2rem; margin: 26px 0 10px; }
.muted { color: var(--muted); }
.shirt-dot { display: inline-block; width: 12px; height: 12px; border-radius: 50%; border: 1px solid #777; vertical-align: -1px; }
.chip {
    display: inline-flex; align-items: center; gap: 4px; white-space: nowrap;
    padding: 4px 10px; border-radius: 999px; font-size: .85rem; font-weight: 700;
    background: var(--surface-2); color: var(--muted); border: 1px solid var(--border);
}
.chip.coming { background: #12301f; color: #86efac; border-color: #1f5133; }
.chip.not_coming { background: var(--notice-bg); color: var(--notice-text); border-color: #5b2a2a; }
.chip.none { color: var(--accent); border-color: var(--accent); }

.comp-banner {
    display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--text);
    background: linear-gradient(90deg, #2a2200, var(--surface)); border: 1px solid #5a4700;
    border-radius: 12px; padding: 12px 14px; margin-bottom: 10px;
}
.comp-banner:hover { border-color: var(--accent); }
.date-badge {
    display: flex; flex-direction: column; align-items: center; justify-content: center; flex: 0 0 52px; height: 52px;
    background: var(--accent); color: #111; border-radius: 10px; font-size: .75rem; font-weight: 700; line-height: 1.1;
}
.date-badge b { font-size: 1.35rem; }
.comp-text { flex: 1; min-width: 0; display: flex; flex-direction: column; font-size: .9rem; }
.comp-text strong { font-size: 1rem; }
.comp-banner .chip { align-self: center; }

.training {
    background: var(--surface); border: 1px solid var(--border); border-left: 4px solid var(--border);
    border-radius: 12px; padding: 14px 16px; margin-bottom: 14px; scroll-margin-top: 70px;
}
.training.coming { border-left-color: #22c55e; }
.training.not_coming { border-left-color: #ef4444; }
.training-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; }
.group-name { font-weight: 800; color: var(--accent); text-transform: uppercase; font-size: .85rem; letter-spacing: .5px; }
.training-when { font-size: 1.1rem; font-weight: 700; }
.hint { color: var(--muted); font-size: .9rem; margin: 10px 0 0; }
.hint.warn { color: #fbbf24; }
.reg-form { margin-top: 12px; }
.colors, .choices { border: none; padding: 0; margin: 0 0 12px; display: flex; flex-wrap: wrap; gap: 8px; }
.colors legend, .choices legend { color: var(--muted); font-size: .9rem; margin-bottom: 6px; padding: 0; width: 100%; }
.color-opt, .choice { position: relative; cursor: pointer; }
.color-opt input, .choice input, .pos input { position: absolute; opacity: 0; pointer-events: none; }
.color-opt > span, .choice > span {
    display: inline-flex; align-items: center; gap: 6px; padding: 10px 14px; border-radius: 10px;
    background: var(--surface-2); border: 2px solid var(--border); font-weight: 600;
}
.choice.small > span { min-width: 52px; justify-content: center; }
.color-opt input:checked + span, .choice input:checked + span, .pos input:checked + span { border-color: var(--accent); background: #2a2200; }
.color-opt input:focus-visible + span, .choice input:focus-visible + span, .pos input:focus-visible + span { outline: 2px solid var(--accent); }
.check { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; cursor: pointer; }
.check input { width: 22px; height: 22px; accent-color: var(--accent); }
.check small { color: var(--muted); }
.btn-pair { display: grid; grid-template-columns: 2fr 1fr; gap: 10px; }
.btn-yes, .btn-no {
    padding: 14px; font-size: 1rem; font-weight: 700; border-radius: 10px; cursor: pointer; border: 1px solid transparent;
}
.btn-yes { background: var(--accent); color: #111; }
.btn-yes:hover { background: var(--accent-hover); }
.btn-yes.full { width: 100%; }
.btn-no { background: transparent; color: var(--text); border-color: var(--border); }
.btn-no:hover { border-color: #ef4444; color: var(--notice-text); }
.roster { margin-top: 12px; border-top: 1px solid var(--border); padding-top: 10px; }
.roster summary { cursor: pointer; display: flex; flex-wrap: wrap; gap: 12px; align-items: center; color: var(--text); }
.roster ul { margin: 8px 0 0; padding-left: 18px; columns: 2; column-gap: 20px; }
.roster li { break-inside: avoid; margin: 2px 0; }
.roster small { margin-left: 4px; }
.schedule { color: var(--muted); font-size: .8rem; margin: 8px 0 0; }
details.card > summary { cursor: pointer; font-weight: 700; padding: 10px 0; }
.fee-info { color: var(--muted); }
.fee-info code { background: var(--surface-2); padding: 2px 6px; border-radius: 4px; color: var(--text); user-select: all; }

/* --- Alamlehed --- */
.back-link { display: inline-block; color: var(--muted); text-decoration: none; margin-bottom: 8px; font-size: .95rem; }
.back-link:hover { color: var(--accent); }
.rink { display: grid; gap: 8px; margin: 10px 0 16px; padding: 12px; border-radius: 14px; background: #1b2530; border: 2px solid #2d3d4f; }
.rink-row { display: flex; gap: 8px; justify-content: center; }
.pos { flex: 1; max-width: 33%; cursor: pointer; position: relative; }
.rink-row:last-child .pos { max-width: 50%; }
.pos > span {
    display: flex; flex-direction: column; align-items: center; text-align: center; gap: 2px; height: 100%;
    padding: 10px 6px; border-radius: 10px; background: rgba(255,255,255,.06); border: 2px solid transparent;
}
.pos small { color: var(--muted); font-size: .75rem; line-height: 1.2; }
.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 10px; margin-bottom: 16px; }
.stat { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 12px 14px; }
.stat b { display: block; font-size: 1.8rem; line-height: 1.1; }
.stat span { color: var(--muted); font-size: .85rem; }
.stat.ok b { color: #86efac; }
.stat.bad b { color: var(--notice-text); }
.tag { display: inline-block; padding: 2px 8px; border-radius: 6px; font-size: .8rem; font-weight: 700; background: var(--surface-2); }
.tag.ok { color: #86efac; }
.tag.bad { color: var(--notice-text); background: var(--notice-bg); }
.tag.gk { color: #93c5fd; }
.tag.muted { color: var(--muted); }
table.sessions { width: 100%; border-collapse: collapse; margin: 6px 0; }
table.sessions td { padding: 7px 4px; border-bottom: 1px solid var(--border); font-size: .92rem; }
table.sessions td:last-child { text-align: right; }
.shirt-preview { display: grid; gap: 8px; margin-bottom: 14px; }
.shirt-img { position: relative; container-type: inline-size; background: #fff1; border-radius: 10px; overflow: hidden; }
.shirt-img img { display: block; width: 100%; height: auto; }
.shirt-img span { position: absolute; transform: translate(-50%, -50%); font-weight: 900; white-space: nowrap; font-family: Impact, "Arial Black", sans-serif; }
.field-row { display: flex; gap: 10px; }
.field-row .grow { flex: 1; }
.field-row .num { flex: 0 0 90px; }
.size-guide { margin: -4px 0 14px; color: var(--muted); }
.size-guide table { margin-top: 6px; font-size: .9rem; }
.size-guide td { padding: 3px 10px 3px 0; }
.shirt-form .btn-block { margin-top: 6px; }
.extra-tag { background: var(--accent); color: #111; border-radius: 4px; padding: 0 6px; }
.fee-list { margin: 6px 0 10px; padding-left: 18px; }
.fee-list li { margin: 6px 0; color: var(--text); }
.fee-list small { color: var(--muted); }
.fee-note { color: var(--muted); border-top: 1px solid var(--border); padding-top: 8px; }

/* Treeningu kinnitamine (treener / juhatus) */
.tabs-scroll { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 6px; margin: 10px 0 14px; }
.tabs-scroll a { flex: 0 0 auto; padding: 8px 12px; border-radius: 999px; background: var(--surface); border: 1px solid var(--border); color: var(--text); text-decoration: none; font-size: .9rem; white-space: nowrap; }
.tabs-scroll a.active { border-color: var(--accent); background: #2a2200; font-weight: 700; }
.confirm-search { width: 100%; padding: 10px 12px; border-radius: 10px; border: 1px solid var(--border); background: var(--surface-2); color: var(--text); font-size: 1rem; margin: 6px 0 10px; }
.confirm-list { display: grid; gap: 6px; margin-bottom: 14px; }
.confirm-list label { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 10px; background: var(--surface-2); border: 1px solid var(--border); cursor: pointer; }
.confirm-list label.reg { border-color: #8a6d00; }
.confirm-list label .name { flex: 1; min-width: 0; }
.confirm-list input[type=checkbox] { width: 22px; height: 22px; accent-color: var(--accent); flex: 0 0 auto; }
.confirm-list .gk { display: flex; align-items: center; gap: 4px; color: var(--muted); font-size: .9rem; }
.confirm-list .gk input { width: 18px; height: 18px; }
.confirm-actions { display: grid; gap: 10px; }
.btn-danger { padding: 12px; border-radius: 10px; background: transparent; color: var(--notice-text); border: 1px solid #5b2a2a; font-weight: 700; cursor: pointer; width: 100%; font-size: .95rem; }
