/* Стили Такси Портала. Чистый CSS (вложенность — нативная), без сборки.
   Порядок: токены → база → компоненты → каркас → шапка/подвал → лендинг → превью. */

/* ── Токены ──────────────────────────────────────────────────────────── */
:root {
    /* Акцент — золотая гамма */
    --tp-accent: #e1a002;
    --tp-accent-strong: #b88002;
    --tp-accent-tint: #fbf2d6;
    --tp-accent-ink: #5a3e00;

    /* Нейтральные */
    --tp-ink: #0b0f14;
    --tp-ink-2: #1f2937;
    --tp-text: #334155;
    --tp-text-2: #64748b;
    --tp-text-3: #94a3b8;
    --tp-line: #e6eaf0;
    --tp-line-2: #eef1f5;
    --tp-bg: #ffffff;
    --tp-bg-soft: #f7f8fa;
    --tp-bg-tint: #fbfcfd;

    /* Семантика */
    --tp-success: #10b981;
    --tp-warn: #f59e0b;
    --tp-danger: #ef4444;
    --tp-info: #3b82f6;

    /* Плотность */
    --tp-d: 1;
    --tp-gap: calc(16px * var(--tp-d));
    --tp-pad-card: calc(24px * var(--tp-d));

    /* Высота кнопок и полей — общая для всех контролов */
    --tp-control-h: 40px;
    --tp-control-h-sm: 32px;
    --tp-control-h-lg: 48px;

    /* Радиусы */
    --tp-r-sm: 6px;
    --tp-r: 12px;
    --tp-r-lg: 20px;
    --tp-r-pill: 999px;

    /* Шрифты */
    --tp-font: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
    --tp-font-display: var(--tp-font);
    --tp-font-serif: ui-serif, "Iowan Old Style", Garamond, "Times New Roman", serif;

    /* Шкала размеров */
    --tp-fs-base: 15px;
    --tp-fs-md: 17px;
    --tp-fs-xl: 28px;
    --tp-fs-2xl: 40px;
    --tp-fs-3xl: 56px;

    /* Тени */
    --tp-shadow: 0 1px 2px rgba(15, 23, 42, 0.04), 0 8px 24px -8px rgba(15, 23, 42, 0.08);
    --tp-shadow-lg: 0 12px 40px -8px rgba(15, 23, 42, 0.18), 0 4px 12px -2px rgba(15, 23, 42, 0.06);
}

/* Плавные переходы между страницами (MPA) — где браузер поддерживает */
@view-transition {
    navigation: auto;
}

/* ── База ────────────────────────────────────────────────────────────── */
*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 96px; /* якоря не прячутся под липкой шапкой */
}

html,
body {
    margin: 0;
    min-height: 100%;
    background: var(--tp-bg);
    color: var(--tp-ink);
    font-family: var(--tp-font);
    font-size: var(--tp-fs-base);
    line-height: 1.5;
    letter-spacing: -0.005em;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

a {
    color: inherit;
    text-decoration: none;
}

button {
    font: inherit;
    color: inherit;
    background: none;
    border: 0;
    padding: 0;
    cursor: pointer;
}

h1, h2, h3, h4, p {
    margin: 0;
}

ul, ol {
    margin: 0;
    padding: 0;
    list-style: none;
}

/* ── Кнопки ──────────────────────────────────────────────────────────── */
.tp-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    height: var(--tp-control-h);
    padding-inline: 16px;
    border: 1px solid transparent;
    border-radius: var(--tp-r-sm);
    font-size: 14px;
    font-weight: 500;
    letter-spacing: -0.005em;
    white-space: nowrap;
    transition: background 0.15s, color 0.15s, border-color 0.15s, transform 0.1s, box-shadow 0.15s;

    &:active {
        transform: translateY(1px);
    }
}

.tp-btn-primary {
    background: var(--tp-ink);
    color: #fff;

    &:hover {
        background: #000;
    }
}

.tp-btn-accent {
    background: var(--tp-accent);
    color: #fff;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.08), inset 0 1px 0 rgba(255, 255, 255, 0.18);

    &:hover {
        background: var(--tp-accent-strong);
    }
}

/* Кнопки с рамкой и одинаковым акцентным ховером */
.tp-btn-outline,
.tp-btn-add,
.tp-icon-btn {
    border-color: var(--tp-line);
    background: #fff;
    color: var(--tp-ink);

    &:hover {
        border-color: var(--tp-accent);
        background: var(--tp-accent-tint);
        color: var(--tp-accent-ink);
    }
}

/* Кнопка добавления — та же рамка, но приглушённая до наведения */
.tp-btn-add {
    background: transparent;
    color: var(--tp-text-2);
}

.tp-btn-ghost {
    color: var(--tp-text);

    &:hover {
        background: var(--tp-accent-tint);
        color: var(--tp-accent-ink);
    }
}

.tp-btn-danger-solid {
    background: var(--tp-danger);
    color: #fff;

    &:hover {
        background: #dc2626;
    }
}

.tp-btn-lg {
    height: var(--tp-control-h-lg);
    padding-inline: 22px;
    font-size: 15px;
}

.tp-btn-sm {
    height: var(--tp-control-h-sm);
    padding-inline: 12px;
    font-size: 13px;
}

.tp-btn-block {
    width: 100%;
    margin-top: 6px;
}

.tp-btn:disabled {
    opacity: 0.55;
    cursor: not-allowed;
}

/* Кнопка-иконка: тот же размер и ховер, что у обычной кнопки */
.tp-icon-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: var(--tp-control-h);
    height: var(--tp-control-h);
    border: 1px solid var(--tp-line);
    border-radius: var(--tp-r-sm);
    color: var(--tp-text-2);
    transition: background 0.15s, color 0.15s, border-color 0.15s;
}

/* ── Типографика ─────────────────────────────────────────────────────── */
.tp-h1 {
    font-family: var(--tp-font-display);
    font-size: var(--tp-fs-3xl);
    line-height: 1.04;
    letter-spacing: -0.035em;
    font-weight: 600;
    color: var(--tp-ink);
}

.tp-h2 {
    font-family: var(--tp-font-display);
    font-size: var(--tp-fs-2xl);
    line-height: 1.1;
    letter-spacing: -0.03em;
    font-weight: 600;
    color: var(--tp-ink);
}

.tp-lead {
    color: var(--tp-text);
    font-size: var(--tp-fs-md);
    line-height: 1.5;
}

.tp-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    font-weight: 500;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--tp-accent-strong);

    &::before {
        content: "";
        width: 18px;
        height: 1px;
        background: var(--tp-accent);
    }
}

/* ── Бейдж ───────────────────────────────────────────────────────────── */
.tp-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    border-radius: var(--tp-r-pill);
    font-size: 12px;
    font-weight: 500;
    color: var(--tp-text);
    background: var(--tp-bg-soft);
    border: 1px solid var(--tp-line);
}

.tp-badge-accent {
    background: var(--tp-accent-tint);
    color: var(--tp-accent-ink);
    border-color: transparent;
}

.tp-badge-dot {
    width: 6px;
    height: 6px;
    border-radius: 999px;
    background: var(--tp-accent);
}

/* ── Логотип (размер через --logo-h) ─────────────────────────────────── */
.tp-logo {
    --logo-h: 44px;
    display: inline-flex;
    align-items: center;
    gap: calc(var(--logo-h) * 0.2);
    line-height: 1;
    user-select: none;

    &.tp-logo--sm { --logo-h: 36px; }
    &.tp-logo--lg { --logo-h: 56px; }
}

.tp-logo-mark {
    height: var(--logo-h);
    width: auto;
    display: block;
}

.tp-logo-word {
    display: inline-flex;
    flex-direction: column;
    gap: calc(var(--logo-h) * 0.13);
}

.tp-logo-name {
    font-weight: 700;
    font-size: calc(var(--logo-h) * 0.38);
    letter-spacing: -0.02em;
    color: var(--tp-ink);
    white-space: nowrap;

    b {
        color: var(--tp-accent);
        margin-left: 0.28em;
        font-weight: inherit;
    }
}

.tp-logo-sub {
    display: flex;
    align-items: center;
    gap: 0.5em;
    font-size: max(7px, calc(var(--logo-h) * 0.14));
    color: var(--tp-ink);
    font-weight: 500;
    text-transform: uppercase;
    white-space: nowrap;

    &::before,
    &::after {
        content: "";
        flex: 1;
        height: 1px;
        background: currentColor;
        opacity: 0.8;
    }
}

/* ── Каркас ──────────────────────────────────────────────────────────── */
.tp-shell {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.tp-shell-main {
    flex: 1;
    min-width: 0;
}

.tp-page {
    width: 100%;
    background: var(--tp-bg);
    /* Декоративные свечения выходят за край — не дают странице горизонтальный скролл */
    overflow-x: clip;
}

/* ── Шапка ───────────────────────────────────────────────────────────── */
.tp-header {
    position: sticky;
    top: 0;
    z-index: 30;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--tp-gap);
    padding: 18px clamp(20px, 4vw, 56px);
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: saturate(180%) blur(14px);
    -webkit-backdrop-filter: saturate(180%) blur(14px);
    border-bottom: 1px solid var(--tp-line-2);
}

.tp-header-logo {
    display: inline-flex;
}

.tp-header-nav {
    display: flex;
    align-items: center;
    gap: 28px;

    a {
        font-size: 14px;
        color: var(--tp-text);
        transition: color 0.15s;

        &:hover {
            color: var(--tp-ink);
        }
    }

    .tp-header-park {
        display: inline-flex;
        align-items: center;
        gap: 4px;
        color: var(--tp-text-3);

        &:hover {
            color: var(--tp-text);
        }
    }
}

.tp-header-park-arrow {
    opacity: 0.6;
}

.tp-header-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.tp-header-burger {
    display: none;
    width: 38px;
    height: 38px;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--tp-line);
    border-radius: var(--tp-r-sm);
    background: #fff;
    color: var(--tp-ink);
}

/* Иконка бургера меняется на крестик, пока открыт popover */
.tp-header-burger-close {
    display: none;
}

.tp-header:has(.tp-header-mobile:popover-open) {
    .tp-header-burger-open { display: none; }
    .tp-header-burger-close { display: block; }
}

/* Мобильное меню — нативный popover под шапкой, с анимацией появления */
.tp-header-mobile {
    position: fixed;
    inset: 81px 0 auto 0;
    width: auto;
    margin: 0;
    border: 0;
    border-bottom: 1px solid var(--tp-line);
    padding: 12px 16px 18px;
    background: #fff;
    box-shadow: var(--tp-shadow);
    flex-direction: column;
    gap: 8px;
    opacity: 0;
    translate: 0 -8px;
    transition: opacity 0.18s, translate 0.18s, display 0.18s allow-discrete, overlay 0.18s allow-discrete;

    &:popover-open {
        display: flex;
        opacity: 1;
        translate: 0 0;

        @starting-style {
            opacity: 0;
            translate: 0 -8px;
        }
    }
}

.tp-header-mobile-link {
    padding: 12px 4px;
    color: var(--tp-text);
    font-size: 15px;
    border-top: 1px solid var(--tp-line-2);

    &:first-child {
        border-top: 0;
    }
}

@media (max-width: 760px) {
    .tp-header-nav,
    .tp-header-actions {
        display: none;
    }

    .tp-header-burger {
        display: inline-flex;
    }
}

/* ── Подвал ──────────────────────────────────────────────────────────── */
.tp-footer {
    padding: 56px clamp(16px, 4vw, 56px) 40px;
    border-top: 1px solid var(--tp-line-2);
    background: var(--tp-bg);
    color: var(--tp-text-2);
    font-size: 13px;

    h4 {
        font-size: 12px;
        text-transform: uppercase;
        letter-spacing: 0.08em;
        color: var(--tp-text-3);
        margin-bottom: 12px;
        font-weight: 500;
    }

    ul li {
        padding: 4px 0;

        a:hover {
            color: var(--tp-ink);
        }
    }
}

