/*
 * ============================================================================
 * inc/cabinet/assets/cabinet.css — стили Личного кабинета
 * ============================================================================
 *
 * @version    1.3.0
 * @build      2026-10-20-031000
 * @generated  2026-10-20 03:10:00 (GMT+5)
 *
 * НАЗНАЧЕНИЕ:
 *   - Стили страниц /cabinet/ и /cabinet-login/.
 *   - Вкладки, таблица детей, карточка ребёнка, история.
 *   - Строка статистики над детьми с кнопкой «Выбрать ещё ребёнка».
 *   - Бейджи статуса подарка.
 *   - Кнопка «Подтвердить вручение» / «Подарок вручен».
 *   - Модалка кропа 4:3 для фото вручения.
 *   - Overlay с фото вручения на весь экран.
 *
 * ИЗМЕНЕНИЯ ОТ v1.2.4:
 *   - Статистика: .tst-cabinet-children__stats-inner (flex, space-between),
 *     __stats-actions (блок кнопки). Кнопка «Выбрать ещё ребёнка»
 *     вынесена из __stats-empty.
 *   - Бейджи: .tst-cabinet__badge--gift-done (зелёный),
 *     .tst-cabinet__badge--gift-work (оранжевый).
 *   - Кнопка подарка: .tst-cabinet-gift, .tst-cabinet__btn--gift-done.
 *   - Модалка кропа 4:3: .tst-cabinet__modal-content--gift,
 *     .tst-cabinet__crop-viewport--gift (aspect-ratio 4/3),
 *     .tst-cabinet-gift-crop__progress.
 *   - Overlay фото: .tst-cabinet-gift-photo-overlay (+ backdrop, close,
 *     body, img, placeholder).
 *   - body.tst-cabinet-no-scroll — блокировка прокрутки.
 *
 * ОТКУДА ВЫЗЫВАЕТСЯ:
 *   - wp_enqueue_style('tst-cabinet', ...) из cabinet-config.php.
 *
 * ИСТОРИЯ ОБНОВЛЕНИЙ:
 *   v1.2.0 — 2026-10-19 — Вкладки, таблица детей, история.
 *   v1.2.1 — 2026-10-19 — Кнопка-градиент, чёрный квадрат, логотип в шапке.
 *   v1.2.2 — 2026-10-19 — Квадрат крупнее, --full кнопка, пустая карточка.
 *   v1.2.3 — 2026-10-19 — Карточка ребёнка в кабинете.
 *   v1.2.4 — 2026-10-19 — Строка статистики, скролл таблицы.
 *   v1.3.0 — 2026-10-20 — Подарок: статусы, кнопка, модалка 4:3, overlay.
 *
 * ============================================================================
 */

/* ---------------------------------------------------------------------------
 * Локальные переменные
 * ------------------------------------------------------------------------- */
.tst-cabinet,
.tst-cabinet-login {
    --tst-cabinet-bg: #f7f9fc;
    --tst-cabinet-card-bg: #ffffff;
    --tst-cabinet-border: #e2e6ee;
    --tst-cabinet-text: #1f2733;
    --tst-cabinet-muted: #6b7688;
    --tst-cabinet-hint: #a0a8b3;
    --tst-cabinet-primary: #1e6fd9;
    --tst-cabinet-primary-hover: #1558b0;
    --tst-cabinet-danger: #c0392b;
    --tst-cabinet-success: #1e8449;
    --tst-cabinet-warning: #b9770e;
    --tst-cabinet-radius: 10px;
    --tst-cabinet-gap: 16px;

    box-sizing: border-box;
    color: var(--tst-cabinet-text);
    font-size: 16px;
    line-height: 1.5;
}

.tst-cabinet *,
.tst-cabinet-login * {
    box-sizing: inherit;
}

.tst-cabinet {
    max-width: 1100px;
    margin: 0 auto;
    padding: 24px 16px 48px;
}

body.tst-cabinet-no-scroll {
    overflow: hidden;
}

/* ---------------------------------------------------------------------------
 * Шапка кабинета
 * ------------------------------------------------------------------------- */
.tst-cabinet__topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--tst-cabinet-gap);
    padding: 16px 20px;
    margin-bottom: 24px;
    background: var(--tst-cabinet-card-bg);
    border: 1px solid var(--tst-cabinet-border);
    border-radius: var(--tst-cabinet-radius);
    box-shadow: 0 1px 2px rgba(31, 39, 51, 0.06), 0 4px 12px rgba(31, 39, 51, 0.05);
}

