/* ==========================================================================
   assets/demo.css — интерактивный тур по продукту (demo.php).
   Дополняет assets/landing.css (подключается вместе с ним): базовые кнопки
   (.ld-btn), форма заявки (.ld-apply), тост (.ld-toast), спиннер (.ld-spinner),
   reveal-анимации и CSS-переменные (--ld-*) берутся оттуда.
   Здесь — только тур-специфичные классы .dt-*.
   Чистый CSS, без библиотек. Все данные на экранах — вымышленные.
   ========================================================================== */

body.dt {
    background: var(--ld-bg);
    color: var(--ld-ink);
}

/* ===================== Hero тура ===================== */
.dt-hero {
    max-width: 900px;
    margin: 0 auto;
    padding: 72px 20px 40px;
    text-align: center;
}
.dt-hero h1 {
    font-size: clamp(28px, 4.6vw, 44px);
    line-height: 1.15;
    margin: 14px 0 12px;
    letter-spacing: -.02em;
}
.dt-hero-sub {
    font-size: 17px;
    color: var(--ld-muted);
    max-width: 640px;
    margin: 0 auto;
}
.dt-cta {
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 26px;
}
.dt-cta form { margin: 0; }
.dt-demo-cred {
    margin-top: 14px;
    font-size: 13px;
    color: var(--ld-muted);
}
.dt-demo-cred code {
    background: var(--ld-brass-soft);
    color: var(--ld-brass-dark);
    border-radius: 6px;
    padding: 1px 7px;
    font-weight: 700;
}

/* ===================== Навигация тура (табы экранов) ===================== */
.dt-tour {
    max-width: 1080px;
    margin: 0 auto;
    padding: 10px 20px 0;
}
.dt-tour-tabs {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    justify-content: center;
    margin-bottom: 18px;
}
.dt-tour-tab {
    border: 1px solid var(--ld-line);
    background: #fff;
    color: var(--ld-muted);
    border-radius: 999px;
    padding: 8px 16px;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    transition: background .2s ease, color .2s ease, border-color .2s ease;
}
.dt-tour-tab:hover { border-color: var(--ld-teal); color: var(--ld-teal); }
.dt-tour-tab.active {
    background: var(--ld-teal);
    border-color: var(--ld-teal);
    color: #fff;
}

/* ===================== Экран-макет (браузерная рамка) ===================== */
.dt-screen { display: none; }
.dt-screen.active { display: block; animation: dtScreenIn .35s ease; }
@keyframes dtScreenIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

