/* ==========================================================================
   TarsyChat Landing Page Styles
   ========================================================================== */

/* ---- ГЕРОЙ-СЕКЦИЯ ---- */
.landing-hero {
    position: relative;
    background: linear-gradient(135deg, #0a0a23 0%, #1a1a3e 40%, #2d1b69 100%);
    color: #fff;
    text-align: center;
    padding: 40px 20px 32px;
    overflow: hidden;
}

/* ===== СПРАВА СВЕРХУ: круглая кнопка личного кабинета (FAB + dropdown) =====
   Авторизован — аватара (первая буква имени) с dropdown-меню;
   аноним — круглая иконка «Войти». Закреплена в углу viewport.
   Базовые правила .user-fab* вынесены в wwwroot/css/user-fab.css (общие для
   всех layout'ов: _Layout/_AuthLayout не подключают landing.css и должны
   рендерить FAB круглым). Здесь — только специфика лендинга, если потребуется. */

.hero-content {
    position: relative;
    z-index: 2;
}

.hero-badge {
    display: inline-block;
    background: rgba(13, 110, 253, 0.2);
    border: 1px solid rgba(13, 110, 253, 0.4);
    color: #7bbdff;
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 0.85rem;
    margin-bottom: 20px;
    font-weight: 600;
}

.hero-title {
    font-size: 2.75rem;
    font-weight: 800;
    margin-bottom: 10px;
    background: linear-gradient(90deg, #60a5fa, #a78bfa, #f472b6);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: none;
    letter-spacing: -1px;
}

.hero-subtitle {
    font-size: 1.1rem;
    color: #9ca3af;
    max-width: 600px;
    margin: 0 auto 20px;
    line-height: 1.5;
}

.hero-buttons {
    display: flex;
    gap: 16px;
    justify-content: center;
    flex-wrap: wrap;
}

.btn-hero-primary {
    background: linear-gradient(135deg, #0d6efd, #6610f2);
    color: #fff;
    border: none;
    padding: 12px 32px;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    transition: all 0.3s;
    box-shadow: 0 4px 15px rgba(13, 110, 253, 0.3);
}

.btn-hero-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(13, 110, 253, 0.5);
    color: #fff;
}

.btn-hero-outline {
    background: transparent;
    color: #fff;
    border: 2px solid rgba(255, 255, 255, 0.3);
    padding: 12px 32px;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    transition: all 0.3s;
}

.btn-hero-outline:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.6);
    color: #fff;
}

/* Анимированные частицы на фоне */
.hero-particles {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    overflow: hidden;
}

.hero-particles::before {
    content: '';
    position: absolute;
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, rgba(13, 110, 253, 0.15), transparent 70%);
    top: 10%;
    left: 10%;
    animation: float 8s ease-in-out infinite;
}

.hero-particles::after {
    content: '';
    position: absolute;
    width: 200px;
    height: 200px;
    background: radial-gradient(circle, rgba(102, 16, 242, 0.15), transparent 70%);
    bottom: 10%;
    right: 15%;
    animation: float 6s ease-in-out infinite reverse;
}

@keyframes float {
    0%, 100% { transform: translate(0, 0) scale(1); }
    50% { transform: translate(30px, -30px) scale(1.1); }
}

/* ---- ГЕРОЙ-СЛАЙДЕР (фразы о возможностях платформы — только аноним) ----
   2026-10-09: ультрасовременный авто-слайдер коротких фраз вместо hero-subtitle
   + «Попробовать чат». Все слайды лежат в ОДНОЙ grid-ячейке (grid-area:1/1) →
   контейнер сам по высоте самого длинного слайда (нет «прыжков» высоты при смене).
   Логика/авто-ротация — wwwroot/js/hero-slider.js. */
.hero-slider {
    position: relative;
    z-index: 2;
    max-width: 660px;
    margin: 14px auto 10px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    padding: 0 12px;
}

.hero-slider__slides {
    display: grid;
    justify-items: center;
    align-items: center;
}

.hero-slider__slide {
    grid-area: 1 / 1;
    text-align: center;
    opacity: 0;
    transform: translateY(16px);
    filter: blur(6px);
    transition: opacity .55s ease, transform .55s ease, filter .55s ease;
    pointer-events: none;
    will-change: opacity, transform, filter;
}

.hero-slider__slide.is-active {
    opacity: 1;
    transform: translateY(0);
    filter: blur(0);
    pointer-events: auto;
}

.hero-slider__icon {
    display: block;
    font-size: 1.7rem;
    line-height: 1;
    margin-bottom: 8px;
}

