:root {
    --soft-blue: #5b8def;
    --soft-blue-bg: #eef4ff;
}

.badge-soft-blue {
    background-color: var(--soft-blue-bg);
    color: var(--soft-blue);
    font-weight: 600;
}

.btn-soft-blue {
    background-color: var(--soft-blue);
    border-color: var(--soft-blue);
    color: white;
}

.btn-soft-blue:hover {
    background-color: #4a7de0;
    border-color: #4a7de0;
}

.participant-link {
    color: #1e293b;
    transition: color 0.15s ease;
}

.participant-link:hover {
    color: var(--soft-blue);
}

body {
    background: #f3f4f6;
    font-family: Arial, sans-serif;
}
.page-content {
    padding-top: calc(var(--navbar-height, 0px) + 20px);
}

.navbar-custom {
    background: white;
    border-bottom: 1px solid #ddd;
}
.logo-title {
    font-weight: 700;
    font-size: 28px;
     color: rgba(0, 0, 0, 0.8)
}
.logo-title span {
    color: #d62828;
}
.start-card {
    background: white;
    padding: 18px;
    border-bottom: 1px solid #e6e6e6; /* 👈 линия */
}
.start-card:last-child {
    border-bottom: none; /* убираем у последнего */
}
.distance-tile {
    background: #fff;
    border: 1px solid #eee;
    transition: 0.2s ease;
}
.distance-tile:hover {
    transform: translateY(-2px);
    border-color: #ddd;
    box-shadow: 0 6px 20px rgba(0,0,0,0.06);
}
.start-link {
    transition: 0.15s ease;
}
.start-link:hover {
    color: #0d6efd;
}
.start-link:hover span {
    transform: translateX(3px);
    display: inline-block;
}

.participant-search-result {
    transition: 0.2s ease;
    background: #fff;
}

.participant-search-result:hover {
    background: #f8fafc;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.06);
}

.breadcrumbs {
    font-size: 0.9rem;
    color: #6b7280;
}

.breadcrumbs a {
    color: #6b7280;
    text-decoration: none;
    transition: 0.2s;
}

.breadcrumbs a:hover {
    color: #2563eb;
}

.separator {
    margin: 0 6px;
    color: #9ca3af;
}

.current {
    color: #111827;
    font-weight: 600;
}

/* ========================================
   MOBILE RESULTS
   ======================================== */

.mobile-results {
    width: 100%;
    background: #ffffff;

    border-radius: 16px;
    overflow: hidden;

    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.06);
}


/* ========================================
   HEADER + ROW
   Одинаковая сетка для точного выравнивания
   ======================================== */

.mobile-results-header,
.mobile-results-row {
    display: grid;

    /*
       Место | № | Участник | Категория | Место кат. | Время
    */

    grid-template-columns:
        7%
        10%
        25%
        13%
        12%
        16.5%
        16.5%;

    width: 100%;
    box-sizing: border-box;

    padding-left: 8px;
    padding-right: 8px;
}


/* ========================================
   HEADER
   ======================================== */

.mobile-results-header {
    align-items: center;

    padding-top: 10px;
    padding-bottom: 10px;

    color: #6c757d;

    font-size: 11px;
    font-weight: 700;

    line-height: 1.15;

    border-bottom: 1px solid #dee2e6;
}

.mobile-results-header > div {
    padding-left: 3px;
    padding-right: 3px;
}


/* Выравнивание заголовков */

.mobile-results-header > div:nth-child(1) {
    text-align: center;
}

.mobile-results-header > div:nth-child(2) {
    text-align: center;
}

.mobile-results-header > div:nth-child(3) {
    text-align: left;
}

.mobile-results-header > div:nth-child(4) {
    text-align: left;
}

.mobile-results-header > div:nth-child(5) {
    text-align: center;
}

.mobile-results-header > div:nth-child(6) {
    text-align: center;
}

.mobile-results-header > div:nth-child(7) {
    text-align: center;
}


