/* Оформление сайта. Цвета — в переменных ниже. */
:root {
  --green-900: #0d3a1c;
  --green-800: #134d26;
  --green-700: #1b6331;
  --green-600: #23803f;
  --green-100: #e6f2e8;
  --green-50: #f3f9f4;
  --accent: #f5b301;
  --accent-dark: #c98f00;
  --red: #c62828;
  --red-100: #fdecea;
  --blue: #1565c0;
  --text: #1c2430;
  --muted: #677285;
  --bg: #eef2ef;
  --panel: #ffffff;
  --border: #d8e0da;
  --row-alt: #f6f9f7;
  --row-hover: #eaf4ec;
  --radius: 8px;
  --shadow: 0 1px 2px rgba(16, 40, 24, 0.08), 0 2px 8px rgba(16, 40, 24, 0.05);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 14px/1.45 system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
}
a { color: var(--green-700); text-decoration: none; }
a:hover { color: var(--green-600); text-decoration: underline; }
h1, h2, h3, h4 { margin: 0 0 10px; line-height: 1.25; }
h1 { font-size: 22px; }
h2 { font-size: 18px; }
h3 { font-size: 15px; }
h4 { font-size: 14px; margin-top: 14px; }
p { margin: 0 0 10px; }
img.flag { vertical-align: -1px; border-radius: 2px; box-shadow: 0 0 0 1px rgba(0,0,0,.12); margin-right: 4px; }
.wrap { max-width: 1240px; margin: 0 auto; padding: 0 16px; }
.muted { color: var(--muted); }
.small { font-size: 12px; }
.center { text-align: center; }
.right { text-align: right; }
.nowrap { white-space: nowrap; }
.good { color: var(--green-600); font-weight: 600; }
.bad { color: var(--red); font-weight: 600; }
.warn { color: #b26a00; font-weight: 600; }
.mt { margin-top: 14px; }
.mb0 { margin-bottom: 0; }
.inline { display: inline; }
.hidden { display: none; }

/* ---------- шапка ---------- */
.top { background: linear-gradient(180deg, var(--green-800), var(--green-900)); color: #fff; }
.top-row { display: flex; align-items: center; gap: 18px; min-height: 64px; flex-wrap: wrap; padding-top: 8px; padding-bottom: 8px; }
.brand { display: flex; align-items: center; gap: 10px; color: #fff; }
.brand:hover { text-decoration: none; color: #fff; }
.brand-ball { width: 40px; height: 40px; flex: none; }
.brand-text { display: flex; flex-direction: column; }
.brand-name { font-size: 21px; font-weight: 800; letter-spacing: .3px; }
.brand-tag { font-size: 11px; text-transform: uppercase; letter-spacing: 1.4px; color: #b9dcc2; }
.top-info { display: flex; gap: 16px; font-size: 13px; color: #cfe7d5; flex-wrap: wrap; }
.top-info b { color: #fff; }
.userbox { margin-left: auto; display: flex; align-items: center; gap: 12px; font-size: 13px; flex-wrap: wrap; }
.userbox a { color: #fff; }
.userbox .team-link { color: var(--accent); font-weight: 600; }
.menu { background: rgba(0,0,0,.18); border-top: 1px solid rgba(255,255,255,.08); }
.menu .wrap { display: flex; flex-wrap: wrap; gap: 2px; }
.menu a { color: #e3f1e6; padding: 10px 11px; font-size: 13.5px; border-bottom: 3px solid transparent; }
.menu a:hover { color: #fff; text-decoration: none; background: rgba(255,255,255,.06); }
.menu a.active { color: #fff; border-bottom-color: var(--accent); }
.menu .sep { width: 1px; background: rgba(255,255,255,.15); margin: 8px 6px; }

/* ---------- раскладка ---------- */
.page { display: grid; grid-template-columns: minmax(0, 1fr) 280px; gap: 18px; padding-top: 18px; padding-bottom: 30px; }
.page.no-side { grid-template-columns: minmax(0, 1fr); }
.content { min-width: 0; }
.side { display: flex; flex-direction: column; gap: 14px; }
.foot { border-top: 1px solid var(--border); background: #fff; color: var(--muted); font-size: 12px; padding: 16px 0; }
.foot .wrap { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; }

.panel { background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); padding: 16px; margin-bottom: 16px; }
.panel-title { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; font-weight: 700; font-size: 16px; margin: -16px -16px 14px; padding: 11px 16px; border-bottom: 1px solid var(--border); background: var(--green-50); border-radius: var(--radius) var(--radius) 0 0; }
.panel-title .actions { font-weight: 400; font-size: 13px; display: flex; gap: 8px; flex-wrap: wrap; }
.side .panel { margin-bottom: 0; padding: 14px; }
.side .panel-title { margin: -14px -14px 10px; padding: 9px 14px; font-size: 14px; }
.grid2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.grid3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.kv { display: grid; grid-template-columns: max-content 1fr; gap: 5px 14px; margin: 0; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; font-weight: 600; }
.kpis { display: flex; flex-wrap: wrap; gap: 10px; }
.kpi { background: var(--green-50); border: 1px solid var(--border); border-radius: 6px; padding: 8px 12px; min-width: 110px; }
.kpi .v { font-size: 18px; font-weight: 800; }
.kpi .l { font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: .5px; }

/* ---------- сообщения ---------- */
.flash { padding: 10px 14px; border-radius: 6px; margin-bottom: 12px; border: 1px solid; }
.flash-success { background: var(--green-100); border-color: #b6dcbf; color: var(--green-800); }
.flash-error { background: var(--red-100); border-color: #f2b8b5; color: #8e1b1b; }
.flash-info { background: #eef4fb; border-color: #c3d7ee; color: #1f4b7a; }
.alerts { list-style: none; padding: 0; margin: 12px 0 0; display: flex; flex-direction: column; gap: 6px; }
.alerts li { padding: 8px 12px; border-radius: 6px; border-left: 4px solid; background: #f7f9fb; }
.alerts .alert-warn { border-color: var(--accent); background: #fff8e5; }
.alerts .alert-info { border-color: var(--blue); }
.alerts .alert-error { border-color: var(--red); background: var(--red-100); }

/* ---------- кнопки и формы ---------- */
.btn, button.btn { display: inline-block; border: 1px solid var(--green-700); background: var(--green-700); color: #fff; padding: 7px 14px; border-radius: 6px; font: inherit; font-weight: 600; cursor: pointer; line-height: 1.3; text-align: center; }
.btn:hover { background: var(--green-600); color: #fff; text-decoration: none; }
.btn-small { padding: 4px 10px; font-size: 12.5px; }
.btn-big { padding: 10px 20px; font-size: 15px; }
.btn-accent { background: var(--accent); border-color: var(--accent-dark); color: #222; }
.btn-accent:hover { background: #ffc61a; color: #111; }
.btn-ghost { background: transparent; color: var(--green-700); }
.btn-ghost:hover { background: var(--green-100); color: var(--green-800); }
.top .btn-ghost { color: #fff; border-color: rgba(255,255,255,.5); }
.btn-danger { background: var(--red); border-color: #9e1f1f; }
.btn-danger:hover { background: #d84343; }
.btn[disabled] { opacity: .5; cursor: not-allowed; }
button.link { background: none; border: 0; padding: 0; color: inherit; font: inherit; cursor: pointer; text-decoration: underline; }
.form { display: flex; flex-direction: column; gap: 12px; max-width: 420px; }
.field { display: flex; flex-direction: column; gap: 4px; }
.field label, .lbl { font-size: 12px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: .4px; }
input[type=text], input[type=password], input[type=email], input[type=number], select, textarea {
  font: inherit; color: inherit; border: 1px solid #c5cfc8; border-radius: 6px; padding: 6px 9px; background: #fff; min-width: 0;
}
input:focus, select:focus, textarea:focus { outline: 2px solid rgba(35,128,63,.35); border-color: var(--green-600); }
textarea { min-height: 110px; resize: vertical; }
.filters { display: flex; flex-wrap: wrap; gap: 10px; align-items: flex-end; margin-bottom: 12px; }
.filters .field { gap: 2px; }
.filters input[type=number] { width: 80px; }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }

/* ---------- таблицы ---------- */
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.tbl { width: 100%; border-collapse: collapse; font-size: 13px; }
.tbl th { text-align: left; font-size: 11.5px; color: var(--muted); font-weight: 700; text-transform: uppercase; letter-spacing: .3px; padding: 7px 8px; border-bottom: 2px solid var(--border); white-space: nowrap; background: #fbfcfb; }
.tbl td { padding: 6px 8px; border-bottom: 1px solid #edf1ee; vertical-align: middle; }
.tbl tbody tr:nth-child(even) td { background: var(--row-alt); }
.tbl tbody tr:hover td { background: var(--row-hover); }
.tbl .num, .tbl th.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.tbl .c { text-align: center; }
.tbl tr.mine td { background: #fff7d6 !important; }
.tbl tr.zone-up td:first-child { box-shadow: inset 4px 0 0 var(--green-600); }
.tbl tr.zone-down td:first-child { box-shadow: inset 4px 0 0 var(--red); }
.tbl tfoot td { font-weight: 700; border-top: 2px solid var(--border); background: #fbfcfb; }
.tbl-results td { padding: 5px 8px; }
.tbl-results .score { text-align: center; font-weight: 800; width: 70px; }

.pos { display: inline-block; min-width: 30px; padding: 1px 5px; border-radius: 4px; font-size: 11px; font-weight: 800; text-align: center; color: #fff; letter-spacing: .3px; }
.pos-gk { background: #b8860b; }
.pos-def { background: #1e5aa8; }
.pos-mid { background: #23803f; }
.pos-att { background: #c0392b; }
.extra-pos { font-size: 11px; color: var(--muted); }
.tag { display: inline-block; padding: 1px 7px; border-radius: 10px; font-size: 11px; font-weight: 700; background: #e9edf1; color: #445; white-space: nowrap; }
.tag-green { background: var(--green-100); color: var(--green-800); }
.tag-red { background: var(--red-100); color: #9b1c1c; }
.tag-yellow { background: #fff2c2; color: #7a5800; }
.tag-blue { background: #e3eefb; color: #174a85; }
.res { display: inline-block; width: 20px; height: 20px; line-height: 20px; border-radius: 4px; text-align: center; font-size: 11px; font-weight: 800; color: #fff; }
.res-W, .res-В { background: var(--green-600); }
.res-D, .res-Н { background: #8a94a6; }
.res-L, .res-П { background: var(--red); }
.rating { display: inline-block; min-width: 32px; padding: 1px 5px; border-radius: 4px; background: #eceff3; font-weight: 700; text-align: center; font-size: 12px; }
.rating-top { background: var(--green-600); color: #fff; }
.rating-good { background: var(--green-100); color: var(--green-800); }
.rating-bad { background: var(--red-100); color: #9b1c1c; }
.bar { display: inline-block; width: 46px; height: 6px; border-radius: 3px; background: #e3e8e4; vertical-align: middle; overflow: hidden; }
.bar > i { display: block; height: 100%; background: var(--green-600); }
.bar.warn > i { background: var(--accent); }
.bar.bad > i { background: var(--red); }

.tabs { display: flex; gap: 4px; border-bottom: 2px solid var(--border); margin-bottom: 14px; flex-wrap: wrap; }
.tabs a { padding: 7px 12px; border-radius: 6px 6px 0 0; color: var(--muted); font-weight: 600; margin-bottom: -2px; border-bottom: 2px solid transparent; }
.tabs a.active { color: var(--green-800); border-bottom-color: var(--green-700); background: var(--green-50); }
.tabs a:hover { text-decoration: none; color: var(--green-700); }
.pager { display: flex; gap: 4px; flex-wrap: wrap; margin-top: 12px; }
.pager a, .pager span { padding: 3px 9px; border: 1px solid var(--border); border-radius: 5px; background: #fff; }
.pager span.cur { background: var(--green-700); color: #fff; border-color: var(--green-700); }

/* ---------- главная ---------- */
.hero { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 20px; background: linear-gradient(135deg, #fff 55%, var(--green-50)); }
.hero h1 { font-size: 26px; }
.hero-points { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.hero-points li { padding: 10px 12px; border-radius: 8px; background: #fff; border: 1px solid var(--border); }
.hero-points b { display: block; color: var(--green-800); }
.news-item { padding: 10px 0; border-bottom: 1px solid #edf1ee; }
.news-item:last-child { border-bottom: 0; padding-bottom: 0; }
.news-item h3 { margin-bottom: 4px; }
.news-date { font-size: 12px; color: var(--muted); }
.callout { border-left: 4px solid var(--accent); }

/* ---------- карточка команды ---------- */
.team-head { display: flex; gap: 16px; align-items: flex-start; flex-wrap: wrap; }
.crest { width: 64px; height: 64px; border-radius: 12px; flex: none; display: grid; place-items: center; color: #fff; font-weight: 900; font-size: 24px; box-shadow: inset 0 -6px 0 rgba(0,0,0,.15); }
.team-head h1 { margin-bottom: 4px; }
.team-meta { display: flex; gap: 14px; flex-wrap: wrap; color: var(--muted); font-size: 13px; }
.team-meta b { color: var(--text); }
.team-head .kpis { margin-left: auto; }

/* ---------- состав на матч ---------- */
.order-grid { display: grid; grid-template-columns: 330px minmax(0, 1fr); gap: 16px; align-items: start; }
.order-matches td { padding: 5px 8px; }
.order-top { display: grid; grid-template-columns: 250px minmax(0, 1.4fr) minmax(220px, 1fr); gap: 16px; align-items: stretch; margin-bottom: 16px; }
.order-top > .panel { margin-bottom: 0; }
.order-pitch-panel { padding: 10px; display: flex; align-items: center; justify-content: center; }
.pitch-top { max-width: 230px; }
.pitch-top .pitch-slot { width: 58px; }
.pitch-top .dot { width: 22px; height: 22px; font-size: 8px; border-width: 1px; }
.pitch-top .nm { font-size: 9.5px; max-width: 58px; }
.order-settings { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin-bottom: 12px; }
.order-settings select { width: 100%; }
.order-info { display: flex; flex-direction: column; gap: 14px; font-size: 13px; }
.info-block .lbl { display: block; margin-bottom: 3px; }
.weather { font-size: 15px; }
.weather-icon { font-size: 20px; vertical-align: -2px; }
.order-layout { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(340px, 1fr); gap: 16px; align-items: start; }
/* Состав на игру: одна сетка колонок для всех строк, поэтому строки ровные. */
.lineup { display: flex; flex-direction: column; border: 1px solid var(--border); border-radius: 6px; overflow: hidden; }
.lu-head, .lu-row { display: grid; grid-template-columns: 46px minmax(0, 1fr); align-items: center; }
.lu-head { grid-template-columns: 46px minmax(0, 1fr) 92px 44px 44px 44px; padding: 5px 8px 5px 0; background: #fbfcfb; border-bottom: 2px solid var(--border); font-size: 11px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .3px; }
.lu-head span:first-child { text-align: center; }
.lu-head .r { text-align: right; }
.lu-row { border-bottom: 1px solid #e7ece8; background: #fff; min-height: 32px; }
.lu-row:last-child { border-bottom: 0; }
.lu-row > .pos, .lu-row > .role-name { justify-self: center; }
.lu-row.fit-ok { background: #eaf6ec; }
.lu-row.fit-mid { background: #fff4d6; }
.lu-row.fit-bad { background: #fde4e1; }
.lu-row.empty { background: #f6f7f6; }
.lu-row.bench-first { border-top: 2px solid var(--border); }
.lineup.roles .lu-row { grid-template-columns: 90px minmax(0, 1fr); }
.role-name { font-size: 12.5px; color: var(--muted); justify-self: start !important; padding-left: 10px; }
.picker { display: grid; grid-template-columns: minmax(0, 1fr) 92px 44px 44px 44px; align-items: center; width: 100%; min-height: 32px; padding: 4px 8px 4px 0; border: 0; border-radius: 0; background: transparent; font: inherit; font-size: 12.5px; text-align: left; cursor: pointer; color: var(--text); }
.picker:hover, .picker:focus-visible { background: rgba(35, 128, 63, .08); outline: none; box-shadow: inset 0 0 0 1px var(--green-600); }
.picker .pk-name { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; padding-left: 4px; }
.picker .pk-empty { font-weight: 400; color: var(--muted); grid-column: 1 / -1; }
.pk-pos { color: var(--muted); font-size: 11.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pk-fat { color: var(--muted); font-size: 11.5px; text-align: right; }
.pk-val { font-weight: 800; text-align: right; font-variant-numeric: tabular-nums; }
.picker .pk-fit { text-align: right; font-size: 11.5px; color: var(--muted); }
.lu-row.fit-bad .pk-fit, .lu-row.fit-mid .pk-fit { color: #9b5b00; font-weight: 700; }
.picker-pop { position: absolute; z-index: 50; width: 440px; max-width: calc(100vw - 16px); background: #fff; border: 1px solid var(--green-600); border-radius: 8px; box-shadow: 0 8px 24px rgba(16, 40, 24, 0.22); overflow: hidden; }
.pk-title { padding: 8px 10px; background: var(--green-800); color: #fff; font-size: 12.5px; font-weight: 700; }
.pk-list { max-height: 340px; overflow-y: auto; }
.pk-none { padding: 10px; color: var(--muted); font-size: 12.5px; }
.pk-opt { display: grid; grid-template-columns: minmax(0, 1fr) 96px 44px 44px 48px; gap: 4px; align-items: center; width: 100%; padding: 5px 10px; border: 0; border-bottom: 1px solid #eef1ee; background: #fff; font: inherit; font-size: 12.5px; text-align: left; cursor: pointer; }
.pk-opt.pk-head { cursor: default; background: #fbfcfb; font-size: 11px; font-weight: 700; color: var(--muted); text-transform: uppercase; }
.pk-opt.pk-head span { font-weight: 700; color: var(--muted); }
.pk-opt.fit-ok { background: #eaf6ec; }
.pk-opt.fit-mid { background: #fff6dc; }
.pk-opt.fit-bad { background: #fff; color: #555; }
.pk-opt.fit-gk .pk-pos { color: #b8860b; font-weight: 700; }
.pk-opt.current { box-shadow: inset 4px 0 0 var(--green-700); }
.pk-opt:hover { background: var(--green-100); }
.pk-opt.pk-clear { color: var(--red); background: #fff; }
.pk-fit { color: var(--muted); font-size: 11px; text-align: right; }
/* Сортировка таблицы и значки состояния игроков. */
th.sortable { cursor: pointer; user-select: none; }
th.sortable:hover { color: var(--green-700); }
th.sort-asc::after { content: " ▲"; font-size: 9px; }
th.sort-desc::after { content: " ▼"; font-size: 9px; }
.status-icons { min-width: 44px; }
.st { display: inline-grid; place-items: center; width: 17px; height: 17px; margin: 0 1px; border-radius: 4px; font-size: 10px; font-weight: 800; line-height: 1; color: #fff; vertical-align: middle; cursor: help; }
.st-injury { background: #c62828; }
.st-red { background: #b71c1c; }
.st-yellow { background: #f2c200; color: #3a2d00; }
.st-tired { background: #ef6c00; }
.st-veteran { background: #6d7686; }
.st-sale { background: #1565c0; }
.st-talent { background: #23803f; }
.status-legend { line-height: 2; }
.status-legend .st { margin-left: 8px; }
.status-legend .st:first-child { margin-left: 0; }
.order-conditions { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 16px; }
.order-roster td { padding: 4px 6px; font-size: 12.5px; }
.order-roster th { padding: 6px; }
.order-roster tr.unavailable td { opacity: .55; }
.order-roster tr.in-start td { background: #e6f4ea; }
.order-roster tr.in-bench td { background: #eef3fb; }
.order-roster tr.in-start td:first-child { box-shadow: inset 3px 0 0 var(--green-700); }
.order-roster tr.in-bench td:first-child { box-shadow: inset 3px 0 0 #1e5aa8; }
.order-roster .lu-mark .pos { min-width: 30px; }
.order-roster input.pick { width: 16px; height: 16px; accent-color: var(--green-700); cursor: pointer; }
.order-kpis { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
.order-kpis > div { background: var(--green-50); border: 1px solid var(--border); border-radius: 6px; padding: 6px 8px; display: flex; flex-direction: column; }
.order-kpis b { font-size: 18px; }
.slot-table { width: 100%; border-collapse: collapse; }
.slot-table td { padding: 2px 3px; }
.slot-table td:first-child { width: 40px; }
.slot-table select { width: 100%; padding: 4px 6px; font-size: 12.5px; }
.slot-table .fit { width: 40px; text-align: right; font-size: 11px; color: var(--muted); }
.slot-table .fit.bad { color: var(--red); font-weight: 700; }
.slot-table tr.bench-first td { border-top: 2px dashed var(--border); padding-top: 6px; }
.slot-table.roles td:first-child { width: 90px; font-size: 12.5px; color: var(--muted); }
.pos-bench { background: #8a94a6; }
.pitch-mini { max-width: 240px; margin: 14px auto 6px; }
.pitch-mini .pitch-slot { width: 62px; }
.pitch-mini .dot { width: 20px; height: 20px; font-size: 8px; border-width: 1px; }
.pitch-mini .nm { font-size: 9px; max-width: 62px; }
.cond-table td { padding: 3px 4px; }
.cond-table input[type=number] { width: 64px; }
.cond-table select { width: 100%; }
.order-actions { margin-bottom: 16px; }
@media (max-width: 1100px) {
  .order-top { grid-template-columns: 230px minmax(0, 1fr); }
  .order-info { grid-column: 1 / -1; flex-direction: row; flex-wrap: wrap; }
}
@media (max-width: 1000px) {
  .order-layout, .order-conditions { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 640px) {
  .order-top { grid-template-columns: minmax(0, 1fr); }
  .order-settings { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .order-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .picker, .lu-head { grid-template-columns: minmax(0, 1fr) 44px 44px; }
  .lu-head { grid-template-columns: 46px minmax(0, 1fr) 44px 44px; }
  .picker .pk-pos, .picker .pk-fat, .lu-head span:nth-child(3), .lu-head span:nth-child(4) { display: none; }
}
.pitch { position: relative; width: 100%; aspect-ratio: 68 / 100; border-radius: 8px; overflow: hidden;
  background:
    linear-gradient(rgba(255,255,255,.55), rgba(255,255,255,.55)) center 50% / 100% 2px no-repeat,
    radial-gradient(circle at 50% 50%, transparent 0 13%, rgba(255,255,255,.55) 13% calc(13% + 2px), transparent calc(13% + 2px)),
    linear-gradient(90deg, transparent 22%, rgba(255,255,255,.5) 22% calc(22% + 2px), transparent calc(22% + 2px) calc(78% - 2px), rgba(255,255,255,.5) calc(78% - 2px) 78%, transparent 78%) center bottom / 100% 16% no-repeat,
    repeating-linear-gradient(180deg, #2f8f45 0 10%, #2a8340 10% 20%);
  border: 3px solid #1f6b33; }
.pitch-slot { position: absolute; transform: translate(-50%, -50%); text-align: center; width: 80px; }
.pitch-slot .dot { width: 30px; height: 30px; border-radius: 50%; margin: 0 auto 2px; display: grid; place-items: center; font-size: 10px; font-weight: 800; color: #fff; border: 2px solid #fff; box-shadow: 0 1px 3px rgba(0,0,0,.4); }
.pitch-slot .nm { display: inline-block; max-width: 80px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 11px; color: #fff; text-shadow: 0 1px 2px rgba(0,0,0,.8); font-weight: 600; }
.pitch-slot .val { font-size: 10px; color: #e6ffe9; text-shadow: 0 1px 2px rgba(0,0,0,.8); }
.pitch-slot.misfit .dot { border-color: var(--accent); }
.pitch-slot.empty .dot { background: rgba(0,0,0,.25) !important; border-style: dashed; }
.slots { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px 14px; }
.slot { display: flex; align-items: center; gap: 6px; }
.slot select { flex: 1; width: 100%; }
.slot .fit { font-size: 11px; width: 34px; text-align: right; color: var(--muted); }
.slot .fit.bad { color: var(--red); }
.settings { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; margin-bottom: 14px; }
.settings select { width: 100%; }
.strength-box { font-size: 13px; }
.strength-box b { font-size: 18px; }
.opponent { font-size: 13px; }

/* ---------- отчёт о матче ---------- */
.scoreboard { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 12px; text-align: center; }
.scoreboard .team-name { font-size: 20px; font-weight: 800; }
.scoreboard .big-score { font-size: 40px; font-weight: 900; letter-spacing: 2px; background: var(--green-800); color: #fff; padding: 4px 18px; border-radius: 10px; }
.scoreboard .pen { font-size: 13px; color: var(--muted); }
.scorers { font-size: 12.5px; color: var(--muted); margin-top: 6px; }
.match-info { display: flex; justify-content: center; gap: 16px; flex-wrap: wrap; color: var(--muted); font-size: 13px; margin-top: 12px; }
.stat-row { display: grid; grid-template-columns: 50px 1fr 50px; align-items: center; gap: 8px; margin: 6px 0; font-size: 13px; }
.stat-row .lbl2 { text-align: center; color: var(--muted); font-size: 12px; }
.stat-bars { display: flex; height: 7px; border-radius: 4px; overflow: hidden; background: #e4e9e5; margin-top: 2px; }
.stat-bars i:first-child { background: var(--green-600); }
.stat-bars i:last-child { background: var(--blue); }
.commentary { list-style: none; margin: 0; padding: 0; }
.commentary li { display: grid; grid-template-columns: 54px 1fr; gap: 8px; padding: 5px 0; border-bottom: 1px solid #f0f3f1; font-size: 13.5px; }
.commentary .m { color: var(--muted); font-weight: 700; text-align: right; font-variant-numeric: tabular-nums; }
.commentary li.goal { background: #f0faf2; font-weight: 600; }
.commentary li.goal .m { color: var(--green-700); }
.commentary li.red, .commentary li.second_yellow { background: #fdf1f0; }
.commentary li.yellow .m::after { content: " ■"; color: #e0b400; }
.commentary li.service { color: var(--muted); font-style: italic; }
.pitches { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.pitch.small { max-width: 360px; margin: 0 auto; }
.pitch.small .pitch-slot { width: 74px; }
.pitch.small .dot { width: 24px; height: 24px; font-size: 9px; }
.pitch.small .nm { max-width: 74px; font-size: 10px; }
.pitch.small .rt { font-size: 9px; }
.pitch .rt { font-size: 10px; font-weight: 800; color: #fff; background: rgba(0,0,0,.45); border-radius: 3px; padding: 0 3px; margin-left: 2px; }

/* ---------- адаптивность ---------- */
@media (max-width: 1000px) {
  .page { grid-template-columns: minmax(0, 1fr); }
  .order-grid { grid-template-columns: minmax(0, 1fr); }
  .order-grid .pitch { max-width: 360px; margin: 0 auto; }
}
@media (max-width: 700px) {
  .grid2, .grid3, .hero, .pitches { grid-template-columns: minmax(0, 1fr); }
  .slots { grid-template-columns: minmax(0, 1fr); }
  .top-row { gap: 10px; }
  .userbox { margin-left: 0; }
  .menu .wrap { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }
  .menu .wrap::-webkit-scrollbar { display: none; }
  .menu a { padding: 9px 8px; font-size: 13px; white-space: nowrap; }
  .scoreboard .team-name { font-size: 15px; }
  .scoreboard .big-score { font-size: 28px; padding: 2px 10px; }
  .team-head .kpis { margin-left: 0; }
}
