/* ══════════════════════════════════════════════════════════════════
   profile.css — Личный кабинет спортсмена
   Дизайн: Neumorphism + Nunito Sans
   ══════════════════════════════════════════════════════════════════ */

/* ── Экран блокировки ──────────────────────────────────────────── */
.prof-blocked-card {
    padding: 48px 32px;
    text-align: center;
    margin-bottom: 24px;
}
.prof-blocked-icon {
    font-size: 3.5rem;
    margin-bottom: 16px;
    line-height: 1;
}
.prof-blocked-title {
    font-size: 1.4rem;
    font-weight: 800;
    color: var(--primary);
    margin: 0 0 12px 0;
}
.prof-blocked-text {
    font-size: 0.92rem;
    color: var(--muted);
    line-height: 1.7;
    margin: 0 0 28px 0;
}
.prof-appeal-btn {
    display: inline-block;
    text-decoration: none;
    padding: 14px 32px;
    background: var(--accent);
    color: #fff !important;
    border-radius: var(--radius-sm) ;
    font-weight: 700;
    font-size: 0.95rem;
    box-shadow: 4px 4px 10px rgba(45,90,142,0.3), -2px -2px 6px #fff;
    transition: all 0.2s;
    border: none;
    cursor: pointer;
}
.prof-appeal-btn:hover {
    background: var(--primary);
    transform: translateY(-2px);
}

/* ── Обёртка страницы ──────────────────────────────────────────── */
.profile-page {
    padding-top: 32px;
    padding-bottom: 60px;
}

/* ── Общий класс выпуклых карточек ────────────────────────────── */
.neu-out {
    background: var(--bg);
    border-radius: var(--radius);
    box-shadow: var(--neu-out);
}
.neu-in {
    background: var(--bg);
    border-radius: var(--radius-sm);
    box-shadow: var(--neu-in);
}

/* ══════════════════════════════════════════════════════════════════
   ШАПКА ПРОФИЛЯ
   ══════════════════════════════════════════════════════════════════ */
.prof-hero {
    display: flex;
    align-items: center;
    gap: 28px;
    padding: 28px 32px;
    margin-bottom: 24px;
    position: relative;
}

/* Фото */
.prof-hero-photo {
    position: relative;
    flex-shrink: 0;
}
.prof-photo-wrap {
    width: 96px;
    height: 96px;
    border-radius: var(--radius-round) ;
    box-shadow: var(--neu-out);
    background: var(--bg);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    font-size: 2.8rem;
}
.prof-photo-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.prof-photo-change {
    position: absolute;
    bottom: 0;
    right: 0;
    width: 30px;
    height: 30px;
    background: var(--accent);
    border-radius: var(--radius-round) ;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 0.85rem;
    box-shadow: 3px 3px 8px rgba(45,90,142,0.3);
    transition: background 0.2s;
}
.prof-photo-change:hover { background: var(--primary); }

/* Инфо */
.prof-hero-info {
    flex: 1;
    min-width: 0;
}
.prof-hero-name {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--primary);
    margin-bottom: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.prof-hero-meta {
    font-size: 0.88rem;
    color: var(--muted);
    font-weight: 600;
    margin-bottom: 2px;
}
.prof-hero-email {
    font-size: 0.82rem;
    color: var(--accent);
    font-weight: 600;
}

/* Кнопка выхода */
.prof-logout-btn {
    padding: 8px 18px;
    background: var(--bg);
    border: none;
    border-radius: var(--radius-sm) ;
    box-shadow: var(--neu-out-sm);
    font-size: 0.82rem;
    font-weight: 700;
    color: var(--muted);
    cursor: pointer;
    transition: all 0.2s;
    width: 100%;
}
.prof-logout-btn:hover {
    box-shadow: var(--neu-in);
    color: var(--primary);
}

/* Обёртка кнопки Выйти + ссылка на правила */
.prof-hero-actions {
    position: absolute;
    top: 20px;
    right: 24px;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 8px;
    min-width: 160px;
}

/* Ссылка на правила рыболовного спорта */
.prof-rules-link {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: .74rem;
    font-weight: 700;
    color: var(--primary);
    text-decoration: none;
    background: rgba(92,122,158,.08);
    border-radius: var(--radius-sm) ;
    padding: 5px 12px;
    box-shadow: 2px 2px 5px #c2c8d0, -2px -2px 5px #ffffff;
    transition: box-shadow .18s, background .18s;
    white-space: nowrap;
}
.prof-rules-link:hover {
    background: rgba(92,122,158,.15);
    box-shadow: inset 2px 2px 5px #c2c8d0, inset -2px -2px 5px #ffffff;
    color: var(--primary);
    text-decoration: none;
}

/* ══════════════════════════════════════════════════════════════════
   ТАБЫ
   ══════════════════════════════════════════════════════════════════ */
.prof-tabs {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 4px;
    padding: 6px;
    margin-bottom: 24px;
    box-shadow: var(--neu-in);
}
.prof-tab {
    padding: 12px 8px;
    text-align: center;
    background: transparent;
    border: none;
    border-radius: var(--radius-sm) ;
    font-size: 0.88rem;
    font-weight: 700;
    color: var(--muted);
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
}
.prof-tab.active {
    background: var(--bg);
    box-shadow: var(--neu-out-sm);
    color: var(--primary);
}
.prof-tab:hover:not(.active) { color: var(--accent); }

/* ══════════════════════════════════════════════════════════════════
   ПАНЕЛИ
   ══════════════════════════════════════════════════════════════════ */
.prof-panel { display: none; }
.prof-panel.active { display: block; }

.prof-card {
    padding: 32px;
    margin-bottom: 20px;
}
.prof-card-title {
    font-size: 1.1rem;
    font-weight: 800;
    color: var(--primary);
    margin: 0 0 22px 0;
}
.prof-divider {
    border: none;
    border-top: 1px solid rgba(26,58,92,0.08);
    margin: 28px 0;
}

/* ── Поля ──────────────────────────────────────────────────────── */
.prof-field-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 20px;
}
.prof-field {
    display: flex;
    flex-direction: column;
    gap: 7px;
}
.prof-field-label {
    font-size: 0.82rem;
    font-weight: 700;
    color: var(--primary);
}
.prof-field-val {
    padding: 13px 15px;
    font-size: 0.92rem;
    color: var(--text);
    font-weight: 600;
    min-height: 48px;
    display: flex;
    align-items: center;
}
.prof-input {
    padding: 13px 15px;
    font-size: 0.92rem;
    color: var(--text);
    border: none;
    outline: none;
    width: 100%;
    box-sizing: border-box;
    transition: box-shadow 0.2s;
    background: var(--bg);
}
.prof-input:focus {
    box-shadow: var(--neu-in), 0 0 0 2px rgba(45,90,142,0.15);
}

