/* Футбольный менеджер для JohnCMS 6.2 — сине-сиреневая тема.
   Все правила внутри .fm, чтобы не задевать тему сайта. */

.fm {
    --ink: #1e1b4b;
    --muted: #6b6790;
    --bg: #f4f2ff;
    --card: #ffffff;
    --line: #e3dffb;
    --line2: #f1eefe;
    --blue: #2563eb;
    --violet: #7c3aed;
    --lilac: #c4b5fd;
    --lilac-soft: #ede9fe;
    --grad: linear-gradient(135deg, #2563eb 0%, #6d3ff0 55%, #a855f7 100%);
    --ok: #047857;
    --ok-bg: #d1fae5;
    --err: #b91c1c;
    --err-bg: #fee2e2;
    --warn: #b45309;
    --warn-bg: #fef3c7;
    font: 14px/1.5 -apple-system, "Segoe UI", Roboto, Tahoma, Arial, sans-serif;
    color: var(--ink);
    background: var(--bg);
    padding: 0 0 8px;
    text-align: left;
}
.fm *, .fm *::before, .fm *::after { box-sizing: border-box; }
.fm a { color: var(--violet); text-decoration: none; }
.fm a:hover { color: var(--blue); }
.fm img { max-width: 100%; }

/* ---------------------------------------------------------- шапка */
.fm-top {
    display: flex; align-items: center; justify-content: space-between;
    background: var(--grad); color: #fff; padding: 10px 12px;
}
.fm .fm-logo { color: #fff; font-weight: 700; font-size: 16px; display: flex; align-items: center; gap: 8px; }
.fm-logo-ball {
    width: 20px; height: 20px; border-radius: 50%; display: inline-block;
    background: radial-gradient(circle at 35% 35%, #fff 0 38%, #c4b5fd 39% 100%);
    box-shadow: inset -2px -3px 0 rgba(30, 27, 75, .25);
}
.fm .fm-bell { position: relative; color: #fff; width: 30px; height: 30px; display: grid; place-items: center; border-radius: 50%; background: rgba(255,255,255,.14); }
.fm-bell-icon { width: 14px; height: 14px; border: 2px solid #fff; border-radius: 7px 7px 2px 2px; display: block; }
.fm-bell b { position: absolute; top: -4px; right: -6px; background: #f43f5e; color: #fff; font-size: 10px; min-width: 17px; height: 17px; border-radius: 9px; display: grid; place-items: center; padding: 0 4px; }

.fm-nav { display: flex; flex-wrap: wrap; gap: 4px; padding: 8px; background: var(--card); border-bottom: 1px solid var(--line); }
.fm-nav a { padding: 5px 10px; border-radius: 16px; color: var(--ink); font-size: 13px; background: var(--lilac-soft); }
.fm-nav a.on { background: var(--violet); color: #fff; }
.fm-nav b { margin-left: 5px; background: #f43f5e; color: #fff; border-radius: 8px; font-size: 10px; padding: 0 5px; }

.fm-h1 { font-size: 19px; margin: 12px 10px 8px; font-weight: 700; }
.fm h1, .fm h2, .fm h3, .fm h4 { color: inherit; }
.fm h2 { font-size: 15px; margin: 0 0 8px; font-weight: 700; }
.fm h3 { font-size: 14px; margin: 10px 0 6px; }

/* --------------------------------------------------------- блоки */
.fm-card { background: var(--card); border: 1px solid var(--line); border-radius: 12px; margin: 8px; padding: 12px; }
.fm-card.flush { padding: 0; overflow: hidden; }
.fm-card-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 10px 12px; border-bottom: 1px solid var(--line); }
.fm-card-head h2 { margin: 0; }
.fm-hero { background: var(--grad); color: #fff; border: 0; }
.fm-hero a { color: #fff; }
.fm-muted { color: var(--muted); }
.fm-small { font-size: 12px; }
.fm-row { display: flex; align-items: center; gap: 8px; }
.fm-between { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.fm-grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.fm-list { margin: 0; padding-left: 18px; }
.fm-pre { background: #1e1b4b; color: #e9e5ff; padding: 10px; border-radius: 8px; overflow-x: auto; font-size: 12px; }
.fm-tag { font-size: 11px; font-weight: 600; background: var(--lilac-soft); color: var(--violet); border-radius: 10px; padding: 1px 8px; vertical-align: middle; }

.fm-msg { margin: 8px; padding: 9px 12px; border-radius: 10px; font-size: 13px; }
.fm-ok { background: var(--ok-bg); color: var(--ok); }
.fm-err { background: var(--err-bg); color: var(--err); }
.fm-warn { background: var(--warn-bg); color: var(--warn); }
.fm-okc { color: var(--ok); }
.fm-errc { color: var(--err); }

.fm-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(100px, 1fr)); gap: 6px; }
.fm-stat { background: var(--lilac-soft); border-radius: 10px; padding: 8px 10px; }
.fm-stat b { display: block; font-size: 18px; }
.fm-stat span { font-size: 11px; color: var(--muted); }

/* ---------------------------------------------------------- кнопки */
.fm .fm-btn, .fm button.fm-btn {
    display: inline-block; border: 0; cursor: pointer; font: 600 13px/1 inherit; font-family: inherit;
    padding: 9px 14px; border-radius: 10px; background: var(--grad); color: #fff; text-align: center;
}
.fm .fm-btn:hover { filter: brightness(1.08); color: #fff; }
.fm .fm-btn-ghost { background: var(--lilac-soft); color: var(--violet); }
.fm .fm-btn-ghost:hover { color: var(--violet); }
.fm .fm-btn-warn { background: linear-gradient(135deg, #d97706, #b45309); }
.fm .fm-btn-sm { padding: 5px 9px; font-size: 12px; border-radius: 8px; }
.fm-form { display: flex; flex-wrap: wrap; gap: 8px; align-items: flex-end; }
.fm-form label { display: flex; flex-direction: column; font-size: 12px; color: var(--muted); gap: 3px; }
.fm input[type=text], .fm input[type=number], .fm input[type=date], .fm input[type=time], .fm input:not([type]), .fm select, .fm textarea {
    border: 1px solid var(--line); border-radius: 8px; padding: 7px 8px; font: 13px inherit; font-family: inherit;
    background: var(--card); color: var(--ink); max-width: 100%;
}
.fm input:focus, .fm select:focus, .fm textarea:focus { outline: 2px solid var(--lilac); border-color: var(--violet); }
.fm-check { display: flex !important; flex-direction: row !important; align-items: center; gap: 6px; color: var(--ink) !important; }

/* ---------------------------------------------------------- таблицы */
.fm-scroll { overflow-x: auto; }
.fm-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.fm-table th { text-align: left; font-size: 11px; color: var(--muted); font-weight: 600; padding: 6px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.fm-table td { padding: 6px; border-bottom: 1px solid var(--line2); vertical-align: middle; }
.fm-table tr:last-child td { border-bottom: 0; }
.fm-table .num { text-align: right; font-variant-numeric: tabular-nums; }
.fm-table tr.me td { background: #f5f0ff; font-weight: 600; }
.fm-zone-up { box-shadow: inset 3px 0 0 #2563eb; }
.fm-zone-eu { box-shadow: inset 3px 0 0 #a855f7; }
.fm-zone-down { box-shadow: inset 3px 0 0 #f43f5e; }

.fm .fm-club { display: inline-flex; align-items: center; gap: 6px; color: var(--ink); }
.fm-badge { border-radius: 50%; object-fit: contain; background: var(--card); flex: none; vertical-align: middle; }
.fm-badge-ini { display: inline-grid; place-items: center; color: #fff; font-weight: 700; }

.fm-pager { display: flex; gap: 4px; justify-content: center; margin: 8px; }
.fm-pager a, .fm-pager b { min-width: 28px; padding: 4px 8px; border-radius: 8px; text-align: center; background: var(--card); border: 1px solid var(--line); }
.fm-pager b { background: var(--violet); color: #fff; border-color: var(--violet); }

.fm-tabs { display: flex; gap: 4px; flex-wrap: wrap; margin: 8px; }
.fm-tabs a { padding: 6px 11px; border-radius: 10px; background: var(--card); border: 1px solid var(--line); color: var(--ink); font-size: 13px; }
.fm-tabs a.on { background: var(--violet); border-color: var(--violet); color: #fff; }
.fm-tabs a b { margin-left: 4px; background: #f43f5e; color: #fff; border-radius: 8px; font-size: 10px; padding: 0 5px; }
.fm-tabs a.on b { background: var(--card); color: var(--violet); }

/* ---------------------------------------------------------- матчи */
.fm-match { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 8px; padding: 8px 12px; border-bottom: 1px solid var(--line2); }
.fm-match:last-child { border-bottom: 0; }
.fm-match .h { justify-content: flex-end; text-align: right; display: flex; }
.fm-match .h .fm-club { flex-direction: row-reverse; }
.fm-score { min-width: 58px; text-align: center; font-weight: 700; padding: 3px 8px; border-radius: 8px; background: var(--lilac-soft); font-variant-numeric: tabular-nums; }
.fm-score.live { background: #fee2e2; color: #b91c1c; }
.fm-score.live::after { content: ""; display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: #ef4444; margin-left: 4px; vertical-align: middle; animation: fm-pulse 1.2s infinite; }
.fm-score.soon { background: var(--card); border: 1px dashed var(--lilac); font-weight: 600; color: var(--muted); font-size: 12px; }
@keyframes fm-pulse { 50% { opacity: .25; } }
.fm-match-meta { grid-column: 1 / -1; text-align: center; font-size: 11px; color: var(--muted); margin-top: -4px; }

/* Табло трансляции */
.fm-board { background: var(--grad); color: #fff; border-radius: 14px; margin: 8px; padding: 14px 12px; text-align: center; }
.fm-board .t { font-size: 12px; opacity: .9; line-height: 1.35; }
.fm-board .t a { color: #fff; text-decoration: underline; text-underline-offset: 2px; }
.fm-board-row { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 8px; margin: 10px 0 6px; }
.fm-board-team { display: flex; flex-direction: column; align-items: center; gap: 5px; font-weight: 600; font-size: 14px; }
.fm-board-team a { color: #fff; }
.fm-board-score { font-size: 38px; font-weight: 800; letter-spacing: 2px; font-variant-numeric: tabular-nums; }
.fm-board-clock { display: inline-block; background: rgba(255,255,255,.18); border-radius: 12px; padding: 2px 12px; font-weight: 700; }
.fm-board-clock.live::before { content: "● "; color: #fca5a5; animation: fm-pulse 1.2s infinite; }
.fm-progress { height: 4px; background: rgba(255,255,255,.25); border-radius: 2px; margin-top: 10px; overflow: hidden; }
.fm-progress i { display: block; height: 100%; background: var(--card); width: 0; transition: width .6s; }

.fm-feed { list-style: none; margin: 0; padding: 0; }
.fm-feed li { display: grid; grid-template-columns: 44px 1fr; gap: 6px; padding: 7px 12px; border-bottom: 1px solid var(--line2); font-size: 13px; }
.fm-feed li:last-child { border-bottom: 0; }
.fm-feed .min { font-weight: 700; color: var(--violet); font-variant-numeric: tabular-nums; }
.fm-feed li.goal { background: linear-gradient(90deg, #ede9fe, #fff); font-weight: 600; }
.fm-feed li.goal .min::after { content: " ⚽"; }
.fm-feed li.yellow .min::after { content: " ▮"; color: #eab308; }
.fm-feed li.red .min::after { content: " ▮"; color: #ef4444; }
.fm-feed li.sub .min::after { content: " ⇅"; color: #059669; }
.fm-feed li.injury .min::after { content: " ✚"; color: #dc2626; }
.fm-feed li.tactic { background: #eff6ff; }
.fm-feed li.intro, .fm-feed li.lineup, .fm-feed li.stats { color: var(--muted); }
.fm-feed li.halftime, .fm-feed li.fulltime { background: var(--lilac-soft); font-weight: 600; }
.fm-feed li.new { animation: fm-in .8s ease; }
@keyframes fm-in { from { background: #ddd6fe; } }

.fm-bars { display: grid; gap: 7px; }
.fm-bar-row { font-size: 12px; }
.fm-bar-row .lbl { display: flex; justify-content: space-between; margin-bottom: 2px; }
.fm-bar { display: flex; height: 6px; border-radius: 3px; overflow: hidden; background: #eee; }
.fm-bar i { display: block; height: 100%; background: var(--blue); }
.fm-bar i + i { background: var(--lilac); }

/* ------------------------------------------------------ состав и схема */
.fm-squad { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: 8px; margin: 8px; }
@media (max-width: 560px) {
    .fm-squad { grid-template-columns: 1fr; }
    /* На телефоне поле ниже, чтобы рядом на экране оставался список игроков */
    .fm-squad .fm-pitch { aspect-ratio: 100 / 86; min-height: 270px; }
    .fm-squad .fm-slot .dot { width: 30px; height: 30px; font-size: 10px; }
    .fm-squad .fm-roster { max-height: 55vh; }
}
.fm-pitch {
    position: relative; aspect-ratio: 68 / 100; min-height: 320px; border-radius: 12px; overflow: hidden;
    background:
        linear-gradient(rgba(255,255,255,.22), rgba(255,255,255,.22)) center / 100% 1px no-repeat,
        radial-gradient(circle at 50% 50%, transparent 0 13%, rgba(255,255,255,.22) 13% calc(13% + 1px), transparent calc(13% + 1px)),
        repeating-linear-gradient(180deg, #2f8f3a 0 10%, #287f33 10% 20%);
    border: 2px solid rgba(255,255,255,.35);
}
.fm-pitch::before, .fm-pitch::after {
    content: ""; position: absolute; left: 25%; width: 50%; height: 14%; border: 1px solid rgba(255,255,255,.25);
}
.fm-pitch::before { top: -1px; border-top: 0; }
.fm-pitch::after { bottom: -1px; border-bottom: 0; }
.fm-slot {
    position: absolute; transform: translate(-50%, -50%); width: 25%; display: flex; flex-direction: column; align-items: center;
    cursor: pointer; background: none; border: 0; padding: 0; color: #fff; font-family: inherit;
}
.fm-slot .dot {
    width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; font-size: 11px;
    background: var(--card); color: var(--violet); box-shadow: 0 2px 6px rgba(0,0,0,.35); border: 2px solid #c4b5fd;
}
.fm a.fm-slot { color: #fff; }
.fm-slot.gk .dot { background: #fde68a; color: #92400e; border-color: #fbbf24; }
.fm-slot .nm { margin-top: 3px; font-size: 10.5px; line-height: 1.15; text-align: center; background: rgba(20,16,60,.55); padding: 1px 5px; border-radius: 6px; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fm-slot .off { color: #fca5a5; }
.fm-slot.sel .dot { background: #f43f5e; color: #fff; border-color: #fff; transform: scale(1.12); }
.fm-slot.empty .dot { background: rgba(255,255,255,.2); color: #fff; border-style: dashed; }

.fm-side { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.fm-side .fm-card { margin: 0; }
.fm-roster { max-height: 330px; overflow-y: auto; }
.fm-roster button {
    display: grid; grid-template-columns: 30px 1fr auto; gap: 6px; align-items: center; width: 100%; text-align: left;
    border: 0; border-bottom: 1px solid var(--line2); background: var(--card); padding: 6px 8px; cursor: pointer; font: 13px inherit; font-family: inherit; color: var(--ink);
}
.fm-roster button:hover { background: #f7f5ff; }
.fm-roster button.in { background: #f0ebff; }
.fm-roster button.in .p::after { content: " • в составе"; color: var(--violet); font-size: 11px; }
.fm-roster button:disabled { opacity: .45; cursor: default; }
.fm-roster .ps { font-size: 11px; font-weight: 700; color: var(--violet); background: var(--lilac-soft); border-radius: 6px; text-align: center; padding: 2px 0; }
.fm-roster .r { font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }
.fm-hint { font-size: 12px; color: var(--muted); padding: 6px 8px; background: #faf8ff; border-bottom: 1px solid var(--line); }

/* ----------------------------------------------------------- игрок */
.fm-player-head { display: grid; grid-template-columns: 96px 1fr; gap: 12px; align-items: center; }
.fm-photo { width: 96px; height: 120px; border-radius: 12px; object-fit: cover; background: var(--lilac-soft); display: grid; place-items: center; overflow: hidden; }
.fm-photo-empty { font-size: 34px; font-weight: 800; color: #fff; background: var(--grad); }
.fm-skill { display: grid; grid-template-columns: 1fr 70px auto; gap: 8px; align-items: center; padding: 5px 0; border-bottom: 1px solid var(--line2); font-size: 13px; }
.fm-skill:last-child { border-bottom: 0; }
.fm-meter { height: 7px; border-radius: 4px; background: #eee; overflow: hidden; }
.fm-meter i { display: block; height: 100%; background: var(--grad); }

.fm-foot { text-align: center; font-size: 11px; color: var(--muted); margin-top: 10px; }
.fm-empty { text-align: center; color: var(--muted); padding: 18px 10px; }
.fm-cmsg { font-weight: 700; color: var(--blue); overflow-wrap: anywhere; }

/* ------------------------------------------- фото игроков в админке */
.fm-media { display: flex; gap: 10px; padding: 10px 12px; border-top: 1px solid var(--line); align-items: flex-start; }
.fm-media.me { background: var(--lilac-soft); }
.fm-media-pic { width: 44px; min-width: 44px; height: 54px; display: grid; place-items: center; background: var(--bg); border-radius: 6px; text-align: center; }
.fm-media-pic img { width: 44px; height: 54px; object-fit: cover; border-radius: 6px; }
.fm-media-body { flex: 1 1 auto; min-width: 0; display: flex; flex-wrap: wrap; gap: 6px 10px; align-items: center; }
.fm-media-body > div:first-child { flex: 1 1 130px; min-width: 0; }
.fm-media-form { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.fm-media-form input[type=file] { max-width: 100%; flex: 1 1 140px; min-width: 0; }
@media (max-width: 560px) {
    .fm-media-body > div:first-child { flex: 1 1 100%; }
    .fm-media-form { flex: 1 1 100%; }
}

/* игрок в списке заявки: выбор на позицию — кнопкой, профиль — ссылкой */
.fm-roster-row { display: grid; grid-template-columns: 1fr auto; align-items: center; border-bottom: 1px solid var(--line2); }
.fm-roster-row button { border-bottom: 0; }
.fm-roster .prof { padding: 6px 9px; font-size: 11.5px; white-space: nowrap; align-self: stretch; display: flex; align-items: center; border-left: 1px solid var(--line2); }

/* видеопросмотр в ленте матча */
.fm-feed li.var { background: #fffbeb; }
.fm-feed li.var .min::after { content: " VAR"; font-size: 9px; color: #b45309; }
.fm-feed li.var_on { background: #ecfdf5; font-weight: 600; }
.fm-feed li.var_on .min::after { content: " ✔"; color: #059669; }
.fm-feed li.var_off { background: #fef2f2; font-weight: 600; }
.fm-feed li.var_off .min::after { content: " ✖"; color: #dc2626; }
.fm-feed li.penalty { background: #eef2ff; font-weight: 600; }
.fm-feed li.penalty .min::after { content: " 🥅"; }

/* 2.8: плитки турниров с эмблемами */
.fm-tile { display: flex; align-items: center; gap: 10px; color: var(--ink); min-width: 0; }
.fm-tile img { flex: 0 0 auto; }
.fm-tile-text { min-width: 0; }
.fm-tile-text b { font-size: 15px; color: var(--violet); }
.fm-tile-text span { display: block; }
.fm-tile-ph { flex: 0 0 30px; height: 30px; border-radius: 8px; background: var(--card); color: var(--violet); font-weight: 700; display: flex; align-items: center; justify-content: center; }
.fm-trow { grid-template-columns: 34px 1fr auto; color: var(--ink); }
.fm-trow b { color: var(--violet); }
.fm-trow-tag { justify-self: center; }
.fm-chips { display: flex; gap: 4px; flex-wrap: wrap; margin: 0 8px 8px; }
.fm-chips a { padding: 4px 10px; border-radius: 14px; background: var(--lilac-soft); color: var(--violet); font-size: 12.5px; }
.fm-chips a.on { background: var(--violet); color: #fff; }
.fm-score small { display: block; font-size: 10px; font-weight: 600; color: var(--muted); line-height: 1.1; }
.fm-hero .fm-small a { text-decoration: underline; text-decoration-color: rgba(255,255,255,.5); text-underline-offset: 2px; }

/* шкала от красного к зелёному: цвет задаётся в разметке по значению */
.fm-meter.pct i { background: none; }
.fm-pct { font-weight: 700; font-variant-numeric: tabular-nums; }
.fm-stat .fm-meter { display: block; height: 7px; margin-top: 6px; }

/* овертайм и серия пенальти в ленте */
.fm-feed li.et_start, .fm-feed li.pens_start { background: #eef2ff; font-weight: 600; }
.fm-feed li.pen_goal { background: #ecfdf5; }
.fm-feed li.pen_goal .min::after { content: " ⚽"; }
.fm-feed li.pen_miss { background: #fef2f2; }
.fm-feed li.pen_miss .min::after { content: " ✖"; color: #dc2626; }
.fm-btn[disabled] { opacity: .45; cursor: default; }

/* 2.8.1: фото игрока рядом с именем */
.fm-face { flex: 0 0 auto; border-radius: 50%; object-fit: cover; object-position: 50% 20%; vertical-align: middle; background: var(--lilac-soft); border: 1px solid #e4defc; }
.fm-slot .dot.ph { background-size: cover; background-position: 50% 20%; position: relative; }
.fm-slot .dot.ph i { position: absolute; bottom: -7px; left: 50%; transform: translateX(-50%); font-style: normal; font-size: 8.5px; line-height: 1; padding: 2px 4px; border-radius: 6px; background: var(--violet); color: #fff; white-space: nowrap; }
.fm-slot.gk .dot.ph i { background: #d97706; }
.fm-slot.sel .dot.ph { box-shadow: 0 0 0 3px #f43f5e; }
.fm-slot .dot.ph + .nm { margin-top: 8px; }
.fm-who { display: inline-flex; align-items: center; gap: 6px; vertical-align: middle; }
.fm-who .fm-face { flex: 0 0 auto; }

/* 2.9: стыки */
.fm-zone-po { box-shadow: inset 3px 0 0 #f59e0b; }
.fm-po { display: grid; grid-template-columns: 1fr auto 1fr; gap: 8px; align-items: center; padding: 8px 12px; border-bottom: 1px solid var(--line2); color: var(--ink); }
.fm-po .h { text-align: right; }
.fm-po-up { color: #059669; font-size: 11px; }
.fm-po-head { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 8px; margin: 8px 0; }
.fm-po-agg { font-size: 30px; font-weight: 800; }
.fm-po-agg .fm-small { font-weight: 400; }
.fm-po-steps { display: flex; flex-wrap: wrap; gap: 4px; margin: 0 8px 8px; }
.fm-po-steps span { font-size: 11.5px; padding: 3px 8px; border-radius: 10px; background: #eee; color: var(--muted); }
.fm-po-steps span.on { background: var(--violet); color: #fff; }
/* 2.9: спонсоры */
.fm-sponsors { display: flex; flex-wrap: wrap; gap: 8px; margin: 4px 8px 8px; }
.fm-card .fm-sponsors { margin: 0; }
.fm-sponsor { display: inline-flex; align-items: center; gap: 8px; background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 5px 10px; font-size: 13px; }
.fm-skill-btns { display: flex; gap: 4px; justify-content: flex-end; }
.fm-skill-btns .fm-btn { padding-left: 8px; padding-right: 8px; }
.fm-skill:target { background: #f5f3ff; }

/* 2.10: чат */
.fm-chat-list { list-style: none; margin: 8px 0 0; padding: 0; }
.fm-chat-list li { padding: 7px 0; border-bottom: 1px solid var(--line2); }
.fm-chat-who { display: block; font-size: 12.5px; }
.fm-chat-text { display: block; word-wrap: break-word; overflow-wrap: anywhere; }
.fm-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: #cbd5e1; margin-right: 5px; vertical-align: middle; }
.fm-dot.on { background: #22c55e; }
.fm-chat-form input { min-width: 0; }

/* 2.10.1: подписи на зелёном поле читаются на тёмной подложке */
.fm-slot .nm { background: rgba(10,40,15,.6); }
/* карточки в статистике */
.fm-card-y, .fm-card-r { display: inline-block; width: 9px; height: 12px; border-radius: 2px; vertical-align: -1px; margin: 0 3px; }
.fm-card-y { background: #facc15; }
.fm-card-r { background: #ef4444; }
/* анимация гола: мяч катится от забившей команды к счёту */
.fm-board { position: relative; }
.fm-goal-ball { position: absolute; font-size: 30px; line-height: 1; z-index: 5; pointer-events: none;
    transition: left .9s cubic-bezier(.3,.7,.4,1), top .9s cubic-bezier(.3,.7,.4,1), transform .9s linear; }
.fm-goal-text { position: absolute; left: 50%; top: 18%; transform: translate(-50%, 0) scale(.6); font-weight: 900; font-size: 26px; letter-spacing: 2px;
    color: #fde047; text-shadow: 0 2px 8px rgba(0,0,0,.45); opacity: 0; z-index: 6; pointer-events: none; transition: all .5s ease-out; }
.fm-goal-text.on { opacity: 1; transform: translate(-50%, -10px) scale(1.1); }
.fm-score-pop { animation: fm-score-pop 1.2s ease-out; }
@keyframes fm-score-pop { 0% { transform: scale(1); } 25% { transform: scale(1.45); color: #fde047; text-shadow: 0 0 18px rgba(253,224,71,.9); } 100% { transform: scale(1); } }

/* 2.11: шапка — счёт FM и настройки */
.fm-top-r { display: flex; align-items: center; gap: 6px; }
.fm .fm-fm-chip { color: #fff; font-size: 12px; font-weight: 700; padding: 4px 9px; border-radius: 14px; background: rgba(255,255,255,.18); white-space: nowrap; }
.fm .fm-gear { font-size: 15px; text-decoration: none; }
/* полосы статистики: зелёная — у лучшего, красная — у соперника */
.fm-bar i.g { background: #22c55e; }
.fm-bar i.r { background: #ef4444; }
/* выбор темы */
.fm-themes { display: flex; gap: 8px; flex-wrap: wrap; }
.fm-theme-pick { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 8px; border: 2px solid var(--line); border-radius: 12px; cursor: pointer; font-size: 13px; }
.fm-theme-pick.on { border-color: var(--violet); }
.fm-theme-pick input { display: none; }
.fm-theme-sample { display: grid; grid-template-columns: 1fr 1fr; gap: 3px; width: 74px; height: 50px; padding: 5px; border-radius: 8px; background: #f4f2ff; }
.fm-theme-sample i { border-radius: 4px; background: #fff; }
.fm-theme-sample i:first-child { grid-column: 1 / -1; background: linear-gradient(135deg, #2563eb, #a855f7); }
.fm-theme-dark .fm-theme-sample { background: #0f0d1f; }
.fm-theme-dark .fm-theme-sample i { background: #1c1936; }
.fm-theme-auto .fm-theme-sample { background: linear-gradient(90deg, #f4f2ff 50%, #0f0d1f 50%); }

/* 2.11: тёмная тема менеджера */
.fm.fm-dark {
    --ink: #ece9ff;
    --muted: #a19cc4;
    --bg: #0f0d1f;
    --card: #1a1733;
    --line: #2e2a52;
    --line2: #26224a;
    --lilac: #6d5bd0;
    --lilac-soft: #2a2550;
    --violet: #a78bfa;
    --blue: #60a5fa;
    --ok-bg: #0b3b2c;
    --err-bg: #4a1620;
    --warn-bg: #45300a;
    --ok: #6ee7b7;
    --err: #fca5a5;
    --warn: #fcd34d;
    color-scheme: dark;
}
.fm.fm-dark input, .fm.fm-dark select, .fm.fm-dark textarea { background: #221e40; color: var(--ink); border-color: var(--line); }
.fm.fm-dark .fm-table th { background: #221e40; color: var(--muted); }
.fm.fm-dark .fm-table tr.me td { background: #2a2550; }
.fm.fm-dark .fm-bar, .fm.fm-dark .fm-meter { background: #2a2550; }
.fm.fm-dark .fm-roster button:hover, .fm.fm-dark .fm-roster button.in { background: #26224a; }
.fm.fm-dark .fm-feed li.var { background: #3a2e0c; }
.fm.fm-dark .fm-feed li.var_on, .fm.fm-dark .fm-feed li.pen_goal { background: #0c3325; }
.fm.fm-dark .fm-feed li.var_off, .fm.fm-dark .fm-feed li.pen_miss { background: #3d1219; }
.fm.fm-dark .fm-feed li.penalty, .fm.fm-dark .fm-feed li.et_start, .fm.fm-dark .fm-feed li.pens_start { background: #1e2250; }
.fm.fm-dark .fm-score.soon { background: var(--card); }
.fm.fm-dark .fm-btn-ghost { background: #2a2550; color: var(--ink); }
.fm.fm-dark .fm-skill:target { background: #26224a; }

/* 2.13: эмблема турнира на табло и формат матча */
.fm-board-wm { overflow: hidden; }
.fm-board-wm > * { position: relative; }
.fm-board .fm-board-bg { position: absolute; inset: 8% 0; background-position: center; background-size: contain; background-repeat: no-repeat; opacity: .3; pointer-events: none; }
.fm-board-logo { vertical-align: middle; object-fit: contain; background: rgba(255,255,255,.9); border-radius: 5px; padding: 1px; }
.fm-board-fmt { font-size: 11px; opacity: .85; margin-top: 6px; }

/* 2.15: гол в тёмной теме — зелёный */
.fm.fm-dark .fm-feed li.goal { background: linear-gradient(90deg, #14532d, #1a1733); color: #dcfce7; }

/* Онлайн-таблица во вкладке матча */
.fm-ltable td:first-child { white-space: nowrap; }
.fm-ltable .fm-up { color: #16a34a; font-size: 10px; }
.fm-ltable .fm-down { color: #dc2626; font-size: 10px; }
.fm .fm-lt-live { display: inline-block; padding: 0 6px; border-radius: 8px; font-size: 11px; font-weight: 700; color: #fff; background: #64748b; }
.fm .fm-lt-live.w { background: #16a34a; }
.fm .fm-lt-live.l { background: #dc2626; }

/* Бегущая строка идущих матчей */
.fm-ticker { display: flex; align-items: center; gap: 8px; background: var(--card); border-bottom: 1px solid var(--line); font-size: 13px; padding: 0 0 0 8px; }
.fm-ticker-dot { flex: none; font-size: 10px; font-weight: 800; letter-spacing: .5px; color: #fff; background: #dc2626; border-radius: 6px; padding: 1px 6px; }
.fm-ticker-run { overflow: hidden; white-space: nowrap; flex: 1; min-width: 0; }
.fm-ticker-in { display: inline-block; padding: 7px 0; animation: fm-ticker 40s linear infinite; }
.fm-ticker-run:hover .fm-ticker-in, .fm-ticker-run:active .fm-ticker-in { animation-play-state: paused; }
.fm .fm-ticker a { color: var(--ink); margin-right: 26px; }
.fm-ticker a .t { color: var(--muted); font-size: 11px; }
.fm-ticker a b { color: #16a34a; }
.fm-ticker a i { font-style: normal; color: #dc2626; font-size: 11px; }
@keyframes fm-ticker { from { transform: translateX(0); } to { transform: translateX(-50%); } }
@media (prefers-reduced-motion: reduce) { .fm-ticker-run { overflow-x: auto; } .fm-ticker-in { animation: none; } }
.fm-nav b.live { background: #16a34a; }

/* Отзывы и предложения */
.fm-fb { padding: 10px 12px; border-bottom: 1px solid var(--line2); }
.fm-fb-kind { font-size: 11px; font-weight: 700; padding: 1px 7px; border-radius: 8px; background: var(--lilac-soft); color: var(--violet); }
.fm-fb-kind.idea { background: #fef3c7; color: #92400e; }
.fm-fb-text { margin: 6px 0 0; overflow-wrap: anywhere; }
.fm-fb-answer { margin: 8px 0 0; padding: 8px 10px; border-left: 3px solid #16a34a; background: var(--ok-bg, #ecfdf5); border-radius: 6px; overflow-wrap: anywhere; }
.fm.fm-dark .fm-fb-kind.idea { background: #45300a; color: #fcd34d; }

/* 2.16: город над клубом, пауза на табло */
.fm-board-city { display: block; font-size: 11px; opacity: .85; margin-bottom: 2px; letter-spacing: .2px; }
.fm-board-pause { margin: 8px auto 0; max-width: 300px; text-align: center; font-weight: 800; font-size: 14px; padding: 6px 10px; border-radius: 10px;
    background: rgba(0, 0, 0, .35); color: #fff; animation: fm-pause 1.2s ease-in-out infinite; position: relative; }
.fm-board-pause.var { background: #1e3a8a; }
.fm-board-pause.penalty { background: #065f46; }
.fm-board-pause.red { background: #991b1b; }
@keyframes fm-pause { 50% { opacity: .55; } }
@media (prefers-reduced-motion: reduce) { .fm-board-pause { animation: none; } }

/* 2.17: переключатель «Текст / 2D» и поле */
.fm-viewtoggle { display: flex; gap: 4px; padding: 8px 10px; border-bottom: 1px solid var(--line2); }
.fm-viewtoggle button { border: 1px solid var(--line); background: var(--card); color: var(--ink); border-radius: 14px; padding: 4px 14px; font: inherit; font-size: 13px; cursor: pointer; }
.fm-viewtoggle button.on { background: var(--violet); border-color: var(--violet); color: #fff; }
.fm-2d { position: relative; padding: 8px; background: #0f5132; }
.fm-2d-svg { display: block; width: 100%; height: auto; border-radius: 8px; }
.fm-2d-cap { position: absolute; left: 50%; top: 14px; transform: translateX(-50%); max-width: 92%; padding: 5px 10px; border-radius: 10px;
    background: rgba(0, 0, 0, .62); color: #fff; font-size: 13px; font-weight: 700; text-align: center; opacity: 0; transition: opacity .25s; pointer-events: none; }
.fm-2d-cap.on { opacity: 1; }
.fm-2d-cap.goal { background: #16a34a; font-size: 15px; }
.fm-2d-cap.hot { background: #b91c1c; }
.fm-feed.fm-feed-short li:nth-child(n+5) { display: none; }
.fm-feed li.freekick, .fm-feed li.setpiece { color: var(--muted); }

/* 2.18: меню плитками */
.fm-nav { display: grid; grid-template-columns: repeat(auto-fill, minmax(64px, 1fr)); gap: 6px; padding: 8px; }
.fm-nav a { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; min-height: 54px;
    padding: 7px 3px 6px; border-radius: 14px; font-size: 11.5px; line-height: 1.15; text-align: center; background: var(--lilac-soft);
    border: 1px solid var(--line); transition: transform .12s; }
.fm-nav a:active { transform: scale(.96); }
.fm-nav a i { font-style: normal; font-size: 20px; line-height: 1; }
.fm-nav a span { font-size: 11px; letter-spacing: -.1px; overflow-wrap: normal; word-break: normal; hyphens: manual; }
.fm-nav a.on { background: var(--grad); border-color: transparent; color: #fff; box-shadow: 0 4px 12px rgba(124, 58, 237, .3); }
.fm-nav b { position: absolute; top: 3px; right: 4px; margin: 0; }

/* Действия плитками */
.fm-acts { flex-basis: 100%; display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 8px; }
.fm-act-form { display: contents; }
.fm .fm-act { display: flex; flex-direction: column; gap: 2px; padding: 10px 12px; border-radius: 14px; background: var(--lilac-soft); border: 1px solid var(--line);
    color: var(--ink); text-align: left; font: inherit; cursor: pointer; width: 100%; min-height: 78px; transition: transform .12s; }
.fm .fm-act:active { transform: scale(.97); }
.fm-act i { font-style: normal; font-size: 22px; line-height: 1.1; }
.fm-act b { font-size: 14px; }
.fm-act span { font-size: 11.5px; color: var(--muted); }
.fm .fm-act.main { background: var(--grad); border-color: transparent; color: #fff; }
.fm-act.main span { color: #ede9fe; }

/* Вкладка «Карточки»: две колонки */
.fm-disc { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.fm-disc-col { min-width: 0; }
.fm-disc-head { display: flex; flex-direction: column; gap: 2px; padding: 8px 10px; border-radius: 12px; background: var(--lilac-soft); margin-bottom: 6px; }
.fm-disc-head span { font-size: 12px; color: var(--muted); display: flex; align-items: center; gap: 3px; flex-wrap: wrap; }
.fm-disc-item { display: flex; align-items: center; gap: 6px; padding: 7px 8px; border: 1px solid var(--line); border-radius: 12px; margin-bottom: 6px; font-size: 13px; }
.fm-disc-min { flex: none; font-weight: 700; color: var(--violet); min-width: 26px; }
.fm-disc-who { min-width: 0; overflow-wrap: anywhere; }
.fm-disc-who small { display: block; font-size: 11px; color: var(--muted); }
.fm-disc-inj { font-size: 14px; }

/* Топ-10 бомбардиров */
.fm-scorers { display: block; }
.fm-chips a img { vertical-align: -2px; }
.fm-top-row { display: flex; align-items: center; gap: 10px; padding: 9px 12px; border-bottom: 1px solid var(--line2); color: var(--ink); }
.fm-top-row.p1 { background: linear-gradient(90deg, rgba(250, 204, 21, .22), transparent); }
.fm-top-row.p2 { background: linear-gradient(90deg, rgba(203, 213, 225, .3), transparent); }
.fm-top-row.p3 { background: linear-gradient(90deg, rgba(217, 119, 6, .18), transparent); }
.fm-top-n { flex: 0 0 28px; text-align: center; font-weight: 800; font-size: 16px; color: var(--muted); }
.fm-top-row .fm-face, .fm-top-ph { flex: 0 0 34px; width: 34px; height: 34px; border-radius: 50%; }
.fm-top-ph { display: flex; align-items: center; justify-content: center; background: var(--lilac-soft); }
.fm-top-who { flex: 1; min-width: 0; }
.fm-top-who b { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fm-top-who span { font-size: 11.5px; color: var(--muted); display: flex; align-items: center; gap: 4px; flex-wrap: wrap; }
.fm-top-g { flex: none; text-align: center; font-weight: 800; font-size: 22px; color: var(--violet); line-height: 1; }
.fm-top-g small { display: block; font-size: 10px; font-weight: 600; color: var(--muted); }

/* 3.1: экран матча — поле, под ним лента, статистика сбоку */
.fm-live3 { display: grid; grid-template-columns: minmax(0, 1fr); gap: 10px; padding: 8px; }
@media (min-width: 760px) { .fm-live3 { grid-template-columns: minmax(0, 1fr) 210px; } }
.fm-live3 .fm-2d { padding: 0; background: none; }
.fm-live3-prog { height: 5px; border-radius: 3px; background: var(--lilac-soft); margin: 6px 0; overflow: hidden; }
.fm-live3-prog i { display: block; height: 100%; background: var(--grad); transition: width .6s; }
.fm-live3-feed { list-style: none; margin: 0; padding: 0; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.fm-live3-feed li { display: flex; gap: 8px; padding: 7px 10px; border-bottom: 1px solid var(--line2); font-size: 13.5px; line-height: 1.35; animation: fm-line-in .4s ease-out; }
.fm-live3-feed li:last-child { border-bottom: 0; }
.fm-live3-feed li .min { flex: none; min-width: 34px; font-weight: 700; color: var(--violet); }
.fm-live3-feed li.goal { background: rgba(22, 163, 74, .14); font-weight: 700; }
.fm-live3-feed li.yellow { background: rgba(250, 204, 21, .16); }
.fm-live3-feed li.red { background: rgba(220, 38, 38, .14); font-weight: 600; }
.fm-live3-feed li.halftime, .fm-live3-feed li.fulltime { background: var(--lilac-soft); font-weight: 600; }
@keyframes fm-line-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.fm-side-stats { width: 100%; border-collapse: collapse; font-size: 13px; }
.fm-side-stats th { font-size: 11px; color: var(--muted); font-weight: 600; padding: 4px; }
.fm-side-stats td { padding: 5px 4px; border-bottom: 1px solid var(--line2); text-align: center; }
.fm-side-stats td.num { width: 34px; }
.fm-live3-side { border: 1px solid var(--line); border-radius: 12px; padding: 6px; align-self: start; }
.fm-2d-flash .fm-2d-svg { animation: fm-flash .7s ease-out; }
@keyframes fm-flash { 0% { filter: brightness(1); } 30% { filter: brightness(1.9); } 100% { filter: brightness(1); } }
.fm-report p { margin: 0; line-height: 1.5; }

/* 3.3: форма клуба — 5 последних игр кружками */
.fm-form { display: inline-flex; flex-wrap: nowrap; gap: 4px; align-items: center; vertical-align: middle; min-height: 27px; }
.fm .fm-form-dot { display: inline-block; flex: none; width: 15px; height: 15px; border-radius: 50%; background: rgba(255, 255, 255, .28); box-shadow: inset 0 0 0 2px rgba(255, 255, 255, .35); }
.fm .fm-form-dot.w { background: #22c55e; box-shadow: 0 0 0 2px rgba(255, 255, 255, .55); }
.fm .fm-form-dot.d { background: #facc15; box-shadow: 0 0 0 2px rgba(255, 255, 255, .55); }
.fm .fm-form-dot.l { background: #ef4444; box-shadow: 0 0 0 2px rgba(255, 255, 255, .55); }
.fm-board-team .fm-form { justify-content: center; min-height: 0; margin-top: 4px; gap: 3px; }
.fm .fm-board-team .fm-form-dot { width: 11px; height: 11px; }
.fm-flag { vertical-align: middle; object-fit: cover; border-radius: 3px; box-shadow: 0 0 0 1px rgba(0, 0, 0, .12); }
.fm-chat-rooms a { display: inline-flex; align-items: center; gap: 5px; }
.fm-room-logo { width: 26px; height: 26px; object-fit: contain; display: block; }
.fm-chat-rooms a:has(.fm-room-logo) { padding: 3px 7px; }
.fm-news-row { padding: 9px 12px; border-bottom: 1px solid var(--line2); font-size: 13.5px; }
.fm-news-row:last-child { border-bottom: 0; }

/* 3.3: меню слева. На 6.2 на компьютере — колонкой, на телефоне — плитками;
   на 9.9 меню в левом меню сайта, в странице его нет. */
.fm-nav a i img, .fm-nav a i .fm-badge { width: 22px; height: 22px; }
.fm-nav a i .fm-badge-ini { font-size: 10px; }
@media (min-width: 900px) {
    .fm-layout { display: grid; grid-template-columns: 196px minmax(0, 1fr); align-items: start; }
    .fm.fm-j9 .fm-layout { display: block; }
    .fm-layout > .fm-nav { display: flex; flex-direction: column; gap: 4px; padding: 10px 8px; border-bottom: 0; border-right: 1px solid var(--line);
        background: var(--card); position: sticky; top: 8px; }
    .fm-layout > .fm-nav a { flex-direction: row; justify-content: flex-start; gap: 10px; min-height: 40px; padding: 7px 10px; border-radius: 12px;
        font-size: 13.5px; text-align: left; }
    .fm-layout > .fm-nav a i { font-size: 18px; width: 24px; text-align: center; display: inline-flex; justify-content: center; }
    .fm-layout > .fm-nav a span { font-size: 13.5px; }
    .fm-layout > .fm-nav b { position: static; margin-left: auto; }
    .fm-main { min-width: 0; }
}

/* 9.9: пункты менеджера в левом меню сайта */
.fm-side-title { padding: 10px 10px 0 20px; font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .4px; opacity: .75; }
.fm-side-title a { color: inherit; text-decoration: none; }
.nav__vertical.fm-side { padding-top: 6px; padding-bottom: 6px; border-bottom: 1px solid var(--bs-border-color, rgba(0, 0, 0, .1)); }
.fm-side .fm-side-ico { width: 24px; height: 24px; margin-right: 12px; display: inline-flex; align-items: center; justify-content: center; font-size: 18px; flex: none; }
.fm-side .fm-side-ico img, .fm-side .fm-side-ico .fm-badge { width: 22px !important; height: 22px !important; border-radius: 50%; object-fit: contain; }

/* 3.3: всплывающие уведомления */
.fm-toasts { position: fixed; right: 16px; bottom: 16px; z-index: 3000; display: flex; flex-direction: column; gap: 8px; width: 330px; max-width: calc(100vw - 32px); pointer-events: none; }
.fm .fm-toast { position: relative; display: flex; flex-direction: column; gap: 2px; padding: 11px 34px 11px 14px; border-radius: 14px; pointer-events: auto;
    background: var(--card); color: var(--ink); border: 1px solid var(--line); box-shadow: 0 10px 28px rgba(30, 27, 75, .28);
    font-size: 13px; line-height: 1.35; text-decoration: none; transform: translateY(16px); opacity: 0; transition: transform .3s, opacity .3s; }
.fm .fm-toast.on { transform: none; opacity: 1; }
.fm .fm-toast b { font-size: 13.5px; }
.fm .fm-toast.goal { background: linear-gradient(135deg, #15803d, #22c55e); color: #fff; border: 0; }
.fm .fm-toast.goal.against { background: linear-gradient(135deg, #b91c1c, #f43f5e); }
.fm .fm-toast.note { border-left: 4px solid var(--violet); }
.fm-toast-x { position: absolute; top: 6px; right: 10px; font-size: 18px; line-height: 1; opacity: .6; cursor: pointer; }
@media (max-width: 600px) { .fm-toasts { left: 12px; right: 12px; bottom: 12px; width: auto; } }

/* 3.3: заявка на матч */
.fm-bench-sum { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 8px; }
.fm-bench-sum span { background: var(--lilac-soft); border-radius: 10px; padding: 4px 10px; font-size: 12.5px; color: var(--muted); }
.fm-bench-sum b { color: var(--ink); }
.fm-bench { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 4px 10px; }
.fm-bench-row { display: flex; align-items: center; gap: 8px; padding: 6px 8px; border-radius: 10px; border: 1px solid var(--line); cursor: pointer; font-size: 13px; }
.fm-bench-row:has(input:checked) { background: var(--lilac-soft); border-color: var(--violet); }
.fm-bench-row.off { opacity: .55; cursor: default; }
.fm-bench-row .ps { flex: none; width: 30px; font-size: 11px; font-weight: 700; color: var(--violet); }
.fm-bench-row .p { flex: 1; min-width: 0; }
.fm-bench-row .r { flex: none; font-size: 12px; color: var(--muted); }
