/* =====================================================================
   FitCoach — единая тёмная тема
   ===================================================================== */

:root {
    --fc-bg: #0b0f17;
    --fc-surface: #131a29;
    --fc-surface-2: #0f1623;
    --fc-surface-3: #192338;
    --fc-border: rgba(255, 255, 255, 0.08);
    --fc-border-strong: rgba(255, 255, 255, 0.14);
    --fc-text: #e2e8f0;
    --fc-text-strong: #f8fafc;
    --fc-muted: #94a3b8;
    --fc-faint: #64748b;
    --fc-accent: #10b981;
    --fc-accent-2: #34d399;
    --fc-accent-ink: #062118;
    --fc-blue: #60a5fa;
    --fc-warn: #fbbf24;
    --fc-danger: #f87171;
    --fc-radius: 18px;
    --fc-radius-sm: 12px;
    --fc-shadow: 0 18px 40px rgba(0, 0, 0, 0.35);
    --fc-tabbar-h: 64px;

    --bs-body-bg: var(--fc-bg);
    --bs-body-color: var(--fc-text);
    --bs-link-color-rgb: 52, 211, 153;
    --bs-link-hover-color-rgb: 110, 231, 183;
}

html, body {
    font-family: "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    background-color: var(--fc-bg);
    color: var(--fc-text);
}

body {
    min-height: 100vh;
    background:
        radial-gradient(circle at 12% 0%, rgba(16, 185, 129, 0.10), transparent 32%),
        radial-gradient(circle at 92% 12%, rgba(59, 130, 246, 0.10), transparent 36%),
        var(--fc-bg);
    background-attachment: fixed;
}

a { color: var(--fc-accent-2); }
a:hover { color: #6ee7b7; }

h1:focus { outline: none; }

.min-w-0 { min-width: 0; }

.fc-ico {
    width: 20px;
    height: 20px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.9;
    stroke-linecap: round;
    stroke-linejoin: round;
    flex-shrink: 0;
}
.text-muted-fc { color: var(--fc-muted) !important; }
.text-faint { color: var(--fc-faint) !important; }
.text-strong { color: var(--fc-text-strong) !important; }
.text-emerald { color: var(--fc-accent-2) !important; }
.text-blue { color: var(--fc-blue) !important; }
.text-warn { color: var(--fc-warn) !important; }

.btn:focus-visible, .form-control:focus, .form-select:focus, .form-check-input:focus {
    box-shadow: 0 0 0 0.2rem rgba(16, 185, 129, 0.25);
}

.valid.modified:not([type=checkbox]) { outline: 1px solid rgba(16, 185, 129, 0.6); }
.invalid { outline: 1px solid #ef4444; }
.validation-message { color: #fca5a5; font-size: 0.82rem; margin-top: 4px; }

/* ---------- Страница и шапка раздела ---------- */

.fc-page {
    max-width: 1240px;
    margin: 0 auto;
    padding: 24px 16px 40px;
}

@media (min-width: 768px) {
    .fc-page { padding: 36px 28px 56px; }
}

.fc-hero {
    position: relative;
    overflow: hidden;
    border-radius: 22px;
    padding: 22px;
    margin-bottom: 20px;
    background: linear-gradient(135deg, #141c2c 0%, #0f1623 100%);
    border: 1px solid var(--fc-border);
    box-shadow: var(--fc-shadow);
}

@media (min-width: 768px) {
    .fc-hero { padding: 32px 36px; margin-bottom: 26px; }
}

.fc-hero-glow {
    position: absolute;
    top: -70px;
    right: -70px;
    width: 260px;
    height: 260px;
    background: radial-gradient(circle, rgba(16, 185, 129, 0.24), transparent 70%);
    pointer-events: none;
}

.fc-hero-inner {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

@media (min-width: 992px) {
    .fc-hero-inner { flex-direction: row; align-items: center; justify-content: space-between; }
}

.fc-hero-title {
    font-size: clamp(1.55rem, 3.2vw, 2.3rem);
    font-weight: 800;
    color: var(--fc-text-strong);
    margin: 10px 0 6px;
    letter-spacing: -0.02em;
}

.fc-hero-subtitle { color: var(--fc-muted); margin: 0; max-width: 640px; }

.fc-hero-actions { display: flex; flex-wrap: wrap; gap: 10px; }

.fc-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    padding: 5px 12px;
    border-radius: 999px;
    background: rgba(16, 185, 129, 0.12);
    color: var(--fc-accent-2);
    border: 1px solid rgba(16, 185, 129, 0.25);
}

.fc-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--fc-accent);
    box-shadow: 0 0 8px var(--fc-accent);
}

/* ---------- Карточки ---------- */

.fc-card {
    background: rgba(19, 26, 41, 0.88);
    border: 1px solid var(--fc-border);
    border-radius: var(--fc-radius);
    padding: 18px;
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.25);
}

@media (min-width: 768px) {
    .fc-card { padding: 24px; }
}

.fc-card + .fc-card { margin-top: 18px; }

.fc-card-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 16px;
}

.fc-card-title {
    font-size: 1.08rem;
    font-weight: 700;
    color: var(--fc-text-strong);
    margin: 0;
    display: flex;
    align-items: center;
    gap: 10px;
}

