/* Встроенное руководство «Помощь» — вкладки, мокапы экранов, печать */

.help-modal-content {
    max-width: 920px !important;
    width: min(96vw, 920px);
}

.help-guide-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin: 12px 0 14px;
    padding-bottom: 10px;
    border-bottom: 1px solid #e2e8f0;
}

.help-guide-tab {
    padding: 7px 14px;
    border: 1px solid #cbd5e1;
    border-radius: 999px;
    background: #f8fafc;
    color: #334155;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.15s, border-color 0.15s, color 0.15s;
}

.help-guide-tab:hover {
    background: #e2e8f0;
}

.help-guide-tab--active {
    background: linear-gradient(135deg, #1d4ed8 0%, #2563eb 100%);
    border-color: #1d4ed8;
    color: #fff;
}

.help-guide-body {
    font-size: 14px;
    color: #334155;
    line-height: 1.55;
    max-height: 62vh;
    overflow-y: auto;
    padding-right: 4px;
}

.help-guide-footer {
    margin-top: 16px;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
}

.help-guide-footer .help-btn-print {
    background: #0f766e;
    color: #fff;
    padding: 8px 14px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
}

.help-guide-footer .help-btn-print:hover {
    background: #0d9488;
}

.help-section-title {
    font-size: 16px;
    font-weight: 700;
    color: #0f172a;
    margin: 0 0 10px;
}

.help-section-lead {
    margin: 0 0 14px;
    color: #475569;
}

.help-step-card {
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 12px 14px;
    margin-bottom: 10px;
    background: #fff;
}

.help-step-card--highlight {
    border-left: 4px solid #1d4ed8;
}

.help-step-card__letter {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: #1d4ed8;
    color: #fff;
    font-size: 13px;
    font-weight: 700;
    margin-right: 8px;
    vertical-align: middle;
}

.help-step-card h4 {
    display: inline;
    font-size: 15px;
    color: #0f172a;
    margin: 0;
}

.help-step-card p,
.help-step-card ul,
.help-step-card ol {
    margin: 8px 0 0;
    padding-left: 18px;
}

.help-role-card {
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 12px 14px;
    margin-bottom: 10px;
    background: #f8fafc;
}

.help-role-card h4 {
    margin: 0 0 6px;
    font-size: 15px;
    color: #1d4ed8;
}

.help-role-card__key {
    font-size: 12px;
    color: #64748b;
    font-family: ui-monospace, Consolas, monospace;
}

.help-table-wrap {
    overflow-x: auto;
    margin: 10px 0 14px;
}

.help-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

.help-table th,
.help-table td {
    border: 1px solid #e2e8f0;
    padding: 8px 10px;
    text-align: left;
    vertical-align: top;
}

.help-table th {
    background: #f1f5f9;
    color: #0f172a;
    font-weight: 600;
}

.help-faq-item {
    border-bottom: 1px solid #e2e8f0;
    padding: 10px 0;
}

.help-faq-item:last-child {
    border-bottom: none;
}

.help-faq-item strong {
    color: #0f172a;
    display: block;
    margin-bottom: 4px;
}

.help-open-full {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin: 0 0 12px;
    padding: 8px 14px;
    border-radius: 8px;
    border: 1px solid #1d4ed8;
    background: #f0f9ff;
    color: #2563eb;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    text-decoration: none;
}

.help-open-full:hover {
    background: #e0f2fe;
}

/* Мокап экрана с подсветкой кнопок */
.help-mockup {
    border: 1px solid #cbd5e1;
    border-radius: 10px;
    overflow: hidden;
    margin: 12px 0 16px;
    background: #f8fafc;
    box-shadow: 0 2px 8px rgba(15, 23, 42, 0.06);
}

.help-mockup__title {
    padding: 8px 12px;
    font-size: 12px;
    font-weight: 600;
    color: #64748b;
    background: #e2e8f0;
    border-bottom: 1px solid #cbd5e1;
}

.help-mockup__header {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    padding: 8px 10px;
    background: linear-gradient(135deg, #1d4ed8 0%, #2563eb 100%);
}

.help-mockup__header-btn {
    padding: 4px 8px;
    border-radius: 6px;
    font-size: 11px;
    color: rgba(255, 255, 255, 0.75);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.help-mockup__header-btn--hot {
    background: rgba(255, 255, 255, 0.25);
    color: #fff;
    border-color: #fbbf24;
    box-shadow: 0 0 0 2px rgba(251, 191, 36, 0.5);
    position: relative;
}

.help-mockup__tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    padding: 8px 10px;
    background: #fff;
    border-bottom: 1px solid #e2e8f0;
}

.help-mockup__tab {
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 11px;
    background: #f1f5f9;
    color: #475569;
}

.help-mockup__tab--active {
    background: linear-gradient(135deg, #dc2626 0%, #991b1b 100%);
    color: #fff;
}

.help-mockup__subtabs {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    padding: 6px 10px;
    background: #f8fafc;
    border-bottom: 1px solid #e2e8f0;
}

.help-mockup__subtab {
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 10px;
    background: #e2e8f0;
    color: #475569;
}

.help-mockup__subtab--hot {
    background: #fef3c7;
    color: #92400e;
    border: 1px solid #f59e0b;
    font-weight: 600;
}

.help-mockup__canvas {
    position: relative;
    min-height: 120px;
    padding: 12px;
    background: #fff;
}

.help-mockup__toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 10px;
}

.help-mockup__action {
    padding: 5px 10px;
    border-radius: 6px;
    font-size: 11px;
    background: #e2e8f0;
    color: #334155;
    border: 1px solid #cbd5e1;
}

.help-mockup__action--hot {
    background: #dcfce7;
    border-color: #22c55e;
    color: #166534;
    font-weight: 600;
    position: relative;
}

.help-mockup__grid {
    display: grid;
    grid-template-columns: 80px repeat(7, 1fr);
    gap: 2px;
    font-size: 9px;
}

.help-mockup__cell {
    background: #f1f5f9;
    border: 1px solid #e2e8f0;
    padding: 6px 2px;
    text-align: center;
    min-height: 22px;
}

.help-mockup__cell--hot {
    background: #fef08a;
    border-color: #eab308;
    box-shadow: inset 0 0 0 2px #ca8a04;
    font-weight: 700;
}

.help-mockup__cell--repair {
    background: #fecaca;
}

.help-callouts {
    margin: 0;
    padding: 10px 12px 12px 28px;
    background: #f8fafc;
    border-top: 1px solid #e2e8f0;
    font-size: 13px;
    line-height: 1.5;
}

.help-callouts li {
    margin-bottom: 4px;
}

.help-callouts li strong {
    color: #1d4ed8;
}

.help-arrow-label {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 12px;
    color: #b45309;
    font-weight: 600;
    margin-left: 4px;
}

.help-arrow-label::before {
    content: "→";
    font-size: 14px;
}

.help-cycle-flow {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    align-items: center;
    margin: 10px 0 16px;
    font-size: 12px;
}

.help-cycle-flow span {
    padding: 4px 8px;
    background: #e0f2fe;
    border-radius: 6px;
    color: #2563eb;
    white-space: nowrap;
}

.help-cycle-flow .help-cycle-arrow {
    color: #94a3b8;
    background: none;
    padding: 0;
}

.help-pill-list {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin: 8px 0 0;
    padding: 0;
    list-style: none;
}

.help-pill-list li {
    padding: 4px 10px;
    background: #f1f5f9;
    border-radius: 999px;
    font-size: 12px;
    color: #475569;
}

/* Печать / PDF */
@media print {
    body * {
        visibility: hidden !important;
    }

    #helpPrintRoot,
    #helpPrintRoot * {
        visibility: visible !important;
    }

    #helpPrintRoot {
        position: absolute !important;
        left: 0 !important;
        top: 0 !important;
        width: 100% !important;
        padding: 16px 20px !important;
        background: #fff !important;
        color: #000 !important;
    }

    .help-guide-tabs,
    .help-guide-footer,
    .help-open-full,
    .close-modal {
        display: none !important;
    }

    .help-guide-body,
    .help-mockup {
        max-height: none !important;
        overflow: visible !important;
        break-inside: avoid;
    }

    .help-step-card,
    .help-role-card {
        break-inside: avoid;
        page-break-inside: avoid;
    }
}