.tst-cabinet__topbar-user {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
}

.tst-cabinet__avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    object-fit: cover;
    flex: 0 0 auto;
    background: #f0f2f5;
    border: 1px solid var(--tst-cabinet-border);
}

.tst-cabinet__user-name {
    font-weight: 600;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.tst-cabinet__user-role {
    color: var(--tst-cabinet-muted);
    font-size: 14px;
}

.tst-cabinet__topbar-actions {
    display: flex;
    gap: 8px;
    flex: 0 0 auto;
}

/* ---------------------------------------------------------------------------
 * Вкладки
 * ------------------------------------------------------------------------- */
.tst-cabinet__tabs {
    display: flex;
    gap: 4px;
    margin-bottom: 24px;
    border-bottom: 1px solid var(--tst-cabinet-border);
    overflow-x: auto;
}

.tst-cabinet__tab {
    display: inline-block;
    padding: 10px 18px;
    font-size: 16px;
    font-weight: 500;
    color: var(--tst-cabinet-muted);
    text-decoration: none;
    border-bottom: 2px solid transparent;
    margin-bottom: -1px;
    white-space: nowrap;
    transition: color 0.15s ease, border-color 0.15s ease;
}

.tst-cabinet__tab:hover {
    color: var(--tst-cabinet-text);
}

.tst-cabinet__tab.is-active {
    color: var(--tst-cabinet-primary);
    border-bottom-color: var(--tst-cabinet-primary);
    font-weight: 600;
}

/* ---------------------------------------------------------------------------
 * Общие секции
 * ------------------------------------------------------------------------- */
.tst-cabinet__section {
    margin-bottom: 24px;
}

.tst-cabinet__section-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--tst-cabinet-gap);
    margin-bottom: 12px;
}

.tst-cabinet__section-title {
    margin: 0;
    font-size: 22px;
    font-weight: 700;
}

.tst-cabinet__section-actions {
    display: flex;
    gap: 8px;
    align-items: center;
    flex-wrap: wrap;
}

.tst-cabinet__count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 28px;
    height: 28px;
    padding: 0 10px;
    border-radius: 999px;
    background: var(--tst-cabinet-bg);
    color: var(--tst-cabinet-muted);
    font-weight: 600;
    font-size: 14px;
    line-height: 1;
}

/* Бейджи */
.tst-cabinet__badge {
    display: inline-block;
    padding: 4px 8px;
    border-radius: 4px;
    background: #eef4fc;
    color: #1e6fd9;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.02em;
}

.tst-cabinet__badge--hidden {
    background: #fdf5e6;
    color: var(--tst-cabinet-warning);
}

.tst-cabinet__badge--gift-done {
    background: #eaf7ef;
    color: var(--tst-cabinet-success);
}

.tst-cabinet__badge--gift-work {
    background: #fdf5e6;
    color: var(--tst-cabinet-warning);
}

/* ---------------------------------------------------------------------------
 * Кнопки
 * ------------------------------------------------------------------------- */
.tst-cabinet__btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    min-height: 40px;
    padding: 9px 16px;
    border: 1px solid var(--tst-cabinet-border);
    border-radius: 8px;
    background: var(--tst-cabinet-card-bg);
    color: var(--tst-cabinet-text);
    font-size: 15px;
    font-weight: 500;
    line-height: 1.2;
    text-decoration: none;
    cursor: pointer;
    transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.tst-cabinet__btn:hover,
.tst-cabinet__btn:focus-visible {
    border-color: var(--tst-cabinet-primary);
    color: var(--tst-cabinet-primary);
    outline: none;
}