.fc-subcard {
    background: rgba(11, 15, 23, 0.65);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: var(--fc-radius-sm);
    padding: 14px;
}

.fc-empty {
    background: rgba(11, 15, 23, 0.5);
    border: 1px dashed rgba(255, 255, 255, 0.14);
    border-radius: var(--fc-radius-sm);
    padding: 26px 18px;
    text-align: center;
    color: var(--fc-muted);
}

.fc-empty-icon { font-size: 1.8rem; display: block; margin-bottom: 6px; }

.fc-stat {
    background: rgba(19, 26, 41, 0.88);
    border: 1px solid var(--fc-border);
    border-radius: var(--fc-radius);
    padding: 16px;
    height: 100%;
}

.fc-stat-label {
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--fc-faint);
}

.fc-stat-value {
    font-size: 1.9rem;
    font-weight: 800;
    color: var(--fc-text-strong);
    line-height: 1.15;
    margin-top: 4px;
}

.fc-stat-hint { font-size: 0.82rem; color: var(--fc-muted); margin-top: 2px; }

.fc-icon {
    width: 40px;
    height: 40px;
    flex-shrink: 0;
    border-radius: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.15rem;
    background: rgba(16, 185, 129, 0.14);
    border: 1px solid rgba(16, 185, 129, 0.28);
}

.fc-icon-blue { background: rgba(59, 130, 246, 0.15); border-color: rgba(59, 130, 246, 0.3); }
.fc-icon-purple { background: rgba(168, 85, 247, 0.15); border-color: rgba(168, 85, 247, 0.3); }
.fc-icon-amber { background: rgba(245, 158, 11, 0.15); border-color: rgba(245, 158, 11, 0.3); }

/* ---------- Кнопки ---------- */

.fc-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 42px;
    padding: 8px 18px;
    border-radius: 12px;
    font-weight: 600;
    font-size: 0.95rem;
    border: 1px solid transparent;
    text-decoration: none;
    cursor: pointer;
    transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease, transform 0.1s ease;
    white-space: nowrap;
}

.fc-btn:active { transform: translateY(1px); }
.fc-btn:disabled, .fc-btn.disabled { opacity: 0.5; cursor: not-allowed; pointer-events: none; }
.fc-btn-sm { min-height: 34px; padding: 5px 12px; font-size: 0.85rem; border-radius: 10px; }
.fc-btn-block { width: 100%; }

.fc-btn-accent {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: var(--fc-accent-ink);
    box-shadow: 0 6px 20px rgba(16, 185, 129, 0.24);
}

