﻿*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

/* Рекламный баннер */
.banner-wrap {
    width: 100%;
    background: #000;
}
.banner-link {
    display: block;
    max-width: 480px;
    margin: 0 auto;
    line-height: 0;
}
.banner-img {
    width: 100%;
    height: auto;
    display: block;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: #0d2b0d;
    color: #e8edf2;
    min-height: 100vh;
    padding: 16px;
}

.container {
    max-width: 480px;
    margin: 0 auto;
}

header {
    text-align: center;
    padding: 32px 0 24px;
}

.logo { font-size: 48px; margin-bottom: 8px; }

h1 {
    font-size: 22px;
    font-weight: 700;
    color: #fff;
}

/* Alerts */
.alert {
    padding: 14px 16px;
    border-radius: 10px;
    margin-bottom: 20px;
    font-size: 15px;
    line-height: 1.4;
}
.alert-success { background: #1a4731; border: 1px solid #2d7a4f; color: #6ee7a8; }
.alert-error   { background: #3d1a1a; border: 1px solid #7a2d2d; color: #f87171; }
.alert-info    { background: #1a3020; border: 1px solid #2d5a7a; color: #93c5fd; }

/* Form */
.form { display: flex; flex-direction: column; gap: 20px; }

.field { display: flex; flex-direction: column; gap: 8px; }

label {
    font-size: 14px;
    font-weight: 600;
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

input[type="text"],
input[type="tel"],
input[type="number"],
input[type="date"],
input[type="time"],
input[type="password"],
input[type="email"] {
    width: 100%;
    padding: 14px 16px;
    background: #1e2d3d;
    border: 1.5px solid #2d4056;
    border-radius: 10px;
    color: #fff;
    font-size: 16px;
    outline: none;
    transition: border-color 0.2s;
    -webkit-appearance: none;
}
input[type="text"]:focus,
input[type="tel"]:focus,
input[type="number"]:focus,
input[type="date"]:focus,
input[type="time"]:focus,
input[type="password"]:focus,
input[type="email"]:focus {
    border-color: #3b82f6;
}
input::placeholder { color: #4a6080; }

/* Training options */
.training-list { display: flex; flex-direction: column; gap: 10px; }

.training-option {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 16px;
    background: #1e2d3d;
    border: 1.5px solid #2d4056;
    border-radius: 10px;
    cursor: pointer;
    transition: border-color 0.2s, background 0.2s;
}
.training-option:has(input:checked) {
    border-color: #3b82f6;
    background: #1a2d4a;
}
.training-option.full {
    opacity: 0.45;
    cursor: not-allowed;
}
.training-option input[type="radio"] {
    width: 20px;
    height: 20px;
    accent-color: #3b82f6;
    flex-shrink: 0;
}

.training-info {
    display: flex;
    flex-direction: column;
    gap: 3px;
}
.training-info strong { font-size: 15px; color: #fff; text-transform: capitalize; }
.time { font-size: 13px; color: #64748b; }
.venue { font-size: 12px; color: #94a3b8; }
.slots { font-size: 13px; color: #4ade80; }
.slots.low { color: #fb923c; }

/* Button */
.btn {
    display: block;
    width: 100%;
    padding: 16px;
    background: #3b82f6;
    color: #fff;
    font-size: 16px;
    font-weight: 700;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    text-align: center;
    text-decoration: none;
    transition: background 0.2s;
    -webkit-appearance: none;
    margin-top: 4px;
}
.btn:hover { background: #2563eb; }
.btn-outline {
    background: transparent;
    border: 1.5px solid #3b82f6;
    color: #3b82f6;
}
.btn-outline:hover { background: #1a2d4a; }
.btn-sm {
    width: auto;
    padding: 8px 16px;
    font-size: 13px;
    font-weight: 600;
    border-radius: 8px;
    display: inline-block;
}
.btn-danger { background: #dc2626; }
.btn-danger:hover { background: #b91c1c; }

/* User header */
.user-header {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 14px 14px 12px;
    margin-bottom: 16px;
    border-radius: 14px;
    overflow: hidden;
    position: relative;
    background-image: url('/img/fon.jpg');
    background-size: cover;
    background-position: center top;
}
.user-header::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(0,0,0,0.65) 0%, rgba(0,0,0,0.5) 100%);
    pointer-events: none;
}
.user-header > * {
    position: relative;
    z-index: 1;
}
.user-top {
    display: flex;
    align-items: center;
    gap: 14px;
}
.user-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.user-nickname { font-size: 18px; font-weight: 700; color: #fff; }

.jersey-wrap {
    display: grid;
    place-items: center;
    width: 80px;
    flex-shrink: 0;
}
.jersey-img, .ball-img, .kit-svg {
    grid-area: 1 / 1;
    width: 100%;
    display: block;
}
.jersey-number {
    grid-area: 1 / 1;
    font-size: 18px;
    font-weight: 900;
    color: #1e3a8a;
    line-height: 1;
    letter-spacing: -1px;
    margin-top: 6px;
    pointer-events: none;
}
.player-number { color: #3b82f6; font-size: 13px; font-weight: 700; margin-left: 4px; }
.user-stats { font-size: 13px; color: #64748b; }
.user-actions {
    display: flex;
    gap: 6px;
    margin-top: 6px;
}
.user-actions .btn-sm {
    flex: 1 1 0;
    text-align: center;
    padding: 8px 4px;
    font-size: 12px;
    min-width: 0;
    white-space: nowrap;
    display: block;
}
.user-btn-icon {
    flex: none !important;
    width: 40px;
    display: flex !important;
    align-items: center;
    justify-content: center;
}

.section-title {
    font-size: 13px;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin: 20px 0 12px;
    font-weight: 600;
}

/* Training cards */
.training-cards { display: flex; flex-direction: column; gap: 10px; }

.training-card {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 14px 16px;
    background: #1e2d3d;
    border: 1.5px solid #2d4056;
    border-radius: 10px;
    gap: 12px;
}
.training-card.registered {
    border-color: #22c55e;
    background: #162e1e;
}
.training-card-info {
    display: flex;
    flex-direction: column;
    gap: 3px;
    flex: 1;
    min-width: 0;
}
.training-card-info strong { font-size: 15px; color: #fff; }
.training-rating { font-size: 13px; color: #fbbf24; }
.star-btn { background: none; border: none; color: #4a6080; font-size: 22px; cursor: pointer; padding: 0 1px; line-height: 1; transition: color .15s; }
.star-btn:hover, .star-btn:hover ~ .star-btn { color: #fbbf24; outline: none; }

.btn-cancel {
    background: transparent;
    border: 1.5px solid #ef4444;
    color: #ef4444;
}
.btn-cancel:hover { background: #3d1a1a; }

button:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

/* Stat cards */
.stats-row {
    display: flex;
    gap: 8px;
    margin-bottom: 20px;
}
.stat-card {
    flex: 1;
    min-width: 0;
    background: #1e2d3d;
    border: 1px solid #2d4056;
    border-radius: 10px;
    padding: 14px 10px;
    text-align: center;
}
.stat-value { font-size: 24px; font-weight: 700; color: #fff; }
.stat-label { font-size: 11px; color: #64748b; margin-top: 4px; text-transform: uppercase; letter-spacing: 0.05em; word-break: break-word; }

/* Rating input в форме */
.rating-input { display: flex; flex-wrap: wrap; gap: 6px; }
.rating-option input[type="radio"] { display: none; }
.rating-option span {
    display: inline-block;
    padding: 6px 12px;
    border: 1.5px solid #2d4056;
    border-radius: 8px;
    font-size: 13px;
    color: #64748b;
    cursor: pointer;
    transition: all 0.15s;
}
.rating-option input:checked + span {
    border-color: #fbbf24;
    color: #fbbf24;
    background: rgba(251,191,36,0.1);
}

/* Star rating */
.star-btn {
    background: none;
    border: none;
    font-size: 20px;
    color: #2d4056;
    cursor: pointer;
    padding: 0 2px;
    line-height: 1;
    transition: color 0.15s;
}
.star-btn.active { color: #fbbf24; }
.star-btn:hover  { color: #fbbf24; }
.star-clear { font-size: 13px; color: #64748b; margin-left: 4px; }
.star-clear:hover { color: #ef4444; }

/* Admin styles */
.admin-header {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 16px 0;
    margin-bottom: 20px;
    border-bottom: 1px solid #2d4056;
}
.admin-header h1 { font-size: 18px; }

/* Шапка тренерской с фоном */
.coach-header {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 14px 14px 12px;
    margin-bottom: 20px;
    border-radius: 14px;
    overflow: hidden;
    position: relative;
    background-image: url('/img/fon.jpg');
    background-size: 100% 200%;
    background-position: center top;
}
.coach-header::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(0,0,0,0.70) 0%, rgba(0,0,0,0.55) 100%);
    pointer-events: none;
}
.coach-header > * {
    position: relative;
    z-index: 1;
}
.coach-header h1 { font-size: 18px; }
.admin-actions {
    display: flex;
    gap: 4px;
    margin-top: 6px;
}
.admin-actions .btn-sm { flex: 1 1 0; text-align: center; padding: 7px 2px; font-size: 11px; min-width: 0; white-space: nowrap; overflow: hidden; display: block; }
.admin-actions form { display: contents; }
.admin-actions form .btn-sm { flex: 1 1 0; text-align: center; padding: 7px 2px; font-size: 11px; min-width: 0; white-space: nowrap; overflow: hidden; display: block; }

.card {
    background: #1e2d3d;
    border: 1px solid #2d4056;
    border-radius: 12px;
    margin-bottom: 16px;
    overflow: hidden;
}
.card-header {
    padding: 14px 16px;
    background: #162233;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
}
.card-header h2 { font-size: 15px; font-weight: 700; }
.badge {
    font-size: 12px;
    padding: 3px 10px;
    border-radius: 20px;
    font-weight: 600;
    background: #2d4056;
    color: #93c5fd;
    white-space: nowrap;
}

table { width: 100%; border-collapse: collapse; }
td { padding: 12px 16px; border-bottom: 1px solid #1a3020; font-size: 14px; }
tr:last-child td { border-bottom: none; }
td:last-child { text-align: right; }

.team-badge {
    display: inline-block;
    padding: 3px 12px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 700;
}
.team-white {
    background: #fff;
    color: #0d2b0d;
    border: 1px solid #cbd5e1;
}
.team-black {
    background: #1a1a1a;
    color: #fff;
    border: 1px solid #374151;
}

/* Итоговый состав */
.composition {
    display: flex;
    gap: 12px;
    padding: 16px;
    border-top: 1px solid #1a3020;
}
.team-column {
    flex: 1;
    border-radius: 10px;
    overflow: hidden;
}
.team-column-header {
    padding: 10px 14px;
    font-size: 13px;
    font-weight: 700;
    text-align: center;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}
.team-column.whites .team-column-header {
    background: #fff;
    color: #0d2b0d;
}
.team-column.blacks .team-column-header {
    background: #1a1a1a;
    color: #fff;
}
.team-column-body {
    background: #162233;
    padding: 10px 14px;
    min-height: 40px;
}
.team-column-body .player {
    font-size: 13px;
    padding: 4px 0;
    border-bottom: 1px solid #1e2d3d;
    color: #e2e8f0;
}
.team-column-body .player:last-child { border-bottom: none; }
.team-column-body .empty-team {
    font-size: 13px;
    color: #4a6080;
    text-align: center;
    padding: 4px 0;
}

select {
    width: 100%;
    background: #0d2b0d;
    border: 1px solid #2d4056;
    border-radius: 6px;
    color: #fff;
    padding: 10px 12px;
    font-size: 16px;
    cursor: pointer;
}

.empty { text-align: center; color: #4a6080; padding: 20px; font-size: 14px; }

/* Tag input (leagues) */
.tag-input-wrap {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    padding: 10px 12px;
    background: #1e2d3d;
    border: 1.5px solid #2d4056;
    border-radius: 10px;
    min-height: 48px;
    align-items: center;
    cursor: text;
}
.tag-input-wrap:focus-within { border-color: #3b82f6; }
.tag {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 10px;
    background: #1a3a5c;
    border: 1px solid #3b82f6;
    border-radius: 20px;
    font-size: 13px;
    color: #93c5fd;
}
.tag button {
    background: none;
    border: none;
    color: #64748b;
    cursor: pointer;
    font-size: 12px;
    padding: 0;
    line-height: 1;
    width: auto;
    display: inline;
    margin-top: 0;
}
.tag button:hover { color: #ef4444; }

/* Team restriction dropdown */
.team-dropdown {
    border: 1.5px solid #2d4056;
    border-radius: 10px;
    overflow: hidden;
}
.team-dropdown-summary {
    padding: 10px 14px;
    background: #1e2d3d;
    color: #94a3b8;
    font-size: 14px;
    cursor: pointer;
    list-style: none;
    display: flex;
    align-items: center;
    justify-content: space-between;
    user-select: none;
}
.team-dropdown-summary::-webkit-details-marker { display: none; }
.team-dropdown-summary::after {
    content: '▾';
    font-size: 12px;
    color: #64748b;
    transition: transform 0.2s;
}
.team-dropdown[open] .team-dropdown-summary::after { transform: rotate(-180deg); }
.team-dropdown[open] .team-dropdown-summary { color: #e2e8f0; border-bottom: 1px solid #2d4056; }
.team-dropdown-body {
    display: flex;
    flex-direction: column;
    gap: 1px;
    background: #162233;
    padding: 6px;
}
.restrict-team-option {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 10px;
    background: #1e2d3d;
    border-radius: 7px;
    cursor: pointer;
    font-size: 14px;
    color: #e2e8f0;
    transition: background 0.15s;
}
.restrict-team-option:has(input:checked) {
    background: #1a2d4a;
    color: #93c5fd;
}
.restrict-team-option input[type="checkbox"] {
    width: 16px;
    height: 16px;
    accent-color: #3b82f6;
    flex-shrink: 0;
}

.private-toggle {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    background: #1e2d3d;
    border: 1.5px solid #2d4056;
    border-radius: 10px;
    cursor: pointer;
    font-size: 14px;
    color: #94a3b8;
    margin-bottom: 4px;
}
.private-toggle:has(input:checked) {
    border-color: #7c3aed;
    background: #1c1535;
    color: #c4b5fd;
}
.private-toggle input[type="checkbox"] {
    width: 16px;
    height: 16px;
    accent-color: #7c3aed;
    flex-shrink: 0;
}

/* Add training form */
.add-form {
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.add-form input { padding: 10px 12px; font-size: 14px; }
.row { display: flex; gap: 10px; }
.add-form .row input { flex: 1; }

@media (max-width: 360px) {
    h1 { font-size: 18px; }
    .logo { font-size: 36px; }
}

/* Полоска дней */
.day-strip-wrap {
    overflow: hidden;
    margin: 0 -16px 16px;
    padding: 0 16px;
}
.day-strip {
    display: flex;
    gap: 6px;
    overflow-x: auto;
    padding: 4px 0 8px;
    scrollbar-width: none;
}
.day-strip::-webkit-scrollbar { display: none; }
.day-pill {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    min-width: 44px;
    padding: 7px 6px 6px;
    border-radius: 12px;
    border: 1px solid #2d4056;
    background: #0f2132;
    color: #64748b;
    cursor: pointer;
    flex-shrink: 0;
    position: relative;
    transition: background 0.15s, border-color 0.15s;
}
.day-pill-all {
    min-width: 48px;
    font-size: 13px;
    font-weight: 600;
    color: #64748b;
    padding: 10px 10px;
    justify-content: center;
}
.dp-name { font-size: 11px; text-transform: uppercase; letter-spacing: 0.03em; }
.dp-num  { font-size: 17px; font-weight: 700; line-height: 1; }
.dp-dot  {
    width: 5px; height: 5px;
    border-radius: 50%;
    background: #3b82f6;
    margin-top: 2px;
}
.day-pill.day-today { border-color: #3b82f6; color: #93c5fd; }
.day-pill.active {
    background: #1a3a1a;
    border-color: #3b82f6;
    color: #fff;
}

/* ── Опросы ── */
.poll-question-text {
    padding: 14px 16px;
    font-size: 16px;
    font-weight: 700;
    line-height: 1.4;
    color: #fff;
    border-bottom: 1px solid #1a3020;
}
.poll-author {
    font-size: 12px;
    color: #64748b;
    font-weight: 400;
    margin-top: 4px;
}
.poll-options {
    padding: 12px 16px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.poll-option {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    background: #162233;
    border: 1.5px solid #2d4056;
    border-radius: 10px;
    cursor: pointer;
    transition: border-color 0.2s, background 0.2s;
    font-size: 14px;
    color: #e8edf2;
    font-weight: 500;
}
.poll-option:hover { border-color: #3b82f6; background: #1a2d4a; }
.poll-option.selected { border-color: #3b82f6; background: #1a2d4a; color: #93c5fd; }
.radio-circle {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    border: 2px solid #2d4056;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    transition: border-color 0.2s, background 0.2s;
}
.poll-option.selected .radio-circle {
    background: #3b82f6;
    border-color: #3b82f6;
    color: #fff;
    font-weight: 900;
}
.poll-footer {
    padding: 12px 16px;
    border-top: 1px solid #1a3020;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #162233;
}
.poll-count { font-size: 12px; color: #64748b; }
.poll-result-item {
    padding: 9px 16px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.poll-result-row {
    display: flex;
    justify-content: space-between;
    font-size: 14px;
}
.poll-result-pct { color: #3b82f6; font-weight: 700; }
.poll-bar-bg {
    background: #162233;
    border-radius: 6px;
    height: 7px;
    overflow: hidden;
    border: 1px solid #2d4056;
}
.poll-bar-fill { height: 100%; border-radius: 6px; background: #2d4056; transition: width 0.4s; }
.poll-bar-fill.top { background: #3b82f6; }
.voted-pill {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background: #1a4731;
    border: 1px solid #2d7a4f;
    color: #6ee7a8;
    border-radius: 20px;
    padding: 3px 12px;
    font-size: 12px;
    font-weight: 600;
}
.poll-voter-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 16px;
    border-bottom: 1px solid #1a3020;
    font-size: 13px;
}
.poll-voter-row:last-child { border-bottom: none; }
.poll-voter-ans { color: #64748b; }
.poll-voter-ans.none { color: #ef4444; font-size: 12px; }
.poll-tab-strip {
    display: flex;
    border-bottom: 1px solid #2d4056;
    padding: 0 16px;
}
.poll-tab {
    padding: 10px 14px;
    font-size: 13px;
    font-weight: 600;
    color: #64748b;
    cursor: pointer;
    border-bottom: 2px solid transparent;
    margin-bottom: -1px;
    transition: color 0.15s;
}
.poll-tab.active { color: #3b82f6; border-bottom-color: #3b82f6; }
.poll-form-wrap { padding: 16px; display: flex; flex-direction: column; gap: 12px; }
.poll-option-row { display: flex; gap: 8px; align-items: center; }
.poll-option-row input { flex: 1; }
.poll-remove-btn {
    width: 36px; height: 36px;
    background: #3d1a1a; border: 1px solid #7a2d2d;
    border-radius: 8px; color: #ef4444;
    font-size: 14px; cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0;
}
.poll-add-opt {
    width: 100%;
    padding: 10px;
    background: none;
    border: 1.5px dashed #2d4056;
    border-radius: 10px;
    color: #64748b;
    font-size: 13px; font-weight: 600;
    cursor: pointer; font-family: inherit;
    transition: border-color 0.2s, color 0.2s;
    margin-top: 4px;
}
.poll-add-opt:hover { border-color: #3b82f6; color: #3b82f6; }
.day-pill.active .dp-dot { background: #fff; }