/* Узкие мобильные экраны */
@media (max-width: 380px) {

    .mobile-results-header,
    .mobile-results-row {
        grid-template-columns:
            8%
            7%
            23%
            12%
            10%
            20%
            20%;

        column-gap: 0;
        padding-left: 4px;
        padding-right: 4px;
        width: 100%;
        box-sizing: border-box;
    }

    /* Разрешаем содержимому сжиматься внутри Grid */
    .mobile-results-header > div,
    .mobile-results-row > div {
        min-width: 0;
        box-sizing: border-box;
    }

    /* Заголовки */
    .mobile-results-header {
        font-size: 10px;
        line-height: 1.15;
    }

    .mobile-category,
    .mobile-category-place {
        font-size: 10px;
        line-height: 1.2;
    }

    /* Участник */
    .mobile-participant {
        font-size: 12px;
        line-height: 1.15;
        overflow-wrap: anywhere;
    }

    .participant-lastname,
    .participant-firstname {
        font-size: 10px;
        line-height: 1.2;
        font-weight: 600;
    }

    /* Номер */
    .mobile-bib {
        font-size: 11px;
        text-align: center;
    }

    /* Категория */
    .mobile-category {
        font-size: 10px;
        overflow-wrap: anywhere;
        line-height: 1.15;
    }

    /* Место */
    .mobile-place {
        font-size: 11px;
    }

    .mobile-place .badge {
        padding: 4px;
        font-size: 10px;
    }

    /* Время CHIP и GUN */
    .mobile-time,
    .mobile-time-gun {
        min-width: 0;
        font-size: 10px;
        white-space: nowrap;
        text-align: center;
        font-variant-numeric: tabular-nums;
        letter-spacing: -0.3px;
    }

    .mobile-results-header > div:nth-child(6),
    .mobile-results-header > div:nth-child(7) {
        text-align: center;
        overflow-wrap: anywhere;
    }
}

/* ========================================
   ROW
   ======================================== */

.mobile-results-row {
    min-height: 62px;

    align-items: center;

    padding-top: 8px;
    padding-bottom: 8px;

    font-size: 14px;

    line-height: 1.2;

    border-bottom: 1px solid #e5e5e5;
}

.mobile-results-row > div {
    padding-left: 3px;
    padding-right: 3px;
}


/* ========================================
   ЧЕРЕДОВАНИЕ СТРОК
   ======================================== */

.result-row-white {
    background-color: #ffffff;
}

.result-row-gray {
    background-color: #f8f9fa;
}


/* ========================================
   МЕСТО
   ======================================== */

.mobile-place {
    display: flex;

    align-items: center;
    justify-content: center;

    text-align: center;
}

.mobile-place .badge {
    width: 24px;
    height: 24px;

    display: inline-flex;
    align-items: center;
    justify-content: center;

    padding: 0;

    border-radius: 6px;

    font-size: 0.75em;
    font-weight: 700;

    line-height: 1;
}


/* ========================================
   НОМЕР
   ======================================== */

.mobile-bib {
    display: flex;

    align-items: center;
    justify-content: center;

    white-space: nowrap;
    font-size: 12px;
    color: #333333;
}


/* ========================================
   УЧАСТНИК
   ======================================== */

.mobile-participant {
    min-width: 0;

    display: flex;
    align-items: center;

    overflow: hidden;
}

.mobile-participant a {
    display: block;

    color: #000000 !important;

    font-size: 14px;
    font-weight: 700;

    line-height: 1.15;

    text-decoration: none;
}


/* Фамилия */
.participant-lastname {
    display: block;
}

/* Имя */
.participant-firstname {
    display: block;
}


/* ========================================
   КАТЕГОРИЯ
   ======================================== */

.mobile-category {
    min-width: 0;

    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    overflow: hidden;

    text-overflow: ellipsis;
    white-space: nowrap;
}


/* ========================================
   МЕСТО В КАТЕГОРИИ
   ======================================== */