/* Интерактивное обучение — карточки сценариев */
.help-training-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 12px;
    margin-top: 12px;
}

.help-training-card {
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 14px 16px;
    background: #f8fafc;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.help-training-card--done {
    border-color: #86efac;
    background: linear-gradient(135deg, #f0fdf4 0%, #f8fafc 100%);
}

.help-training-card h4 {
    margin: 0;
    font-size: 15px;
    color: #0f172a;
}

.help-training-card__lead {
    margin: 0;
    font-size: 13px;
    color: #475569;
    line-height: 1.45;
    flex: 1;
}

.help-training-card__meta {
    font-size: 12px;
    color: #64748b;
}

.help-training-start {
    margin-top: 4px;
    padding: 8px 12px;
    border: none;
    border-radius: 8px;
    background: linear-gradient(135deg, #1d4ed8 0%, #2563eb 100%);
    color: #fff;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    align-self: flex-start;
}

.help-training-start:hover {
    filter: brightness(1.05);
}

.help-training-card--featured {
    border-color: #93c5fd;
    background: linear-gradient(135deg, #eff6ff 0%, #f8fafc 100%);
}

.help-training-card__badge {
    display: inline-block;
    margin-bottom: 4px;
    padding: 2px 8px;
    border-radius: 999px;
    background: #2563eb;
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.help-training-group-title {
    margin: 18px 0 8px;
    font-size: 14px;
    font-weight: 700;
    color: #0f172a;
}

.help-training-group-title:first-of-type {
    margin-top: 8px;
}
    margin: 14px 0 0;
    padding: 12px 14px;
    border-radius: 10px;
    border: 1px solid #bae6fd;
    background: #f0f9ff;
    font-size: 13px;
    color: #1d4ed8;
    line-height: 1.5;
}

.help-training-promo__link {
    border: none;
    background: none;
    color: #2563eb;
    font-weight: 700;
    cursor: pointer;
    text-decoration: underline;
    padding: 0;
    font-size: inherit;
}

/* Тур с подсветкой (общий слой) */
#nek-tour-root {
    position: fixed;
    inset: 0;
    z-index: 10001;
    pointer-events: none;
}

#nek-tour-spotlight {
    position: fixed;
    z-index: 10001;
    border-radius: 12px;
    box-shadow: 0 0 0 9999px rgba(15, 23, 42, 0.58);
    pointer-events: none;
    display: none;
    transition: top 0.2s ease, left 0.2s ease, width 0.2s ease, height 0.2s ease;
}

#nek-tour-tooltip {
    pointer-events: auto;
}

