/* Личный кабинет: профиль-хаб и страницы /my/… (макет 02.09.2026).
 *
 * Палитра — как у ленты визитов (profile-visits.css): фон #f5f1e8, акцент
 * #2d493d, текст #2c2a24, muted #6f6a5c, границы #e4ddcc. Префиксы hub-*,
 * visit-*, selfpay-*, set-*, ach-*. Тёмная тема — переопределением токенов
 * pv-* в profile-visits.css, здесь только их использование.
 */

/* ─── Каркас страницы ─── */

.hub,
.hub-page {
    max-width: 560px;
    margin: 0 auto 32px;
    padding: 12px 14px 0;
    color: var(--pv-text, #2c2a24);
    text-align: left;
}

.hub-page--wide { max-width: 760px; }

.hub-page__back {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    margin-bottom: 8px;
    color: var(--pv-muted, #6f6a5c);
    font-size: 14px;
    text-decoration: none;
}

.hub-page__back:hover { color: var(--pv-accent, #2d493d); text-decoration: none; }
.hub-page__back .hub-ico { width: 18px; height: 18px; }

.hub-page__title {
    margin: 0 0 14px;
    font-size: 26px;
    font-weight: 800;
    line-height: 1.15;
}

.hub-page__title--tight { margin-bottom: 4px; }

.hub-ico {
    width: 22px;
    height: 22px;
    flex: 0 0 auto;
    display: inline-block;
    vertical-align: middle;
}

/* ─── Шапка хаба ─── */

.hub__head {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 16px;
}

.hub__avatar {
    flex: 0 0 60px;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    overflow: hidden;
    background: var(--pv-accent-soft, #eaf0ea);
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
}

.hub__avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.hub__avatar img[hidden],
.hub__initials[hidden] { display: none; }

.hub__initials {
    font-size: 22px;
    font-weight: 800;
    color: var(--pv-accent, #2d493d);
    letter-spacing: .02em;
}

.hub__who { flex: 1; min-width: 0; }

.hub__name {
    margin: 0;
    font-size: 22px;
    font-weight: 800;
    line-height: 1.2;
    overflow-wrap: anywhere;
}

.hub__level {
    margin-top: 2px;
    font-size: 13px;
    color: var(--pv-muted, #6f6a5c);
}

.hub__gear {
    flex: 0 0 40px;
    width: 40px;
    height: 40px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: var(--pv-surface, #fff);
    border: 1px solid var(--pv-border, #e4ddcc);
    color: var(--pv-accent, #2d493d);
    text-decoration: none;
}

.hub__gear:hover { background: var(--pv-accent-soft, #eaf0ea); color: var(--pv-accent, #2d493d); }

/* ─── Строки-разделы ─── */

.hub__rows {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 18px;
}

.hub-row {
    display: flex;
    align-items: center;
    gap: 12px;
    min-height: 64px;
    padding: 12px 14px;
    border: 1px solid var(--pv-border, #e4ddcc);
    border-radius: 16px;
    background: var(--pv-surface, #fff);
    color: inherit;
    text-decoration: none;
}

a.hub-row:hover,
a.hub-row:focus {
    color: inherit;
    text-decoration: none;
    border-color: var(--pv-accent, #2d493d);
}

.hub-row--accent { background: var(--pv-accent-soft, #eaf0ea); border-color: transparent; }

.hub-row__ico {
    flex: 0 0 40px;
    width: 40px;
    height: 40px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    background: var(--pv-surface-soft, #f6f2e8);
    color: var(--pv-accent, #2d493d);
}

.hub-row--accent .hub-row__ico { background: rgba(255, 255, 255, .7); }

.hub-row__body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }

.hub-row__title { font-size: 16px; font-weight: 600; line-height: 1.25; }

.hub-row__sub {
    font-size: 13px;
    color: var(--pv-muted, #6f6a5c);
    line-height: 1.3;
}

.hub-row__chev { flex: 0 0 auto; color: var(--pv-muted, #6f6a5c); opacity: .7; }

.hub-row__btn,
.set-line__act {
    flex: 0 0 auto;
    min-height: 34px;
    padding: 6px 14px;
    border: 1px solid var(--pv-accent, #2d493d);
    border-radius: 999px;
    background: transparent;
    color: var(--pv-accent, #2d493d);
    font: inherit;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    white-space: nowrap;
}

.hub-row__btn:hover,
.set-line__act:hover { background: var(--pv-accent-soft, #eaf0ea); text-decoration: none; color: var(--pv-accent, #2d493d); }

.hub-row__amount { flex: 0 0 auto; font-weight: 700; white-space: nowrap; }

.hub-row--details { display: block; padding: 0; }
.hub-row__summary {
    display: flex;
    align-items: center;
    gap: 12px;
    min-height: 64px;
    padding: 12px 14px;
    cursor: pointer;
    list-style: none;
}
.hub-row__summary::-webkit-details-marker { display: none; }
.hub-row__extra { padding: 0 14px 12px 66px; font-size: 13px; }
.hub-row__line {
    display: flex;
    justify-content: space-between;
    gap: 8px;
    padding: 4px 0;
}
.hub-row__line .is-minus { color: #b5511c; }
.hub-row__line .is-plus { color: #2e7d32; }

/* Мастер покупки живёт в DOM (модалка фиксированная), его собственную кнопку
   прячем: открывает строка «Абонемент». */
.hub__wizard .abonement-wizard__open-btn { display: none; }

/* ─── Карточки-секции ─── */

.hub-card {
    padding: 14px 16px;
    margin-bottom: 12px;
    border: 1px solid var(--pv-border, #e4ddcc);
    border-radius: 16px;
    background: var(--pv-surface, #fff);
}

.hub-card__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 8px;
}

.hub-card__title { margin: 0 0 8px; font-size: 17px; font-weight: 700; }
.hub-card__head .hub-card__title { margin-bottom: 0; }
.hub-card__count { font-size: 13px; font-weight: 500; color: var(--pv-muted, #6f6a5c); margin-left: 4px; }
.hub-card__hint { margin: 0 0 8px; font-size: 13px; color: var(--pv-muted, #6f6a5c); }
.hub-card__link { margin: 10px 0 0; font-size: 14px; }
.hub-card__link a { display: inline-flex; align-items: center; gap: 6px; font-weight: 700; }

.hub-cols { display: grid; grid-template-columns: 1fr; gap: 0 16px; }
@media (min-width: 900px) { .hub-cols { grid-template-columns: 1fr 1fr; } }

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

.hub-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    min-height: 48px;
    padding: 10px 16px;
    border-radius: 14px;
    border: 1px solid transparent;
    font: inherit;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    text-decoration: none;
    box-sizing: border-box;
}

.hub-btn--primary { background: var(--pv-accent, #2d493d); color: #f6f1e6; }
.hub-btn--primary:hover { color: #fff; filter: brightness(1.08); text-decoration: none; }
.hub-btn--ghost {
    background: var(--pv-surface, #fff);
    border-color: var(--pv-border, #e4ddcc);
    color: var(--pv-accent, #2d493d);
}
.hub-btn--ghost:hover { background: var(--pv-accent-soft, #eaf0ea); color: var(--pv-accent, #2d493d); text-decoration: none; }
.hub-btn[disabled] { opacity: .6; cursor: default; }
.hub-btn + .hub-btn { margin-top: 8px; }

/* ─── Моя запись ─── */

.visit-kind {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 6px 0 4px;
    font-size: 14px;
    color: var(--pv-muted, #6f6a5c);
}
.visit-kind__dot { width: 10px; height: 10px; border-radius: 50%; background: #4d8ac9; }
.visit-kind--training .visit-kind__dot { background: #4f9d6f; }
.visit-kind--competition .visit-kind__dot { background: #b45f9b; }
.visit-kind--trip .visit-kind__dot { background: #4bab9c; }

.visit-place { margin: 0 0 14px; font-size: 15px; color: var(--pv-muted, #6f6a5c); }

.visit-card {
    padding: 18px;
    border-radius: 20px;
    margin-bottom: 10px;
    background: var(--pv-surface, #fff);
    border: 1px solid var(--pv-border, #e4ddcc);
}

.visit-card--muted { background: var(--pv-surface-soft, #f6f2e8); border-color: transparent; }

.visit-card--green {
    background: linear-gradient(135deg, #2d493d, #3e6b57);
    border-color: transparent;
    color: #f6f1e6;
}

.visit-card__title { font-size: 17px; font-weight: 800; }
.visit-card__text { margin: 8px 0 0; font-size: 14px; line-height: 1.45; }
.visit-card__text a { color: inherit; text-decoration: underline; }
.visit-card--muted .visit-card__text { color: var(--pv-muted, #6f6a5c); }
.visit-card .hub-btn { margin-top: 12px; }

.visit-card__lock {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 17px;
    font-weight: 800;
}
.visit-card__lock .hub-ico { width: 26px; height: 26px; color: var(--pv-muted, #6f6a5c); }

.visit-card__status {
    font-size: 12px;
    letter-spacing: .06em;
    text-transform: uppercase;
    opacity: .85;
    font-weight: 700;
}

.visit-card__price {
    margin: 6px 0 12px;
    font-size: 32px;
    font-weight: 800;
    line-height: 1.1;
}
.visit-card__price small { font-size: 15px; font-weight: 500; opacity: .85; }

.visit-card__white {
    padding: 12px 14px;
    border-radius: 14px;
    background: rgba(255, 255, 255, .96);
    color: #2c2a24;
}

.visit-card__white-title { font-size: 14px; font-weight: 700; }
.visit-card__white-sub { font-size: 12px; color: #6f6a5c; }

.selfpay-stepper {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 10px 0 8px;
}

.selfpay-stepper__btn {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    border: 1px solid #e4ddcc;
    background: #f6f2e8;
    color: #2d493d;
    font-size: 22px;
    font-weight: 700;
    cursor: pointer;
    flex: 0 0 auto;
}
.selfpay-stepper__btn[disabled] { opacity: .35; cursor: default; }

.selfpay-stepper__val {
    flex: 1;
    text-align: center;
    font-size: 24px;
    font-weight: 800;
}

.selfpay-stepper__all {
    height: 44px;
    padding: 0 14px;
    border-radius: 12px;
    border: 1px solid #2d493d;
    background: transparent;
    color: #2d493d;
    font: inherit;
    font-weight: 700;
    cursor: pointer;
    flex: 0 0 auto;
}
.selfpay-stepper__all[disabled] { opacity: .35; cursor: default; }

.selfpay-split {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin-top: 6px;
    font-size: 14px;
}
.selfpay-split div { display: flex; justify-content: space-between; }

.selfpay-pay {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 52px;
    margin-top: 14px;
    border: 0;
    border-radius: 14px;
    background: #f6f1e6;
    color: #2d493d;
    font: inherit;
    font-size: 16px;
    font-weight: 800;
    cursor: pointer;
}
.selfpay-pay[disabled] { opacity: .7; cursor: default; }

.visit-card__foot { margin: 10px 0 0; font-size: 12px; opacity: .85; line-height: 1.4; }

.visit-card__check {
    display: flex;
    align-items: center;
    gap: 12px;
}
.visit-card__check .hub-ico {
    width: 44px;
    height: 44px;
    padding: 8px;
    border-radius: 50%;
    background: rgba(255, 255, 255, .18);
    box-sizing: border-box;
}
.visit-card__check-title { font-size: 20px; font-weight: 800; }
.visit-card__check-sub { font-size: 13px; opacity: .9; }

.visit-card__spinner {
    display: inline-block;
    width: 16px;
    height: 16px;
    margin-right: 8px;
    border: 2px solid currentColor;
    border-right-color: transparent;
    border-radius: 50%;
    vertical-align: -3px;
    animation: hub-spin .8s linear infinite;
}
@keyframes hub-spin { to { transform: rotate(360deg); } }

.visit-foot {
    margin: 0 0 16px;
    font-size: 13px;
    color: var(--pv-muted, #6f6a5c);
    text-align: center;
}

.visit-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 14px; }
.visit-actions .hub-btn + .hub-btn { margin-top: 0; }
.visit-actions .hub-btn { font-size: 14px; padding: 10px 8px; }

.visit-leave {
    display: block;
    width: 100%;
    padding: 10px;
    border: 0;
    background: transparent;
    color: #b5511c;
    font: inherit;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
}
.visit-leave__hint { margin: 0; font-size: 12px; color: var(--pv-muted, #6f6a5c); text-align: center; }

@media (min-width: 900px) {
    .hub-page--visit { max-width: 640px; }
}

/* ─── Нижняя шторка ─── */

.hub-sheet { position: fixed; inset: 0; z-index: 1400; }
.hub-sheet[hidden] { display: none; }
.hub-sheet__backdrop { position: absolute; inset: 0; background: rgba(20, 24, 20, .45); }
.hub-sheet__panel {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    max-width: 560px;
    margin: 0 auto;
    padding: 10px 18px calc(18px + env(safe-area-inset-bottom));
    border-radius: 22px 22px 0 0;
    background: var(--pv-surface, #fff);
    color: var(--pv-text, #2c2a24);
    box-shadow: 0 -8px 30px rgba(0, 0, 0, .18);
    animation: hub-sheet-up .22s ease-out;
}
@keyframes hub-sheet-up { from { transform: translateY(30px); opacity: .6; } to { transform: none; opacity: 1; } }
.hub-sheet__handle { width: 40px; height: 4px; margin: 0 auto 14px; border-radius: 99px; background: var(--pv-border, #e4ddcc); }
.hub-sheet__title { margin: 0 0 12px; font-size: 20px; font-weight: 800; }
.hub-sheet__block {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    padding: 12px 14px;
    border-radius: 14px;
    margin-bottom: 10px;
    font-size: 14px;
    line-height: 1.4;
}
.hub-sheet__block p { margin: 0; }
.hub-sheet__block--green { background: #e6f1e8; color: #1f4d33; }
.hub-sheet__block--yellow { background: #fff4d6; color: #6b4a00; }
.hub-sheet__block[hidden] { display: none; }
.hub-sheet__ico { flex: 0 0 auto; }
.hub-sheet__text { margin: 0 0 10px; font-size: 14px; color: var(--pv-muted, #6f6a5c); }
.hub-sheet__text[hidden] { display: none; }
.hub-sheet .hub-btn--ghost { color: #b5511c; }

@media (min-width: 900px) {
    .hub-sheet__panel { bottom: auto; top: 50%; transform: translateY(-50%); border-radius: 22px; }
}

/* ─── Настройки ─── */

.set-avatar { display: flex; align-items: center; gap: 14px; }
.set-avatar__pic {
    position: relative;
    flex: 0 0 72px;
    width: 72px;
    height: 72px;
    border-radius: 50%;
    overflow: hidden;
    background: var(--pv-accent-soft, #eaf0ea);
    display: flex;
    align-items: center;
    justify-content: center;
}
.set-avatar__pic img { width: 100%; height: 100%; object-fit: cover; display: block; }
.set-avatar__pic img[hidden] { display: none; }
.set-avatar__overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, .5);
    color: #fff;
    font-size: 12px;
}
.set-avatar__overlay[hidden] { display: none; }
.set-avatar__body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; align-items: flex-start; }
.set-avatar__body .hub-row__btn { margin-top: 6px; }

.set-line {
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 44px;
    padding: 6px 0;
    border-top: 1px solid var(--pv-border, #e4ddcc);
    font-size: 14px;
}
.set-line:first-of-type { border-top: 0; }
.set-line[hidden] { display: none; }
.set-line__lbl { flex: 0 0 88px; color: var(--pv-muted, #6f6a5c); }
.set-line__val { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.set-line__hint { font-size: 12px; color: var(--pv-muted, #6f6a5c); }
.set-level-form { display: flex; flex-direction: column; gap: 8px; padding-top: 8px; }
.set-level-form[hidden] { display: none; }
.set-logout { margin-top: 8px; color: #b5511c; }

.phone-verification-status { font-size: 12px; color: #b5511c; }
.phone-verification-status--verified { color: #2e7d32; }

/* ─── Достижения ─── */

.ach-titles { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.ach-titles__item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    border-radius: 12px;
    background: var(--pv-surface-soft, #f6f2e8);
    font-size: 14px;
    font-weight: 600;
}
.ach-place {
    flex: 0 0 26px;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 13px;
    font-weight: 800;
    background: #9a9a9a;
}
.ach-place--1 { background: #d4a017; }
.ach-place--2 { background: #9a9a9a; }
.ach-place--3 { background: #b87333; }

.ach-switch { display: flex; margin-bottom: 10px; }
.ach-board[hidden] { display: none; }
.ach-board__title { margin: 10px 0 4px; font-size: 14px; font-weight: 700; }

.hub-table-wrap { overflow-x: auto; }
.hub-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.hub-table th { text-align: left; font-size: 12px; color: var(--pv-muted, #6f6a5c); font-weight: 600; padding: 4px 6px; border-bottom: 1px solid var(--pv-border, #e4ddcc); }
.hub-table td { padding: 8px 6px; border-bottom: 1px solid var(--pv-border, #e4ddcc); vertical-align: top; }
.hub-table__nowrap { white-space: nowrap; }

.ach-badges {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(96px, 1fr));
    gap: 8px;
}
.ach-badge {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    padding: 10px 6px;
    border-radius: 14px;
    border: 1px dashed var(--pv-border, #e4ddcc);
    text-align: center;
    opacity: .55;
}
.ach-badge.is-earned { border-style: solid; background: var(--pv-surface-soft, #f6f2e8); opacity: 1; }
.ach-badge__icon { display: inline-flex; color: var(--pv-accent, #2d493d); }
.ach-badge__icon .hub-ico { width: 30px; height: 30px; }
.ach-badge:not(.is-earned) .ach-badge__icon { color: var(--pv-muted, #6f6a5c); }
.ach-badge__name { font-size: 12px; font-weight: 700; line-height: 1.2; }
.ach-badge__sub { font-size: 11px; color: var(--pv-muted, #6f6a5c); }