/* ── Кнопка ────────────────────────────────────────────────────── */
.prof-btn {
    padding: 13px 30px;
    background: var(--accent);
    color: #fff;
    border: none;
    border-radius: var(--radius-sm) ;
    font-size: 0.95rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: 4px 4px 10px rgba(45,90,142,0.3), -2px -2px 6px #fff;
    margin-top: 4px;
}
.prof-btn:hover {
    background: var(--primary);
    transform: translateY(-2px);
    box-shadow: 6px 6px 14px rgba(26,58,92,0.3), -2px -2px 8px #fff;
}
.prof-btn:active {
    transform: translateY(0);
    box-shadow: var(--neu-in);
}
.prof-btn:disabled { opacity: 0.6; cursor: default; transform: none; }

/* ── Сообщения ─────────────────────────────────────────────────── */
.prof-msg {
    display: none;
    padding: 12px 16px;
    border-radius: var(--radius-sm) ;
    font-size: 0.87rem;
    font-weight: 600;
    margin-bottom: 16px;
}
.prof-msg.error   { background: #fff0f0; color: #c0392b; box-shadow: inset 2px 2px 6px #f5c6cb; }
.prof-msg.success { background: #f0fff4; color: #27ae60; box-shadow: inset 2px 2px 6px #b7e4c7; }

/* ── Loader / empty ───────────────────────────────────────────── */
.prof-loader {
    padding: 30px;
    text-align: center;
    color: var(--muted);
    font-size: 0.95rem;
}
.prof-empty {
    padding: 40px 20px;
    text-align: center;
    color: var(--muted);
    font-size: 0.95rem;
    line-height: 1.7;
}

/* ══════════════════════════════════════════════════════════════════
   ИСТОРИЯ
   ══════════════════════════════════════════════════════════════════ */
.prof-hist-card {
    padding: 20px 24px;
    margin-bottom: 14px;
}
.prof-hist-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 10px;
    gap: 10px;
}
.prof-hist-title {
    font-size: 1rem;
    font-weight: 800;
    color: var(--primary);
}
.prof-hist-status {
    font-size: 0.78rem;
    font-weight: 700;
    color: var(--muted);
    background: var(--bg);
    box-shadow: var(--neu-in);
    padding: 4px 10px;
    border-radius: var(--radius-xs) ;
    white-space: nowrap;
}
.prof-hist-body {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 12px;
}
.prof-hist-tag {
    font-size: 0.78rem;
    font-weight: 700;
    color: var(--accent);
    background: var(--bg);
    box-shadow: var(--neu-out-sm);
    padding: 4px 10px;
    border-radius: var(--radius-xs) ;
}
.prof-hist-tours {
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.prof-hist-tour {
    display: flex;
    gap: 14px;
    align-items: center;
    flex-wrap: wrap;
    font-size: 0.85rem;
    color: var(--text);
    background: var(--bg);
    box-shadow: var(--neu-in);
    padding: 10px 14px;
    border-radius: var(--radius-sm) ;
}
.prof-hist-tour-label {
    font-weight: 800;
    color: var(--primary);
    min-width: 44px;
}
.prof-hist-place {
    font-weight: 800;
    color: var(--gold);
    margin-left: auto;
}

/* ══════════════════════════════════════════════════════════════════
   РЕЙТИНГ
   ══════════════════════════════════════════════════════════════════ */
.prof-rating-hero {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 28px;
    margin-bottom: 24px;
    text-align: center;
}
.prof-rating-place {
    font-size: 3.5rem;
    font-weight: 900;
    color: var(--gold);
    line-height: 1;
}
.prof-rating-place-label {
    font-size: 0.85rem;
    color: var(--muted);
    font-weight: 700;
    margin-top: 6px;
}
.prof-rating-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0 6px;
    font-size: 0.9rem;
}
.prof-rating-table thead th {
    font-size: 0.78rem;
    font-weight: 700;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    padding: 6px 14px;
    text-align: left;
}
.prof-rating-table tbody tr {
    background: var(--bg);
    box-shadow: var(--neu-out-sm);
}
.prof-rating-table tbody td {
    padding: 12px 14px;
    color: var(--text);
    font-weight: 600;
}
.prof-rating-table tbody td:first-child { border-radius: var(--radius-sm) 0 0 var(--radius-sm); }
.prof-rating-table tbody td:last-child  { border-radius: 0 var(--radius-sm) var(--radius-sm) 0; }

/* ══════════════════════════════════════════════════════════════════
   ДОКУМЕНТЫ
   ══════════════════════════════════════════════════════════════════ */
.prof-docs-hint {
    font-size: 0.85rem;
    color: var(--muted);
    margin: 0 0 20px 0;
    line-height: 1.6;
}
.prof-doc-upload {
    padding: 20px;
    margin-bottom: 24px;
}
.prof-docs-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 8px;
}
.prof-doc-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    gap: 16px;
}
.prof-doc-info { flex: 1; min-width: 0; }
.prof-doc-type {
    font-size: 0.88rem;
    font-weight: 800;
    color: var(--primary);
    margin-bottom: 2px;
}
.prof-doc-name {
    font-size: 0.80rem;
    color: var(--muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.prof-doc-status {
    font-size: 0.78rem;
    font-weight: 700;
    margin-top: 4px;
}
.prof-doc-status.status-0 { color: #e67e22; }
.prof-doc-status.status-1 { color: #27ae60; }
.prof-doc-status.status-2 { color: #e74c3c; }
.prof-doc-reject {
    font-size: 0.76rem;
    color: #e74c3c;
    margin-top: 3px;
}
.prof-doc-del {
    background: var(--bg);
    border: none;
    border-radius: var(--radius-sm) ;
    box-shadow: var(--neu-out-sm);
    width: 38px;
    height: 38px;
    font-size: 1rem;
    cursor: pointer;
    flex-shrink: 0;
    transition: all 0.2s;
}
.prof-doc-del:hover {
    box-shadow: var(--neu-in);
    color: #e74c3c;
}

/* ── Кастомный file-picker ─────────────────────────────────────── */
.prof-file-picker {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 8px 8px 8px;
    min-height: 48px;
    box-sizing: border-box;
}
.prof-file-btn {
    flex-shrink: 0;
    padding: 9px 16px;
    background: var(--bg);
    border: none;
    border-radius: var(--radius-sm) ;
    box-shadow: var(--neu-out-sm);
    font-size: 0.82rem;
    font-weight: 700;
    color: var(--accent);
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
}
.prof-file-btn:hover {
    box-shadow: var(--neu-in);
    color: var(--primary);
}
.prof-file-btn:active {
    box-shadow: var(--neu-in);
    transform: scale(0.98);
}
.prof-file-name {
    font-size: 0.82rem;
    color: var(--muted);
    font-weight: 600;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    flex: 1;
    min-width: 0;
}
.prof-file-name.has-file {
    color: var(--text);
}

/* ── Select разряда (и docType) ────────────────────────────────── */
select.prof-input {
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%2364748b' d='M6 8L0 0h12z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    padding-right: 36px;
    cursor: pointer;
}
select.prof-input:focus {
    box-shadow: var(--neu-in), 0 0 0 2px rgba(45,90,142,0.15);
}

/* ══════════════════════════════════════════════════════════════════
   КОМАНДНЫЙ МОДУЛЬ
   ══════════════════════════════════════════════════════════════════ */

/* Баннер инвайта */
.team-invite-banner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 20px 28px;
    margin-bottom: 20px;
    border-left: 4px solid var(--gold);
    flex-wrap: wrap;
}
.team-invite-text {
    font-size: 1rem;
    font-weight: 700;
    color: var(--primary);
    flex: 1;
}
.team-invite-actions {
    display: flex;
    gap: 10px;
    flex-shrink: 0;
}

/* Шапка команды */
.team-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 16px;
    margin-bottom: 4px;
}
.team-role-badge {
    display: inline-block;
    font-size: 0.78rem;
    font-weight: 700;
    padding: 4px 12px;
    border-radius: var(--radius-lg) ;
    margin-top: 6px;
}
.team-role-badge.captain {
    background: var(--bg);
    box-shadow: var(--neu-out-sm);
    color: var(--gold);
}
.team-role-badge.member {
    background: var(--bg);
    box-shadow: var(--neu-out-sm);
    color: var(--accent);
}
.team-captain-info {
    font-size: 0.88rem;
    color: var(--muted);
    margin: 0 0 8px 0;
}

/* Аватарка участника */
.team-member-avatar {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-round) ;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    overflow: hidden;
}
.team-member-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Список участников */
.team-members-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 8px;
}
.team-member-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 18px;
    gap: 12px;
}
.team-member-info { flex: 1; min-width: 0; }
.team-member-fio {
    font-size: 0.92rem;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 2px;
}
.team-member-email {
    font-size: 0.78rem;
    color: var(--muted);
}
.team-member-status {
    font-size: 0.80rem;
    font-weight: 600;
    color: var(--accent);
    margin-top: 3px;
}