.tp-footer-grid {
    display: grid;
    grid-template-columns: 1.4fr 1fr 1fr 1fr;
    gap: 48px;
    padding-bottom: 32px;
}

.tp-footer-about {
    margin-top: 16px;
    max-width: 280px;
    line-height: 1.5;
}

.tp-footer-bottom {
    padding-top: 24px;
    border-top: 1px solid var(--tp-line-2);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.tp-footer-legal {
    display: flex;
    gap: 18px;
}

@media (max-width: 680px) {
    .tp-footer-grid {
        grid-template-columns: 1fr 1fr;
        gap: 28px;

        > :first-child {
            grid-column: 1 / -1;
        }
    }

    .tp-footer-bottom {
        flex-direction: column;
        gap: 10px;
        align-items: flex-start;
    }
}

/* ── Лендинг ─────────────────────────────────────────────────────────── */
.tp-section-head {
    max-width: 640px;
    margin-bottom: calc(48px * var(--tp-d));

    .tp-eyebrow {
        margin-bottom: 18px;
    }

    .tp-lead {
        margin-top: 16px;
        max-width: 580px;
    }
}

.tp-section-head--center {
    text-align: center;
    margin-inline: auto;

    .tp-lead {
        margin-inline: auto;
    }
}

.lp-muted {
    color: var(--tp-text-2);
}

.lp-caps {
    font-size: 11px;
    color: var(--tp-text-3);
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.lp-section {
    padding: calc(140px * var(--tp-d)) calc(56px * var(--tp-d)) 0;
    max-width: 1200px;
    margin: 0 auto;
}

.lp-section--tight {
    padding-top: calc(80px * var(--tp-d));
}

/* Hero */
.lp-hero {
    position: relative;
    padding: calc(96px * var(--tp-d)) calc(56px * var(--tp-d)) 0;
    text-align: center;
}

.lp-hero-badge {
    margin-bottom: 28px;
}

.lp-hero-title {
    margin: 0 auto;
    max-width: 920px;
    font-size: clamp(48px, 5.6vw, 72px);
}

.lp-hero-lead {
    margin: 24px auto 0;
    max-width: 560px;
    font-size: 18px;
}

.lp-hero-actions {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin-top: 36px;
}

.lp-hero-note {
    margin-top: 18px;
    font-size: 13px;
    color: var(--tp-text-3);
}

.lp-hero-stage {
    position: relative;
    max-width: 880px;
    height: 480px;
    margin: 80px auto 0;
}

.lp-glow {
    position: absolute;
    inset: -20px 0;
    background: radial-gradient(50% 60% at 50% 40%, var(--tp-accent-tint) 0%, transparent 70%);
    filter: blur(20px);
}

.lp-hero-phone {
    position: absolute;
    left: 50%;
    top: 0;
    z-index: 2;
    transform: translateX(-50%);
}

/* Плавающие карточки вокруг телефона */
.lp-float {
    position: absolute;
    z-index: 1;
    padding: 14px;
    background: #fff;
    border: 1px solid var(--tp-line);
    border-radius: var(--tp-r);
    box-shadow: var(--tp-shadow-lg);
    text-align: left;
    animation: lp-float 6s ease-in-out infinite;
}

.lp-float--left {
    left: calc(50% - 280px);
    top: 80px;
    max-width: 240px;
    display: flex;
    gap: 12px;
    align-items: center;
}

.lp-float--right {
    right: calc(50% - 280px);
    top: 200px;
    max-width: 230px;
    animation-delay: -3s;
}

@keyframes lp-float {
    50% { translate: 0 -6px; }
}

@media (prefers-reduced-motion: reduce) {
    .lp-float { animation: none; }
}

.lp-float-icon {
    width: 32px;
    height: 32px;
    flex-shrink: 0;
    display: grid;
    place-items: center;
    border-radius: var(--tp-r-sm);
    background: var(--tp-accent-tint);
    color: var(--tp-accent-strong);
}

.lp-float-title {
    font-weight: 600;
    font-size: 13px;
}

.lp-float-sub {
    font-size: 11px;
    color: var(--tp-text-2);
}

.lp-docs {
    margin-top: 8px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.lp-docs-row {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    font-size: 12px;

    span { color: var(--tp-text-2); }
    b { font-weight: 500; }
    .is-ok { color: var(--tp-accent-strong); }
    .is-warn { color: var(--tp-warn); }
}

/* Trusted by */
.lp-trusted {
    padding: calc(80px * var(--tp-d)) calc(56px * var(--tp-d)) 0;
    text-align: center;
}

.lp-trusted-caption {
    font-size: 13px;
    color: var(--tp-text-3);
    text-transform: uppercase;
    letter-spacing: 0.12em;
}

.lp-trusted-logos {
    margin-top: 28px;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 56px;
    color: var(--tp-text-2);
    font-size: 18px;
    font-weight: 500;
    letter-spacing: -0.01em;

    .is-italic { font-style: italic; }
    .is-wide { font-weight: 700; letter-spacing: 0.04em; }
    .is-serif { font-family: ui-serif, serif; }
    .is-bold { font-weight: 700; }
}

/* Как это работает */
.lp-steps {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    border-top: 1px solid var(--tp-line);
}

.lp-step {
    padding: 44px 32px 36px;

    & + & {
        border-left: 1px solid var(--tp-line);
    }

    h3 {
        display: flex;
        align-items: baseline;
        gap: 16px;
        font-size: 24px;
        font-weight: 600;
        letter-spacing: -0.02em;
    }

    p {
        margin-top: 14px;
        padding-left: calc(1.6em + 16px);
        color: var(--tp-text-2);
        line-height: 1.55;
    }
}

.lp-step-num {
    min-width: 1.6em;
    font-family: var(--tp-font-serif);
    font-style: italic;
    font-weight: 400;
    font-size: 28px;
    color: var(--tp-text-3);
}

/* Личный кабинет */
.lp-feature {
    display: grid;
    grid-template-columns: 1fr 1.1fr;
    gap: 80px;
    align-items: center;
}

.lp-feature-title {
    margin-top: 16px;
}

.lp-feature-lead {
    margin-top: 18px;
    max-width: 480px;
}

.lp-checklist {
    margin-top: 28px;

    li {
        display: flex;
        align-items: center;
        gap: 12px;
        padding: 12px 0;
        border-bottom: 1px solid var(--tp-line);
        font-size: 15px;
        color: var(--tp-text);

        &:first-child {
            border-top: 1px solid var(--tp-line);
        }
    }
}

.lp-check {
    width: 22px;
    height: 22px;
    flex-shrink: 0;
    display: grid;
    place-items: center;
    border-radius: 999px;
    background: var(--tp-accent-tint);
    color: var(--tp-accent-strong);
}

/* Отзывы */
.lp-voices {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
}

.lp-voice {
    display: flex;
    flex-direction: column;
    padding: 28px;
    background: #fff;
    border: 1px solid var(--tp-line);
    border-radius: var(--tp-r-lg);
    transition: box-shadow 0.2s, translate 0.2s;

    &:hover {
        box-shadow: var(--tp-shadow);
        translate: 0 -2px;
    }
}

.lp-voice-head {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 18px;
}

.lp-voice-metric {
    font-size: 28px;
    font-weight: 600;
    letter-spacing: -0.025em;
    color: var(--tp-accent-strong);
}

.lp-voice-label,
.lp-voice-meta {
    font-size: 12px;
    color: var(--tp-text-3);
}

.lp-voice-meta {
    font-size: 11px;
}

.lp-voice-quote {
    flex: 1;
    font-size: 15px;
    line-height: 1.55;
    color: var(--tp-ink);
}

.lp-voice-author {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 22px;
    padding-top: 18px;
    border-top: 1px solid var(--tp-line-2);
}

.lp-avatar {
    width: 32px;
    height: 32px;
    display: grid;
    place-items: center;
    border-radius: 999px;
    background: var(--tp-bg-soft);
    border: 1px solid var(--tp-line);
    font-size: 12px;
    font-weight: 600;
    color: var(--tp-text-2);
}

.lp-voice-name {
    font-size: 13px;
    font-weight: 500;
}

/* Плашка для таксопарков */
.lp-band {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 24px;
    padding: 32px 36px;
    background: var(--tp-bg-soft);
    border: 1px solid var(--tp-line-2);
    border-radius: var(--tp-r-lg);
}

.lp-band-info {
    display: flex;
    align-items: center;
    gap: 18px;
}

.lp-band-icon {
    width: 44px;
    height: 44px;
    flex-shrink: 0;
    display: grid;
    place-items: center;
    border-radius: var(--tp-r-sm);
    background: #fff;
    border: 1px solid var(--tp-line);
    color: var(--tp-text);
}

.lp-band-title {
    font-weight: 600;
    font-size: 16px;
    letter-spacing: -0.015em;
}

.lp-band-text {
    margin-top: 2px;
    font-size: 13px;
    color: var(--tp-text-2);
}

/* Тариф */
.lp-pricing {
    position: relative;
    overflow: hidden;
    display: grid;
    grid-template-columns: 1.4fr 1fr;
    gap: 64px;
    align-items: center;
    padding: 64px 56px;
    background: var(--tp-ink);
    color: #fff;
    border-radius: var(--tp-r-lg);
}

.lp-pricing-glow {
    position: absolute;
    right: -120px;
    top: -120px;
    width: 360px;
    height: 360px;
    background: radial-gradient(closest-side, var(--tp-accent) 0%, transparent 70%);
    opacity: 0.35;
}

.lp-pricing-info,
.lp-pricing-actions {
    position: relative;
}

.lp-pricing-eyebrow {
    color: var(--tp-accent);
}

.lp-pricing-title {
    margin-top: 16px;
    color: #fff;
}

.lp-pricing-text {
    margin-top: 14px;
    max-width: 460px;
    font-size: 16px;
    color: rgba(255, 255, 255, 0.7);
}

.lp-pricing-actions {
    display: flex;
    flex-direction: column;
    gap: 12px;

    .tp-btn {
        justify-content: center;
        padding: 14px 22px;
    }
}

.lp-btn-glass {
    background: rgba(255, 255, 255, 0.08);
    color: #fff;

    &:hover {
        background: rgba(255, 255, 255, 0.14);
    }
}

.lp-bottom-space {
    height: calc(120px * var(--tp-d));
}

/* Лендинг: планшет */
@media (max-width: 1000px) {
    .lp-feature {
        grid-template-columns: 1fr;
        gap: 48px;
    }

    .lp-voices {
        grid-template-columns: 1fr 1fr;

        .lp-voice:last-child { display: none; }
    }
}

/* Лендинг: мобильный — упрощённая версия страницы */
@media (max-width: 760px) {
    .tp-h2 {
        font-size: 30px;
    }

    .lp-hero {
        padding: 40px 20px 0;
    }

    .lp-hero-badge {
        margin-bottom: 18px;
    }

    .lp-hero-title {
        font-size: 38px;
        line-height: 1.05;
    }

    .lp-hero-lead {
        margin-top: 16px;
        font-size: 15px;
    }

    .lp-hero-actions {
        flex-direction: column;
        gap: 10px;
        margin-top: 24px;

        .tp-btn { justify-content: center; }
    }

    .lp-hero-note {
        font-size: 12px;
    }

    .lp-hero-stage {
        height: auto;
        margin-top: 48px;
        display: flex;
        justify-content: center;
    }

    .lp-glow {
        inset: -30px;
    }

    .lp-hero-phone {
        position: relative;
        left: auto;
        transform: none;
    }

    .lp-float,
    .lp-trusted,
    #features,
    .lp-section--tight {
        display: none;
    }

    .lp-section {
        padding: 72px 20px 0;
    }

    .tp-section-head {
        text-align: left;
        margin-bottom: 24px;

        .tp-lead { display: none; }
    }

    .lp-steps {
        grid-template-columns: 1fr;
    }

    .lp-step {
        padding: 22px 0;

        & + & {
            border-left: 0;
            border-top: 1px solid var(--tp-line);
        }

        &:last-child { border-bottom: 1px solid var(--tp-line); }

        h3 { font-size: 18px; gap: 12px; }
        p { margin-top: 6px; font-size: 13px; padding-left: calc(1.4em + 12px); }
    }

    .lp-step-num {
        font-size: 22px;
        min-width: 1.4em;
    }

    .lp-voices {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .lp-voice {
        padding: 20px;
    }

    .lp-pricing {
        grid-template-columns: 1fr;
        gap: 18px;
        padding: 28px;
    }

    .lp-pricing-title {
        font-size: 28px;
    }

    .lp-bottom-space {
        height: 72px;
    }
}

/* ── Превью продукта (декор) ─────────────────────────────────────────── */
.pv-status {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    color: var(--tp-accent-strong);
    font-weight: 500;

    i {
        width: 5px;
        height: 5px;
        border-radius: 999px;
        background: currentColor;
    }

    &.is-warn { color: var(--tp-warn); }
}

/* Телефон */
.pv-phone {
    width: 240px;
    padding: 8px;
    border-radius: 32px;
    background: var(--tp-ink);
    border: 1px solid #000;
    box-shadow: var(--tp-shadow-lg), 0 0 0 1px rgba(0, 0, 0, 0.5);
    text-align: left;
}

.pv-phone-screen {
    position: relative;
    overflow: hidden;
    padding-top: 28px;
    border-radius: 26px;
    background: #fff;
}

.pv-phone-notch {
    position: absolute;
    top: 6px;
    left: 50%;
    width: 80px;
    height: 18px;
    transform: translateX(-50%);
    border-radius: 999px;
    background: #000;
}

.pv-phone-status {
    display: flex;
    justify-content: space-between;
    padding: 6px 22px;
    font-size: 10px;
    font-weight: 600;
}

.pv-phone-body {
    padding: 16px 16px 24px;
}

.pv-phone-hello {
    font-size: 11px;
    color: var(--tp-text-2);
}

.pv-phone-name {
    font-size: 17px;
    font-weight: 600;
    letter-spacing: -0.02em;
}

.pv-phone-card {
    margin-top: 16px;
    padding: 14px;
    border-radius: 14px;
    background: var(--tp-accent-tint);
    border: 1px solid color-mix(in oklab, var(--tp-accent) 30%, transparent);
}

.pv-phone-card-caps {
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--tp-accent-ink);
}

.pv-phone-card-car {
    margin-top: 4px;
    font-size: 14px;
    font-weight: 600;
}

.pv-phone-card-sub {
    margin-top: 2px;
    font-size: 11px;
    color: var(--tp-text-2);
}

.pv-phone-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid var(--tp-line-2);
    font-size: 11px;
    color: var(--tp-text);
}

.pv-phone-btn {
    margin-top: 14px;
    padding: 11px 0;
    border-radius: 10px;
    background: var(--tp-ink);
    color: #fff;
    font-size: 12px;
    font-weight: 500;
    text-align: center;
}

/* Окно кабинета */
.pv-dash {
    overflow: hidden;
    font-size: 12px;
    background: #fff;
    border: 1px solid var(--tp-line);
    border-radius: var(--tp-r-lg);
    box-shadow: var(--tp-shadow-lg);
}

.pv-dash-bar {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 14px;
    border-bottom: 1px solid var(--tp-line-2);
    background: var(--tp-bg-tint);

    i {
        width: 9px;
        height: 9px;
        border-radius: 999px;
        background: #e2e8f0;
    }
}

.pv-dash-url {
    margin-left: 12px;
    padding: 3px 10px;
    font-size: 11px;
    color: var(--tp-text-3);
    background: #fff;
    border: 1px solid var(--tp-line-2);
    border-radius: 4px;
}

.pv-dash-body {
    display: grid;
    grid-template-columns: 180px 1fr;
    min-height: 280px;
}

.pv-dash-side {
    padding: 16px;
    background: var(--tp-bg-tint);
    border-right: 1px solid var(--tp-line-2);
}

.pv-dash-brand {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 18px;
    font-weight: 600;
    letter-spacing: -0.01em;

    img {
        display: block;
        height: 18px;
        width: auto;
    }
}

.pv-dash-nav {
    margin-bottom: 2px;
    padding: 7px 10px;
    border-radius: 6px;
    border: 1px solid transparent;
    color: var(--tp-text-2);

    &.is-active {
        color: var(--tp-ink);
        background: #fff;
        border-color: var(--tp-line-2);
        font-weight: 500;
    }
}

.pv-dash-main {
    padding: 20px;
}

.pv-dash-head {
    display: flex;
    justify-content: space-between;
    margin-bottom: 16px;
}

.pv-dash-title {
    font-size: 16px;
    font-weight: 600;
    letter-spacing: -0.02em;
}

.pv-dash-sub {
    font-size: 11px;
    color: var(--tp-text-2);
}

.pv-dash-add {
    display: inline-flex;
    align-items: center;
    height: 26px;
    padding: 6px 10px;
    border-radius: 6px;
    background: var(--tp-ink);
    color: #fff;
    font-size: 11px;
}

.pv-dash-row {
    display: grid;
    grid-template-columns: 60px 1fr auto auto;
    gap: 12px;
    align-items: center;
    padding: 10px 12px;
    border-top: 1px solid var(--tp-line-2);
    font-size: 11px;

    &:last-child {
        border-bottom: 1px solid var(--tp-line-2);
    }
}

.pv-plate {
    padding: 2px 6px;
    border: 1px solid var(--tp-line);
    border-radius: 4px;
    font-family: ui-monospace, monospace;
    font-size: 10px;
    font-weight: 600;
    white-space: nowrap;
}

.pv-dash-model {
    font-weight: 500;
}

.pv-dash-since {
    color: var(--tp-text-2);
}

/* ── Общие элементы интерфейса ───────────────────────────────────────── */
.tp-h3 {
    font-size: var(--tp-fs-xl);
    letter-spacing: -0.02em;
    line-height: 1.2;
    font-weight: 600;
}

.tp-card {
    background: #fff;
    border: 1px solid var(--tp-line);
    border-radius: var(--tp-r);
    padding: var(--tp-pad-card);
}

.tp-link-accent {
    color: var(--tp-accent-strong);
    font-weight: 500;

    &:hover {
        text-decoration: underline;
    }
}

.tp-btn:disabled {
    opacity: 0.55;
    cursor: not-allowed;
}

/* ── Поля форм ───────────────────────────────────────────────────────── */
.tp-field-group {
    margin-bottom: 14px;
}

.tp-label {
    display: block;
    margin-bottom: 6px;
    font-size: 12px;
    font-weight: 500;
    color: var(--tp-text-2);
}

.tp-field {
    display: block;
    width: 100%;
    height: var(--tp-control-h);
    padding: 0 14px;
    border: 1px solid var(--tp-line);
    border-radius: var(--tp-r-sm);
    background: #fff;
    font: inherit;
    font-size: 14px;
    color: var(--tp-ink);
    transition: border-color 0.15s, box-shadow 0.15s;

    &:hover:not(:disabled, :focus) {
        border-color: var(--tp-ink-2);
    }

    &::placeholder {
        color: var(--tp-text-3);
    }

    &:focus {
        outline: none;
        border-color: var(--tp-accent);
        box-shadow: 0 0 0 3px var(--tp-accent-tint);
    }

    &.is-error {
        border-color: var(--tp-danger);
        box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.12);
    }
}

.tp-field-hint,
.tp-field-error {
    margin-top: 5px;
    font-size: 12px;
    color: var(--tp-text-2);
}

.tp-field-error {
    color: var(--tp-danger);
}

.tp-form-error {
    margin-bottom: 14px;
    padding: 10px 12px;
    border-radius: var(--tp-r-sm);
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: #b91c1c;
    font-size: 13px;
}

/* ── Вход / регистрация ──────────────────────────────────────────────── */
.tp-shell-main {
    display: flex;
    flex-direction: column;
}

.tp-auth {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: clamp(32px, 6vw, 72px) 20px;
    background: var(--tp-bg-soft);
}

.tp-auth-card {
    width: 100%;
    max-width: 420px;
    box-shadow: var(--tp-shadow);
    animation: tp-rise 0.3s ease-out;
}

.tp-auth-title {
    margin-bottom: 20px;

    &.has-sub {
        margin-bottom: 6px;
    }
}

.tp-auth-sub {
    margin-bottom: 20px;
    font-size: 14px;
    color: var(--tp-text-2);
}

.tp-auth-note {
    margin-bottom: 16px;
    font-size: 14px;
    color: var(--tp-text);
}

.tp-auth-footer {
    margin-top: 20px;
    font-size: 14px;
    color: var(--tp-text-2);
}

/* «Забыли пароль?» под полем пароля и пояснение после формы */
.tp-auth-forgot {
    margin: -6px 0 16px;
    font-size: 13px;
    text-align: right;
}

.tp-auth-note--after {
    margin: 16px 0 0;
    font-size: 13px;
    color: var(--tp-text-2);
}

/* Кнопка формы, которая выглядит как ссылка в тексте */
.tp-link-button {
    padding: 0;
    border: 0;
    background: none;
    font: inherit;
    cursor: pointer;
}

/* Превью кабинета на узком экране: без боковой колонки, иначе не влезает в 320px */
@media (max-width: 560px) {
    .pv-dash-body { grid-template-columns: 1fr; }
    .pv-dash-side { display: none; }
}

/* Баланс: крупный остаток, суммы операций справа */
.tp-balance-card {
    margin-bottom: 24px;
}

.tp-balance-label {
    font-size: 13px;
    color: var(--tp-text-2);
}

.tp-balance-amount {
    margin: 4px 0;
    font-size: 30px;
    font-weight: 600;
    letter-spacing: -0.02em;
}

.tp-balance-note {
    font-size: 13px;
    color: var(--tp-text-2);
}

.tp-balance-section {
    margin-bottom: 24px;
}

.tp-balance-payouts {
    margin-top: 12px;
}

.tp-balance-entry {
    flex-shrink: 0;
    text-align: right;
}

.tp-balance-entry-amount {
    font-size: 15px;
    font-weight: 600;
    white-space: nowrap;

    &.is-income {
        color: #047857;
    }
}

@media (max-width: 640px) {
    .tp-balance-entry {
        text-align: left;
    }
}

/* Сводка финансов: плитки с цифрами */
.tp-stats {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 12px;
    margin-bottom: 24px;
}

.tp-stat-value {
    margin: 4px 0;
    font-size: 22px;
    font-weight: 600;
    letter-spacing: -0.02em;
}

/* Строки проводки в журнале платформы */
.tp-ledger-lines {
    margin-top: 6px;
    font-size: 13px;

    summary {
        cursor: pointer;
        color: var(--tp-text-2);
    }
}

.tp-ledger-line {
    display: grid;
    grid-template-columns: 1fr auto auto;
    gap: 12px;
    padding: 4px 0;
    border-bottom: 1px dashed var(--tp-line);
}

@media (max-width: 640px) {
    .tp-ledger-line {
        grid-template-columns: 1fr;
        gap: 0;
    }
}

/* Согласия при регистрации */
.tp-consent {
    margin: 4px 0 20px;
}

.tp-consent-row {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 6px 0;
    font-size: 13px;
    line-height: 1.45;
    color: var(--tp-text-2);
    cursor: pointer;

    input {
        flex-shrink: 0;
        width: 16px;
        height: 16px;
        margin-top: 2px;
        accent-color: var(--tp-accent-strong);
    }
}

/* Уведомление о cookies — внизу, не перекрывает контент надолго */
.tp-cookie {
    position: fixed;
    inset: auto 16px 16px 16px;
    z-index: 60;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    max-width: 720px;
    margin: 0 auto;
    padding: 14px 18px;
    border: 1px solid var(--tp-line);
    border-radius: var(--tp-r);
    background: var(--tp-bg);
    box-shadow: var(--tp-shadow);
    font-size: 13px;
    color: var(--tp-text-2);

    p { margin: 0; }
}

/* display: flex перебивает браузерное [hidden] — прячем явно */
.tp-cookie[hidden] {
    display: none;
}

@media (max-width: 560px) {
    .tp-cookie {
        flex-direction: column;
        align-items: stretch;
        text-align: center;
    }
}

/* Правовые документы */
.tp-legal {
    width: 100%;
    max-width: 760px;
    margin: 0 auto;
    padding: clamp(32px, 6vw, 64px) 20px;
    font-size: 15px;
    line-height: 1.6;
    color: var(--tp-text);

    h1 { margin-bottom: 6px; }

    h2 {
        margin: 32px 0 10px;
        font-size: var(--tp-fs-md);
        font-weight: 600;
    }

    p, li { margin: 0 0 10px; }

    ol, ul { padding-left: 22px; }

    a { color: var(--tp-accent-strong); }
}

.tp-legal-meta {
    margin-bottom: 24px;
    font-size: 13px;
    color: var(--tp-text-2);
}

.tp-legal-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 18px;
    margin-bottom: 28px;
    font-size: 13px;

    a.is-active {
        color: var(--tp-text);
        font-weight: 600;
        text-decoration: none;
    }
}