.fc-btn-accent:hover { background: linear-gradient(135deg, #34d399 0%, #10b981 100%); color: #041711; }

.fc-btn-glass {
    background: rgba(255, 255, 255, 0.05);
    color: var(--fc-text);
    border-color: rgba(255, 255, 255, 0.12);
}

.fc-btn-glass:hover { background: rgba(255, 255, 255, 0.1); color: #fff; }

.fc-btn-outline {
    background: transparent;
    color: var(--fc-accent-2);
    border-color: rgba(52, 211, 153, 0.45);
}

.fc-btn-outline:hover { background: rgba(16, 185, 129, 0.12); color: #6ee7b7; }

.fc-btn-danger {
    background: rgba(239, 68, 68, 0.14);
    color: var(--fc-danger);
    border-color: rgba(239, 68, 68, 0.32);
}

.fc-btn-danger:hover { background: rgba(239, 68, 68, 0.24); color: #fecaca; }

.fc-icon-btn {
    width: 40px;
    height: 40px;
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    border: 1px solid transparent;
    background: transparent;
    color: var(--fc-text);
    cursor: pointer;
}

.fc-icon-btn:hover { background: rgba(255, 255, 255, 0.08); }
.fc-icon-btn svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }

/* ---------- Формы ---------- */

.fc-label { display: block; font-size: 0.82rem; color: var(--fc-muted); margin-bottom: 6px; font-weight: 500; }

.fc-input, .fc-input.form-control, .fc-input.form-select {
    background-color: var(--fc-surface-2);
    color: var(--fc-text);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 12px;
    min-height: 44px;
}

.fc-input::placeholder { color: var(--fc-faint); }

.fc-input:focus {
    background-color: var(--fc-surface-2);
    color: var(--fc-text-strong);
    border-color: var(--fc-accent);
    box-shadow: 0 0 0 0.2rem rgba(16, 185, 129, 0.18);
}

.fc-input[type="datetime-local"], .fc-input[type="date"] { color-scheme: dark; }

textarea.fc-input { min-height: 84px; resize: vertical; }

.fc-form-grid { display: grid; gap: 14px; grid-template-columns: 1fr; }

@media (min-width: 768px) {
    .fc-form-grid { grid-template-columns: repeat(2, 1fr); }
    .fc-form-grid .span-2 { grid-column: span 2; }
}

@media (min-width: 1200px) {
    .fc-form-grid.cols-4 { grid-template-columns: repeat(4, 1fr); }
}

.fc-hint { font-size: 0.78rem; color: var(--fc-faint); margin-top: 5px; }

/* Сегментированный выбор (уровень программы, роль) */
.fc-segment { display: flex; gap: 6px; flex-wrap: wrap; }

.fc-segment button {
    flex: 1 1 0;
    min-height: 42px;
    border-radius: 11px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: var(--fc-surface-2);
    color: var(--fc-muted);
    font-weight: 600;
    font-size: 0.88rem;
    padding: 6px 10px;
}

.fc-segment button.active { color: var(--fc-text-strong); border-color: var(--fc-accent); background: rgba(16, 185, 129, 0.14); }
.fc-segment button.lvl-beginner.active { border-color: #84cc16; background: rgba(132, 204, 22, 0.16); }
.fc-segment button.lvl-intermediate.active { border-color: #eab308; background: rgba(234, 179, 8, 0.16); }
.fc-segment button.lvl-advanced.active { border-color: #ef4444; background: rgba(239, 68, 68, 0.16); }

/* ---------- Сообщения ---------- */

.fc-alert {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    border-radius: 12px;
    padding: 10px 14px;
    font-size: 0.92rem;
    margin-bottom: 16px;
}

.fc-alert > span:first-child { font-weight: 800; }
.fc-alert-ok { background: rgba(16, 185, 129, 0.14); color: #6ee7b7; border: 1px solid rgba(16, 185, 129, 0.35); }
.fc-alert-err { background: rgba(239, 68, 68, 0.14); color: #fca5a5; border: 1px solid rgba(239, 68, 68, 0.35); }
.fc-alert-warn { background: rgba(245, 158, 11, 0.12); color: #fcd34d; border: 1px solid rgba(245, 158, 11, 0.32); }
.fc-alert-info { background: rgba(59, 130, 246, 0.12); color: #93c5fd; border: 1px solid rgba(59, 130, 246, 0.3); }

/* ---------- Бейджи ---------- */

.fc-tag {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.75rem;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.06);
    color: var(--fc-muted);
    border: 1px solid rgba(255, 255, 255, 0.09);
    white-space: nowrap;
}

.fc-tag-ok { background: rgba(16, 185, 129, 0.15); color: var(--fc-accent-2); border-color: rgba(16, 185, 129, 0.32); }
.fc-tag-warn { background: rgba(245, 158, 11, 0.15); color: var(--fc-warn); border-color: rgba(245, 158, 11, 0.32); }
.fc-tag-blue { background: rgba(59, 130, 246, 0.15); color: var(--fc-blue); border-color: rgba(59, 130, 246, 0.32); }
.fc-tag-danger { background: rgba(239, 68, 68, 0.15); color: var(--fc-danger); border-color: rgba(239, 68, 68, 0.32); }

.fc-level {
    display: inline-flex;
    align-items: center;
    font-size: 0.72rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 4px 12px;
    border-radius: 999px;
    white-space: nowrap;
}

.lvl-beginner { --lvl: #84cc16; }
.lvl-intermediate { --lvl: #eab308; }
.lvl-advanced { --lvl: #ef4444; }

.fc-level.lvl-beginner { background: #84cc16; color: #1a2e05; }
.fc-level.lvl-intermediate { background: #eab308; color: #261a00; }
.fc-level.lvl-advanced { background: #dc2626; color: #fff1f2; }

/* ---------- Группы мышц (цвета как в трекерах: грудь — зелёный, спина — синий и т.д.) ---------- */

.mg-chest { --mg: #4ade80; --mg-bg: #1c4026; --mg-tint: #dcfce7; }
.mg-back { --mg: #818cf8; --mg-bg: #1f2766; --mg-tint: #e0e7ff; }
.mg-shoulders { --mg: #38bdf8; --mg-bg: #0b3d5a; --mg-tint: #e0f2fe; }
.mg-arms { --mg: #f87171; --mg-bg: #561b1b; --mg-tint: #fee2e2; }
.mg-legs { --mg: #bef264; --mg-bg: #3b440d; --mg-tint: #f4fbdc; }
.mg-core { --mg: #c084fc; --mg-bg: #31195c; --mg-tint: #f3e8ff; }
.mg-none { --mg: #94a3b8; --mg-bg: #272c36; --mg-tint: #f1f5f9; }

.fc-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.78rem;
    font-weight: 600;
    padding: 4px 10px 4px 8px;
    border-radius: 999px;
    color: var(--fc-text);
    background: color-mix(in srgb, var(--mg) 14%, transparent);
    border: 1px solid color-mix(in srgb, var(--mg) 35%, transparent);
    white-space: nowrap;
}

.fc-chip i { width: 8px; height: 8px; border-radius: 50%; background: var(--mg); }

.fc-chip-btn { cursor: pointer; background: rgba(255, 255, 255, 0.04); border-color: rgba(255, 255, 255, 0.1); color: var(--fc-muted); }
.fc-chip-btn.active { color: var(--fc-text-strong); background: color-mix(in srgb, var(--mg) 22%, transparent); border-color: var(--mg); }
.fc-chip-btn.mg-none.active { background: rgba(16, 185, 129, 0.16); border-color: var(--fc-accent); }

.fc-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.fc-chips-scroll { flex-wrap: nowrap; overflow-x: auto; padding-bottom: 4px; scrollbar-width: none; }
.fc-chips-scroll::-webkit-scrollbar { display: none; }

/* ---------- Иллюстрации упражнений ---------- */

.fc-figure {
    display: block;
    width: 100%;
    height: 100%;
    --fig-body: #e2e8f0;
    --fig-prop: #475569;
    --fig-metal: #94a3b8;
}

.fc-figure--light { --fig-body: #334155; --fig-prop: #a8b3c4; --fig-metal: #475569; }

.fc-figure .seg { stroke: var(--fig-body); stroke-width: 6; stroke-linecap: round; fill: none; }
.fc-figure .seg.torso { stroke-width: 8.5; }
.fc-figure .seg.thin { stroke-width: 4; }
.fc-figure .seg.hl { stroke: var(--mg, #34d399); }
.fc-figure--light .seg.hl { stroke: color-mix(in srgb, var(--mg, #10b981) 80%, #000); }
.fc-figure .seg.far { opacity: 0.45; }
.fc-figure .head { fill: var(--fig-body); }
.fc-figure .prop { fill: var(--fig-prop); }
.fc-figure .prop-line { stroke: var(--fig-prop); stroke-linecap: round; fill: none; }
.fc-figure .ground { stroke: var(--fig-prop); stroke-width: 1.4; opacity: 0.6; }
.fc-figure .metal { fill: var(--fig-metal); }
.fc-figure .hub { fill: var(--fig-prop); }
.fc-figure .bar { stroke: var(--fig-metal); stroke-width: 2.2; stroke-linecap: round; }
.fc-figure .cable { stroke: var(--fig-metal); stroke-width: 1.2; opacity: 0.85; }
.fc-figure .lever { stroke: var(--fig-metal); stroke-width: 3.5; stroke-linecap: round; }
.fc-figure .rail { stroke: var(--fig-prop); stroke-width: 2; opacity: 0.7; }

.fc-thumb {
    width: 64px;
    height: 64px;
    flex-shrink: 0;
    border-radius: 14px;
    background: var(--mg-tint, #f1f5f9);
    padding: 5px;
    overflow: hidden;
    display: inline-flex;
}

.fc-thumb img { width: 100%; height: 100%; object-fit: cover; border-radius: 10px; }

@media (min-width: 768px) {
    .fc-thumb { width: 72px; height: 72px; }
}

/* ---------- Строка упражнения ---------- */

.fc-ex-row {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 8px 12px 8px 8px;
    border-radius: 16px;
    background: var(--mg-bg);
    border-left: 4px solid var(--mg);
    transition: background-color 0.18s ease, filter 0.18s ease, transform 0.12s ease;
    color: var(--fc-text-strong);
}

.fc-ex-row + .fc-ex-row { margin-top: 8px; }
.fc-ex-row.is-clickable { cursor: pointer; user-select: none; }
.fc-ex-row.is-clickable:hover { filter: brightness(1.12); }
.fc-ex-row.is-clickable:active { transform: scale(0.995); }
.fc-ex-row.is-muted { background: #1d2028; border-left-color: color-mix(in srgb, var(--mg) 55%, #1d2028); }
.fc-ex-row.is-muted .fc-thumb { filter: saturate(0.75); }
.fc-ex-row.is-done { box-shadow: inset 0 0 0 1px rgba(52, 211, 153, 0.45); }

.fc-ex-row-body { flex: 1; min-width: 0; }
.fc-ex-row-title { font-weight: 600; font-size: 1rem; line-height: 1.3; }

@media (min-width: 768px) {
    .fc-ex-row-title { font-size: 1.06rem; }
}

.fc-ex-row-meta { font-size: 0.8rem; color: rgba(226, 232, 240, 0.72); margin-top: 3px; }
.fc-ex-row-aside { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }

.fc-sets-pill {
    display: inline-flex;
    align-items: center;
    padding: 4px 12px;
    border-radius: 999px;
    border: 2px solid rgba(255, 255, 255, 0.35);
    color: rgba(255, 255, 255, 0.78);
    font-weight: 700;
    font-size: 0.85rem;
    white-space: nowrap;
}

.fc-check {
    width: 26px;
    height: 26px;
    border-radius: 8px;
    border: 2px solid rgba(255, 255, 255, 0.45);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.fc-check.on { background: #fff; border-color: #fff; }
.fc-check.on::after { content: ""; width: 7px; height: 12px; border: solid #0b0f17; border-width: 0 3px 3px 0; transform: rotate(45deg) translate(-1px, -1px); }

/* Степпер подходов/повторений */
.fc-stepper {
    display: inline-flex;
    align-items: center;
    gap: 2px;
    background: rgba(0, 0, 0, 0.28);
    border-radius: 10px;
    padding: 2px;
}

.fc-stepper button {
    width: 30px;
    height: 30px;
    border: 0;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
    font-weight: 700;
    line-height: 1;
}

.fc-stepper button:hover { background: rgba(255, 255, 255, 0.16); }
.fc-stepper span { min-width: 30px; text-align: center; font-weight: 700; font-size: 0.92rem; }
.fc-stepper-label { font-size: 0.72rem; color: rgba(226, 232, 240, 0.7); margin-right: 4px; }

/* ---------- Плитки программ (обложка с иллюстрацией) ---------- */

.fc-tiles { display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr)); }

@media (max-width: 575.98px) {
    .fc-tiles.two-cols { grid-template-columns: 1fr 1fr; gap: 10px; }
}

.fc-tile {
    position: relative;
    display: block;
    aspect-ratio: 4 / 3;
    border-radius: 18px;
    overflow: hidden;
    text-decoration: none;
    color: #fff;
    background:
        radial-gradient(circle at 75% 35%, color-mix(in srgb, var(--mg) 45%, transparent), transparent 60%),
        linear-gradient(150deg, color-mix(in srgb, var(--mg-bg) 85%, #000) 0%, #0b0f17 100%);
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 10px 26px rgba(0, 0, 0, 0.35);
    transition: transform 0.16s ease, border-color 0.16s ease;
}

.fc-tile:hover { transform: translateY(-3px); border-color: color-mix(in srgb, var(--mg) 60%, transparent); color: #fff; }

.fc-tile-art {
    position: absolute;
    right: -6%;
    bottom: -4%;
    width: 72%;
    height: 92%;
    opacity: 0.42;
}

.fc-tile-shade { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(0, 0, 0, 0.1) 0%, rgba(0, 0, 0, 0.55) 100%); }

.fc-tile-title {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 18px 22px;
    font-weight: 800;
    font-size: clamp(1rem, 2.4vw, 1.35rem);
    line-height: 1.2;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.7);
}

.fc-tile-bottom {
    position: absolute;
    left: 12px;
    right: 12px;
    bottom: 10px;
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 8px;
}

.fc-tile-meta { font-size: 0.75rem; color: rgba(255, 255, 255, 0.82); text-shadow: 0 1px 6px rgba(0, 0, 0, 0.8); min-width: 0; }
.fc-tile-meta div { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.fc-tile-wrap { position: relative; }
.fc-tile-menu { position: absolute; top: 8px; right: 6px; z-index: 2; }
.fc-tile-menu .fc-icon-btn { color: #fff; background: rgba(0, 0, 0, 0.25); width: 34px; height: 34px; }

.fc-tile-dropdown {
    position: absolute;
    top: 38px;
    right: 0;
    min-width: 170px;
    background: #182033;
    border: 1px solid var(--fc-border-strong);
    border-radius: 12px;
    padding: 6px;
    box-shadow: var(--fc-shadow);
}

.fc-tile-dropdown a, .fc-tile-dropdown button {
    display: block;
    width: 100%;
    text-align: left;
    padding: 8px 10px;
    border-radius: 8px;
    color: var(--fc-text);
    background: none;
    border: 0;
    text-decoration: none;
    font-size: 0.9rem;
}

.fc-tile-dropdown a:hover, .fc-tile-dropdown button:hover { background: rgba(255, 255, 255, 0.07); }
.fc-tile-dropdown .danger { color: var(--fc-danger); }

.fc-tile-progress { position: absolute; left: 0; right: 0; bottom: 0; height: 4px; background: rgba(255, 255, 255, 0.12); }
.fc-tile-progress span { display: block; height: 100%; background: var(--fc-accent-2); }

/* ---------- Прогресс ---------- */

.fc-progress { height: 8px; border-radius: 999px; background: rgba(255, 255, 255, 0.08); overflow: hidden; }
.fc-progress > span { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #10b981, #34d399); transition: width 0.3s ease; }

.fc-ring {
    --p: 0;
    width: 84px;
    height: 84px;
    flex-shrink: 0;
    border-radius: 50%;
    display: grid;
    place-items: center;
    background: conic-gradient(var(--fc-accent-2) calc(var(--p) * 1%), rgba(255, 255, 255, 0.08) 0);
}

.fc-ring > span {
    width: 68px;
    height: 68px;
    border-radius: 50%;
    background: var(--fc-surface);
    display: grid;
    place-items: center;
    font-weight: 800;
    color: var(--fc-text-strong);
}

/* Кружки подходов */
.fc-sets { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }

.fc-set {
    min-width: 38px;
    height: 34px;
    padding: 0 8px;
    border-radius: 10px;
    border: 1.5px solid rgba(255, 255, 255, 0.3);
    background: rgba(0, 0, 0, 0.2);
    color: #fff;
    font-weight: 700;
    font-size: 0.85rem;
}

.fc-set:hover { border-color: #fff; }
.fc-set.done { background: #fff; color: #0b0f17; border-color: #fff; }

/* ---------- Демонстрация «2 слайда» ---------- */

.fc-demo { display: flex; flex-direction: column; gap: 12px; }

.fc-demo-stage {
    position: relative;
    aspect-ratio: 4 / 3;
    max-height: 52vh;
    width: 100%;
    border-radius: 18px;
    overflow: hidden;
    background:
        radial-gradient(circle at 50% 40%, color-mix(in srgb, var(--mg) 30%, transparent), transparent 65%),
        linear-gradient(160deg, color-mix(in srgb, var(--mg-bg) 80%, #000), #0b0f17);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.fc-demo-slide {
    position: absolute;
    inset: 6% 10% 2%;
    opacity: 0;
    transform: scale(0.97);
    transition: opacity 0.45s ease, transform 0.45s ease;
}

.fc-demo-slide.is-active { opacity: 1; transform: scale(1); }
.fc-demo-slide img { width: 100%; height: 100%; object-fit: contain; }

.fc-demo-badge, .fc-demo-phase {
    position: absolute;
    top: 10px;
    font-size: 0.72rem;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 999px;
    background: rgba(0, 0, 0, 0.45);
    color: #fff;
    backdrop-filter: blur(4px);
}

.fc-demo-badge { left: 10px; }
.fc-demo-phase { right: 10px; color: var(--mg); }

.fc-demo-timer {
    position: absolute;
    left: 0;
    bottom: 0;
    height: 4px;
    width: 0;
    background: var(--mg);
    animation: fc-demo-progress linear forwards;
}

@keyframes fc-demo-progress { from { width: 0; } to { width: 100%; } }

.fc-demo-controls { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }

.fc-demo-play {
    width: 46px;
    height: 46px;
    border-radius: 50%;
    border: 0;
    background: var(--mg);
    color: #0b0f17;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.fc-demo-play svg { width: 20px; height: 20px; fill: currentColor; }

.fc-demo-steps { display: inline-flex; background: rgba(255, 255, 255, 0.06); border-radius: 12px; padding: 3px; }

.fc-demo-steps button {
    width: 40px;
    height: 38px;
    border: 0;
    border-radius: 9px;
    background: transparent;
    color: var(--fc-muted);
    font-weight: 800;
}

.fc-demo-steps button.active { background: #fff; color: #0b0f17; }

.fc-demo-caption { flex: 1 1 200px; font-size: 0.9rem; color: var(--fc-text); }
.fc-demo-caption strong { color: var(--fc-text-strong); margin-right: 4px; }

.fc-demo-tip {
    display: flex;
    gap: 10px;
    padding: 12px 14px;
    border-radius: 14px;
    background: color-mix(in srgb, var(--mg) 10%, transparent);
    border: 1px solid color-mix(in srgb, var(--mg) 30%, transparent);
    font-size: 0.9rem;
    line-height: 1.5;
}

.fc-demo-tip strong { color: var(--fc-text-strong); }

/* ---------- Модальная панель ---------- */

.fc-sheet-backdrop { position: fixed; inset: 0; z-index: 1040; background: rgba(2, 6, 12, 0.72); backdrop-filter: blur(3px); }

.fc-sheet {
    position: fixed;
    z-index: 1050;
    inset: 0;
    display: flex;
    flex-direction: column;
    background: #0b0f17;
}

@media (min-width: 768px) {
    .fc-sheet {
        inset: 5vh auto auto 50%;
        transform: translateX(-50%);
        width: min(640px, 92vw);
        max-height: 90vh;
        border-radius: 22px;
        border: 1px solid var(--fc-border-strong);
        box-shadow: 0 30px 80px rgba(0, 0, 0, 0.6);
        overflow: hidden;
    }

    .fc-sheet.fc-sheet-wide { width: min(820px, 94vw); }
}

.fc-sheet-header {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 12px 12px 8px;
    border-bottom: 1px solid var(--fc-border);
    background: #0b0f17;
}

.fc-sheet-header-body { flex: 1; min-width: 0; }
.fc-sheet-title { flex: 1; min-width: 0; margin: 0; font-size: 1.1rem; font-weight: 700; color: var(--fc-text-strong); }
.fc-sheet-body { flex: 1; overflow-y: auto; padding: 14px; }

.fc-sheet-footer {
    display: flex;
    justify-content: flex-end;
    gap: 0;
    padding: 12px 14px calc(12px + env(safe-area-inset-bottom));
    border-top: 1px solid var(--fc-border);
    background: #0b0f17;
}

.fc-sheet-search {
    width: 100%;
    background: transparent;
    border: 0;
    color: var(--fc-text-strong);
    font-size: 1.05rem;
    outline: none;
    padding: 6px 4px;
}

.fc-sheet-search::placeholder { color: var(--fc-faint); }

/* Пара кнопок «ЗАКРЫТЬ | ДОБАВИТЬ • N» */
.fc-split-actions { display: inline-flex; border-radius: 16px; overflow: hidden; background: #1b1e25; }

.fc-split-actions button {
    border: 0;
    min-height: 52px;
    padding: 0 18px;
    font-weight: 700;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    font-size: 0.95rem;
}

.fc-split-actions .secondary { background: transparent; color: #e5e7eb; }
.fc-split-actions .primary { background: #22c55e; color: #fff; border-radius: 16px; }
.fc-split-actions .primary:disabled { background: #1f6f3e; color: rgba(255, 255, 255, 0.55); }

/* ---------- Аватар и карточки тренеров ---------- */

.fc-avatar {
    position: relative;
    flex-shrink: 0;
    display: inline-grid;
    place-items: center;
    border-radius: 50%;
    overflow: hidden;
    color: #fff;
    font-weight: 800;
    background: linear-gradient(135deg, #10b981, #0e7490);
}

.fc-avatar img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.fc-avatar-sm { width: 32px; height: 32px; font-size: 0.75rem; }
.fc-avatar-md { width: 44px; height: 44px; font-size: 0.95rem; }
.fc-avatar-lg { width: 64px; height: 64px; font-size: 1.3rem; }
.fc-avatar-xl { width: 104px; height: 104px; font-size: 2rem; box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.08), 0 10px 26px rgba(0, 0, 0, 0.4); }
.fc-avatar-c1 { background: linear-gradient(135deg, #6366f1, #3b82f6); }
.fc-avatar-c2 { background: linear-gradient(135deg, #f97316, #db2777); }
.fc-avatar-c3 { background: linear-gradient(135deg, #a855f7, #6366f1); }
.fc-avatar-c4 { background: linear-gradient(135deg, #0ea5e9, #14b8a6); }
.fc-avatar-c5 { background: linear-gradient(135deg, #eab308, #f97316); }

.fc-trainer-grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); }

.fc-trainer-card {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 14px;
    padding: 20px;
    border-radius: 20px;
    background: linear-gradient(170deg, #172036 0%, #111827 70%);
    border: 1px solid var(--fc-border);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.3);
}

.fc-trainer-card.is-mine { border-color: rgba(52, 211, 153, 0.6); box-shadow: 0 0 0 1px rgba(52, 211, 153, 0.25), 0 12px 30px rgba(0, 0, 0, 0.3); }

.fc-trainer-mine {
    position: absolute;
    top: 14px;
    right: 14px;
    font-size: 0.72rem;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 999px;
    background: rgba(16, 185, 129, 0.18);
    color: var(--fc-accent-2);
}

.fc-trainer-head { display: flex; align-items: center; gap: 16px; }
.fc-trainer-name { font-size: 1.2rem; font-weight: 800; color: var(--fc-text-strong); margin: 0 0 4px; overflow-wrap: anywhere; }
.fc-trainer-spec { color: var(--fc-accent-2); font-weight: 600; font-size: 0.9rem; }

.fc-trainer-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }

.fc-trainer-stats > div {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 12px;
    padding: 8px 12px;
}

.fc-trainer-stats strong { display: block; color: var(--fc-text-strong); font-size: 1.05rem; }
.fc-trainer-stats span { font-size: 0.75rem; color: var(--fc-faint); }

.fc-trainer-bio {
    margin: 0;
    color: var(--fc-muted);
    font-size: 0.9rem;
    line-height: 1.55;
    display: -webkit-box;
    -webkit-line-clamp: 4;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.fc-trainer-actions { margin-top: auto; display: flex; gap: 8px; flex-wrap: wrap; }
.fc-trainer-actions > * { flex: 1 1 auto; }

/* ---------- Расписание ---------- */

.fc-day-label {
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--fc-faint);
    margin: 18px 0 8px;
}

.fc-day-label:first-child { margin-top: 0; }

.fc-session {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 12px 14px;
    padding: 14px;
    border-radius: 14px;
    background: rgba(11, 15, 23, 0.65);
    border: 1px solid rgba(255, 255, 255, 0.06);
}

.fc-session + .fc-session { margin-top: 10px; }
.fc-session.is-pending { border-color: rgba(245, 158, 11, 0.45); }
.fc-session.is-done { opacity: 0.75; }

.fc-session-time {
    min-width: 62px;
    text-align: center;
    padding: 8px 6px;
    border-radius: 12px;
    background: rgba(59, 130, 246, 0.14);
    border: 1px solid rgba(59, 130, 246, 0.28);
    color: var(--fc-blue);
    font-weight: 800;
    line-height: 1.1;
}

.fc-session-time small { display: block; font-size: 0.68rem; font-weight: 600; color: var(--fc-muted); margin-top: 2px; }
.fc-session-title { font-weight: 700; color: var(--fc-text-strong); }
.fc-session-actions { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 8px; }

.fc-request {
    border-radius: 16px;
    padding: 16px;
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.12), rgba(19, 26, 41, 0.9));
    border: 1px solid rgba(245, 158, 11, 0.38);
}

.fc-request + .fc-request { margin-top: 12px; }
.fc-request-times { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 10px 0; }
.fc-request-times .from { text-decoration: line-through; color: var(--fc-faint); }
.fc-request-times .to { color: var(--fc-warn); font-weight: 800; }

.fc-request-reason {
    font-size: 0.9rem;
    color: var(--fc-text);
    background: rgba(0, 0, 0, 0.22);
    border-radius: 10px;
    padding: 8px 12px;
    margin-bottom: 12px;
}

.fc-inline-form {
    grid-column: 1 / -1;
    display: grid;
    gap: 10px;
    padding: 12px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px dashed rgba(255, 255, 255, 0.14);
}

@media (min-width: 768px) {
    .fc-inline-form { grid-template-columns: 220px 1fr auto; align-items: end; }
}

/* ---------- Регистрация и вход ---------- */

.fc-auth {
    min-height: calc(100vh - 40px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px 16px 40px;
}

.fc-auth-shell {
    width: 100%;
    max-width: 1040px;
    display: grid;
    grid-template-columns: 1fr;
    border-radius: 26px;
    overflow: hidden;
    border: 1px solid var(--fc-border);
    box-shadow: 0 30px 70px rgba(0, 0, 0, 0.5);
    background: rgba(19, 26, 41, 0.92);
}

@media (min-width: 992px) {
    .fc-auth-shell { grid-template-columns: 0.9fr 1.1fr; }
}

.fc-auth-aside {
    position: relative;
    padding: 28px;
    background:
        radial-gradient(circle at 20% 15%, rgba(16, 185, 129, 0.35), transparent 50%),
        radial-gradient(circle at 90% 90%, rgba(59, 130, 246, 0.28), transparent 50%),
        #0e1524;
    display: none;
}

@media (min-width: 992px) {
    .fc-auth-aside { display: flex; flex-direction: column; justify-content: space-between; padding: 40px; }
}

.fc-auth-aside h2 { font-size: 2rem; font-weight: 800; color: #fff; line-height: 1.15; margin: 18px 0 12px; }
.fc-auth-aside ul { list-style: none; padding: 0; margin: 22px 0 0; display: grid; gap: 12px; }
.fc-auth-aside li { display: flex; gap: 10px; color: var(--fc-text); }
.fc-auth-aside li span:first-child { color: var(--fc-accent-2); font-weight: 800; }

.fc-auth-art { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 28px; }
.fc-auth-art .fc-thumb { width: 100%; height: auto; aspect-ratio: 1; background: rgba(255, 255, 255, 0.06); }

.fc-auth-form { padding: 26px 20px; }

@media (min-width: 576px) {
    .fc-auth-form { padding: 36px 40px; }
}

.fc-brand-mark {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-weight: 800;
    font-size: 1.15rem;
    color: var(--fc-text-strong);
    text-decoration: none;
}

.fc-brand-badge {
    width: 34px;
    height: 34px;
    border-radius: 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 0.85rem;
    color: var(--fc-accent-ink);
    background: linear-gradient(135deg, #10b981 0%, #34d399 100%);
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.25);
}

.fc-role-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }

.fc-role {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 14px;
    border-radius: 14px;
    border: 1.5px solid rgba(255, 255, 255, 0.12);
    background: var(--fc-surface-2);
    cursor: pointer;
    transition: border-color 0.15s ease, background-color 0.15s ease;
}

.fc-role input { position: absolute; opacity: 0; pointer-events: none; }
.fc-role-icon { font-size: 1.5rem; }
.fc-role-title { font-weight: 700; color: var(--fc-text-strong); }
.fc-role-desc { font-size: 0.78rem; color: var(--fc-muted); line-height: 1.35; }
.fc-role:has(input:checked) { border-color: var(--fc-accent); background: rgba(16, 185, 129, 0.12); }
.fc-role:has(input:focus-visible) { box-shadow: 0 0 0 0.2rem rgba(16, 185, 129, 0.3); }

.fc-trainer-extra { display: none; }
.fc-register:has(#role-trainer:checked) .fc-trainer-extra { display: grid; }

.fc-password-rules { list-style: none; padding: 0; margin: 6px 0 0; display: flex; flex-wrap: wrap; gap: 6px; }
.fc-password-rules li { font-size: 0.72rem; color: var(--fc-faint); background: rgba(255, 255, 255, 0.04); border-radius: 999px; padding: 2px 9px; }

.fc-errors { list-style: none; padding: 10px 14px; margin: 0 0 16px; border-radius: 12px; background: rgba(239, 68, 68, 0.12); border: 1px solid rgba(239, 68, 68, 0.35); color: #fca5a5; font-size: 0.9rem; }
.fc-errors li + li { margin-top: 4px; }
.fc-errors:empty { display: none; }

/* ---------- Мобильная нижняя навигация ---------- */

.fc-tabbar { display: none; }

@media (max-width: 767.98px) {
    .fc-tabbar {
        position: fixed;
        z-index: 1030;
        left: 0;
        right: 0;
        bottom: 0;
        display: flex;
        justify-content: space-around;
        height: calc(var(--fc-tabbar-h) + env(safe-area-inset-bottom));
        padding-bottom: env(safe-area-inset-bottom);
        background: rgba(11, 15, 23, 0.96);
        border-top: 1px solid var(--fc-border);
        backdrop-filter: blur(10px);
    }

    .fc-tabbar a {
        flex: 1;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 3px;
        color: var(--fc-faint);
        text-decoration: none;
        font-size: 0.68rem;
        font-weight: 600;
    }

    .fc-tabbar a.active { color: var(--fc-accent-2); }
    .fc-tabbar svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

    .fc-has-tabbar main { padding-bottom: calc(var(--fc-tabbar-h) + 12px); }
}

/* ---------- Ошибки Blazor ---------- */

#blazor-error-ui {
    color-scheme: dark;
    background: #3b1218;
    color: #fecaca;
    bottom: 0;
    box-shadow: 0 -1px 2px rgba(0, 0, 0, 0.2);
    box-sizing: border-box;
    display: none;
    left: 0;
    padding: 0.6rem 1.25rem 0.7rem 1.25rem;
    position: fixed;
    width: 100%;
    z-index: 2000;
}

#blazor-error-ui .dismiss { cursor: pointer; position: absolute; right: 0.75rem; top: 0.5rem; }

.blazor-error-boundary {
    background: #b32121;
    padding: 1rem 1rem 1rem 3.7rem;
    color: white;
}

.blazor-error-boundary::after { content: "Произошла ошибка."; }

.darker-border-checkbox.form-check-input { border-color: #929292; }

.form-floating > .form-control-plaintext::placeholder, .form-floating > .form-control::placeholder {
    color: var(--bs-secondary-color);
    text-align: end;
}

.form-floating > .form-control-plaintext:focus::placeholder, .form-floating > .form-control:focus::placeholder { text-align: start; }