.hero-slider__text {
    display: block;
    font-size: 1.18rem;
    font-weight: 600;
    line-height: 1.45;
    letter-spacing: -0.2px;
    color: #e5e7eb; /* fallback, если нет поддержки background-clip: text */
    background: linear-gradient(90deg, #93c5fd 0%, #c4b5fd 50%, #f9a8d4 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-slider__dots {
    display: flex;
    gap: 8px;
    align-items: center;
    justify-content: center;
}

.hero-slider__dot {
    width: 8px;
    height: 8px;
    padding: 0;
    border: none;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.28);
    cursor: pointer;
    transition: width .3s ease, background .3s ease, box-shadow .3s ease;
}

.hero-slider__dot:hover {
    background: rgba(255, 255, 255, 0.6);
}

.hero-slider__dot.is-active {
    width: 26px;
    background: linear-gradient(90deg, #60a5fa, #a78bfa);
    box-shadow: 0 0 12px rgba(139, 132, 255, 0.55);
}

.hero-slider__dot:focus-visible {
    outline: 2px solid rgba(255, 255, 255, 0.7);
    outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
    .hero-slider__slide {
        transition: opacity .2s ease;
        transform: none;
        filter: none;
    }
}

@media (max-width: 640px) {
    .hero-slider__text {
        font-size: 1.02rem;
    }
    .hero-slider__icon {
        font-size: 1.45rem;
    }
}


/* ---- ТОП-ПРАВЫЙ БЛОК «Создать аккаунт»/«Войти» (аноним, лендинг) ----
   2026-10-09: кнопки перенесены из-под hero-слайдера в правый верхний угол —
   рядом с круглешком навигации (.user-fab-guest, user-fab.css: fixed; top:16px;
   right:20px; 44×44). Контейнер fixed; right:76px = 20(FAB) + 44(FAB) + 12(зазор)
   → кнопки ЛЕВЕЕ круглешка, на одной вертикали (top:16px, height:44px).
   Только аноним на лендинге (Index.cshtml); authed — только сам круглешок. */
.top-auth {
    position: fixed;
    top: 16px;
    right: 76px;
    z-index: 1060;
    display: flex;
    align-items: center;
    gap: 8px;
}

.top-auth__btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    height: 44px;
    padding: 0 18px;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
    font-size: 0.95rem;
    font-weight: 600;
    line-height: 1;
    text-decoration: none;
    white-space: nowrap;
    backdrop-filter: blur(6px);
    transition: transform .15s ease, background .15s ease, border-color .15s ease, box-shadow .15s ease;
}

.top-auth__btn:hover {
    background: rgba(255, 255, 255, 0.18);
    border-color: rgba(255, 255, 255, 0.6);
    color: #fff;
    transform: translateY(-1px);
}

.top-auth__btn:focus-visible {
    outline: 2px solid rgba(255, 255, 255, 0.7);
    outline-offset: 2px;
}