.tp-legal-requisites {
    margin-top: 36px;
    padding: 16px 18px;
    border: 1px solid var(--tp-line);
    border-radius: var(--tp-r);
    background: var(--tp-bg-soft);
    font-size: 13px;
    line-height: 1.55;

    p { margin: 0; }
}

@keyframes tp-rise {
    from { opacity: 0; translate: 0 8px; }
}

@media (prefers-reduced-motion: reduce) {
    .tp-auth-card { animation: none; }
}

/* Страницы ошибок: логотип сверху, карточка по центру */
.tp-error-page {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background: var(--tp-bg-soft);
}

.tp-error-logo {
    padding: 20px clamp(16px, 4vw, 40px) 0;
}

.tp-error-code {
    margin-bottom: 6px;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.08em;
    color: var(--tp-text-3);
}

/* Выбор кабинета для подключения */
.tp-auth--wide {
    align-items: stretch;
}

.tp-connect {
    width: 100%;
    max-width: 760px;
    margin: 0 auto;
}

.tp-connect-group {
    margin: 28px 0 12px;
    font-size: 12px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--tp-text-3);
}

.tp-choice-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: var(--tp-gap);
}

.tp-choice {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
    transition: border-color 0.15s, box-shadow 0.15s;

    &:hover {
        box-shadow: var(--tp-shadow);
    }

    &.is-active {
        border-color: var(--tp-accent);
        box-shadow: 0 0 0 3px var(--tp-accent-tint);
    }
}