.tst-cabinet__btn--primary,
a.tst-cabinet__btn--primary,
button.tst-cabinet__btn--primary {
    font-family: "Raleway", sans-serif;
    font-weight: bold;
    font-size: 16px;
    line-height: 14px;
    border-radius: 40px;
    text-transform: initial;
    text-decoration: none;
    cursor: pointer;
    background: linear-gradient(90deg, #2378BC 0%, #3598E7 100%);
    border: none;
    color: #FFF;
    -webkit-transition: all .6s ease-out;
    -o-transition: all .6s ease-out;
    transition: all .6s ease-out;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 15px 24px;
    min-height: 44px;
    text-align: center;
}

.tst-cabinet__btn--primary:hover,
.tst-cabinet__btn--primary:focus-visible {
    background: linear-gradient(90deg, #3598E7 0%, #2378BC 100%);
    color: #FFF;
    text-decoration: none;
    outline: none;
    box-shadow: 0 4px 12px rgba(35, 120, 188, 0.35);
}

.tst-cabinet__btn--primary:disabled,
.tst-cabinet__btn--primary.is-loading {
    cursor: default;
    opacity: 0.6;
    box-shadow: none;
}

.tst-cabinet__btn--full {
    display: flex;
    width: 100%;
    box-sizing: border-box;
}

.tst-cabinet__btn[disabled],
.tst-cabinet__btn.is-loading {
    opacity: 0.6;
    cursor: progress;
}

/* Кнопка «Подарок вручен» */
.tst-cabinet__btn--gift-done,
button.tst-cabinet__btn--gift-done {
    font-family: "Raleway", sans-serif;
    font-weight: bold;
    font-size: 15px;
    line-height: 14px;
    border-radius: 40px;
    background: #eaf7ef;
    color: var(--tst-cabinet-success);
    border: 1px solid #c6e8d2;
    padding: 12px 20px;
    min-height: 42px;
    cursor: pointer;
    transition: background-color 0.15s ease, box-shadow 0.15s ease;
}

.tst-cabinet__btn--gift-done:hover,
.tst-cabinet__btn--gift-done:focus-visible {
    background: #dff2e7;
    color: var(--tst-cabinet-success);
    outline: none;
    box-shadow: 0 2px 8px rgba(30, 132, 73, 0.2);
}

/* ---------------------------------------------------------------------------
 * Уведомления
 * ------------------------------------------------------------------------- */
.tst-cabinet__notice {
    padding: 12px 16px;
    margin: 0 0 16px;
    border-radius: var(--tst-cabinet-radius);
    border: 1px solid transparent;
    font-size: 15px;
}

.tst-cabinet__notice--info { background: #eef4fc; border-color: #cfe0f7; color: #1f4f8f; }
.tst-cabinet__notice--success { background: #eaf7ef; border-color: #c6e8d2; color: var(--tst-cabinet-success); }
.tst-cabinet__notice--warning { background: #fdf5e6; border-color: #f2dfb7; color: var(--tst-cabinet-warning); }
.tst-cabinet__notice--error { background: #fbeceb; border-color: #f1c7c2; color: var(--tst-cabinet-danger); }

/* ---------------------------------------------------------------------------
 * Сетка кабинета снеговика
 * ------------------------------------------------------------------------- */
.tst-cabinet-snowman__grid {
    display: flex;
    gap: 32px;
    align-items: flex-start;
}

.tst-cabinet-snowman__card-col {
    flex: 0 0 320px;
    position: sticky;
    top: 24px;
    padding-top: 24px;
}

.tst-cabinet-snowman__card-header {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 0;
}

.tst-cabinet-snowman__card-title-preview {
    margin: 0;
    font-size: 20px;
    font-weight: 700;
    color: var(--tst-cabinet-text);
    line-height: 1.5;
}

.tst-cabinet-snowman__card-preview-wrap {
    margin-top: 8px;
    transition: filter 0.3s ease, opacity 0.3s ease;
}

.tst-cabinet-snowman__card-preview-wrap.is-hidden {
    filter: grayscale(100%);
    opacity: 0.4;
}

.tst-cabinet-snowman__card-col .cards__button {
    text-align: center;
}

.tst-cabinet-snowman__card-col .cards__button > a,
.tst-cabinet-snowman__card-col .cards__button > .cards__button-disabled {
    display: inline-block;
    margin: 0 auto;
}

/* Тумблер */
.tst-cabinet-snowman__switch {
    display: inline-flex;
    align-items: center;
    cursor: pointer;
    user-select: none;
}

.tst-cabinet-snowman__switch input {
    display: none;
}

.tst-cabinet-snowman__switch-slider {
    position: relative;
    width: 36px;
    height: 20px;
    background-color: #ccc;
    border-radius: 20px;
    margin-right: 10px;
    transition: background-color 0.2s;
    flex-shrink: 0;
}

.tst-cabinet-snowman__switch-slider::before {
    content: "";
    position: absolute;
    height: 16px;
    width: 16px;
    left: 2px;
    bottom: 2px;
    background-color: white;
    border-radius: 50%;
    transition: transform 0.2s;
}

.tst-cabinet-snowman__switch input:checked + .tst-cabinet-snowman__switch-slider {
    background-color: var(--tst-cabinet-warning);
}

.tst-cabinet-snowman__switch input:checked + .tst-cabinet-snowman__switch-slider::before {
    transform: translateX(16px);
}

.tst-cabinet-snowman__switch-label {
    font-size: 15px;
    color: var(--tst-cabinet-text);
}

/* Правая колонка */
.tst-cabinet-snowman__fields-col {
    flex: 1;
    min-width: 0;
    max-width: 100%;
    background: var(--tst-cabinet-card-bg);
    border: 1px solid var(--tst-cabinet-border);
    border-radius: var(--tst-cabinet-radius);
    padding: 24px;
    box-shadow: 0 1px 2px rgba(31, 39, 51, 0.06);
}

.tst-cabinet-snowman__fields-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 20px;
    min-height: 40px;
    flex-wrap: wrap;
}

.tst-cabinet-snowman__fields-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.tst-cabinet-snowman__section-title {
    margin: 0;
    font-size: 20px;
    font-weight: 700;
    line-height: 1.5;
}

.tst-cabinet-snowman__group {
    margin-bottom: 24px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--tst-cabinet-border);
}

.tst-cabinet-snowman__field {
    margin-bottom: 18px;
    min-width: 0;
    max-width: 100%;
}

.tst-cabinet-snowman__label {
    display: block;
    font-size: 13px;
    text-transform: uppercase;
    color: var(--tst-cabinet-muted);
    font-weight: 600;
    letter-spacing: 0.02em;
    margin-bottom: 4px;
}

.tst-cabinet-snowman__req {
    color: var(--tst-cabinet-danger);
    font-size: 16px;
    font-weight: 700;
    margin-left: 2px;
    line-height: 1;
}

.tst-cabinet-snowman__value {
    font-size: 16px;
    font-weight: 500;
    color: var(--tst-cabinet-text);
    word-break: break-word;
}

.tst-cabinet-snowman__empty {
    color: var(--tst-cabinet-muted);
    font-weight: 400;
    font-style: italic;
}

.tst-cabinet-snowman__input {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    padding: 10px 12px;
    border: 1px solid var(--tst-cabinet-border);
    border-radius: 8px;
    background: #ffffff;
    color: var(--tst-cabinet-text);
    font-size: 16px;
    line-height: 1.3;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.tst-cabinet-snowman__input:focus {
    outline: none;
    border-color: var(--tst-cabinet-primary);
    box-shadow: 0 0 0 3px rgba(30, 111, 217, 0.15);
}

.tst-cabinet-snowman__input.is-invalid {
    border-color: var(--tst-cabinet-danger);
    box-shadow: 0 0 0 3px rgba(192, 57, 43, 0.15);
}

.tst-cabinet-snowman__hint {
    margin: 4px 0 0;
    font-size: 12px;
    color: var(--tst-cabinet-hint);
    line-height: 1.35;
}

/* ---------------------------------------------------------------------------
 * Логотип
 * ------------------------------------------------------------------------- */
.tst-cabinet-snowman__logo-wrap {
    display: flex;
    gap: 16px;
    align-items: center;
    flex-wrap: wrap;
}

.tst-cabinet-snowman__logo-preview {
    position: relative;
    width: 96px;
    height: 96px;
    overflow: hidden;
    border: 2px solid var(--tst-cabinet-border);
    background: #fff;
    flex-shrink: 0;
}

.tst-cabinet-snowman__logo-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.tst-cabinet-snowman__logo-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(31, 39, 51, 0.65);
    color: #ffffff;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    font-size: 12px;
    font-weight: 600;
    z-index: 2;
}

.tst-cabinet-snowman__logo-progress {
    width: 70%;
    height: 4px;
    background: rgba(255, 255, 255, 0.25);
    border-radius: 999px;
    overflow: hidden;
}

.tst-cabinet-snowman__logo-progress-fill {
    height: 100%;
    background: #ffffff;
    transition: width 0.2s ease;
    border-radius: 999px;
}

.tst-cabinet-snowman__logo-progress-text {
    font-size: 12px;
    line-height: 1;
}

.tst-cabinet-snowman__logo-actions {
    flex: 1;
    min-width: 0;
}

.tst-cabinet__btn.js-cabinet-logo-btn {
    cursor: pointer;
    margin-bottom: 4px;
}

/* ---------------------------------------------------------------------------
 * Модальное окно кропа (логотип 1:1)
 * ------------------------------------------------------------------------- */
.tst-cabinet__modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 99999;
}

.tst-cabinet__modal[hidden] {
    display: none !important;
}

.tst-cabinet__modal-content {
    background: #fff;
    padding: 24px;
    border-radius: 12px;
    width: 90%;
    max-width: 400px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    text-align: center;
    box-sizing: border-box;
}

.tst-cabinet__modal-title {
    margin: 0 0 8px;
    font-size: 20px;
    font-weight: 700;
}

.tst-cabinet__modal-hint {
    margin: 0 0 16px;
    font-size: 13px;
    color: #6b7688;
}

.tst-cabinet__crop-viewport {
    position: relative;
    width: 100%;
    aspect-ratio: 1 / 1;
    overflow: hidden;
    border: 2px solid #e2e6ee;
    background: #f7f9fc;
    cursor: move;
    margin-bottom: 20px;
    box-sizing: border-box;
}

.tst-cabinet__crop-viewport img {
    pointer-events: none;
}

.tst-cabinet__modal-actions {
    display: flex;
    justify-content: space-between;
    gap: 12px;
}

.tst-cabinet__modal-actions .tst-cabinet__btn {
    flex: 1;
}

/* ---------------------------------------------------------------------------
 * Модальное окно кропа 4:3 (подарок)
 * ------------------------------------------------------------------------- */
.tst-cabinet__modal-content--gift {
    max-width: 720px;
}

.tst-cabinet__crop-viewport--gift {
    aspect-ratio: 4 / 3;
    max-width: 100%;
    margin-left: auto;
    margin-right: auto;
}

.tst-cabinet-gift-crop__progress-wrap {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 16px;
}

.tst-cabinet-gift-crop__progress {
    flex: 1;
    height: 6px;
    background: rgba(31, 39, 51, 0.15);
    border-radius: 999px;
    overflow: hidden;
}

.tst-cabinet-gift-crop__progress-fill {
    height: 100%;
    background: var(--tst-cabinet-primary);
    transition: width 0.2s ease;
    border-radius: 999px;
}

.tst-cabinet-gift-crop__progress-text {
    font-size: 13px;
    color: var(--tst-cabinet-muted);
    min-width: 40px;
    text-align: right;
}

.tst-cabinet__btn.js-cabinet-gift-crop-select {
    cursor: pointer;
}

/* ---------------------------------------------------------------------------
 * Overlay фото вручения на весь экран
 * ------------------------------------------------------------------------- */
.tst-cabinet-gift-photo-overlay {
    position: fixed;
    inset: 0;
    z-index: 100000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.tst-cabinet-gift-photo-overlay[hidden] {
    display: none !important;
}

.tst-cabinet-gift-photo-overlay__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.92);
    cursor: zoom-out;
}

.tst-cabinet-gift-photo-overlay__close {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.15);
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.3);
    font-size: 28px;
    line-height: 1;
    cursor: pointer;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.15s ease;
}