.mobile-category-place {
    display: flex;

    align-items: center;
    justify-content: center;

    text-align: center;
}


/* ========================================
   ВРЕМЯ
   ======================================== */

.mobile-time {
    display: flex;

    align-items: center;
    justify-content: center;

    white-space: nowrap;

    font-weight: 400;

    font-variant-numeric: tabular-nums;
}

.mobile-time-gun {
    display: flex;

    align-items: center;
    justify-content: center;

    white-space: nowrap;

    font-weight: 600;

    font-variant-numeric: tabular-nums;
}

.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1030;

    background: white;

    transition: transform 0.25s ease;
}

.navbar.navbar-hidden {
    transform: translateY(-100%);
}

/* # HEADER */
/* .logo-title {
    display: flex;
    align-items: center;
    gap: 8px;

    letter-spacing: -1px;
    text-decoration: none;
}

.navbar-logo {
    height: 24px;
    width: auto;
    display: block;
}

.logo-results {
    color:  #595c5f !important;
} */

/* 
СТИЛЕК ДЛЯ СТРАНИЦЫ ИНФОРМАЦИИ ОБ УЧАСТНИКЕ */

    /* Общие карточки */
    .profile-stat-card {
        border: 1px solid #dee2e6;
        border-radius: 1rem;
        background: #fff;
        height: 100%;
    }

    .profile-stat-card .card-body {
        padding: 12px;
    }

    .profile-stat-label {
        color: #6c757d;
        font-size: 12px;
        line-height: 1.3;
    }

    .profile-stat-value {
        font-size: 22px;
        font-weight: 700;
        line-height: 1.3;
        overflow-wrap: anywhere;
    }

    .profile-section-title {
        font-size: 17px;
        font-weight: 700;
        margin-bottom: 12px;
    }

    /* Таблица отметок */
    .marks-table {
        font-size: 13px;
        margin-bottom: 0;
    }

    .marks-table th {
        color: #6c757d;
        font-size: 12px;
        font-weight: 400;
        vertical-align: bottom;
        white-space: nowrap;
    }

    .marks-table td {
        white-space: nowrap;
        vertical-align: middle;
        padding-top: 14px;
        padding-bottom: 14px;
    }

    .place-up {
        color: #198754;
        font-weight: 700;
    }

    .place-down {
        color: #dc3545;
        font-weight: 700;
    }

    .place-same {
        color: #6c757d;
    }

    /* График */
    .pace-chart-container {
        position: relative;
        width: 100%;
        height: 300px;
    }

    .place-value {
        display: inline-block;
        position: relative;
        min-width: 24px;
        text-align: center;
    }

    .place-arrow {
        position: absolute;
        left: 100%;
        top: 50%;
        transform: translateY(-50%);
        margin-left: 2px;
        font-weight: 700;
        line-height: 1;
    }
@media (max-width: 575.98px) {
    .profile-stat-card .card-body {
        padding: 9px;
    }

    .profile-stat-label {
        font-size: 11px;
    }

    .profile-stat-value {
        font-size: 18px;
    }

    .profile-section-title {
        font-size: 16px;
        margin-bottom: 10px;
    }

        /* Компактная таблица отметок только для мобильных */
        /* Компактная таблица отметок только для мобильных */
    .marks-table {
        width: 100%;
        min-width: 0;
        table-layout: fixed;
        font-size: 12px;
    }
    
    .marks-table th {
        font-size: 14px;
        white-space: normal;
        overflow-wrap: break-word;
        padding: 7px 2px;
        line-height: 1.25;
    }
    
    .marks-table td {
        padding: 9px 2px;
        white-space: normal;
        font-size: 12px;
        line-height: 1.3;
    }
    
    /* Точка */
    .marks-table th:nth-child(1),
    .marks-table td:nth-child(1) {
        width: 20%;
        overflow-wrap: anywhere;
    }
    
    /* Время */
    /* Время */
    .marks-table th:nth-child(2),
    .marks-table td:nth-child(2) {
        width: 24%;
        white-space: nowrap;
        font-size: 14px;
        letter-spacing: -0.4px;
    }

    /* Темп */
    .marks-table th:nth-child(3),
    .marks-table td:nth-child(3) {
        width: 24%;
        white-space: nowrap;
        font-size: 14px;
        letter-spacing: -0.4px;
    }
    
    /* Три колонки мест */
    .marks-table th:nth-child(n+4),
    .marks-table td:nth-child(n+4) {
        width: 10.66%;
        text-align: center;
        padding-left: 1px;
        padding-right: 1px;
        font-size: 12px;
    }
    
    /* Изменение мест */
    .marks-table .place-up,
    .marks-table .place-down {
        font-size: 12px;
    }
    
    .pace-chart-container {
        height: 250px;
    }
}