.tp-choice-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    width: 100%;
}

.tp-choice-title {
    font-size: 20px;
    font-weight: 600;
}

.tp-choice-desc {
    flex: 1;
    font-size: 13.5px;
    line-height: 1.45;
    color: var(--tp-text-2);
}

/* ── Меню пользователя (наведение/фокус) ─────────────────────────────── */
.tp-usermenu {
    position: relative;
    cursor: pointer;
    outline: none;
}

/* Оформление кнопки-«добавить»: рамка и высота как у остальных кнопок */
.tp-usermenu-trigger {
    gap: 6px;
    padding-inline: 12px;
}

.tp-usermenu:hover .tp-usermenu-trigger,
.tp-usermenu:focus-within .tp-usermenu-trigger {
    border-color: var(--tp-accent);
    background: var(--tp-accent-tint);
    color: var(--tp-accent-ink);
}

.tp-usermenu-name {
    max-width: 220px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 13px;
    font-weight: 500;
}

.tp-usermenu-ctx {
    max-width: 260px;
    overflow: hidden;
    text-overflow: ellipsis;
    font-size: 12px;
    color: var(--tp-ink-2);
    opacity: 0.75;
    white-space: nowrap;
}

/* Длинное название организации не раздвигает меню и страницу (QA 29.11) */
.tp-cabinet-item-title,
.tp-header-mobile .tp-btn {
    overflow-wrap: anywhere;
    white-space: normal;
}

/* Кнопка с длинным названием растёт по высоте, а не наезжает на соседние */
.tp-header-mobile .tp-btn {
    height: auto;
    min-height: var(--tp-control-h);
    padding-block: 8px;
    text-align: left;
}

.tp-cab-page h1,
.tp-cab-page-head,
.tp-cab-sub {
    overflow-wrap: anywhere;
}

.tp-usermenu-caret {
    opacity: 0.6;
}

.tp-usermenu-pop {
    position: absolute;
    right: 0;
    top: 100%;
    z-index: 40;
    margin-top: 6px;
    min-width: 240px;
    padding: 6px;
    display: flex;
    flex-direction: column;
    gap: 2px;
    background: #fff;
    border: 1px solid var(--tp-line);
    border-radius: var(--tp-r-sm);
    box-shadow: var(--tp-shadow);
    /* Плавное раскрытие вместо резкого display */
    opacity: 0;
    visibility: hidden;
    translate: 0 -4px;
    transition: opacity 0.15s, translate 0.15s, visibility 0.15s;

    /* «Мостик» над меню, чтобы оно не схлопывалось при переходе курсора */
    &::before {
        content: "";
        position: absolute;
        left: 0;
        right: 0;
        top: -8px;
        height: 8px;
    }
}

.tp-usermenu:hover .tp-usermenu-pop,
.tp-usermenu:focus-within .tp-usermenu-pop {
    opacity: 1;
    visibility: visible;
    translate: 0 0;
}

.tp-menu-item {
    display: block;
    width: 100%;
    padding: 8px 10px;
    border-radius: var(--tp-r-sm);
    text-align: left;
    font-size: 14px;
    color: var(--tp-text);
    background: transparent;
    transition: background 0.15s, color 0.15s;

    &:hover {
        background: var(--tp-bg-soft);
        color: var(--tp-ink);
    }

    &.is-active {
        background: var(--tp-accent-tint);
        color: var(--tp-accent-ink);
        font-weight: 600;
    }
}

/* Баланс в меню пользователя — строка сведений, не пункт */
.tp-menu-balance {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 12px;
    padding: 8px 10px 10px;
    margin-bottom: 4px;
    border-bottom: 1px solid var(--tp-line);
    font-size: 14px;
    color: var(--tp-text-3);
    cursor: default;
    user-select: text;

    strong {
        color: var(--tp-ink);
        font-weight: 600;
        white-space: nowrap;
    }
}

/* Пункт кабинета: название + роли в организации */
.tp-cabinet-item {
    display: flex;
    flex-direction: column;
    gap: 1px;
}

.tp-cabinet-item-role {
    font-size: 12px;
    font-weight: 400;
    color: var(--tp-text-3);
}

.tp-cabinet-item-add {
    margin-top: 4px;
    padding-top: 10px;
    border-top: 1px solid var(--tp-line-2);
    border-radius: 0 0 var(--tp-r-sm) var(--tp-r-sm);
    color: var(--tp-accent-strong);
}

/* Мобильное меню авторизованного */
.tp-header-mobile-user {
    padding: 4px 4px 6px;
    font-weight: 600;
}

.tp-header-mobile {
    form { display: contents; }

    .tp-cabinet-item {
        align-items: center;
    }

    .tp-btn.is-active {
        border-color: var(--tp-accent);
        background: var(--tp-accent-tint);
        color: var(--tp-accent-ink);
        font-weight: 600;
    }

    .tp-cabinet-item-add {
        border-radius: var(--tp-r-sm);
        border-top: 1px solid var(--tp-line);
    }
}

/* ── Каркас кабинета ─────────────────────────────────────────────────── */
.tp-cab-shell {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background: var(--tp-bg-soft);
}

.tp-cab-body {
    flex: 1;
    display: grid;
    grid-template-columns: 264px 1fr;
    min-height: 0;
}

.tp-cab-sidebar {
    padding: 20px 16px;
    background: var(--tp-bg-tint);
    border-right: 1px solid var(--tp-line);
}

.tp-cab-sidebar-menu {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.tp-cab-sidebar-title {
    padding: 4px 10px 8px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--tp-text-3);
}

.tp-cab-navitem {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 11px;
    border: 1px solid transparent;
    border-radius: var(--tp-r-sm);
    font-size: 14px;
    color: var(--tp-text-2);
    transition: color 0.15s, background 0.15s, border-color 0.15s;

    &:hover {
        color: var(--tp-ink);
        background: var(--tp-bg-soft);
    }

    /* Активный пункт: только акцентная полоса слева, фон не заливаем */
    &.active {
        position: relative;
        color: var(--tp-ink);
        background: transparent;
        border-color: transparent;
        font-weight: 600;

        &::before {
            content: "";
            position: absolute;
            left: 0;
            top: 6px;
            bottom: 6px;
            width: 3px;
            border-radius: 0 3px 3px 0;
            background: var(--tp-accent);
        }
    }
}

.tp-cab-content {
    min-width: 0;
    padding: clamp(20px, 3vw, 32px) clamp(16px, 3vw, 40px);
    background: #fff;
}

.tp-cab-page-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 20px;
}

/* Подзаголовок идёт сразу за шапкой — свой отступ он задаёт сам */
.tp-cab-page-head + .tp-cab-sub {
    margin-top: -12px;
}

.tp-cab-narrow {
    max-width: 640px;
}

.tp-cab-sub {
    margin: 8px 0 24px;
    font-size: 14px;
    color: var(--tp-text-2);
}

@media (max-width: 680px) {
    .tp-cab-body {
        grid-template-columns: 1fr;
    }

    .tp-cab-sidebar {
        padding: 12px 16px;
        border-right: 0;
        border-bottom: 1px solid var(--tp-line);
    }

    .tp-cab-sidebar-menu {
        flex-direction: row;
        flex-wrap: wrap;
        align-items: center;
    }

    .tp-cab-sidebar-title {
        flex-basis: 100%;
        padding-bottom: 4px;
    }
}

/* ── Подсказка ───────────────────────────────────────────────────────── */
.tp-hint {
    display: flex;
    align-items: center;
    gap: var(--tp-gap);
    margin-bottom: 20px;
    padding: 16px 18px;
    border-radius: var(--tp-r);
}

.tp-hint-action {
    background: #fff;
    border: 1px solid var(--tp-line);
    border-left: 3px solid var(--tp-accent);
}

.tp-hint-info {
    background: #eff6ff;
    border: 1px solid #bfdbfe;
}

.tp-hint-danger {
    background: #fef2f2;
    border: 1px solid #fecaca;
}

.tp-hint-body {
    flex: 1;
    min-width: 0;
}

.tp-hint-title {
    margin-bottom: 2px;
    font-size: 15px;
    font-weight: 600;
    color: var(--tp-ink);
}

.tp-hint-text {
    font-size: 13.5px;
    line-height: 1.45;
    color: var(--tp-text);
}

.tp-hint-cta {
    flex-shrink: 0;
}

@media (max-width: 640px) {
    .tp-hint {
        flex-direction: column;
        align-items: flex-start;
    }
}

/* Форма и история проверок рядом, пока хватает ширины */
.tp-cab-columns {
    display: grid;
    grid-template-columns: minmax(0, 720px) minmax(260px, 360px);
    gap: 36px;
    align-items: start;
}

.tp-cab-columns .tp-section-title:first-child {
    margin-top: 0;
}

@media (max-width: 1180px) {
    .tp-cab-columns {
        grid-template-columns: minmax(0, 1fr);
        gap: 0;
    }
}