/* Кнопка-outline */
.prof-btn-outline {
    padding: 13px 24px;
    background: var(--bg);
    color: var(--muted);
    border: none;
    border-radius: var(--radius-sm) ;
    font-size: 0.95rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: var(--neu-out-sm);
}
.prof-btn-outline:hover {
    box-shadow: var(--neu-in);
    color: var(--primary);
}

/* Кнопка опасного действия */
.prof-btn-danger {
    padding: 12px 24px;
    background: var(--bg);
    color: #e74c3c;
    border: none;
    border-radius: var(--radius-sm) ;
    font-size: 0.88rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: var(--neu-out-sm);
}
.prof-btn-danger:hover {
    box-shadow: var(--neu-in);
}

.team-btn-accept { margin-top: 0; }

/* ══════════════════════════════════════════════════════════════════
   МОБИЛЬНАЯ АДАПТАЦИЯ — 768px (основной брейкпоинт)
   ══════════════════════════════════════════════════════════════════ */
@media (max-width: 768px) {

    /* ── Страница ─────────────────────────────────────────────── */
    .profile-page {
        padding-top: 16px;
        padding-bottom: 40px;
    }

    /* ── Шапка профиля ────────────────────────────────────────── */
    .prof-hero {
        flex-direction: column;
        text-align: center;
        padding: 22px 16px 18px;
        gap: 12px;
        border-radius: var(--radius) ;
        margin-bottom: 16px;
    }
    .prof-hero-name {
        font-size: 1.2rem;
        white-space: normal;
    }
    .prof-hero-meta { font-size: 0.82rem; }
    .prof-hero-email { font-size: 0.78rem; }

    /* Фото — чуть меньше */
    .prof-photo-wrap { width: 88px; height: 88px; font-size: 2.4rem; }

    /* Кнопка выхода — из абсолютной в обычную */
    .prof-logout-btn {
        position: static;
        margin-top: 4px;
        width: 100%;
        max-width: 200px;
    }
    .prof-hero-actions {
        position: static;
        align-items: center;
        width: 100%;
    }
    .prof-rules-link {
        width: 100%;
        max-width: 200px;
        justify-content: center;
    }

    /* ── Табы — 3 в ряд × 2 строки ───────────────────────────── */
    .prof-tabs {
        grid-template-columns: repeat(3, 1fr);
        margin-bottom: 16px;
        border-radius: var(--radius) ;
        padding: 5px;
    }
    .prof-tab {
        font-size: 0.76rem;
        padding: 10px 4px;
        border-radius: var(--radius-xs);
    }

    /* ── Карточки панелей ─────────────────────────────────────── */
    .prof-card {
        padding: 20px 16px;
        border-radius: var(--radius) ;
        margin-bottom: 14px;
    }
    .prof-card-title { font-size: 1rem; margin-bottom: 16px; }
    .prof-divider { margin: 20px 0; }

    /* ── Поля — в одну колонку ────────────────────────────────── */
    .prof-field-row {
        grid-template-columns: 1fr;
        gap: 12px;
        margin-bottom: 14px;
    }
    .prof-field-val { font-size: 0.88rem; min-height: 44px; }
    .prof-input { padding: 12px 13px; font-size: 0.88rem; }

    /* ── Кнопки ───────────────────────────────────────────────── */
    .prof-btn {
        width: 100%;
        padding: 14px;
        margin-top: 6px;
    }
    .prof-btn-danger {
        width: 100%;
        padding: 12px;
        margin-top: 4px;
    }
    .prof-btn-outline {
        width: 100%;
        padding: 12px;
    }

    /* ── File picker ──────────────────────────────────────────── */
    .prof-file-picker { flex-wrap: wrap; gap: 8px; padding: 8px 10px; }
    .prof-file-btn { width: 100%; text-align: center; }
    .prof-file-name { width: 100%; text-align: center; }

    /* ── История ──────────────────────────────────────────────── */
    .prof-hist-card { padding: 16px 14px; border-radius: var(--radius-sm) ; }
    .prof-hist-head { flex-direction: column; gap: 6px; }
    .prof-hist-title { font-size: 0.95rem; }
    .prof-hist-tour {
        gap: 6px;
        font-size: 0.78rem;
        padding: 8px 10px;
        flex-wrap: wrap;
    }
    .prof-hist-place { margin-left: 0; width: 100%; }
    .prof-hist-body { gap: 6px; }
    .prof-hist-tag { font-size: 0.72rem; padding: 3px 8px; }

    /* ── Рейтинг ──────────────────────────────────────────────── */
    .prof-rating-hero { padding: 20px 16px; border-radius: var(--radius-sm) ; }
    .prof-rating-place { font-size: 2.8rem; }
    .prof-rating-table { font-size: 0.82rem; }
    .prof-rating-table thead th { font-size: 0.72rem; padding: 5px 10px; }
    .prof-rating-table tbody td { padding: 10px 10px; }

    /* ── Документы ────────────────────────────────────────────── */
    .prof-doc-upload { padding: 14px 12px; border-radius: var(--radius-sm) ; }
    .prof-doc-item { padding: 12px 14px; border-radius: var(--radius-sm) ; flex-wrap: wrap; }
    .prof-doc-type { font-size: 0.82rem; }
    .prof-doc-name { font-size: 0.74rem; }

    /* ── Командный модуль ─────────────────────────────────────── */
    .team-invite-banner {
        flex-direction: column;
        align-items: flex-start;
        padding: 16px;
        border-radius: var(--radius-sm) ;
        gap: 12px;
    }
    .team-invite-actions { width: 100%; flex-direction: column; gap: 8px; }
    .team-invite-actions .prof-btn,
    .team-invite-actions .prof-btn-outline { width: 100%; }

    .team-header { flex-direction: column; gap: 10px; }
    .team-header .prof-btn { width: 100%; }

    .team-member-row { padding: 12px 12px; border-radius: var(--radius-sm) ; }
    .team-member-fio { font-size: 0.86rem; }
    .team-member-email { font-size: 0.74rem; }

    .prof-docs-list { gap: 8px; }
}