.nek-tour-scenario-badge {
    display: inline-block;
    margin: 0 0 8px;
    padding: 3px 10px;
    border-radius: 999px;
    background: #e0f2fe;
    color: #2563eb;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.02em;
    text-transform: uppercase;
}

.nek-tour-progress {
    margin: 0 0 8px;
    font-size: 12px;
    color: #64748b;
    font-weight: 600;
}

.nek-tour-mock {
    margin: 0 0 12px;
    display: none;
}

.nek-tour-mock__box {
    padding: 10px 12px;
    border-radius: 8px;
    background: #fffbeb;
    border: 1px solid #fcd34d;
    font-size: 13px;
    color: #78350f;
    line-height: 1.45;
}

.nek-tour-mock__label {
    display: block;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    color: #b45309;
    margin-bottom: 4px;
}

.nek-tour-highlight {
    position: relative;
    z-index: 10002 !important;
    outline: 3px solid #2563eb !important;
    outline-offset: 2px;
    border-radius: 8px;
}

#nek-tour-tooltip {
    position: fixed;
    z-index: 10003;
    left: 50%;
    bottom: 24px;
    transform: translateX(-50%);
    max-width: min(440px, calc(100vw - 32px));
    background: #fff;
    border-radius: 14px;
    padding: 16px 18px;
    box-shadow: 0 20px 50px rgba(15, 23, 42, 0.28);
    border: 1px solid #e2e8f0;
}

#nek-tour-tooltip h4 {
    margin: 0 0 8px;
    font-size: 16px;
    color: #0f172a;
}

#nek-tour-tooltip p {
    margin: 0 0 12px;
    font-size: 14px;
    line-height: 1.5;
    color: #475569;
}

.nek-tour-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: flex-end;
}

.nek-tour-actions button {
    padding: 8px 14px;
    border-radius: 8px;
    border: none;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
}

#nek-tour-next { background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%); color: #fff; }
#nek-tour-back { background: #f1f5f9; color: #334155; }
#nek-tour-skip { background: transparent; color: #64748b; border: 1px solid #e2e8f0 !important; }

.dialog--help .modal__content {
    max-width: min(96vw, 920px);
    width: 100%;
}

.chat-faq-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    margin: 0 0 0.65rem;
    padding: 0.55rem 0.65rem;
    border-radius: 10px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
}

.chat-faq-chips__label {
    width: 100%;
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    color: #64748b;
    margin-bottom: 0.15rem;
}

.chat-faq-chip {
    border: 1px solid #cbd5e1;
    background: #fff;
    color: #334155;
    border-radius: 999px;
    padding: 0.28rem 0.65rem;
    font-size: 0.78rem;
    font-weight: 600;
    cursor: pointer;
}

.chat-faq-chip:hover {
    border-color: #2563eb;
    color: #1d4ed8;
}

.chat-faq-chip--primary {
    background: #eff6ff;
    border-color: #93c5fd;
    color: #1d4ed8;
}

.chat-msg--system {
    align-self: center;
    max-width: 92%;
    background: #f0f9ff;
    border: 1px solid #bae6fd;
    border-radius: 12px;
    padding: 0.65rem 0.85rem;
    font-size: 0.88rem;
    line-height: 1.45;
    color: #0c4a6e;
}

.chat-msg--system strong {
    display: block;
    margin-bottom: 0.25rem;
    color: #0f172a;
}

@media print {
    #nek-tour-root { display: none !important; }
    #helpPrintRoot { display: block !important; }
    .dialog--help { display: none !important; }
}