.top-auth__btn--primary {
    background: linear-gradient(135deg, #0d6efd, #6610f2);
    border-color: transparent;
    box-shadow: 0 4px 14px rgba(13, 110, 253, 0.35);
}

.top-auth__btn--primary:hover {
    background: linear-gradient(135deg, #0d6efd, #6610f2);
    box-shadow: 0 6px 18px rgba(13, 110, 253, 0.55);
}

@media (max-width: 640px) {
    .top-auth {
        right: 72px;
        gap: 6px;
    }
    .top-auth__btn {
        padding: 0 12px;
        font-size: 0.82rem;
    }
}

/* ---- ОСНОВНОЙ КОНТЕЙНЕР (3 КОЛОНКИ) ---- */
.landing-body {
    display: flex;
    gap: 0;
    min-height: calc(100vh - 200px);
    background: #0f0f23;
}

/* ---- ЛЕВАЯ ПАНЕЛЬ (САЙДБАР) ---- */
.landing-sidebar {
    width: 280px;
    min-width: 280px;
    background: #1a1a2e;
    border-right: 1px solid #2d2d4a;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 20px;
    overflow-y: auto;
}

.sidebar-section {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.sidebar-title {
    color: #e0e0e0;
    font-size: 0.9rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin: 0;
    padding-bottom: 8px;
    border-bottom: 1px solid #2d2d4a;
}

/* Карточки агентов в сайдбаре */
.agent-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.agent-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
    border: 1px solid transparent;
    background: transparent;
}

.agent-item:hover {
    background: rgba(13, 110, 253, 0.1);
    border-color: rgba(13, 110, 253, 0.3);
}

.agent-item.active {
    background: rgba(13, 110, 253, 0.15);
    border-color: #0d6efd;
}

.agent-item-icon {
    width: 36px;
    height: 36px;
    min-width: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(13, 110, 253, 0.1);
    border-radius: 8px;
    color: #60a5fa;
    font-size: 1.1rem;
}

.agent-item-info {
    overflow: hidden;
}

.agent-item-name {
    color: #e0e0e0;
    font-weight: 600;
    font-size: 0.9rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.agent-item-desc {
    color: #6c757d;
    font-size: 0.75rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Маркет агентов (.market-agent-card, Index.cshtml): панель действий
   (Редактировать / Опубликовано / Удалить / К себе) прижата к ПРАВОМУ
   краю карточки — .agent-item-info не растянута (нет flex:1), поэтому
   у блока margin-left:auto; кнопки/лейблы — в одну строку. */
.market-agent-card > .d-flex {
    margin-left: auto;
    flex-shrink: 0;
}

.market-agent-card .btn,
.market-agent-card .form-check-label {
    white-space: nowrap;
}

/* 2026: описание в КАРТОЧКАХ МАРКЕТА — многострочное (читается полностью);
   в сайдбаре (#agentList .agent-item-desc) остаётся однострочным (ellipsis). */
.market-agent-card .agent-item-desc {
    white-space: normal;
    overflow: visible;
    text-overflow: clip;
}


/* Карточки пайплайнов в сайдбаре (отделяются фиолетовым акцентом) */
.pipeline-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.pipeline-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
    border: 1px solid rgba(132, 59, 255, 0.25);
    background: rgba(132, 59, 255, 0.05);
}

.pipeline-item:hover {
    background: rgba(132, 59, 255, 0.14);
    border-color: rgba(167, 139, 250, 0.6);
    box-shadow: 0 0 0 1px rgba(167, 139, 250, 0.25) inset;
}

.pipeline-item:focus-visible {
    outline: 2px solid #a78bfa;
    outline-offset: 1px;
}

.pipeline-item.active {
    background: rgba(132, 59, 255, 0.2);
    border-color: #a78bfa;
    box-shadow: 0 0 12px rgba(132, 59, 255, 0.35);
}

.pipeline-item-icon {
    width: 36px;
    height: 36px;
    min-width: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(132, 59, 255, 0.1);
    border-radius: 8px;
    color: #a78bfa;
    font-size: 1.1rem;
}

.pipeline-item-info {
    overflow: hidden;
    flex-grow: 1;
}

.pipeline-item-name {
    color: #e0e0e0;
    font-weight: 600;
    font-size: 0.9rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.pipeline-item-desc {
    color: #6c757d;
    font-size: 0.75rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Карточки «Пайплайн маркет»: описание — МУЛЬТИСТРОЧНОЕ (без эллипсиса).
   pre-line: перенос по пробелам + сохраняем \n из описания;
   word-break: длинные слова/URL тоже переносятся. В сайдбаре
   (#pipelineList) карточки остаются однострочными (rule выше). */
.market-pipeline-card .pipeline-item-desc {
    white-space: pre-line;
    overflow: visible;
    text-overflow: clip;
    word-break: break-word;
    line-height: 1.45;
}

/* Кнопки карточек маркета («К себе», «Открыть», «Удалить», «Редактировать»):
   текст БЕЗ переносов — иконка и подпись всегда в одну строку.
   Покрывает и динамические карточки (черновики) — те же классы. */
.market-pipeline-card .btn {
    white-space: nowrap;
}

.pipeline-empty {
    color: #6c757d;
    font-size: 0.8rem;
    padding: 8px;
    font-style: italic;
    opacity: 0.7;
}

/* Строка служебного сообщения при выполнении пайплайна (видна в чате) */
.landing-service-msg {
    background: rgba(255, 255, 255, 0.04);
    border-left: 3px solid rgba(148, 163, 184, 0.4);
    color: #9ca3af;
    font-size: 0.8rem;
    padding: 6px 10px;
    margin: 6px 0;
    border-radius: 0 6px 6px 0;
    font-family: 'Consolas', 'Roboto Mono', monospace;
    white-space: pre-wrap;
}

/* ---- ЦЕНТРАЛЬНАЯ ОБЛАСТЬ ---- */
.landing-main {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    gap: 16px;
    padding: 20px;
    min-width: 0;
}

/* ---- СЕКЦИЯ ЧАТА ---- */
.chat-demo-section {
    background: #1a1a2e;
    border: 1px solid #2d2d4a;
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
    min-height: 700px;
    max-height: 90vh;
    overflow: hidden;
}

.chat-demo-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    border-bottom: 1px solid #2d2d4a;
    background: rgba(0, 0, 0, 0.2);
}

.chat-demo-title {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #e0e0e0;
    font-weight: 600;
    font-size: 0.9rem;
}

.status-dot {
    width: 8px;
    height: 8px;
    background: #22c55e;
    border-radius: 50%;
    animation: pulse-dot 2s ease-in-out infinite;
}

@keyframes pulse-dot {
    0%, 100% { opacity: 1; box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.4); }
    50% { opacity: 0.7; box-shadow: 0 0 0 6px rgba(34, 197, 94, 0); }
}

.chat-demo-actions .btn {
    font-size: 0.8rem;
}

/* История чата */
.landing-chat-history {
    flex-grow: 1;
    overflow-y: auto;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* Приветственное сообщение */
.welcome-message {
    text-align: center;
    padding: 40px 20px;
    color: #6c757d;
}

.welcome-icon {
    font-size: 3rem;
    margin-bottom: 16px;
}

.welcome-message h4 {
    color: #e0e0e0;
    margin-bottom: 8px;
}

.welcome-message p {
    font-size: 0.9rem;
    max-width: 400px;
    margin: 0 auto;
    line-height: 1.5;
}

/* Сообщения в чате */
.landing-msg {
    max-width: 80%;
    padding: 12px 16px;
    border-radius: 12px;
    font-size: 0.9rem;
    line-height: 1.5;
    word-wrap: break-word;
}

.landing-msg-user {
    align-self: flex-end;
    background: linear-gradient(135deg, #0d6efd, #6610f2);
    color: #fff;
    border-bottom-right-radius: 4px;
}

.landing-msg-ai {
    align-self: flex-start;
    background: #2d2d4a;
    color: #e0e0e0;
    border: 1px solid #3d3d5a;
    border-bottom-left-radius: 4px;
}

.landing-msg-ai p {
    margin: 0 0 8px;
}

.landing-msg-ai p:last-child {
    margin-bottom: 0;
}

/* 3.1 SECURITY_AUDIT: .msg-content — обёртка тела AI-сообщения
   (renderMarkdownContent). pre-wrap — переносы строк ответа модели
   сохраняются в plain-text режиме (marked недоступен). */
.landing-msg-ai .msg-content {
    white-space: pre-wrap;
    word-break: break-word;
}


/* Индикатор печати */
.landing-typing-indicator {
    display: flex;
    align-self: flex-start;
    background: #2d2d4a;
    border: 1px solid #3d3d5a;
    padding: 12px 16px;
    border-radius: 12px;
    border-bottom-left-radius: 4px;
    gap: 5px;
}

.landing-typing-dot {
    width: 8px;
    height: 8px;
    background-color: #6c757d;
    border-radius: 50%;
    animation: landing-pulse 1.4s infinite ease-in-out both;
}

.landing-typing-dot:nth-child(2) { animation-delay: 0.2s; }
.landing-typing-dot:nth-child(3) { animation-delay: 0.4s; }

@keyframes landing-pulse {
    0%, 80%, 100% { transform: scale(0.6); opacity: 0.4; }
    40% { transform: scale(1); opacity: 1; }
}

/* Поле ввода */
.landing-chat-input {
    padding: 16px;
    border-top: 1px solid #2d2d4a;
    background: rgba(0, 0, 0, 0.2);
}

.landing-chat-input textarea {
    resize: none;
    font-family: inherit;
    font-size: 0.9rem;
}

.chat-input-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 8px;
}

.current-agent-info {
    display: flex;
    align-items: center;
    gap: 6px;
    color: #6c757d;
    font-size: 0.8rem;
}

.chat-input-buttons {
    display: flex;
    gap: 8px;
}

/* ---- СЕКЦИЯ ВИЗУАЛИЗАЦИИ ПАЙПЛАЙНА ---- */
.pipeline-visualization-section {
    background: #1a1a2e;
    border: 1px solid #2d2d4a;
    border-radius: 12px;
    overflow: hidden;
    min-height: 200px;
}

.pipeline-viz-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    border-bottom: 1px solid #2d2d4a;
    background: rgba(0, 0, 0, 0.2);
}

.pipeline-viz-header h4 {
    margin: 0;
    color: #e0e0e0;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 8px;
}

.pipeline-visualization-area {
    padding: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 160px;
    position: relative;
    overflow: hidden;
}

.pipeline-placeholder {
    text-align: center;
    color: #6c757d;
    position: relative;
    z-index: 2;
}

.pipeline-placeholder-icon {
    font-size: 3rem;
    color: #3d3d5a;
    margin-bottom: 12px;
}

.pipeline-placeholder-text {
    font-size: 0.9rem;
    margin-bottom: 8px;
}

/* Декоративная сетка для плейсхолдера */
.pipeline-placeholder-grid {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    opacity: 0.1;
}

.grid-node {
    position: absolute;
    width: 40px;
    height: 30px;
    background: #0d6efd;
    border-radius: 4px;
    animation: grid-pulse 3s ease-in-out infinite;
}

.grid-node-1 { top: 20%; left: 20%; animation-delay: 0s; }
.grid-node-2 { top: 20%; right: 20%; animation-delay: 1s; }
.grid-node-3 { bottom: 20%; left: 50%; transform: translateX(-50%); animation-delay: 2s; }

.grid-connection {
    position: absolute;
    height: 2px;
    background: linear-gradient(90deg, #0d6efd, transparent);
    animation: grid-flow 2s ease-in-out infinite;
}

.grid-conn-1 {
    top: 30%;
    left: 28%;
    width: 40%;
    transform: rotate(-15deg);
}

.grid-conn-2 {
    top: 50%;
    left: 30%;
    width: 40%;
    transform: rotate(10deg);
    animation-delay: 1s;
}

@keyframes grid-pulse {
    0%, 100% { opacity: 0.3; transform: scale(1); }
    50% { opacity: 0.8; transform: scale(1.1); }
}

@keyframes grid-flow {
    0%, 100% { opacity: 0.2; }
    50% { opacity: 0.6; }
}

/* ---- ПРАВАЯ ПАНЕЛЬ (ВОЗМОЖНОСТИ) ---- */
.landing-features {
    width: 280px;
    min-width: 280px;
    background: #1a1a2e;
    border-left: 1px solid #2d2d4a;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    overflow-y: auto;
}

.features-title {
    color: #e0e0e0;
    font-size: 0.9rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin: 0;
    padding-bottom: 8px;
    border-bottom: 1px solid #2d2d4a;
}

/* Карточки возможностей */
.feature-card {
    background: rgba(13, 110, 253, 0.05);
    border: 1px solid rgba(13, 110, 253, 0.15);
    border-radius: 10px;
    padding: 16px;
    text-align: center;
    transition: all 0.3s;
}

.feature-card:hover {
    background: rgba(13, 110, 253, 0.1);
    border-color: rgba(13, 110, 253, 0.3);
    transform: translateY(-2px);
}

.feature-card.auth-required {
    position: relative;
    overflow: hidden;
    background: rgba(108, 117, 125, 0.05);
    border-color: rgba(108, 117, 125, 0.15);
}

.feature-card.auth-required::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.3);
    pointer-events: none;
}

.feature-icon {
    font-size: 1.5rem;
    color: #60a5fa;
    margin-bottom: 8px;
}

.feature-card h5 {
    color: #e0e0e0;
    font-size: 0.85rem;
    margin-bottom: 6px;
}

.feature-card p {
    color: #6c757d;
    font-size: 0.75rem;
    line-height: 1.4;
    margin: 0;
}

.auth-badge {
    display: inline-block;
    background: rgba(255, 193, 7, 0.1);
    border: 1px solid rgba(255, 193, 7, 0.3);
    color: #ffc107;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 0.7rem;
    margin-top: 8px;
}

/* Кнопка редактирования */
.landing-edit-cta {
    margin-top: auto;
}

.landing-edit-cta .btn {
    font-size: 0.85rem;
    border-color: rgba(255, 193, 7, 0.3);
    color: #ffc107;
}

.landing-edit-cta .btn:hover {
    background: rgba(255, 193, 7, 0.1);
    border-color: #ffc107;
    color: #ffc107;
}

/* ---- АДАПТИВНОСТЬ ---- */
/* 2026-10-07: мобильные drawer-панели (off-canvas) вместо display:none.
   • ≤768px  — левая .landing-sidebar выезжает слева (кнопка #sidebarToggleBtn);
   • ≤1200px — правая .landing-features выезжает справа (кнопка #featuresToggleBtn);
   бэкдропы + логика открытия/закрытия — Index.cshtml / js/landing-sidebar-toggle.js.
   Классы НЕ переименованы (docs/conflicts.md С3); на десктопе (≥768px / ≥1200px)
   всё остаётся 1-в-1: кнопки и бэкдропы полностью выключены. */

/* Кнопки шторок: видны ТОЛЬКО в своих брейкпоинтах (включаются в media ниже) */
.sidebar-toggle-btn,
.features-toggle-btn {
    display: none;
}

/* 2026-10-08: STICKY-ШАПКА с тумблерами шторок (≤1200px) — кнопки «на уровне
   шапки», едут за прокруткой, как и FAB-профиль. З-порядок: 1046 — ВЫШЕ
   шторок (1045) и бэкдропов (1044), чтобы кнопки оставались кликабельными
   для закрытия открытой шторки; НИЖЕ FAB (1060) — круглешок парит поверх. */
.mobile-topbar {
    display: none;
}

/* Бэкдропы под шторками: вне брейкпоинтов полностью выключены */
.sidebar-backdrop,
.features-backdrop {
    display: none;
}

/* Правая панель: drawer справа (≤1200px) */
@media (max-width: 1200px) {
    /* Sticky-шапка с тумблерами шторок: видна на всю прокрутку страницы.
       height:52px + border 1px = 53px — шторки открываются ПОД ней (top:53px).
       padding-right 84px — зазор под FAB-профиль (fixed, top:16px right:20px,
       width:44px, z-1060): кнопки не уезжают под круглешок. */
    .mobile-topbar {
        display: flex;
        align-items: center;
        gap: 8px;
        position: sticky;
        top: 0;
        z-index: 1046;
        height: 52px;
        padding: 0 84px 0 12px;
        background: rgba(13, 13, 20, 0.92);
        backdrop-filter: blur(14px) saturate(1.1);
        border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    }
    .mobile-topbar .sidebar-toggle-btn,
    .mobile-topbar .features-toggle-btn {
        white-space: nowrap;
    }

    .features-toggle-btn {
        display: inline-flex;
    }
    .landing-features {
        position: fixed;
        top: 53px; /* под sticky-шапкой (52px + 1px border) */
        right: 0;
        bottom: 0;
        width: min(320px, 85vw);
        min-width: 0;
        z-index: 1045;
        transform: translateX(100%);
        transition: transform 0.28s ease;
        overflow-y: auto;
    }
    body.features-open .landing-features {
        transform: translateX(0);
        box-shadow: -8px 0 30px rgba(0, 0, 0, 0.45);
    }
    .features-backdrop {
        display: block;
        position: fixed;
        inset: 0;
        background: rgba(0, 0, 0, 0.55);
        z-index: 1044;
        opacity: 0;
        pointer-events: none;
        transition: opacity 0.28s ease;
    }
    body.features-open .features-backdrop {
        opacity: 1;
        pointer-events: auto;
    }
}

@media (max-width: 768px) {
    .sidebar-toggle-btn {
        display: inline-flex;
    }
    /* Левая панель: drawer слева (≤768px) — вместо display:none (2026-10-07);
       top:53px — открывается ПОД sticky-шапкой (2026-10-08) */
    .landing-sidebar {
        position: fixed;
        top: 53px; /* под sticky-шапкой (52px + 1px border) */
        left: 0;
        bottom: 0;
        width: min(320px, 85vw);
        min-width: 0;
        z-index: 1045;
        transform: translateX(-100%);
        transition: transform 0.28s ease;
        overflow-y: auto;
    }
    body.sidebar-open .landing-sidebar {
        transform: translateX(0);
        box-shadow: 8px 0 30px rgba(0, 0, 0, 0.45);
    }
    .sidebar-backdrop {
        display: block;
        position: fixed;
        inset: 0;
        background: rgba(0, 0, 0, 0.55);
        z-index: 1044;
        opacity: 0;
        pointer-events: none;
        transition: opacity 0.28s ease;
    }
    body.sidebar-open .sidebar-backdrop {
        opacity: 1;
        pointer-events: auto;
    }
    
    .hero-title {
        font-size: 2.25rem;
    }
    
    .hero-subtitle {
        font-size: 1rem;
    }
    
    .landing-body {
        flex-direction: column;
    }
    
    .landing-main {
        padding: 10px;
    }
    
    .chat-demo-section {
        min-height: 400px;
        max-height: none;
    }
}

/* ============ ДЕМО-РЕЖИМ ============ */
/* Бейдж «ДЕМО» на карточке пайплайна */
.demo-badge {
    display: inline-block;
    margin-left: 6px;
    padding: 1px 7px;
    font-size: 0.62rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    color: #0d1520;
    background: linear-gradient(135deg, #ffc107, #ff9800);
    border-radius: 10px;
    vertical-align: middle;
}

/* Ссылка «Полный доступ» в шапке визуализации */
.pipeline-viz-header-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

/* 2026-10-04: бейдж ДЕМО ВНУТРИ строки описания (анонимные карточки,
   Index.cshtml): первый элемент nowrap-строки → гарантированно виден
   даже при длинном описании. Левый отступ 0 (бейдж теперь ВПЕРЕДИ
   текста, а не после имени). */
.pipeline-item-desc > .demo-badge {
    margin-left: 0;
    margin-right: 6px;
}
.pipeline-full-access-link {
    font-size: 0.82rem;
    color: #ffc107;
    text-decoration: none;
    white-space: nowrap;
}
.pipeline-full-access-link:hover {
    color: #ffdb70;
    text-decoration: underline;
}

/* Демо-режим: готовые вопросы-чипы (вместо свободного textarea) */
.demo-samples {
    margin-top: 10px;
    padding: 12px 14px;
    background: linear-gradient(135deg, rgba(132, 59, 255, 0.10), rgba(13, 110, 253, 0.08));
    border: 1px dashed rgba(132, 59, 255, 0.45);
    border-radius: 10px;
}
.demo-samples-label {
    font-size: 0.8rem;
    color: #c4b5fd;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 6px;
}
.demo-sample-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
.demo-sample-chip {
    flex: 1 1 220px;
    max-width: 100%;
    padding: 9px 12px;
    font-size: 0.84rem;
    line-height: 1.35;
    text-align: left;
    color: #e0e0e0;
    background: rgba(13, 15, 26, 0.85);
    border: 1px solid rgba(132, 59, 255, 0.35);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.18s ease;
}
.demo-sample-chip:hover {
    border-color: #a57bfa;
    background: rgba(132, 59, 255, 0.16);
    box-shadow: 0 0 0 1px rgba(167, 139, 250, 0.25) inset;
}
.demo-sample-chip.chosen {
    background: rgba(132, 59, 255, 0.22);
    border-color: #a57bfa;
    color: #ffffff;
}
.demo-sample-chip:disabled {
    opacity: 0.45;
    cursor: wait;
}
.demo-cta {
    margin: 18px 0 8px;
    padding: 18px 20px;
    background: linear-gradient(135deg, rgba(255, 193, 7, 0.12), rgba(13, 150, 233, 0.10));
    border: 1px solid rgba(255, 193, 7, 0.45);
    border-radius: 14px;
}
.demo-cta-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 700;
    font-size: 1.02rem;
    color: #ffc107;
    margin-bottom: 6px;
}
.demo-cta-text {
    color: #adb5bd;
    font-size: 0.92rem;
    margin-bottom: 14px;
}
.demo-cta-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}
@media (max-width: 576px) {
    .demo-cta-actions {
        flex-direction: column;
    }
    .demo-cta-actions .btn {
        width: 100%;
    }
}

/* C6: Инспектор свойств выбранного агента (authed, правая колонка .landing-features).
   Скрыт по умолчанию (класс .d-none); показывается JS-функцией showInspector(). */
.landing-inspector {
    background: rgba(13, 110, 253, 0.05);
    border: 1px solid rgba(13, 110, 253, 0.2);
    border-radius: 12px;
    padding: 14px 16px;
    color: #e0e0e0;
    font-size: 0.85rem;
}
.landing-inspector h5 {
    color: #6ea8fe;
    font-size: 0.95rem;
    font-weight: 600;
    margin: 0 0 4px;
    word-break: break-word;
}
.landing-inspector hr {
    border-color: rgba(255, 255, 255, 0.12);
    margin: 10px 0 12px;
}
.landing-inspector label.form-label {
    font-size: 0.72rem;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    color: #adb5bd;
    margin-bottom: 4px;
}
.landing-inspector textarea,
.landing-inspector input[type="number"] {
    background: rgba(0, 0, 0, 0.35);
    border-color: rgba(255, 255, 255, 0.15);
    color: #e9ecef;
}
.landing-inspector textarea:focus,
.landing-inspector input[type="number"]:focus {
    background: rgba(0, 0, 0, 0.55);
    border-color: rgba(13, 110, 253, 0.6);
    color: #fff;
    box-shadow: 0 0 0 0.15rem rgba(13, 110, 253, 0.25);
}

/* ============ ЧАТЫ ПАЙПЛАЙНА (правая колонка лендинга, authed) ============
   Панель #pipelineChatsPanel показывается/скрывается
   window.PipelineChats.show/hide (wwwroot/js/landing-pipeline-chats.js) —
   только inline-style display (bootstrap .d-none = display:none!important).
   Стили согласованы с .landing-features / .landing-inspector. */
.pipeline-chats-panel {
    background: #1a1a2e;
    border: 1px solid #2d2d4a;
    border-radius: 12px;
    padding: 14px 16px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    color: #e0e0e0;
    font-size: 0.85rem;
}

.pipeline-chats-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding-bottom: 8px;
    border-bottom: 1px solid #2d2d4a;
}

.pipeline-chats-title {
    margin: 0;
    color: #7bbdff;
    font-size: 0.85rem;
    font-weight: 700;
    letter-spacing: 0.4px;
    text-transform: uppercase;
    display: flex;
    align-items: center;
    gap: 6px;
}

.pipeline-chats-title i {
    color: #60a5fa;
    font-size: 1rem;
}

.pipeline-chats-actions {
    display: flex;
    gap: 6px;
}

.pipeline-chats-btn {
    font-size: 0.8rem !important;
    line-height: 1.5;
}

.pipeline-chats-btn.btn-outline-info {
    border-color: rgba(13, 110, 253, 0.45) !important;
    color: #7bbdff !important;
    background: transparent;
}
.pipeline-chats-btn.btn-outline-info:hover {
    background: rgba(13, 110, 253, 0.15) !important;
    border-color: #60a5fa !important;
    color: #9ec9ff !important;
}

.pipeline-chats-btn.btn-outline-warning {
    border-color: rgba(255, 193, 7, 0.45) !important;
    color: #ffc107 !important;
    background: transparent;
}
.pipeline-chats-btn.btn-outline-warning:hover {
    background: rgba(255, 193, 7, 0.12) !important;
    border-color: #ffd257 !important;
    color: #ffd257 !important;
}

/* ---- Список чатов ---- */
.pipeline-chats-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 6px;
    max-height: 360px;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: #2d2d4a transparent;
}
.pipeline-chats-list::-webkit-scrollbar { width: 8px; }
.pipeline-chats-list::-webkit-scrollbar-track { background: transparent; }
.pipeline-chats-list::-webkit-scrollbar-thumb {
    background: #2d2d4a;
    border-radius: 8px;
}
.pipeline-chats-list::-webkit-scrollbar-thumb:hover { background: #44446a; }

.pipeline-chats-empty {
    color: #6c757d;
    font-size: 0.8rem;
    font-style: italic;
    padding: 12px 4px;
    text-align: center;
}

.pipeline-chats-row {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 10px;
    background: rgba(13, 110, 253, 0.04);
    border: 1px solid rgba(13, 110, 253, 0.15);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.15s ease;
    position: relative;
}
.pipeline-chats-row:hover {
    background: rgba(13, 110, 253, 0.10);
    border-color: rgba(13, 110, 253, 0.35);
}
.pipeline-chats-row.active {
    background: rgba(13, 110, 253, 0.16);
    border-color: #60a5fa;
    box-shadow: 0 0 0 1px rgba(96, 165, 250, 0.3) inset;
}
.pipeline-chats-row:focus-visible {
    outline: 2px solid #7bbdff;
    outline-offset: 1px;
}

.pipeline-chats-row-label {
    flex: 1 1 auto;
    min-width: 0;
    color: #e0e0e0;
    font-size: 0.85rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.pipeline-chats-row-count {
    display: inline-block;
    margin-left: 6px;
    padding: 0 6px;
    font-size: 0.7rem;
    color: #7bbdff;
    background: rgba(13, 110, 253, 0.18);
    border-radius: 9px;
    white-space: nowrap;
}

.pipeline-chats-row-meta {
    flex: 0 0 auto;
    color: #6c757d;
    font-size: 0.72rem;
    white-space: nowrap;
}

.pipeline-chats-row-delete {
    flex: 0 0 auto;
    -webkit-appearance: none;
    appearance: none;
    background: transparent;
    border: none;
    color: #6c757d;
    cursor: pointer;
    padding: 2px 4px;
    border-radius: 4px;
    font-size: 0.85rem;
    line-height: 1;
    opacity: 0.55;
    transition: all 0.15s ease;
}
.pipeline-chats-row:hover .pipeline-chats-row-delete { opacity: 1; }
.pipeline-chats-row-delete:hover {
    color: #ff6b6b !important;
    background: rgba(255, 107, 107, 0.12);
}
.pipeline-chats-row-delete:focus-visible {
    opacity: 1;
    outline: 2px solid #ff6b6b;
    outline-offset: 1px;
}

/* ============ КОНЕЦ: ЧАТЫ ПАЙПЛАЙНА ============ */

/* ============ БЛОКИРОВКА ПЕРЕХОДОВ И СОЗДАНИЙ ВО ВРЕМЯ ГЕНЕРАЦИИ LLM ============
   Класс .lc-busy выставляется на <body> из landing-chat.js::setStreamingState()
   на время активной генерации. Блокируем переключение контекста (агент / пайплайн /
   чаты-история) и создание/копирование (пайплайнов / чатов), чтобы пользователь не
   «уехал» в другой диалог и не создал новый, пока LLM отвечает.
   ВАЖНО: используем pointer-events (а не disabled) — состояние disabled/display этих
   элементов управляют другие модули (pipeline-editor/init.js: readonly-логика), и мы
   его не трогаем. pointer-events: none + затемнение покрывают и динамически
   отрисованные строки Chats, и повторные рендеры (body-класс живёт весь стрим).
   Дополнительно на входе в каждый обработчик стоят JS-guard'ы (защита от клавиатуры). */
body.lc-busy .agent-item,
body.lc-busy .pipeline-item,
body.lc-busy .pipeline-chats-row,
body.lc-busy #createPipelineBtn,
body.lc-busy #deletePipelineBtn,
body.lc-busy #pnlChatsAddBtn,
body.lc-busy #pnlChatsCopyBtn {
    pointer-events: none !important;
    opacity: 0.5;
    cursor: not-allowed !important;
}