/* ══════════════════════════════════════════════════════════════════
   430px — iPhone Pro Max, крупные Android
   ══════════════════════════════════════════════════════════════════ */
@media (max-width: 430px) {

    /* Шапка */
    .prof-hero { padding: 18px 14px 16px; gap: 10px; }
    .prof-hero-name { font-size: 1.08rem; }
    .prof-photo-wrap { width: 78px; height: 78px; font-size: 2.1rem; }
    .prof-photo-change { width: 26px; height: 26px; font-size: 0.75rem; }

    /* Табы */
    .prof-tab { font-size: 0.70rem; padding: 9px 3px; }

    /* Карточки */
    .prof-card { padding: 16px 13px; }
    .prof-card-title { font-size: 0.95rem; }

    /* Рейтинг таблица — скролл по горизонтали */
    .prof-rating-table-wrap {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        border-radius: var(--radius-xs) ;
    }
    .prof-rating-table { min-width: 300px; }

    /* История */
    .prof-hist-tour { font-size: 0.75rem; }
    .prof-hist-tour-label { min-width: 36px; font-size: 0.75rem; }
    .prof-rating-place { font-size: 2.4rem; }

    /* Документы */
    .prof-doc-type { font-size: 0.78rem; }
    .prof-doc-del { width: 34px; height: 34px; font-size: 0.9rem; }
}

/* ══════════════════════════════════════════════════════════════════
   390px — iPhone SE, стандартный iPhone
   ══════════════════════════════════════════════════════════════════ */
@media (max-width: 390px) {

    .prof-hero { padding: 16px 12px 14px; }
    .prof-hero-name { font-size: 1rem; }
    .prof-photo-wrap { width: 72px; height: 72px; }

    .prof-tabs { padding: 4px; gap: 3px; }
    .prof-tab { font-size: 0.66rem; padding: 8px 2px; }

    .prof-card { padding: 14px 11px; }
    .prof-input { padding: 11px 11px; font-size: 0.84rem; }
    .prof-btn { padding: 13px; font-size: 0.9rem; }

    .prof-hist-tour { font-size: 0.72rem; padding: 7px 9px; }
    .prof-rating-place { font-size: 2.2rem; }
    .prof-rating-table { font-size: 0.78rem; }
}

/* ══════════════════════════════════════════════════════════════════
   360px — Samsung Galaxy S8/S9, Xiaomi, средний Android
   ══════════════════════════════════════════════════════════════════ */
@media (max-width: 360px) {

    .profile-page { padding-top: 10px; padding-bottom: 30px; }

    .prof-hero { padding: 14px 10px; border-radius: var(--radius-sm) ; }
    .prof-hero-name { font-size: 0.95rem; }
    .prof-hero-meta { font-size: 0.76rem; }
    .prof-photo-wrap { width: 66px; height: 66px; font-size: 1.8rem; }

    .prof-tabs { border-radius: var(--radius-sm) ; }
    .prof-tab { font-size: 0.62rem; padding: 8px 2px; }

    .prof-card { padding: 12px 10px; border-radius: var(--radius-sm) ; }
    .prof-card-title { font-size: 0.88rem; margin-bottom: 12px; }

    .prof-field-label { font-size: 0.76rem; }
    .prof-input { padding: 10px 10px; font-size: 0.82rem; }
    .prof-field-val { font-size: 0.82rem; padding: 10px 11px; }

    .prof-btn { padding: 12px; font-size: 0.86rem; }
    .prof-btn-danger { font-size: 0.82rem; padding: 11px; }

    .prof-rating-place { font-size: 2rem; }
    .prof-rating-table { font-size: 0.74rem; min-width: 280px; }
    .prof-rating-table thead th { font-size: 0.64rem; padding: 4px 7px; }
    .prof-rating-table tbody td { padding: 8px 7px; }

    .prof-hist-tour { font-size: 0.70rem; padding: 6px 8px; gap: 4px; }
    .prof-hist-title { font-size: 0.88rem; }
    .prof-hist-tag { font-size: 0.66rem; padding: 2px 6px; }

    .prof-doc-type { font-size: 0.74rem; }
    .prof-doc-name { font-size: 0.68rem; }
    .prof-doc-del { width: 30px; height: 30px; font-size: 0.82rem; }

    .team-member-fio { font-size: 0.80rem; }
    .team-member-email { font-size: 0.68rem; }
    .team-member-row { padding: 10px 10px; }
}