/* Полоса «данные закрыты от правок» над формой */
.tp-lockbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 14px;
    max-width: 720px;
    margin-bottom: 24px;
    padding: 14px 18px;
    border: 1px solid var(--tp-line);
    border-left: 3px solid var(--tp-text-3);
    border-radius: var(--tp-r);
    background: var(--tp-bg-soft);

    b {
        display: block;
        font-size: 14px;
        font-weight: 600;
        color: var(--tp-ink-2);
    }

    small {
        font-size: 13px;
        color: var(--tp-text-2);
    }
}

/* Группа полей: блокируется целиком, пока данные закрыты */
.tp-fieldset {
    border: 0;
    margin: 0;
    padding: 0;
    min-width: 0;
}

/* ── Модальное окно ──────────────────────────────────────────────────── */
.tp-modal {
    max-width: 480px;
    padding: 24px;
    border: 1px solid var(--tp-line);
    border-radius: var(--tp-r);
    box-shadow: var(--tp-shadow-lg);
    color: var(--tp-text);

    &::backdrop {
        background: rgba(15, 23, 42, 0.35);
    }
}

.tp-modal-title {
    margin-bottom: 8px;
    font-size: var(--tp-fs-md);
    font-weight: 600;
    color: var(--tp-ink);
}

.tp-modal-text {
    font-size: 13.5px;
    line-height: 1.5;
    color: var(--tp-text-2);
}

.tp-modal-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 20px;
}

/* Окно дня чуть шире обычного: в строке по две кнопки с длинными подписями */
.tp-modal[data-day-dialog] {
    max-width: 540px;
    width: calc(100% - 32px);
}

/* Окно дня: кнопки строками, в каждой строке — одинаковой ширины */
.tp-day-actions {
    display: grid;
    gap: 10px;
    margin-top: 20px;
}

.tp-day-actions-row {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: minmax(0, 1fr);
    gap: 10px;

    > * {
        width: 100%;
        min-width: 0;
    }

    /* Длинная подпись переносится внутри кнопки, а не вылезает за неё */
    .tp-btn {
        height: auto;
        min-height: 40px;
        padding-inline: 10px;
        white-space: normal;
        text-align: center;
        line-height: 1.25;
    }
}

/* Поля, не нужные при текущем выборе, убираем из потока */
[data-show-if][hidden],
[data-toggle-by][hidden] {
    display: none;
}

/* ── Расписание точки: неделя плитками ────────────────────────────────── */
.tp-week {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    /* Плитки одной высоты: строка тянется по самой высокой */
    grid-auto-rows: 1fr;
    gap: 8px;
    margin-top: 12px;
}

@media (max-width: 900px) {
    .tp-week {
        grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    }
}

.tp-week-tile {
    display: grid;
    align-content: start;
    gap: 3px;
    width: 100%;
    height: 100%;
    padding: 12px 10px;
    border: 1px solid var(--tp-line);
    border-radius: var(--tp-r);
    background: var(--tp-bg);
    font: inherit;
    text-align: left;
    cursor: pointer;

    b {
        font-size: 14px;
    }

    /* Часы — одной строкой, перерыв — второй: переносы ломали высоту плиток */
    span {
        font-size: 13px;
        color: var(--tp-text-2);
        white-space: nowrap;
    }

    small {
        min-height: 15px;
        font-size: 11px;
        color: var(--tp-text-3);
        white-space: nowrap;
    }

    &:hover {
        border-color: var(--tp-text-3);
    }

    /* Рабочий день — зелёный, выходной — красный: видно одним взглядом */
    &.is-on {
        border-color: #bfe3c6;
        background: #f2fbf4;
    }

    &.is-off {
        border-color: #f0c9c9;
        background: #fdf4f4;

        span {
            color: #b4453f;
        }
    }
}

/* Окно правки дня */
.tp-day-form {
    display: grid;
    gap: 6px;
    margin-top: 6px;
}

.tp-day-times {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    padding: 4px 0 8px;
}

.tp-schedule-label {
    font-size: 13px;
    color: var(--tp-text-2);
}

.tp-field-time {
    width: 118px;
    padding-block: 7px;
}

/* Время записи вводят руками: иконка часов остаётся, но окно выбора не нужно */
.tp-field-time.is-manual::-webkit-calendar-picker-indicator {
    pointer-events: none;
}

/* Специалист занят на другой точке — виден, но выбрать нельзя */
.tp-suggest-item.is-busy {
    color: var(--tp-text-3);
    cursor: not-allowed;

    small {
        display: block;
        font-size: 11px;
    }

    &:hover {
        background: transparent;
        color: var(--tp-text-3);
    }
}

/* Тумблер как у флажков в формах, но работает и на radio */
.tp-switch {
    position: relative;
    flex-shrink: 0;
    appearance: none;
    width: 38px;
    height: 22px;
    margin: 0;
    border-radius: 999px;
    background: var(--tp-line);
    cursor: pointer;
    transition: background 0.15s;

    &::after {
        content: "";
        position: absolute;
        top: 2px;
        left: 2px;
        width: 18px;
        height: 18px;
        border-radius: 999px;
        background: #fff;
        box-shadow: 0 1px 2px rgba(15, 23, 42, 0.25);
        transition: translate 0.15s;
    }

    &:checked {
        background: var(--tp-accent);
    }

    &:checked::after {
        translate: 16px 0;
    }

    &:focus-visible {
        outline: 2px solid var(--tp-accent);
        outline-offset: 2px;
    }
}

.tp-form-subtitle {
    margin: 18px 0 2px;
    font-size: 14px;
    font-weight: 600;
}

/* ── Выбор точки: список панелью поверх карты ─────────────────────────── */
.tp-geo {
    position: relative;
    height: calc(100vh - var(--tp-header-h, 64px) - 32px);
    min-height: 520px;
    margin: -16px -16px 0;
    overflow: hidden;
    border-radius: var(--tp-r);
    background: var(--tp-bg-soft);
}

.tp-geo-map {
    position: absolute;
    inset: 0;
}

.tp-geo-panel {
    position: absolute;
    z-index: 10;
    top: 0;
    bottom: 0;
    left: 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
    width: 380px;
    padding: 16px;
    overflow-y: auto;
    background: var(--tp-bg);
    box-shadow: var(--tp-shadow-lg);
}

.tp-geo-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.tp-geo-search {
    display: flex;
    gap: 8px;

    .tp-field {
        flex: 1;
        min-width: 0;
    }
}

.tp-geo-note {
    margin: 0;
    font-size: 13px;
    color: var(--tp-text-2);
}

.tp-geo-list {
    display: grid;
    gap: 8px;
}

.tp-geo-item {
    display: grid;
    gap: 4px;
    padding: 12px;
    border: 1px solid var(--tp-line);
    border-radius: var(--tp-r);
    cursor: pointer;

    &:hover {
        border-color: var(--tp-text-3);
    }

    &.is-active {
        border-color: var(--tp-accent);
        box-shadow: inset 0 0 0 1px var(--tp-accent);
    }

}

.tp-geo-item-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 8px;
    font-size: 14px;
}

.tp-geo-distance {
    flex-shrink: 0;
    font-size: 12px;
    color: var(--tp-text-3);
}

.tp-geo-item-meta {
    font-size: 12.5px;
    color: var(--tp-text-2);
}

/* Своя метка «вы здесь»: фиолетовая — синих значков на карте и так хватает */
.tp-map-me {
    display: flex;
    align-items: center;
    gap: 6px;
    transform: translate(-17px, -17px);

    i {
        flex-shrink: 0;
        width: 26px;
        height: 26px;
        border: 4px solid #fff;
        border-radius: 999px;
        background: #7c3aed;
        box-shadow: 0 0 0 4px rgba(124, 58, 237, 0.25), 0 2px 6px rgba(15, 23, 42, 0.3);
    }

    span {
        padding: 3px 8px;
        border-radius: 999px;
        background: #7c3aed;
        box-shadow: 0 2px 6px rgba(15, 23, 42, 0.25);
        font-size: 12px;
        font-weight: 600;
        white-space: nowrap;
        color: #fff;
    }
}

/* Кнопка «моё местоположение» — поверх карты, заметная */
.tp-geo-locate {
    position: absolute;
    z-index: 20;
    right: 16px;
    bottom: 24px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    border: 0;
    border-radius: 999px;
    background: var(--tp-accent);
    box-shadow: var(--tp-shadow-lg);
    font: inherit;
    font-size: 13px;
    font-weight: 600;
    color: var(--tp-accent-ink);
    cursor: pointer;

    &:hover {
        background: var(--tp-accent-strong);
        color: #fff;
    }
}

.tp-geo-item-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 8px;
}

.tp-geo-item-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 2px;
}

/* На узком экране всё встаёт в колонку: сначала список, под ним карта */
@media (max-width: 900px) {
    .tp-geo-locate {
        right: 12px;
        bottom: 12px;
    }

    .tp-geo {
        height: auto;
        min-height: 0;
        overflow: visible;
    }

    .tp-geo-map {
        position: relative;
        inset: auto;
        height: 260px;
    }

    .tp-geo-panel {
        position: relative;
        inset: auto;
        width: auto;
        box-shadow: none;
    }
}

/* ── Запись на осмотр: дни и свободное время ──────────────────────────── */
.tp-days {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 14px 0 18px;
}

.tp-day {
    display: grid;
    gap: 2px;
    min-width: 96px;
    padding: 10px 12px;
    border: 1px solid var(--tp-line);
    border-radius: var(--tp-r);
    background: var(--tp-bg);
    text-align: center;
    text-decoration: none;
    color: inherit;

    b {
        font-size: 13px;
        text-transform: capitalize;
    }

    span {
        font-size: 13px;
        color: var(--tp-text-2);
    }

    small {
        font-size: 12px;
        color: var(--tp-text-3);
    }

    &:hover {
        border-color: var(--tp-text-3);
    }

    &.is-active {
        border-color: var(--tp-accent, #111);
        box-shadow: inset 0 0 0 1px var(--tp-accent, #111);
    }

    &.is-empty {
        opacity: 0.55;
    }
}

.tp-slot-pick {
    max-width: 420px;
}

/* Предварительный путевой лист: карточка с полями и сам бланк в PDF */
.tp-preview {
    margin-bottom: var(--tp-gap);
    padding: 18px 20px;
    border: 1px solid var(--tp-line);
    border-radius: var(--tp-r);
    background: var(--tp-bg);
}

.tp-preview-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 14px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--tp-line);

    b {
        display: block;
        font-size: 15px;
    }

    small {
        font-size: 12.5px;
        color: var(--tp-text-2);
    }
}

.tp-doc {
    margin-bottom: var(--tp-gap);
    border: 1px solid var(--tp-line);
    border-radius: var(--tp-r);
    overflow: hidden;
    background: var(--tp-bg);
}

.tp-doc-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 16px;
    border-bottom: 1px solid var(--tp-line);
}

/* Бланк A5 — соотношение сторон 148×210 */
.tp-doc-frame {
    display: block;
    width: 100%;
    height: 620px;
    border: 0;
    background: var(--tp-bg-soft);
}

.tp-week {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    /* Плитки одной высоты: строка тянется по самой высокой */
    grid-auto-rows: 1fr;
    gap: 8px;
    margin-top: 12px;
}

@media (max-width: 900px) {
    .tp-week {
        grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    }
}

.tp-week-tile {
    display: grid;
    align-content: start;
    gap: 3px;
    width: 100%;
    height: 100%;
    padding: 12px 10px;
    border: 1px solid var(--tp-line);
    border-radius: var(--tp-r);
    background: var(--tp-bg);
    font: inherit;
    text-align: left;
    cursor: pointer;

    b {
        font-size: 14px;
    }

    /* Часы — одной строкой, перерыв — второй: переносы ломали высоту плиток */
    span {
        font-size: 13px;
        color: var(--tp-text-2);
        white-space: nowrap;
    }

    small {
        min-height: 15px;
        font-size: 11px;
        color: var(--tp-text-3);
        white-space: nowrap;
    }

    &:hover {
        border-color: var(--tp-text-3);
    }

    /* Рабочий день — зелёный, выходной — красный: видно одним взглядом */
    &.is-on {
        border-color: #bfe3c6;
        background: #f2fbf4;
    }

    &.is-off {
        border-color: #f0c9c9;
        background: #fdf4f4;

        span {
            color: #b4453f;
        }
    }
}