.tst-cabinet-gift-photo-overlay__close:hover {
    background: rgba(255, 255, 255, 0.3);
}

.tst-cabinet-gift-photo-overlay__body {
    position: relative;
    z-index: 1;
    max-width: 96vw;
    max-height: 96vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.tst-cabinet-gift-photo-overlay__img {
    max-width: 96vw;
    max-height: 96vh;
    width: auto;
    height: auto;
    display: block;
    object-fit: contain;
    box-shadow: 0 8px 40px rgba(0, 0, 0, 0.5);
}

.tst-cabinet-gift-photo-overlay__placeholder {
    color: #ffffff;
    font-size: 20px;
    padding: 32px 48px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    text-align: center;
}

/* ---------------------------------------------------------------------------
 * ВКЛАДКА 2: Ваши дети
 * ------------------------------------------------------------------------- */
.tst-cabinet-children__stats {
    margin-bottom: 24px;
    padding: 20px;
    background: var(--tst-cabinet-card-bg);
    border: 1px solid var(--tst-cabinet-border);
    border-radius: var(--tst-cabinet-radius);
    box-shadow: 0 1px 2px rgba(31, 39, 51, 0.04);
}

.tst-cabinet-children__stats-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
}

.tst-cabinet-children__stats-empty,
.tst-cabinet-children__stats-filled {
    display: flex;
    align-items: baseline;
    gap: 8px;
    flex-wrap: wrap;
    flex: 1 1 auto;
    min-width: 0;
}