/* ══════════════════════════════════════════════════════════════════
   ВКЛАДКА «ЗАЯВКИ» — entry cards
   ══════════════════════════════════════════════════════════════════ */
.entries-list {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.entry-card {
    background: var(--bg);
    border-radius: var(--radius) ;
    padding: 16px 18px;
    transition: box-shadow .2s;
}

.entry-card-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 10px;
}

.entry-card-title {
    font-size: .96rem;
    font-weight: 800;
    color: var(--primary);
    line-height: 1.3;
    flex: 1;
}

.entry-card-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 10px;
}

.entry-meta-item {
    font-size: .78rem;
    font-weight: 700;
    color: var(--muted);
    background: rgba(92,122,158,.10);
    border-radius: var(--radius-xs) ;
    padding: 3px 9px;
}

.entry-card-footer {
    font-size: .74rem;
    color: var(--muted);
    margin-top: 4px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    flex-wrap: wrap;
}


/* ── Маркеры типа заявки (личная / командная в составе / без меня) ── */
.entry-type-marker-wrap {
    margin-top: 8px;
}
.entry-type-marker {
    display: inline-flex;
    align-items: center;
    font-size: .76rem;
    font-weight: 700;
    border-radius: var(--radius-lg) ;
    padding: 3px 10px;
    white-space: nowrap;
}
.entry-type-marker--personal  { background: rgba(108,99,255,.10); color: #6c63ff; }
.entry-type-marker--team-in   { background: rgba(39,174,96,.12);  color: #1e8449; }
.entry-type-marker--team-out  { background: rgba(241,196,15,.15); color: #b8860b; }

/* Бейдж «командная без меня» в открытых регистрациях */
.reg-smart-badge--team-out {
    background: rgba(241,196,15,.12);
    color: #b8860b;
}
/* ── Кнопка отмены заявки ────────────────────────────────────────── */
.entry-cancel-btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: .74rem;
    font-weight: 700;
    color: #c0392b;
    background: rgba(231,76,60,.08);
    border: 1px solid rgba(231,76,60,.2);
    border-radius: var(--radius-lg) ;
    padding: 3px 10px;
    cursor: pointer;
    transition: background .2s, box-shadow .2s;
    white-space: nowrap;
    box-shadow: 2px 2px 5px #c2c8d0, -2px -2px 5px #ffffff;
}
.entry-cancel-btn:hover:not(:disabled) {
    background: rgba(231,76,60,.16);
    box-shadow: inset 2px 2px 5px #c2c8d0, inset -2px -2px 5px #ffffff;
}
.entry-cancel-btn:disabled {
    opacity: .5;
    cursor: not-allowed;
}

/* ── Статусные бейджи заявок ─────────────────────────────────────── */
.entry-status-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: .76rem;
    font-weight: 800;
    border-radius: var(--radius-lg) ;
    padding: 4px 10px;
    white-space: nowrap;
    flex-shrink: 0;
}
.entry-status-badge--entry-st-reg       { background: rgba(241,196,15,.15);  color: #b8860b; }
.entry-status-badge--entry-st-confirmed { background: rgba(39,174,96,.15);   color: #1e8449; }
.entry-status-badge--entry-st-paid      { background: rgba(52,152,219,.15);  color: #1a5276; }
.entry-status-badge--entry-st-rejected  { background: rgba(231,76,60,.12);   color: #922b21; }

/* ── Лоадер ──────────────────────────────────────────────────────── */
.prof-loader {
    text-align: center;
    padding: 28px;
    color: var(--muted);
    font-weight: 700;
    font-size: .9rem;
}

/* ══════════════════════════════════════════════════════════════════
   МОДАЛЬНОЕ ОКНО — командная заявка
   ══════════════════════════════════════════════════════════════════ */
.prof-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.38);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    box-sizing: border-box;
}

.prof-modal {
    background: var(--bg);
    border-radius: var(--radius-lg) ;
    width: 100%;
    max-width: 480px;
    /* overflow:hidden убран — нужен scroll внутри body */
    display: flex;
    flex-direction: column;
    max-height: 90vh;
    animation: modalIn .22s cubic-bezier(.34,1.56,.64,1);
}

@keyframes modalIn {
    from { transform: scale(.92) translateY(20px); opacity: 0; }
    to   { transform: scale(1)   translateY(0);    opacity: 1; }
}

.prof-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 22px 16px;
    border-bottom: 1.5px solid var(--border, #dde6f0);
    flex-shrink: 0;
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}

.prof-modal-title {
    font-size: 1rem;
    font-weight: 800;
    color: var(--primary);
    margin: 0;
}

.prof-modal-close {
    background: none;
    border: none;
    font-size: 1.1rem;
    color: var(--muted);
    cursor: pointer;
    padding: 4px 8px;
    border-radius: var(--radius-xs) ;
    transition: background .15s;
}
.prof-modal-close:hover { background: rgba(92,122,158,.12); }

.prof-modal-body {
    padding: 18px 22px;
    overflow-y: auto;
    flex: 1 1 auto;
    /* Скролл для длинных форм (командный состав 3+ человек) */
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
}

/* Кастомный скроллбар в теле модалки */
.prof-modal-body::-webkit-scrollbar { width: 4px; }
.prof-modal-body::-webkit-scrollbar-track { background: transparent; }
.prof-modal-body::-webkit-scrollbar-thumb {
    background: rgba(92,122,158,.25);
    border-radius: 4px;
}
.prof-modal-body::-webkit-scrollbar-thumb:hover {
    background: rgba(92,122,158,.45);
}

.prof-modal-footer {
    display: flex;
    gap: 10px;
    padding: 14px 22px 20px;
    border-top: 1.5px solid var(--border, #dde6f0);
    flex-shrink: 0;
    border-radius: 0 0 20px 20px;
    background: var(--bg);
}

.prof-btn-secondary {
    flex: 1;
    padding: 13px;
    border-radius: var(--radius-sm) ;
    border: none;
    background: var(--bg);
    box-shadow: var(--neu-out-sm);
    color: var(--muted);
    font-size: .9rem;
    font-weight: 700;
    cursor: pointer;
    transition: box-shadow .18s;
}
.prof-btn-secondary:hover { box-shadow: var(--neu-in); }

/* Превью состава команды в модалке */
.team-entry-team-preview {
    background: rgba(52,152,219,.06);
    border-radius: var(--radius-sm) ;
    padding: 12px 14px;
}

.team-entry-preview-title {
    font-size: .8rem;
    font-weight: 800;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: .5px;
    margin-bottom: 10px;
}

/* Строка участника с чекбоксом */
.team-entry-member-row {
    padding: 5px 0;
    border-bottom: 1px solid rgba(92,122,158,.10);
}
.team-entry-member-row:last-child { border-bottom: none; }

.team-entry-member-check {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    padding: 7px 4px;
    border-radius: var(--radius-xs) ;
    transition: background .15s;
}
.team-entry-member-check:hover {
    background: rgba(52,152,219,.08);
}
.team-entry-member-check input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: var(--primary);
    cursor: pointer;
    flex-shrink: 0;
}

.team-entry-member-fio {
    font-size: .88rem;
    font-weight: 700;
    color: var(--primary);
}

/* Счётчик выбранных участников */
.team-entry-counter {
    font-size: .82rem;
    font-weight: 700;
    border-radius: var(--radius-sm) ;
    padding: 8px 14px;
    margin-bottom: 10px;
}
.team-entry-counter--ok   { background: rgba(39,174,96,.12);  color: #1e8449; }
.team-entry-counter--warn { background: rgba(241,196,15,.15); color: #b8860b; }



/* ── Заблокированный участник в команде ─────────────────────────── */
.team-member-blocked {
    opacity: .6;
}
.team-member-blocked-badge {
    font-size: .72rem;
    font-weight: 700;
    color: #c0392b;
    background: rgba(231,76,60,.1);
    border-radius: var(--radius-sm) ;
    padding: 2px 7px;
    margin-left: 6px;
}
.team-entry-member-check.team-member-blocked {
    opacity: .55;
    cursor: not-allowed;
}
.team-entry-member-check.team-member-blocked input[type="checkbox"] {
    cursor: not-allowed;
}
/* ── Сводка участников в карточке командной заявки ──────────────── */
.team-entry-members-summary {
    margin: 8px 0 4px;
    padding: 8px 10px;
    background: rgba(52,152,219,.05);
    border-radius: var(--radius-xs) ;
}
.team-entry-member-summary-row {
    font-size: .8rem;
    color: var(--muted);
    padding: 2px 0;
}

/* ── Кнопки действий в карточке командной заявки ────────────────── */
.entry-card-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}
.team-entry-edit-btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: .74rem;
    font-weight: 700;
    color: var(--primary);
    background: rgba(52,152,219,.08);
    border: 1px solid rgba(52,152,219,.2);
    border-radius: var(--radius-lg) ;
    padding: 3px 10px;
    cursor: pointer;
    transition: background .2s, box-shadow .2s;
    white-space: nowrap;
    box-shadow: 2px 2px 5px #c2c8d0, -2px -2px 5px #ffffff;
}
.team-entry-edit-btn:hover {
    background: rgba(52,152,219,.16);
    box-shadow: inset 2px 2px 5px #c2c8d0, inset -2px -2px 5px #ffffff;
}
/* ══════════════════════════════════════════════════════════════════
   УМНЫЕ БЕЙДЖИ на странице registrations.php
   ══════════════════════════════════════════════════════════════════ */
.reg-smart-badge-wrap {
    margin-top: 8px;
    min-height: 0;
}

.reg-smart-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: .76rem;
    font-weight: 800;
    border-radius: var(--radius-lg) ;
    padding: 4px 11px;
    letter-spacing: .1px;
}

.reg-smart-badge--auto    { background: rgba(52,152,219,.12);  color: #1a5276; }
.reg-smart-badge--done    { background: rgba(39,174,96,.14);   color: #1e8449; }
.reg-smart-badge--team    { background: rgba(142,68,173,.12);  color: #6c3483; }
.reg-smart-badge--captain { background: rgba(230,126,34,.12);  color: #935116; }

/* ══════════════════════════════════════════════════════════════════
   ФОРМА РЕГИСТРАЦИИ: readonly-стиль + баннер гостя
   ══════════════════════════════════════════════════════════════════ */
.frm-readonly {
    background: rgba(92,122,158,.07) !important;
    color: var(--muted) !important;
    cursor: not-allowed !important;
    box-shadow: var(--neu-in) !important;
}

.member-autofill-badge {
    font-size: .72rem;
    font-weight: 800;
    color: #1e8449;
    background: rgba(39,174,96,.12);
    border-radius: var(--radius-lg) ;
    padding: 2px 10px;
}

/* Баннер «Войдите — заполнится само» */
.reg-login-banner {
    display: flex;
    align-items: center;
    gap: 14px;
    background: rgba(52,152,219,.08);
    border: 1.5px solid rgba(52,152,219,.22);
    border-radius: var(--radius) ;
    padding: 14px 16px;
    margin: 14px 0 18px;
    flex-wrap: wrap;
}

.reg-login-banner-icon {
    font-size: 1.6rem;
    flex-shrink: 0;
}

.reg-login-banner-text {
    flex: 1;
    font-size: .85rem;
    color: var(--primary);
    line-height: 1.5;
    min-width: 140px;
}

.reg-login-banner-btns {
    display: flex;
    gap: 8px;
    flex-shrink: 0;
    flex-wrap: wrap;
}

.reg-login-banner-btn {
    padding: 8px 16px;
    border-radius: var(--radius-sm) ;
    border: none;
    background: var(--bg);
    box-shadow: 4px 4px 10px #b8c0cc, -2px -2px 6px #ffffff;
    color: var(--primary);
    font-size: .82rem;
    font-weight: 700;
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
    transition: box-shadow .18s;
}
.reg-login-banner-btn:hover { box-shadow: inset 3px 3px 8px #c2c8d0, inset -2px -2px 6px #ffffff; }
.reg-login-banner-btn--primary {
    background: var(--accent);
    color: #fff;
    box-shadow: 4px 4px 10px #b8c0cc, -2px -2px 6px #ffffff;
}
.reg-login-banner-btn--primary:hover { box-shadow: inset 3px 3px 8px rgba(0,0,0,.25), inset -1px -1px 4px rgba(255,255,255,.1); }

/* ══════════════════════════════════════════════════════════════════
   МОБИЛЬНАЯ АДАПТАЦИЯ новых элементов
   ══════════════════════════════════════════════════════════════════ */
@media (max-width: 600px) {
    .entry-card-header { flex-direction: column; gap: 8px; }
    .entry-status-badge { align-self: flex-start; }
    .prof-modal { border-radius: var(--radius) ; }
    .prof-modal-footer { flex-direction: column; }
    .reg-login-banner { flex-direction: column; gap: 10px; }
    .reg-login-banner-btns { width: 100%; }
    .reg-login-banner-btn { flex: 1; text-align: center; }
}

/* ══════════════════════════════════════════════════════════════════
   ОТКРЫТЫЕ РЕГИСТРАЦИИ в личном кабинете
   ══════════════════════════════════════════════════════════════════ */
.open-regs-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.open-reg-row {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 16px;
    border-radius: var(--radius) ;
    background: var(--bg);
}

.open-reg-info {
    flex: 1;
    min-width: 0;
}

.open-reg-title {
    font-size: .94rem;
    font-weight: 800;
    color: var(--primary);
    margin-bottom: 6px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.open-reg-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
}

.open-reg-btn {
    flex-shrink: 0;
    padding: 9px 18px;
    border-radius: var(--radius-sm) ;
    border: none;
    background: var(--accent);
    color: #fff;
    font-size: .84rem;
    font-weight: 700;
    cursor: pointer;
    white-space: nowrap;
    transition: opacity .18s, transform .12s;
    box-shadow: 3px 3px 8px rgba(0,0,0,.15);
}
.open-reg-btn:hover { opacity: .88; transform: scale(.97); }
.open-reg-btn--full {
    background: rgba(92,122,158,.12);
    color: var(--muted);
    box-shadow: none;
    cursor: default;
}
.open-reg-btn--full:hover { opacity: 1; transform: none; }
.open-reg-btn--list {
    background: var(--bg);
    color: var(--accent);
    box-shadow: var(--neu-out-sm);
    text-decoration: none;
    display: inline-block;
}
.open-reg-btn--list:hover { opacity: 1; transform: scale(.97); box-shadow: var(--neu-in); }

/* Широкая модалка для формы регистрации */
.prof-modal--wide {
    max-width: 560px;
}

.prof-modal-subtitle {
    font-size: .8rem;
    color: var(--muted);
    margin-top: 2px;
    font-weight: 600;
}

/* Секции внутри модалки */
/* frm-section-title — немного компактнее чем на витрине (для модалки) */
.frm-section-title {
    font-size: .82rem;
    font-weight: 800;
    color: var(--primary);
    margin: 14px 0 10px;
    padding: 8px 12px;
    background: rgba(52,152,219,.07);
    border-left: 3px solid var(--accent);
    border-radius: 0 8px 8px 0;
}

@media (max-width: 600px) {
    .open-reg-row { flex-direction: column; align-items: flex-start; gap: 10px; }
    .open-reg-btn { width: 100%; text-align: center; }
    .prof-modal--wide { max-width: 100%; }
    .prof-modal { max-height: 95vh; border-radius: var(--radius) ; margin: 10px; width: calc(100% - 20px); }
    .prof-modal-header { border-radius: var(--radius) var(--radius) 0 0; }
    .prof-modal-footer { border-radius: 0 0 16px 16px; }
    .prof-modal .frm-row2 { grid-template-columns: 1fr; }
    .prof-modal .reg-type-tabs { flex-direction: column; gap: 8px; }
    .prof-modal .reg-type-tab { text-align: center; }
}

/* ══════════════════════════════════════════════════════════════════
   СТИЛИ ФОРМЫ В МОДАЛКЕ — скоуп .prof-modal
   Переопределяем registration.css классы внутри модалки
   чтобы совпадали 1 в 1 с registration.php
   ══════════════════════════════════════════════════════════════════ */

/* ── Поля ввода ──────────────────────────────────────────────────── */
.prof-modal .frm-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 14px;
}

.prof-modal .frm-label {
    font-size: .78rem;
    font-weight: 700;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: .5px;
}

.prof-modal .frm-control {
    padding: 11px 14px;
    border-radius: var(--radius-sm) ;
    border: none;
    background: var(--bg);
    box-shadow: var(--neu-in);
    font-size: .92rem;
    color: var(--text);
    outline: none;
    transition: box-shadow .18s;
    width: 100%;
    box-sizing: border-box;
    appearance: auto;
    -webkit-appearance: auto;
}

.prof-modal .frm-control:focus {
    box-shadow: inset 3px 3px 8px #b8bec6, inset -2px -2px 6px #fff,
                0 0 0 2px rgba(52,152,219,.2);
}

/* Readonly (автозаполнено из профиля) */
.prof-modal .frm-control.frm-readonly {
    background: rgba(92,122,158,.07) !important;
    color: var(--muted) !important;
    cursor: not-allowed !important;
    box-shadow: var(--neu-in) !important;
}

/* ── Двухколоночная сетка (дата + разряд) ───────────────────────── */
.prof-modal .frm-row2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
}

/* ── Блок участника ──────────────────────────────────────────────── */
.prof-modal .member-block {
    background: var(--bg);
    border-radius: var(--radius) ;
    box-shadow: var(--neu-in);
    padding: 16px 18px;
    margin-bottom: 14px;
}

.prof-modal .member-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 14px;
    flex-wrap: wrap;
    gap: 8px;
}

.prof-modal .member-title {
    font-size: .92rem;
    font-weight: 800;
    color: var(--primary);
}

.prof-modal .member-remove {
    background: rgba(231,76,60,.08);
    border: none;
    border-radius: var(--radius-xs) ;
    color: #e74c3c;
    font-size: .78rem;
    font-weight: 700;
    padding: 4px 10px;
    cursor: pointer;
    transition: background .15s;
}
.prof-modal .member-remove:hover { background: rgba(231,76,60,.18); }

/* ── Кнопка добавить участника ───────────────────────────────────── */
.prof-modal .reg-add-btn {
    width: 100%;
    padding: 11px;
    border-radius: var(--radius-sm) ;
    border: 2px dashed var(--accent);
    background: rgba(52,152,219,.05);
    color: var(--accent);
    font-size: .88rem;
    font-weight: 700;
    cursor: pointer;
    margin-bottom: 6px;
    transition: background .15s;
    box-sizing: border-box;
}
.prof-modal .reg-add-btn:hover { background: rgba(52,152,219,.12); }

/* ── Переключатель Личная/Командная ──────────────────────────────── */
.prof-modal .reg-type-tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 18px;
    flex-wrap: wrap;
}

.prof-modal .reg-type-tab {
    flex: 1;
    padding: 12px 16px;
    border-radius: var(--radius) ;
    border: none;
    background: var(--bg);
    box-shadow: var(--neu-out);
    color: var(--muted);
    font-size: .88rem;
    font-weight: 700;
    cursor: pointer;
    transition: box-shadow .18s, color .18s;
    letter-spacing: .2px;
}
.prof-modal .reg-type-tab:hover {
    box-shadow: var(--neu-in);
    color: var(--primary);
}
.prof-modal .reg-type-tab.active {
    box-shadow: var(--neu-in);
    color: var(--accent);
}
.prof-modal .reg-type-tab-personal.active { color: #27ae60; }
.prof-modal .reg-type-tab-team.active     { color: var(--accent); }

/* ── Заголовок секции (Контакт для связи) ────────────────────────── */
.prof-modal .frm-section-title {
    font-size: .88rem;
    font-weight: 800;
    color: var(--primary);
    margin: 18px 0 12px;
    padding: 10px 14px;
    background: rgba(52,152,219,.07);
    border-left: 4px solid var(--accent);
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}

/* ── Блок ошибок ─────────────────────────────────────────────────── */
.prof-modal .reg-err-block {
    padding: 12px 16px;
    background: rgba(231,76,60,.08);
    border-radius: var(--radius-sm) ;
    color: #e74c3c;
    font-size: .88rem;
    font-weight: 700;
    margin-top: 8px;
}

/* ── Badge «Из профиля» ──────────────────────────────────────────── */
.prof-modal .member-autofill-badge {
    font-size: .72rem;
    font-weight: 800;
    color: #1e8449;
    background: rgba(39,174,96,.12);
    border-radius: var(--radius-lg) ;
    padding: 2px 10px;
    white-space: nowrap;
}

/* ── Мобилка ─────────────────────────────────────────────────────── */
@media (max-width: 600px) {
    .prof-modal .frm-row2 { grid-template-columns: 1fr; }
    .prof-modal .reg-type-tabs { flex-direction: column; gap: 8px; }
    .prof-modal .reg-type-tab { text-align: center; }
}

/* ═══════════════════════════════════════════════════════════════════
   ДОСТИЖЕНИЯ — Кубки и Медали
   ═══════════════════════════════════════════════════════════════════ */

.ach-section {
    margin-bottom: 20px;
}
.ach-section:last-child {
    margin-bottom: 0;
}
.ach-section-title {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text);
    margin: 0 0 12px 0;
    padding-bottom: 6px;
    border-bottom: 1px solid rgba(0,0,0,.06);
}

.ach-row {
    display: flex;
    flex-wrap: nowrap;
    gap: 10px;
    overflow-x: auto;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding: 4px 2px;
}
.ach-row::-webkit-scrollbar { display: none; }

/* ── Подблок (Кубки / Медали) ────────────────────────────────── */
.ach-subsection {
    margin-bottom: 12px;
}
.ach-subsection:last-child { margin-bottom: 0; }
.ach-sub-label {
    display: inline-block;
    font-size: .8rem;
    font-weight: 700;
    color: #555;
    margin-bottom: 6px;
}

/* ── Обёртка слайдера с кнопками ─────────────────────────────── */
.ach-slider-wrap {
    position: relative;
}
.ach-arrow {
    display: none;
    position: absolute;
    top: 50%;
    transform: translateY(-60%);
    width: 28px;
    height: 28px;
    border-radius: 50%;
    border: none;
    background: var(--bg);
    box-shadow: var(--neu-out);
    font-size: 1.2rem;
    line-height: 1;
    color: var(--text);
    cursor: pointer;
    z-index: 2;
    padding: 0;
}
.ach-has-scroll .ach-arrow { display: flex; align-items: center; justify-content: center; }
.ach-arrow-l { left: -6px; }
.ach-arrow-r { right: -6px; }
.ach-arrow:hover { box-shadow: var(--neu-in); }

.ach-card {
    width: 100px;
    border-radius: var(--radius);
    overflow: hidden;
    background: var(--bg);
    transition: transform .2s ease, box-shadow .2s ease;
    cursor: default;
}
.ach-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--neu-out), 0 6px 20px rgba(0,0,0,.08);
}

/* ── Контейнер для изображения ────────────────────────────────── */
.ach-img-wrap {
    width: 100px;
    height: 120px;
    overflow: hidden;
    position: relative;
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-sm) var(--radius-sm) 0 0;
}