/* Окно правки дня */
.tp-day-form {
    display: grid;
    gap: 6px;
    margin-top: 6px;
}

.tp-day-times {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    padding: 4px 0 8px;
}

.tp-schedule-label {
    font-size: 13px;
    color: var(--tp-text-2);
}

.tp-field-time {
    width: 118px;
    padding-block: 7px;
}

/* Специалист занят на другой точке — виден, но выбрать нельзя */
.tp-suggest-item.is-busy {
    color: var(--tp-text-3);
    cursor: not-allowed;

    small {
        display: block;
        font-size: 11px;
    }

    &:hover {
        background: transparent;
        color: var(--tp-text-3);
    }
}

/* Тумблер как у флажков в формах, но работает и на radio */
.tp-switch {
    position: relative;
    flex-shrink: 0;
    appearance: none;
    width: 38px;
    height: 22px;
    margin: 0;
    border-radius: 999px;
    background: var(--tp-line);
    cursor: pointer;
    transition: background 0.15s;

    &::after {
        content: "";
        position: absolute;
        top: 2px;
        left: 2px;
        width: 18px;
        height: 18px;
        border-radius: 999px;
        background: #fff;
        box-shadow: 0 1px 2px rgba(15, 23, 42, 0.25);
        transition: translate 0.15s;
    }

    &:checked {
        background: var(--tp-accent);
    }

    &:checked::after {
        translate: 16px 0;
    }

    &:focus-visible {
        outline: 2px solid var(--tp-accent);
        outline-offset: 2px;
    }
}

.tp-form-subtitle {
    margin: 18px 0 2px;
    font-size: 14px;
    font-weight: 600;
}

/* ── Выбор точки: список панелью поверх карты ─────────────────────────── */
.tp-geo {
    position: relative;
    height: calc(100vh - var(--tp-header-h, 64px) - 32px);
    min-height: 520px;
    margin: -16px -16px 0;
    overflow: hidden;
    border-radius: var(--tp-r);
    background: var(--tp-bg-soft);
}

.tp-geo-map {
    position: absolute;
    inset: 0;
}

.tp-geo-panel {
    position: absolute;
    z-index: 10;
    top: 0;
    bottom: 0;
    left: 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
    width: 380px;
    padding: 16px;
    overflow-y: auto;
    background: var(--tp-bg);
    box-shadow: var(--tp-shadow-lg);
}

.tp-geo-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.tp-geo-search {
    display: flex;
    gap: 8px;

    .tp-field {
        flex: 1;
        min-width: 0;
    }
}

.tp-geo-note {
    margin: 0;
    font-size: 13px;
    color: var(--tp-text-2);
}

.tp-geo-list {
    display: grid;
    gap: 8px;
}

.tp-geo-item {
    display: grid;
    gap: 4px;
    padding: 12px;
    border: 1px solid var(--tp-line);
    border-radius: var(--tp-r);
    cursor: pointer;

    &:hover {
        border-color: var(--tp-text-3);
    }

    &.is-active {
        border-color: var(--tp-accent);
        box-shadow: inset 0 0 0 1px var(--tp-accent);
    }

}

.tp-geo-item-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 8px;
    font-size: 14px;
}

.tp-geo-distance {
    flex-shrink: 0;
    font-size: 12px;
    color: var(--tp-text-3);
}

.tp-geo-item-meta {
    font-size: 12.5px;
    color: var(--tp-text-2);
}

/* Своя метка «вы здесь»: фиолетовая — синих значков на карте и так хватает */
.tp-map-me {
    display: flex;
    align-items: center;
    gap: 6px;
    transform: translate(-17px, -17px);

    i {
        flex-shrink: 0;
        width: 26px;
        height: 26px;
        border: 4px solid #fff;
        border-radius: 999px;
        background: #7c3aed;
        box-shadow: 0 0 0 4px rgba(124, 58, 237, 0.25), 0 2px 6px rgba(15, 23, 42, 0.3);
    }

    span {
        padding: 3px 8px;
        border-radius: 999px;
        background: #7c3aed;
        box-shadow: 0 2px 6px rgba(15, 23, 42, 0.25);
        font-size: 12px;
        font-weight: 600;
        white-space: nowrap;
        color: #fff;
    }
}

/* Кнопка «моё местоположение» — поверх карты, заметная */
.tp-geo-locate {
    position: absolute;
    z-index: 20;
    right: 16px;
    bottom: 24px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    border: 0;
    border-radius: 999px;
    background: var(--tp-accent);
    box-shadow: var(--tp-shadow-lg);
    font: inherit;
    font-size: 13px;
    font-weight: 600;
    color: var(--tp-accent-ink);
    cursor: pointer;

    &:hover {
        background: var(--tp-accent-strong);
        color: #fff;
    }
}

.tp-geo-item-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 8px;
}

.tp-geo-item-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 2px;
}

/* На узком экране всё встаёт в колонку: сначала список, под ним карта */
@media (max-width: 900px) {
    .tp-geo-locate {
        right: 12px;
        bottom: 12px;
    }

    .tp-geo {
        height: auto;
        min-height: 0;
        overflow: visible;
    }

    .tp-geo-map {
        position: relative;
        inset: auto;
        height: 260px;
    }

    .tp-geo-panel {
        position: relative;
        inset: auto;
        width: auto;
        box-shadow: none;
    }
}

/* ── Запись на осмотр: дни и свободное время ──────────────────────────── */
.tp-days {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 14px 0 18px;
}

.tp-day {
    display: grid;
    gap: 2px;
    min-width: 96px;
    padding: 10px 12px;
    border: 1px solid var(--tp-line);
    border-radius: var(--tp-r);
    background: var(--tp-bg);
    text-align: center;
    text-decoration: none;
    color: inherit;

    b {
        font-size: 13px;
        text-transform: capitalize;
    }

    span {
        font-size: 13px;
        color: var(--tp-text-2);
    }

    small {
        font-size: 12px;
        color: var(--tp-text-3);
    }

    &:hover {
        border-color: var(--tp-text-3);
    }

    &.is-active {
        border-color: var(--tp-accent, #111);
        box-shadow: inset 0 0 0 1px var(--tp-accent, #111);
    }

    &.is-empty {
        opacity: 0.55;
    }
}

/* Скрытые до снятия блокировки кнопки формы.
   !important — иначе display у самого блока (например, tp-form-actions) перебивает утилиту */
.is-hidden {
    display: none !important;
}

/* Превью кабинета в герое вместо телефона — на страницах для организаций */
.lp-hero-stage--wide {
    max-width: 880px;
    margin-inline: auto;
}

.lp-hero-preview {
    position: relative;
    z-index: 1;
}

/* ── Статус модерации ────────────────────────────────────────────────── */
.tp-status {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 11px;
    border-radius: var(--tp-r-pill);
    font-size: 12px;
    font-weight: 500;
    white-space: nowrap;

    &::before {
        content: "";
        width: 6px;
        height: 6px;
        border-radius: 999px;
        background: currentColor;
    }
}

.tp-st-draft {
    color: var(--tp-text-2);
    background: var(--tp-bg-soft);
    border: 1px solid var(--tp-line);
}

.tp-st-pending {
    color: #b45309;
    background: #fffbeb;
    border: 1px solid #fde68a;
}

.tp-st-verified {
    color: #047857;
    background: #ecfdf5;
    border: 1px solid #a7f3d0;
}

.tp-st-rejected {
    color: #b91c1c;
    background: #fef2f2;
    border: 1px solid #fecaca;
}

/* ── Сообщения после действий ────────────────────────────────────────── */
.tp-flash {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 16px;
    padding: 12px 12px 12px 14px;
    border-radius: var(--tp-r-sm);
    font-size: 14px;
    transition: opacity 0.2s, translate 0.2s;

    /* Закрытие: уезжает вверх и исчезает */
    &.is-closing {
        opacity: 0;
        translate: 0 -6px;
    }
}

.tp-flash-body {
    flex: 1;
    min-width: 0;
}

.tp-flash-close {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    border-radius: var(--tp-r-sm);
    color: currentColor;
    opacity: 0.55;
    transition: opacity 0.15s, background 0.15s;

    &:hover {
        opacity: 1;
        background: rgb(0 0 0 / 0.06);
    }
}

.tp-flash-ok {
    background: #ecfdf5;
    border: 1px solid #a7f3d0;
    color: #065f46;
}

.tp-flash-error {
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: #b91c1c;
}

.tp-flash-warn {
    background: #fffbeb;
    border: 1px solid #fde68a;
    color: #92400e;
}

/* Поле со ссылкой-приглашением + кнопка копирования */
.tp-copy {
    display: flex;
    gap: 8px;
    margin-top: 10px;

    .tp-field {
        font-size: 13px;
        font-family: ui-monospace, monospace;
    }

    /* Кнопки — по содержимому, поля занимают всё свободное место */
    .tp-filters-actions {
        display: flex;
        gap: 8px;
        flex-shrink: 0;
    }
}

/* ── Карточка с заголовком ───────────────────────────────────────────── */
.tp-card-title {
    margin-bottom: 6px;
    font-size: var(--tp-fs-md);
    font-weight: 600;
}

.tp-card-text {
    margin-bottom: 14px;
    font-size: 13.5px;
    line-height: 1.45;
    color: var(--tp-text-2);
}

.tp-section-title {
    margin: 28px 0 12px;
    font-size: 12px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--tp-text-3);
}

/* ── Шаги водителя до путевого листа ─────────────────────────────────── */
.tp-steps-lead {
    margin: -6px 0 18px;
    font-size: 13.5px;
    color: var(--tp-text-2);
}

/* Три равные колонки, разделённые только вертикальной линией */
.tp-steps {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
}

.tp-step {
    display: flex;
    flex-direction: column;
    padding: 4px 24px 4px 0;

    /* Рамок нет — колонки делит правая граница первых двух шагов */
    &:not(:last-child) {
        border-right: 1px solid var(--tp-line);
    }

    & + & {
        padding-left: 24px;
    }
}

.tp-step-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 6px;
}

.tp-step-num {
    font-family: var(--tp-font-serif);
    font-style: italic;
    font-size: 26px;
    line-height: 1.1;
    color: var(--tp-text-3);
}

.tp-step-title {
    margin-bottom: 8px;
    font-size: var(--tp-fs-md);
    font-weight: 600;
    letter-spacing: -0.01em;
    color: var(--tp-ink-2);
}

.tp-step-body {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.tp-step-text {
    font-size: 13.5px;
    line-height: 1.5;
    color: var(--tp-text-2);
}

.tp-step-note {
    margin-top: 8px;
    font-size: 13px;
    line-height: 1.5;
    color: var(--tp-text-3);
}

/* Кнопки — под сообщением; у всех колонок на одной линии */
.tp-step-cta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: auto;
    padding-top: 18px;
}

/* Заблокированный шаг виден, но приглушён */
.tp-step.is-locked {
    .tp-step-title {
        color: var(--tp-text-2);
    }

    .tp-step-num {
        color: color-mix(in oklab, var(--tp-text-3) 60%, #fff);
    }
}

.tp-step.is-done .tp-step-num {
    color: var(--tp-success);
}

.tp-step.is-review .tp-step-num {
    color: var(--tp-accent-strong);
}

@media (max-width: 900px) {
    .tp-steps {
        grid-template-columns: 1fr;
        gap: 18px;
    }

    .tp-step {
        padding: 0 0 18px;

        &:not(:last-child) {
            border-right: 0;
            border-bottom: 1px solid var(--tp-line);
        }

        & + & {
            padding-left: 0;
        }
    }
}

/* Тег-ссылка: ведёт в форму документа */
a.tp-status-link {
    gap: 6px;
    cursor: pointer;
    transition: filter 0.15s;

    &:hover {
        filter: brightness(0.96);
    }

    svg {
        opacity: 0.7;
    }
}

/* ── Списки (команда, приглашения) ───────────────────────────────────── */
.tp-list {
    border: 1px solid var(--tp-line);
    border-radius: var(--tp-r);
    background: #fff;
    overflow: visible;
}

.tp-list-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--tp-gap);
    padding: 14px 18px;
    border-top: 1px solid var(--tp-line-2);

    &:first-child {
        border-top: 0;
    }

    &.is-muted .tp-list-title {
        color: var(--tp-text-2);
    }
}