.dt-frame {
    background: #fff;
    border: 1px solid var(--ld-line);
    border-radius: var(--ld-radius);
    box-shadow: var(--ld-shadow-up);
    overflow: hidden;
}
.dt-frame-bar {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    background: #f5f1ea;
    border-bottom: 1px solid var(--ld-line);
}
.dt-frame-dots { display: inline-flex; gap: 5px; flex: 0 0 auto; }
.dt-frame-dots i {
    width: 10px; height: 10px; border-radius: 50%;
    background: #ddd3c3;
}
.dt-frame-dots i:nth-child(1) { background: #e7a49c; }
.dt-frame-dots i:nth-child(2) { background: #ecd28a; }
.dt-frame-dots i:nth-child(3) { background: #9fd3ab; }
.dt-frame-url {
    flex: 1 1 auto;
    min-width: 0;
    background: #fff;
    border: 1px solid var(--ld-line);
    border-radius: 8px;
    padding: 3px 10px;
    font-size: 12px;
    color: var(--ld-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.dt-frame-badge {
    flex: 0 0 auto;
    background: var(--ld-brass-soft);
    color: var(--ld-brass-dark);
    border-radius: 999px;
    font-size: 11px;
    font-weight: 800;
    padding: 3px 10px;
    text-transform: uppercase;
    letter-spacing: .04em;
}
.dt-frame-body { padding: 20px; }

/* ===================== Кликабельные элементы с подсказками ===================== */
.dt-tip {
    position: relative;
    cursor: pointer;
    border: 1px dashed rgba(15, 118, 110, .45);
    border-radius: 12px;
    transition: box-shadow .2s ease, border-color .2s ease;
}
.dt-tip:hover, .dt-tip.dt-tip-open {
    border-color: var(--ld-teal);
    border-style: solid;
    box-shadow: 0 0 0 3px rgba(15, 118, 110, .14);
}
.dt-tip::after {
    content: "?";
    position: absolute;
    top: -9px;
    right: -9px;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--ld-teal);
    color: #fff;
    font-size: 12px;
    font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 6px rgba(15, 118, 110, .4);
}
.dt-tip-star::after {
    content: "★";
    background: var(--ld-brass);
    box-shadow: 0 2px 6px rgba(168, 133, 58, .4);
}

/* ===================== Popover ===================== */
.dt-popover {
    position: absolute;
    z-index: 90;
    width: 300px;
    max-width: calc(100vw - 32px);
    background: #fff;
    border: 1px solid var(--ld-line);
    border-radius: 14px;
    box-shadow: 0 18px 44px rgba(28, 25, 23, .2);
    padding: 14px 16px 12px;
    animation: dtPopIn .18s ease;
}
@keyframes dtPopIn { from { opacity: 0; transform: translateY(6px) scale(.98); } to { opacity: 1; transform: none; } }
.dt-popover-close {
    position: absolute;
    top: 6px;
    right: 10px;
    border: none;
    background: none;
    font-size: 18px;
    line-height: 1;
    color: var(--ld-muted);
    cursor: pointer;
    padding: 2px 4px;
}
.dt-popover-close:hover { color: var(--ld-ink); }
.dt-popover-star {
    display: inline-block;
    background: var(--ld-brass-soft);
    color: var(--ld-brass-dark);
    border-radius: 999px;
    font-size: 11px;
    font-weight: 800;
    padding: 2px 9px;
    margin-bottom: 6px;
}
.dt-popover-title { font-weight: 800; font-size: 15px; margin: 0 0 5px; padding-right: 18px; }
.dt-popover-text { margin: 0 0 10px; font-size: 13.5px; line-height: 1.5; color: var(--ld-muted); }
.dt-popover-cta {
    display: inline-block;
    border: none;
    background: var(--ld-brass);
    color: #fff;
    border-radius: 9px;
    padding: 7px 14px;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    transition: background .2s ease;
}
.dt-popover-cta:hover { background: var(--ld-brass-dark); }

/* ===================== Стрелки и точки ===================== */
.dt-tour-nav {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    margin: 20px 0 8px;
}
.dt-nav-arrow {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    border: 1px solid var(--ld-line);
    background: #fff;
    color: var(--ld-teal);
    font-size: 18px;
    cursor: pointer;
    transition: background .2s ease, color .2s ease, border-color .2s ease;
}
.dt-nav-arrow:hover:not(:disabled) { background: var(--ld-teal); border-color: var(--ld-teal); color: #fff; }
.dt-nav-arrow:disabled { opacity: .35; cursor: default; }
.dt-dots-nav { display: flex; gap: 8px; }
.dt-dots-nav button {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    border: none;
    background: #ddd3c3;
    cursor: pointer;
    padding: 0;
    transition: background .2s ease, transform .2s ease;
}
.dt-dots-nav button.active { background: var(--ld-teal); transform: scale(1.25); }

/* ===================== Экран 1: дашборд ФУ ===================== */
.dt-dash-head {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 14px;
}
.dt-dash-head h3 { margin: 0; font-size: 17px; }
.dt-dash-head span { font-size: 12.5px; color: var(--ld-muted); }
.dt-dash-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
}
.dt-case {
    display: block;
    text-align: left;
    width: 100%;
    background: #fff;
    padding: 12px 14px;
    font: inherit;
    color: inherit;
}
.dt-case-name { font-weight: 800; font-size: 14.5px; }
.dt-case-meta { font-size: 12px; color: var(--ld-muted); margin: 3px 0 7px; }
.dt-case-tags { display: flex; gap: 6px; flex-wrap: wrap; }
.dt-tag {
    border-radius: 999px;
    font-size: 11px;
    font-weight: 700;
    padding: 2px 9px;
    background: var(--ld-teal-soft);
    color: var(--ld-teal-dark);
}
.dt-tag-brass { background: var(--ld-brass-soft); color: var(--ld-brass-dark); }
.dt-case-sum { margin-top: 8px; font-size: 13px; font-weight: 700; }
.dt-widget {
    margin-top: 14px;
    background: var(--ld-teal-soft);
    border: 1px solid rgba(15, 118, 110, .2);
    border-radius: 12px;
    padding: 12px 14px;
}
.dt-widget-title { font-size: 12px; font-weight: 800; text-transform: uppercase; letter-spacing: .05em; color: var(--ld-teal-dark); margin-bottom: 8px; }
.dt-deadline {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    width: 100%;
    font: inherit;
    color: inherit;
    text-align: left;
    background: #fff;
    border-radius: 9px;
    padding: 8px 12px;
    margin-bottom: 6px;
    font-size: 13.5px;
}
.dt-deadline:last-child { margin-bottom: 0; }
.dt-deadline-when { flex: 0 0 auto; font-size: 12px; font-weight: 700; color: var(--ld-brass-dark); }

/* ===================== Экран 2: АРМ юриста ===================== */
.dt-mock-tabs {
    display: flex;
    gap: 6px;
    border-bottom: 1px solid var(--ld-line);
    margin: -20px -20px 16px;
    padding: 10px 20px 0;
    background: #fbf9f5;
}
.dt-mock-tab {
    border: none;
    background: none;
    font: inherit;
    font-size: 13.5px;
    font-weight: 700;
    color: var(--ld-muted);
    padding: 8px 12px;
    cursor: pointer;
    border-bottom: 3px solid transparent;
}
.dt-mock-tab.active { color: var(--ld-teal-dark); border-bottom-color: var(--ld-teal); }
.dt-pane { display: none; }
.dt-pane.active { display: block; animation: dtScreenIn .25s ease; }

.dt-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.dt-table th, .dt-table td {
    text-align: left;
    padding: 7px 9px;
    border-bottom: 1px solid var(--ld-line);
}
.dt-table th { font-size: 11.5px; text-transform: uppercase; letter-spacing: .04em; color: var(--ld-muted); }
.dt-fillable { transition: opacity .38s ease; color: var(--ld-muted); }
.dt-filling { opacity: 0; }
.dt-filled { color: var(--ld-ink); font-weight: 600; }
.dt-mock-actions { margin-top: 14px; display: flex; gap: 10px; flex-wrap: wrap; }

.dt-doc {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    border: 1px solid var(--ld-line);
    border-radius: 10px;
    padding: 10px 12px;
    margin-bottom: 8px;
    font-size: 13.5px;
}
.dt-doc-name { font-weight: 700; flex: 1 1 180px; }
.dt-doc-status { font-size: 12px; color: var(--ld-muted); }
.dt-doc-status.dt-ok { color: var(--ld-teal-dark); font-weight: 800; }
.dt-doc-cat {
    flex: 0 0 auto;
    font-size: 11px;
    font-weight: 700;
    border-radius: 999px;
    padding: 2px 9px;
    background: var(--ld-teal-soft);
    color: var(--ld-teal-dark);
    opacity: 0;
    transition: opacity .3s ease;
}
.dt-done .dt-doc-cat { opacity: 1; }

.dt-chk { list-style: none; margin: 0; padding: 0; }
.dt-chk li {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 10px;
    border: 1px solid var(--ld-line);
    border-radius: 10px;
    margin-bottom: 7px;
    font-size: 13.5px;
    cursor: pointer;
    transition: border-color .2s ease, background .2s ease;
}
.dt-chk li:hover { border-color: var(--ld-teal); }
.dt-chk-box {
    flex: 0 0 20px;
    width: 20px;
    height: 20px;
    border: 2px solid var(--ld-line);
    border-radius: 6px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    font-weight: 800;
    color: #fff;
    transition: background .2s ease, border-color .2s ease;
}
.dt-chk li.dt-on { background: var(--ld-teal-soft); border-color: rgba(15, 118, 110, .35); }
.dt-chk li.dt-on .dt-chk-box { background: var(--ld-teal); border-color: var(--ld-teal); }
.dt-ready {
    display: none;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
    margin-top: 12px;
    background: var(--ld-teal-soft);
    border: 1px solid rgba(15, 118, 110, .3);
    border-radius: 12px;
    padding: 12px 14px;
    font-weight: 700;
    color: var(--ld-teal-dark);
}
.dt-ready.dt-show { display: flex; animation: dtScreenIn .3s ease; }

/* ===================== Телефонная рамка (экраны 3–4) ===================== */
.dt-phone-wrap { display: flex; justify-content: center; padding: 6px 0 2px; }
.dt-phone {
    width: 100%;
    max-width: 360px;
    background: #fff;
    border: 1px solid var(--ld-line);
    border-radius: 28px;
    box-shadow: var(--ld-shadow-up);
    overflow: hidden;
}
.dt-phone-notch {
    height: 26px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f5f1ea;
    border-bottom: 1px solid var(--ld-line);
}
.dt-phone-notch i {
    width: 72px;
    height: 6px;
    border-radius: 3px;
    background: #ddd3c3;
}
.dt-phone-body { padding: 16px; }
.dt-phone-title { font-weight: 800; font-size: 15px; margin-bottom: 3px; }
.dt-phone-sub { font-size: 12px; color: var(--ld-muted); margin-bottom: 12px; }

.dt-stage {
    display: block;
    width: 100%;
    text-align: left;
    font: inherit;
    color: inherit;
    background: #fff;
    padding: 12px;
    margin-bottom: 12px;
}
.dt-stage-label { display: flex; justify-content: space-between; font-size: 12.5px; font-weight: 700; margin-bottom: 7px; }
.dt-stage-label span:last-child { color: var(--ld-teal-dark); }
.dt-progress-track {
    height: 9px;
    border-radius: 5px;
    background: var(--ld-line);
    overflow: hidden;
}
.dt-progress-bar {
    height: 100%;
    width: 60%;
    border-radius: 5px;
    background: linear-gradient(90deg, var(--ld-teal), #14b8a6);
}
.dt-doing { margin: 0 0 12px; padding: 0; list-style: none; }
.dt-doing li {
    font-size: 13px;
    padding: 6px 0 6px 24px;
    position: relative;
    border-bottom: 1px dashed var(--ld-line);
}
.dt-doing li:last-child { border-bottom: none; }
.dt-doing li::before {
    content: "✓";
    position: absolute;
    left: 2px;
    color: var(--ld-teal);
    font-weight: 800;
}
.dt-pay {
    display: block;
    width: 100%;
    text-align: left;
    font: inherit;
    color: inherit;
    background: #fff;
    padding: 12px;
}
.dt-pay-row { display: flex; align-items: center; gap: 10px; }
.dt-pay-logo {
    flex: 0 0 34px;
    width: 34px;
    height: 34px;
    border-radius: 9px;
    background: #e8480c; /* фирменный Kaspi-красный */
    color: #fff;
    font-weight: 800;
    font-size: 13px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
.dt-pay-sum { font-weight: 800; font-size: 14.5px; }
.dt-pay-note { font-size: 12px; color: var(--ld-muted); }
.dt-wa-btn {
    display: block;
    text-align: center;
    margin-top: 12px;
    background: #1faa55;
    color: #fff;
    border-radius: 10px;
    padding: 10px;
    font-weight: 700;
    font-size: 14px;
    text-decoration: none;
}

/* ===================== Экран 4: Telegram-чат ===================== */
.dt-chat {
    background: #ece5d8;
    padding: 14px 12px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.dt-chat-head {
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 4px 6px 10px;
    border-bottom: 1px solid rgba(28, 25, 23, .08);
    margin-bottom: 4px;
}
.dt-chat-ava {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: var(--ld-teal);
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
}
.dt-chat-name { font-size: 13px; font-weight: 800; }
.dt-chat-status { font-size: 11px; color: var(--ld-muted); }
.dt-msg {
    max-width: 88%;
    background: #fff;
    border-radius: 12px 12px 12px 4px;
    padding: 8px 11px 5px;
    font-size: 12.8px;
    line-height: 1.45;
    box-shadow: 0 1px 2px rgba(28, 25, 23, .12);
}
.dt-msg-time { display: block; text-align: right; font-size: 10.5px; color: var(--ld-muted); margin-top: 2px; }

/* ===================== Финальный блок ===================== */
.dt-final { text-align: center; }
.dt-final .dt-cta { margin-top: 20px; }
.dt-fine {
    font-size: 12.5px;
    color: var(--ld-muted);
    max-width: 560px;
    margin: 16px auto 0;
}
.dt-key-toggle {
    margin-top: 14px;
    font-size: 13px;
}
.dt-keyform {
    display: none;
    margin: 10px auto 0;
    max-width: 320px;
    gap: 8px;
}
.dt-keyform.dt-show { display: flex; }
.dt-keyform input {
    flex: 1 1 auto;
    min-width: 0;
    border: 1px solid var(--ld-line);
    border-radius: 9px;
    padding: 8px 12px;
    font: inherit;
    font-size: 14px;
    background: #fff;
}

/* ===================== prefers-reduced-motion: всё статично ===================== */
@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    .dt-screen.active, .dt-pane.active, .dt-ready.dt-show,
    .dt-popover { animation: none; }
    .dt-tip, .dt-tour-tab, .dt-nav-arrow, .dt-dots-nav button,
    .dt-chk li, .dt-chk-box, .dt-fillable, .dt-doc-cat,
    .dt-popover-cta { transition: none; }
}

/* ===================== Адаптив ===================== */
@media (max-width: 860px) {
    .dt-dash-grid { grid-template-columns: 1fr; }
    .dt-frame-body { padding: 14px; }
    .dt-mock-tabs { margin: -14px -14px 14px; padding: 8px 14px 0; }
    .dt-hero { padding: 48px 20px 30px; }
    .dt-popover { width: 270px; }
}