.ach-img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}

/* ── Fallback (если нет картинки) ────────────────────────────── */
.ach-fallback {
    display: flex;
    align-items: center;
    justify-content: center;
}
.ach-emoji {
    font-size: 3.5rem;
    line-height: 1;
}

/* ── Подпись под изображением ────────────────────────────────── */
.ach-info {
    padding: 6px 6px 8px;
    text-align: center;
}

.ach-place {
    font-size: .65rem;
    font-weight: 800;
    margin-bottom: 2px;
}

.ach-title {
    font-size: .6rem;
    font-weight: 600;
    color: var(--text);
    line-height: 1.2;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.ach-team {
    font-size: .55rem;
    color: #7f8c8d;
    margin-top: 2px;
}

/* ── Мобильная адаптация ─────────────────────────────────────── */
@media (max-width: 600px) {
    .ach-row {
        gap: 8px;
        justify-content: flex-start;
    }
    .ach-card {
        width: 90px;
    }
    .ach-img-wrap {
        width: 90px;
        height: 108px;
    }
}

@media (max-width: 390px) {
    .ach-card {
        width: 80px;
    }
    .ach-img-wrap {
        width: 80px;
        height: 96px;
    }
    .ach-place { font-size: .6rem; }
    .ach-title { font-size: .55rem; }
}

/* ── Placeholder — пустой слот ожидания ───────────────────────── */
.ach-placeholder {
    border-top: 4px solid #d0d0d0 !important;
}
.ach-ph-img {
    background: linear-gradient(145deg, #e8ecf1 0%, #d5dbe3 100%) !important;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-sm) var(--radius-sm) 0 0;
}
.ach-ph-icon {
    font-size: 2.2rem;
    line-height: 1;
    filter: grayscale(1);
    opacity: .35;
}
.ach-ph-text {
    font-size: .58rem;
    color: #aaa;
    font-weight: 600;
    font-style: italic;
    line-height: 1.3;
}