.tp-list-main {
    min-width: 0;
}

.tp-list-title {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    font-size: 15px;
    font-weight: 500;
}

.tp-list-meta {
    margin-top: 3px;
    font-size: 13px;
    color: var(--tp-text-2);
}

/* Роли участника тегами под именем */
.tp-list-roles {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 6px;
}

.tp-list-roles .tp-list-meta {
    margin-top: 0;
}

/* Строка с бейджем под заголовком строки списка */
.tp-list-badges {
    margin-top: 6px;
}

.tp-list-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.tp-btn-sm {
    padding: 4px 10px;
    font-size: 12px;
}

@media (max-width: 640px) {
    .tp-list-row {
        flex-direction: column;
        align-items: stretch;
    }

    .tp-list-actions {
        justify-content: flex-start;
    }
}

/* Раскрывающаяся форма ролей у строки списка */
.tp-inline-form {
    position: relative;

    summary {
        list-style: none;
        cursor: pointer;

        &::-webkit-details-marker { display: none; }
    }

    &[open] summary {
        border-color: var(--tp-ink-2);
    }
}

.tp-popform {
    position: absolute;
    right: 0;
    top: calc(100% + 6px);
    z-index: 20;
    width: 280px;
    box-shadow: var(--tp-shadow);
    padding: 16px;
}

@media (max-width: 640px) {
    .tp-popform {
        position: static;
        width: 100%;
        margin-top: 8px;
    }
}

/* Строка выбора: тумблер (для флажков) или радио, подпись и пояснение */
.tp-check-row {
    display: flex;
    /* Тумблер по центру строки — с подписью и пояснением вместе */
    align-items: center;
    gap: 12px;
    padding: 9px 0;
    cursor: pointer;

    &:last-of-type {
        margin-bottom: 8px;
    }

    b {
        display: block;
        font-size: 14px;
        font-weight: 500;
    }

    small {
        display: block;
        margin-top: 2px;
        font-size: 12px;
        color: var(--tp-text-2);
        line-height: 1.4;
    }

    /* Флажок выглядит как тумблер */
    input[type="checkbox"] {
        position: relative;
        flex-shrink: 0;
        appearance: none;
        width: 38px;
        height: 22px;
        margin: 0;
        border-radius: 999px;
        background: var(--tp-line);
        cursor: pointer;
        transition: background 0.15s;

        &::after {
            content: "";
            position: absolute;
            top: 2px;
            left: 2px;
            width: 18px;
            height: 18px;
            border-radius: 999px;
            background: #fff;
            box-shadow: 0 1px 2px rgba(15, 23, 42, 0.25);
            transition: translate 0.15s;
        }

        &:checked {
            background: var(--tp-accent);
        }

        &:checked::after {
            translate: 16px 0;
        }

        &:focus-visible {
            outline: 2px solid var(--tp-accent);
            outline-offset: 2px;
        }
    }

    input[type="radio"] {
        flex-shrink: 0;
        margin-top: 3px;
        width: 16px;
        height: 16px;
        accent-color: var(--tp-accent);
    }
}

.tp-invite {
    max-width: 480px;
}

.tp-card-gap {
    margin-bottom: var(--tp-gap);
}

/* Радио-кнопки в строках выбора — как чекбоксы */
.tp-check-row input[type="radio"] {
    border-radius: 999px;
}

/* ── Пары «поле — значение» (карточка заявки) ────────────────────────── */
.tp-props {
    display: grid;
    grid-template-columns: 180px 1fr;
    gap: 8px 16px;
    margin: 0;
    font-size: 14px;

    dt {
        color: var(--tp-text-2);
    }

    dd {
        margin: 0;
        color: var(--tp-ink);
    }
}

@media (max-width: 640px) {
    .tp-props {
        grid-template-columns: 1fr;
        gap: 2px;

        dd {
            margin-bottom: 10px;
        }
    }
}

/* Строка списка целиком — ссылка */
.tp-list-link {
    transition: background 0.15s;

    &:hover {
        background: var(--tp-bg-soft);
    }
}

/* Форма отказа раскрывается под кнопкой */
.tp-reject {
    margin-top: 10px;

    summary {
        list-style: none;
        cursor: pointer;
        display: inline-flex;

        &::-webkit-details-marker { display: none; }
    }

    form {
        margin-top: 14px;
        padding-top: 14px;
        border-top: 1px solid var(--tp-line-2);
    }
}

.tp-btn-danger-solid {
    background: var(--tp-danger);
    color: #fff;

    &:hover {
        background: #dc2626;
    }
}

/* Заблокированные на время проверки поля */
.tp-field:disabled {
    background: var(--tp-bg-soft);
    color: var(--tp-text);
}

/* ── Госномер ────────────────────────────────────────────────────────── */
.tp-plate {
    display: inline-block;
    padding: 2px 8px;
    border: 1px solid var(--tp-line);
    border-radius: 4px;
    background: #fff;
    font-family: ui-monospace, monospace;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.02em;
    white-space: nowrap;
}

.tp-plate-lg {
    padding: 6px 14px;
    font-size: 16px;
}

/* Сетка полей формы: две колонки на широком экране */
.tp-form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0 var(--tp-gap);
}

@media (max-width: 640px) {
    .tp-form-grid {
        grid-template-columns: 1fr;
    }
}

/* Широкая раскрывающаяся форма (документы, точки) */
.tp-popform-wide {
    width: 340px;
}

/* Подзаголовок группы в окне ролей: «В кабинете», «Специалист» */
.tp-popform-group {
    margin: 4px 0 6px;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--tp-text-3, #8a94a6);
}

.tp-popform-group:not(:first-of-type) {
    margin-top: 14px;
}

/* Роль, которую назначающий не вправе выдать, видна, но не переключается */
.tp-check-row.is-disabled {
    opacity: 0.55;
    cursor: not-allowed;
}

@media (max-width: 640px) {
    .tp-popform-wide {
        width: 100%;
    }
}

/* ── Сканы документов ────────────────────────────────────────────────── */
.tp-scans {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 300px));
    gap: 18px;
}

.tp-scan {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.tp-scan-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

/* Предпросмотр: картинка вписывается, PDF — крупной ссылкой; слоты равной высоты */
.tp-scan-preview {
    flex: 1;
    display: grid;
    place-items: center;
    min-height: 150px;
    padding: 10px;
    border: 1px solid var(--tp-line);
    border-radius: var(--tp-r);
    background: var(--tp-bg-soft);
    color: var(--tp-text-2);
    font-size: 13px;
    overflow: hidden;

    img {
        max-width: 100%;
        max-height: 220px;
        border-radius: var(--tp-r-sm);
    }
}

a.tp-scan-preview:hover {
    border-color: var(--tp-accent);
}

.tp-scan-preview--pdf {
    gap: 8px;
}

/* Выбор файла: своя кнопка вместо системной */
.tp-scan-file {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
}

.tp-scan-filename {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 13px;
    color: var(--tp-text-3);
}

.tp-scan-preview--empty {
    color: var(--tp-text-3);
}

/* Карта точки осмотра */
.tp-map {
    position: relative;
    margin-top: 12px;
    border: 1px solid var(--tp-line);
    border-radius: var(--tp-r);
    overflow: hidden;
    background: var(--tp-bg-soft);
}

.tp-map-frame {
    display: block;
    width: 100%;
    height: 260px;
    border: 0;
}

/* Яндекс рисует карту прямо в контейнере — задаём ему высоту сами */
/* Карта Яндекса рисуется сразу, даже пока адрес не выбран */
.tp-map[data-ymap] {
    height: 260px;
}

.tp-map-link {
    position: absolute;
    right: 10px;
    bottom: 10px;
    padding: 6px 10px;
    border: 1px solid var(--tp-line);
    border-radius: var(--tp-r-sm);
    background: #fff;
    font-size: 12px;
    color: var(--tp-text);

    &:hover {
        border-color: var(--tp-accent);
        color: var(--tp-accent-ink);
    }
}

.tp-map-empty {
    display: grid;
    place-items: center;
    height: 140px;
    padding: 16px;
    font-size: 13px;
    color: var(--tp-text-3);
    text-align: center;
}

/* Подсказки адреса под полем ввода */
.tp-suggest {
    position: relative;
}

.tp-suggest-list {
    position: absolute;
    z-index: 30;
    left: 0;
    right: 0;
    top: calc(100% + 4px);
    max-height: 260px;
    overflow-y: auto;
    padding: 4px;
    border: 1px solid var(--tp-line);
    border-radius: var(--tp-r-sm);
    background: #fff;
    box-shadow: var(--tp-shadow);
}

.tp-suggest-list:empty {
    display: none;
}

/* Скрытый вариант не должен кликаться: display у класса сильнее атрибута hidden */
.tp-suggest-item[hidden] {
    display: none;
}

.tp-suggest-item {
    display: block;
    width: 100%;
    padding: 8px 10px;
    border: 0;
    border-radius: var(--tp-r-sm);
    background: transparent;
    font: inherit;
    font-size: 13.5px;
    text-align: left;
    color: var(--tp-text);
    cursor: pointer;

    &:hover,
    &.is-active {
        background: var(--tp-accent-tint);
        color: var(--tp-accent-ink);
    }
}

/* Поле даты: текст с маской и кнопка календаря справа */
.tp-date {
    position: relative;

    .tp-field {
        padding-right: 40px;
    }
}

.tp-date-button {
    position: absolute;
    right: 6px;
    top: 50%;
    translate: 0 -50%;
    display: grid;
    place-items: center;
    width: 28px;
    height: 28px;
    border: 0;
    border-radius: var(--tp-r-sm);
    background: transparent;
    color: var(--tp-text-3);
    cursor: pointer;
    transition: color 0.15s, background 0.15s;

    &:hover {
        background: var(--tp-bg-soft);
        color: var(--tp-accent-strong);
    }
}

/* Нативный календарь нужен только как источник значения — держим его невидимым,
   но в потоке: у скрытых display:none элементов showPicker() не работает */
.tp-date-native {
    position: absolute;
    right: 10px;
    bottom: 6px;
    width: 1px;
    height: 1px;
    padding: 0;
    border: 0;
    opacity: 0;
    pointer-events: none;
}

fieldset[disabled] .tp-date-button {
    pointer-events: none;
    opacity: 0.5;
}

/* Поле выбора файла */
.tp-file {
    display: block;
    width: 100%;
    font-size: 13px;
    color: var(--tp-text-2);

    &::file-selector-button {
        margin-right: 10px;
        padding: 6px 10px;
        border: 1px solid var(--tp-line);
        border-radius: var(--tp-r-sm);
        background: #fff;
        font: inherit;
        font-size: 13px;
        color: var(--tp-ink);
        cursor: pointer;
    }
}

/* Удаление — отдельно от основных действий */
.tp-danger-zone {
    margin-top: 18px;
    padding-top: 14px;
    border-top: 1px solid var(--tp-line-2);
}

/* ── Путевой лист ────────────────────────────────────────────────────── */
.tp-waybill {
    border-color: var(--tp-accent);
    box-shadow: 0 0 0 3px var(--tp-accent-tint);
}

.tp-waybill-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: var(--tp-gap);
    margin-bottom: 16px;
    padding-bottom: 14px;
    border-bottom: 1px solid var(--tp-line-2);
}