/* По умолчанию — десктоп */
.desktop-results {
    display: block;
}



/* Узкое окно браузера — мобильный вариант */
/* Десктопная таблица при уменьшении ширины окна */
/* Компактная десктопная таблица */
@media (min-width:  767.98px) {
    .desktop-results .row > div {
        min-width: 0;
        padding-left: 3px;
        padding-right: 3px;
        font-size: clamp(10px, 0.9vw, 14px);
    }

    .desktop-results .row {
        padding-top: 8px !important;
        padding-bottom: 8px !important;
    }

    .desktop-results .row a {
        font-size: inherit;
    }

    /* Время и короткие значения — в одну строку */
    .desktop-results .row > div:nth-child(1),
    .desktop-results .row > div:nth-child(2),
    .desktop-results .row > div:nth-child(5),
    .desktop-results .row > div:nth-child(6),
    .desktop-results .row > div:nth-child(7),
    .desktop-results .row > div:nth-child(8) {
        white-space: nowrap;
    }
}

/* # ЭСТАФЕТЫ */

@media (max-width: 767.98px) {
    .mobile-team-grid {
        display: grid;
        grid-template-columns: 32px minmax(0, 1fr) 76px 76px;
        gap: 6px;
        width: 100%;
        box-sizing: border-box;
    }

    .mobile-team-grid > div {
        min-width: 0;
    }

    .mobile-team-header {
        font-size: 11px;
    }

    .team-name {
        overflow-wrap: anywhere;
    }

    .team-leg-time,
    .team-total-time {
        white-space: nowrap;
        font-size: 12px;
        font-variant-numeric: tabular-nums;
    }
}

/* # ЭСТАФЕТЫ */

.mobile-result-relay .mobile-team-grid {
    display: grid;
    grid-template-columns: 12% 38% 25% 25%;
    align-items: center;
    width: 100%;
    box-sizing: border-box;
}

.mobile-result-relay .team-stage {
    text-align: left;
}

.mobile-result-relay .team-name {
    text-align: left;
    min-width: 0;
}

.mobile-result-relay .team-leg-time,
.mobile-result-relay .team-total-time {
    text-align: center;
    min-width: 0;
}

@media (max-width: 767.98px) {
    /* Заголовки */
    .mobile-result-relay .mobile-team-header > div {
        font-size: 9px;
        line-height: 1.2;
        white-space: normal;
        overflow-wrap: break-word;
    }

    /* Строки участников */
    .mobile-result-relay .mobile-team-grid:not(.mobile-team-header) > div {
        font-size: 10px;
        white-space: nowrap;
    }

    /* Название участника */
    .mobile-result-relay .team-name {
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .mobile-result-relay .mobile-team-grid {
        padding-left: 8px;
        padding-right: 8px;
    }


    .mobile-result-relay .place-badge {
        font-size: 10px;
    }

    .mobile-result-relay .mobile-team-title {
        padding-top: 8px;

        padding-left: 8px;
    }

    .mobile-result-relay {
        overflow: hidden;
        border-radius: 0.5rem !important;
    }

    .mobile-result-relay .mobile-team-total {
        padding-right: 8px;
        padding-bottom: 8px;
}
}