.tst-cabinet-children__stats-text {
    font-size: 18px;
    color: var(--tst-cabinet-text);
    line-height: 1.4;
}

.tst-cabinet-children__stats-text strong {
    font-weight: 700;
    color: var(--tst-cabinet-primary);
}

.tst-cabinet-children__stats-breakdown {
    color: var(--tst-cabinet-muted);
    font-size: 15px;
}

.tst-cabinet-children__stats-actions {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
}

/* Скролл таблицы (max-height = высота карточки) */
.tst-cabinet-children__grid {
    display: flex;
    gap: 32px;
    align-items: flex-start;
}

.tst-cabinet-children__card-col {
    flex: 0 0 380px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.tst-cabinet-children__table-col {
    flex: 1;
    min-width: 0;
    background: var(--tst-cabinet-card-bg);
    border: 1px solid var(--tst-cabinet-border);
    border-radius: var(--tst-cabinet-radius);
    padding: 24px;
    box-shadow: 0 1px 2px rgba(31, 39, 51, 0.06);
    overflow-y: auto;
    max-height: 600px;
}

.tst-cabinet-children__table {
    width: 100%;
    border-collapse: collapse;
    font-size: 15px;
}

.tst-cabinet-children__table thead th {
    text-align: left;
    padding: 10px 8px;
    font-size: 13px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.02em;
    color: var(--tst-cabinet-muted);
    border-bottom: 1px solid var(--tst-cabinet-border);
    white-space: nowrap;
    position: sticky;
    top: -24px;
    background: var(--tst-cabinet-card-bg);
    z-index: 1;
}

.tst-cabinet-children__table tbody td {
    padding: 10px 8px;
    border-bottom: 1px solid var(--tst-cabinet-border);
    vertical-align: middle;
}

.tst-cabinet-children__row {
    cursor: pointer;
    transition: background-color 0.15s ease;
    outline: none;
}

.tst-cabinet-children__row:hover {
    background-color: #f7f9fc;
}

.tst-cabinet-children__row.is-active {
    background-color: #eef4fc;
    font-weight: 500;
}

.tst-cabinet-children__row.is-active td {
    color: var(--tst-cabinet-primary);
}

.tst-cabinet-children__row:focus-visible {
    box-shadow: inset 0 0 0 2px var(--tst-cabinet-primary);
}

/* Блок подарка под карточкой */
.tst-cabinet-gift {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: 4px;
}

.tst-cabinet-gift .tst-cabinet__btn {
    width: 100%;
}

/* Подсказка, когда детей нет */
.tst-cabinet-children__empty-hint {
    margin-top: 16px;
    color: var(--tst-cabinet-muted);
    font-size: 15px;
}

/* ---------------------------------------------------------------------------
 * КАРТОЧКА РЕБЁНКА (в кабинете)
 * ------------------------------------------------------------------------- */
.tst-cabinet-child-card {
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(31, 39, 51, 0.08);
    padding: 24px;
    box-sizing: border-box;
    text-align: center;
    position: relative;
}

.tst-cabinet-child-card__season {
    color: #ff6b8a;
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 16px;
}

.tst-cabinet-child-card__photo-wrap {
    position: relative;
    width: 200px;
    height: 200px;
    margin: 0 auto 16px;
    border-radius: 50%;
    overflow: hidden;
    background: #f0f2f5;
    border: 4px solid #fff;
    box-shadow: 0 4px 12px rgba(31, 39, 51, 0.12);
}

.tst-cabinet-child-card__photo-link {
    display: block;
    width: 100%;
    height: 100%;
}

.tst-cabinet-child-card__photo {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.tst-cabinet-child-card__name {
    margin: 0 0 16px;
    font-size: 22px;
    font-weight: 700;
    color: var(--tst-cabinet-text);
}

.tst-cabinet-child-card__name a {
    color: inherit;
    text-decoration: none;
}

.tst-cabinet-child-card__name a:hover {
    text-decoration: underline;
    color: var(--tst-cabinet-primary);
}

.tst-cabinet-child-card__meta {
    margin: 0 0 16px;
    padding: 0;
    list-style: none;
    text-align: left;
    font-size: 15px;
    color: var(--tst-cabinet-text);
    display: grid;
    gap: 8px;
}

.tst-cabinet-child-card__meta li {
    display: flex;
    gap: 6px;
    align-items: baseline;
}

.tst-cabinet-child-card__meta-label {
    color: var(--tst-cabinet-muted);
    font-weight: 500;
    flex-shrink: 0;
}

.tst-cabinet-child-card__story {
    margin: 0 0 16px;
    padding: 12px;
    background: #f7f9fc;
    border-radius: 8px;
    font-size: 14px;
    line-height: 1.5;
    color: var(--tst-cabinet-text);
    text-align: left;
}

.tst-cabinet-child-card__actions {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 8px;
}

.tst-cabinet-child-card__read-more {
    color: var(--tst-cabinet-primary);
    font-weight: 500;
    text-decoration: none;
    font-size: 15px;
}

.tst-cabinet-child-card__read-more:hover {
    text-decoration: underline;
}

.tst-cabinet-child-card.is-not-published .tst-cabinet-child-card__name {
    color: var(--tst-cabinet-muted);
}

.tst-cabinet-child-card.is-not-published .tst-cabinet-child-card__photo-wrap {
    filter: grayscale(50%);
    opacity: 0.85;
}

/* AJAX loading */
.js-cabinet-child-card {
    transition: opacity 0.2s ease;
}

.js-cabinet-child-card.is-loading {
    opacity: 0.5;
    pointer-events: none;
}

/* ---------------------------------------------------------------------------
 * ВКЛАДКА 3: Ваша история
 * ------------------------------------------------------------------------- */
.tst-cabinet-history__list {
    margin: 0;
    padding: 0;
    list-style: none;
    position: relative;
}

.tst-cabinet-history__list::before {
    content: "";
    position: absolute;
    left: 12px;
    top: 0;
    bottom: 0;
    width: 2px;
    background: var(--tst-cabinet-border);
}

.tst-cabinet-history__item {
    position: relative;
    padding: 12px 16px 12px 40px;
    margin-bottom: 8px;
    background: var(--tst-cabinet-card-bg);
    border: 1px solid var(--tst-cabinet-border);
    border-radius: var(--tst-cabinet-radius);
}

.tst-cabinet-history__item::before {
    content: "";
    position: absolute;
    left: 6px;
    top: 16px;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: var(--tst-cabinet-muted);
    border: 2px solid var(--tst-cabinet-card-bg);
    box-shadow: 0 0 0 1px var(--tst-cabinet-border);
}

.tst-cabinet-history__item--auth::before { background: #1e6fd9; }
.tst-cabinet-history__item--select::before { background: #1e8449; }
.tst-cabinet-history__item--refusal::before { background: #c0392b; }
.tst-cabinet-history__item--edit::before { background: #b9770e; }
.tst-cabinet-history__item--logo::before { background: #8e44ad; }
.tst-cabinet-history__item--create::before { background: #1e8449; }
.tst-cabinet-history__item--gift::before { background: #27ae60; }

.tst-cabinet-history__stamp {
    font-size: 12px;
    color: var(--tst-cabinet-muted);
    margin-bottom: 4px;
    font-weight: 500;
}

.tst-cabinet-history__text {
    font-size: 15px;
    color: var(--tst-cabinet-text);
    line-height: 1.4;
}

.tst-cabinet-history__end {
    margin-top: 20px;
    text-align: right;
    font-size: 36px;
    line-height: 1;
    color: #000;
    padding-right: 16px;
}

/* ---------------------------------------------------------------------------
 * Оргкомитет
 * ------------------------------------------------------------------------- */
.tst-cabinet__committee-card {
    position: relative;
}

.tst-cabinet__committee-card .tst-cabinet__badge--hidden {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 2;
}

.tst-cabinet__committee-card.is-hidden .cards__background {
    filter: grayscale(100%);
    opacity: 0.5;
}

/* ---------------------------------------------------------------------------
 * Адаптив
 * ------------------------------------------------------------------------- */
@media (max-width: 900px) {
    .tst-cabinet-snowman__grid,
    .tst-cabinet-children__grid {
        flex-direction: column;
    }
    .tst-cabinet-snowman__card-col,
    .tst-cabinet-children__card-col {
        flex: 1 1 auto;
        width: 100%;
        position: static;
        display: flex;
        flex-direction: column;
        align-items: center;
        padding-top: 0;
    }
    .tst-cabinet-snowman__card-header {
        align-items: center;
    }
    .tst-cabinet-snowman__card-title-preview {
        text-align: center;
    }
    .tst-cabinet-snowman__fields-col,
    .tst-cabinet-children__table-col {
        width: 100%;
    }
    .tst-cabinet-children__table-col {
        max-height: 400px;
    }
    .tst-cabinet-children__stats-inner {
        flex-direction: column;
        align-items: stretch;
    }
    .tst-cabinet-children__stats-actions {
        justify-content: flex-start;
    }
    .tst-cabinet-children__stats-empty,
    .tst-cabinet-children__stats-filled {
        flex-direction: column;
        align-items: flex-start;
    }
    .tst-cabinet-child-card__photo-wrap {
        width: 160px;
        height: 160px;
    }
    .tst-cabinet-gift {
        width: 100%;
    }
}

@media (max-width: 640px) {
    .tst-cabinet__topbar {
        flex-direction: column;
        align-items: flex-start;
    }
    .tst-cabinet__section-head {
        flex-direction: column;
        align-items: flex-start;
    }
    .tst-cabinet-snowman__fields-col,
    .tst-cabinet-children__table-col {
        padding: 16px;
    }
    .tst-cabinet-children__table {
        font-size: 13px;
    }
    .tst-cabinet-children__table thead th,
    .tst-cabinet-children__table tbody td {
        padding: 8px 4px;
    }
    .tst-cabinet-child-card {
        padding: 16px;
    }
    .tst-cabinet-child-card__photo-wrap {
        width: 120px;
        height: 120px;
    }
    .tst-cabinet-child-card__name {
        font-size: 18px;
    }
    .tst-cabinet__modal-content--gift {
        padding: 16px;
    }
    .tst-cabinet__crop-viewport--gift {
        margin-bottom: 12px;
    }
}

/* ---------------------------------------------------------------------------
 * Логин
 * ------------------------------------------------------------------------- */
.tst-cabinet-login {
    max-width: 420px;
    margin: 48px auto;
    padding: 24px;
    background: var(--tst-cabinet-card-bg);
    border: 1px solid var(--tst-cabinet-border);
    border-radius: var(--tst-cabinet-radius);
    box-shadow: 0 1px 2px rgba(31, 39, 51, 0.06);
    box-sizing: border-box;
}

.tst-cabinet-login__form { display: grid; gap: 16px; }
.tst-cabinet-login__step { display: grid; gap: 16px; }
.tst-cabinet-login__field { display: grid; gap: 6px; min-width: 0; }
.tst-cabinet-login__field label { font-weight: 600; font-size: 14px; }
.tst-cabinet-login__field input {
    width: 100%; max-width: 100%; box-sizing: border-box;
    padding: 10px 12px;
    border: 1px solid var(--tst-cabinet-border);
    border-radius: 8px; font-size: 16px;
}
.tst-cabinet-login__field input:focus {
    outline: none; border-color: var(--tst-cabinet-primary);
    box-shadow: 0 0 0 3px rgba(30, 111, 217, 0.15);
}
.tst-cabinet-login__hint { margin: 0; color: var(--tst-cabinet-hint); font-size: 12px; }
.tst-cabinet-login__notice { padding: 10px 14px; border-radius: 8px; font-size: 14px; }
.tst-cabinet-login__notice.is-error { background: #fbeceb; color: var(--tst-cabinet-danger); }
.tst-cabinet-login__notice.is-success { background: #eaf7ef; color: var(--tst-cabinet-success); }
.tst-cabinet-login__notice.is-info { background: #eef4fc; color: #1f4f8f; }
.tst-cabinet-login__notice.is-warning { background: #fdf5e6; color: var(--tst-cabinet-warning); }
.tst-cabinet-login__actions { display: flex; justify-content: flex-end; gap: 8px; }

/*
 * ----------------------------------------------------------------------------
 * Файл:    cabinet.css
 * Версия:  v1.3.0
 * Путь:    wp-content/themes/tstnext/inc/cabinet/assets/cabinet.css
 * Дата:    2026-10-20
 * Время:   03:10:00 (GMT+5)
 * ----------------------------------------------------------------------------
 * Commit:  cabinet.css: подарок — статусы, кнопка, модалка 4:3, overlay
 * ----------------------------------------------------------------------------
 */