.tp-waybill-number {
    font-size: 20px;
    font-weight: 600;
    letter-spacing: -0.02em;
}

.tp-waybill-time {
    flex-shrink: 0;
    font-size: 14px;
    font-weight: 500;
    color: var(--tp-accent-strong);
}

select.tp-field {
    appearance: none;
    background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='%2364748b' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 6l4 4 4-4'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 16px;
    padding-right: 36px;
}

/* Строка поиска в списках */
.tp-search {
    display: flex;
    gap: 8px;
    margin-bottom: 18px;

    .tp-field {
        max-width: 360px;
    }

    /* Кнопки — по содержимому, поля занимают всё свободное место */
    .tp-filters-actions {
        display: flex;
        gap: 8px;
        flex-shrink: 0;
    }
}

/* ── Раздел меню-аккордеона в сайдбаре ───────────────────────────────── */
.tp-cab-group {
    margin-bottom: 4px;

    & + & {
        margin-top: 8px;
        padding-top: 8px;
        border-top: 1px solid var(--tp-line-2);
    }
}

.tp-cab-group-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 6px 10px 8px;
    list-style: none;
    cursor: pointer;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--tp-text-3);
    border-radius: var(--tp-r-sm);
    transition: color 0.15s, background 0.15s;

    &::-webkit-details-marker {
        display: none;
    }

    &:hover {
        color: var(--tp-text-2);
        background: var(--tp-bg-soft);
    }
}

.tp-cab-group-caret {
    flex-shrink: 0;
    opacity: 0.7;
    transition: rotate 0.15s;
}

.tp-cab-group[open] .tp-cab-group-caret {
    rotate: 180deg;
}

/* Группа без сворачивания: заголовок просто подпись */
.tp-cab-group--static {
    margin-top: 8px;

    .tp-cab-group-title {
        cursor: default;

        &:hover {
            color: var(--tp-text-3);
            background: none;
        }
    }
}

.tp-cab-group-items {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

@media (max-width: 680px) {
    .tp-cab-group + .tp-cab-group {
        margin-top: 4px;
        padding-top: 4px;
    }

    .tp-cab-group-items {
        flex-direction: row;
        flex-wrap: wrap;
    }
}

/* Действия под заголовком страницы — прижаты к правому краю */
.tp-page-actions {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    margin: 4px 0 20px;
}

/* Компактные пары «поле — значение» в карточке приглашения */
.tp-props-compact {
    grid-template-columns: 150px 1fr;
    margin-bottom: 18px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--tp-line-2);
    font-size: 13px;
}

/* ── Лёгкая кнопка добавления ────────────────────────────────────────── */
/* Действия в строке заголовка страницы */
.tp-head-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

/* ── Фильтры списка: без фона и подписей, кнопка вровень с полями ────── */
.tp-filters {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 18px;

    .tp-field {
        flex: 1;
        min-width: 180px;
    }

    select.tp-field {
        flex: 0 1 220px;
    }

    /* Кнопки — по содержимому, поля занимают всё свободное место */
    .tp-filters-actions {
        display: flex;
        gap: 8px;
        flex-shrink: 0;
    }
}

@media (max-width: 640px) {
    .tp-filters {
        .tp-field {
            flex: 1 1 100%;
        }

        .tp-filters-actions {
            width: 100%;
        }
    }

    .tp-btn-add {
        width: 100%;
    }
}

/* ── Постраничная навигация ──────────────────────────────────────────── */
.tp-pager {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
    margin-top: 18px;
}

.tp-pager-item {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: var(--tp-control-h-sm);
    height: var(--tp-control-h-sm);
    padding: 0 12px;
    border: 1px solid var(--tp-line);
    border-radius: var(--tp-r-sm);
    background: #fff;
    font-size: 13px;
    color: var(--tp-text);
    transition: border-color 0.15s, color 0.15s, background 0.15s;

    &:hover {
        border-color: var(--tp-ink-2);
        color: var(--tp-ink);
    }

    &.is-current {
        border-color: var(--tp-accent);
        background: var(--tp-accent-tint);
        color: var(--tp-accent-ink);
        font-weight: 600;
    }

    &.is-disabled {
        color: var(--tp-text-3);
        background: var(--tp-bg-soft);
        cursor: not-allowed;
    }
}

.tp-pager-gap {
    padding: 0 4px;
    color: var(--tp-text-3);
}

.tp-pager-total {
    margin-left: auto;
    font-size: 13px;
    color: var(--tp-text-3);
}

@media (max-width: 640px) {
    .tp-pager-total {
        margin-left: 0;
        width: 100%;
    }
}

/* Список без внешней рамки — только разделители между строками */
.tp-list--flat {
    border: 0;
    border-radius: 0;
    background: transparent;

    .tp-list-row {
        padding-inline: 0;
    }
}

/* Телефон рядом с именем в строке списка */
.tp-list-phone {
    font-size: 13px;
    font-weight: 400;
    color: var(--tp-text-2);
}

/* Роли отдельной строкой под именем */
.tp-list-roles {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 6px;
}

/* Многострочное поле */
.tp-textarea {
    height: auto;
    min-height: 96px;
    padding: 11px 14px;
    line-height: 1.45;
    resize: vertical;
}

/* ── Форма без рамок: секции разделены воздухом ──────────────────────── */
.tp-form-flat {
    max-width: 720px;

    /* Несколько форм подряд (данные авто, документы) — с воздухом между ними */
    & + & {
        margin-top: 36px;
    }
}

.tp-form-section {
    margin-bottom: 34px;
}

.tp-form-section-title {
    margin-bottom: 4px;
    font-size: var(--tp-fs-md);
    font-weight: 600;
}

.tp-form-section-hint {
    margin-bottom: 12px;
    font-size: 13px;
    line-height: 1.45;
    color: var(--tp-text-2);
}

/* ── Несохранённые изменения ─────────────────────────────────────────── */
.tp-form-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

/* Пометка рядом с кнопкой — видна, только пока есть правки */
.tp-dirty-note {
    display: none;
    align-items: center;
    gap: 7px;
    font-size: 13px;
    color: var(--tp-text-2);

    &::before {
        content: "";
        width: 6px;
        height: 6px;
        border-radius: 999px;
        background: var(--tp-accent);
    }
}

form.is-dirty .tp-dirty-note {
    display: inline-flex;
}

/* Изменённое поле: только акцентная рамка, без заливки — это не ошибка */
.tp-field.is-changed {
    border-color: var(--tp-accent);
}

/* Изменённая строка: тонкая акцентная полоса слева, как у активного пункта меню */
.tp-check-row:has(input.is-changed) {
    position: relative;
    margin-inline: -14px;
    padding-inline: 14px;

    &::before {
        content: "";
        position: absolute;
        left: 0;
        top: 8px;
        bottom: 8px;
        width: 2px;
        border-radius: 0 2px 2px 0;
        background: var(--tp-accent);
    }
}

/* Опасное действие: кнопка-иконка с красным наведением */
.tp-icon-btn--danger:hover {
    border-color: var(--tp-danger);
    background: color-mix(in oklab, var(--tp-danger) 8%, #fff);
    color: var(--tp-danger);
}

/* --- Демо-стенд: список тестовых аккаунтов --- */
.tp-demo {
    max-width: 880px;
    margin: 0 auto;
    padding: 48px 16px 64px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.tp-demo-note {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
}

.tp-demo-password {
    font-size: 20px;
    font-weight: 700;
    letter-spacing: 0.08em;
    padding: 8px 14px;
    border-radius: 10px;
    background: var(--tp-surface-2, #f1f4f9);
}

.tp-demo-group {
    margin-top: 8px;
}

.tp-demo-phone {
    font-variant-numeric: tabular-nums;
    font-weight: 600;
    color: var(--tp-text, #1b2330);
}

.tp-demo-footnote {
    margin-top: 24px;
}

/* ── Сотрудники точки: поиск и список выбранных ──────────────────────── */
.tp-picker {
    margin-bottom: 8px;
}

.tp-picker-field {
    position: relative;
    max-width: 520px;
}

.tp-picker-list {
    position: absolute;
    z-index: 30;
    left: 0;
    right: 0;
    top: calc(100% + 4px);
    max-height: 260px;
    overflow-y: auto;
    padding: 4px;
    border: 1px solid var(--tp-line);
    border-radius: var(--tp-r-sm);
    background: #fff;
    box-shadow: var(--tp-shadow);
}

.tp-picker-empty {
    padding: 8px 10px;
    font-size: 13px;
    color: var(--tp-text-3);
}

/* Выбранные — список в рамке формы, но в стилистике списков кабинета */
.tp-picked {
    margin-top: 10px;
    border: 1px solid var(--tp-line);
    border-radius: var(--tp-r);
    background: var(--tp-bg);
}

.tp-picked-row {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 10px 14px;
    border-bottom: 1px solid var(--tp-line);

    &:last-of-type {
        border-bottom: 0;
    }
}

.tp-picked-name {
    flex: 1;
    min-width: 0;
    font-size: 14px;
}

.tp-picked-meta,
.tp-suggest-meta {
    font-size: 13px;
    color: var(--tp-text-3);
    white-space: nowrap;
}

.tp-suggest-meta {
    margin-left: 8px;
}

.tp-picked-sample {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: var(--tp-text-2);
    white-space: nowrap;
    cursor: pointer;
}

/* Образец выключен — отметка «на образце» ни к чему */
.tp-form-flat:has(#waybill-sample:not(:checked)) .tp-picked-sample {
    display: none;
}

.tp-picked-empty {
    margin: 0;
    padding: 12px 14px;
    font-size: 13px;
    color: var(--tp-text-3);
}

/* Предупреждение под полем времени: смена на это время уже открыта */
.tp-slot-shift {
    margin-top: 8px;
    padding: 10px 12px;
    border: 1px solid #fde68a;
    border-radius: var(--tp-r-sm);
    background: #fffbeb;
    color: #92400e;
    font-size: 13px;
}

/* Радиусы подбора точек */
.tp-geo-radii {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin: 0 0 10px;
}

/* В узкой панели подбора подсказка идёт столбиком: текст, под ним кнопка */
.tp-geo-panel .tp-hint {
    flex-direction: column;
    align-items: stretch;
}

/* Заявка в кабинете специалиста: примечание и кнопки результата в строку */
.tp-inspect-actions {
    flex-wrap: wrap;
    justify-content: flex-end;
}

.tp-inspect-form {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;

    .tp-field {
        width: 180px;
        height: 32px;
        font-size: 13px;
    }
}

/* Окно подтверждения решения — в том же лёгком виде, что окно дня графика точки */
.tp-confirm {
    width: calc(100% - 32px);

    .tp-modal-title {
        display: flex;
        align-items: center;
        flex-wrap: wrap;
        gap: 8px;
    }

    .tp-field-group {
        margin-top: 14px;
    }

    .tp-day-actions-row {
        margin-top: 18px;
    }
}

/* Прошлые осмотры в карточке заявки */
.tp-history-item {
    padding: 10px 0;
    border-bottom: 1px solid var(--tp-line);

    &:last-child {
        border-bottom: 0;
    }
}

.tp-history-note {
    margin-top: 4px;
    padding: 6px 10px;
    border-radius: var(--tp-r-sm);
    background: var(--tp-bg-soft);
    font-size: 13px;
    color: var(--tp-text);
}

/* ── Поддержка ───────────────────────────────────────────────────────────── */
.tp-check {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    cursor: pointer;
}

.tp-muted {
    color: var(--tp-ink-2);
    opacity: 0.8;
}

.tp-support-body {
    margin-top: 6px;
    line-height: 1.5;
    overflow-wrap: anywhere;
}

/* display: flex у .tp-filters перебивает [hidden] — прячем явно */
[data-callback-window][hidden] {
    display: none;
}
