/* Справка OPTORA Partner — светлая/тёмная тема, мобильная версия */

:root,
[data-theme="light"] {
    --help-bg: #f0f4f8;
    --help-surface: #ffffff;
    --help-surface-2: #f8fafc;
    --help-text: #1e293b;
    --help-muted: #64748b;
    --help-border: #e2e8f0;
    --help-accent: #667eea;
    --help-accent-2: #764ba2;
    --help-green: #059669;
    --help-green-bg: #ecfdf5;
    --help-yellow-bg: #fffbeb;
    --help-yellow: #b45309;
    --help-blue-bg: #eff6ff;
    --help-blue: #1d4ed8;
    --help-shadow: 0 4px 24px rgba(15, 23, 42, 0.08);
    --help-sidebar-bg: linear-gradient(165deg, #667eea 0%, #764ba2 100%);
    --help-sidebar-supplier: linear-gradient(165deg, #14532d 0%, #166534 45%, #0f3d6b 100%);
}

[data-theme="dark"] {
    --help-bg: #0f172a;
    --help-surface: #1e293b;
    --help-surface-2: #334155;
    --help-text: #f1f5f9;
    --help-muted: #94a3b8;
    --help-border: #475569;
    --help-accent: #818cf8;
    --help-accent-2: #a78bfa;
    --help-green-bg: rgba(5, 150, 105, 0.15);
    --help-yellow-bg: rgba(180, 83, 9, 0.15);
    --help-blue-bg: rgba(29, 78, 216, 0.15);
    --help-shadow: 0 4px 24px rgba(0, 0, 0, 0.35);
}

.help-body {
    margin: 0;
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
    background: var(--help-bg);
    color: var(--help-text);
    line-height: 1.65;
    min-height: 100vh;
}

.help-topbar {
    position: sticky;
    top: 0;
    z-index: 200;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.75rem 1.25rem;
    background: var(--help-surface);
    border-bottom: 1px solid var(--help-border);
    box-shadow: var(--help-shadow);
}

.help-topbar-brand {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    font-weight: 800;
    font-size: 1.1rem;
    color: var(--help-text);
    text-decoration: none;
}

.help-topbar-brand i { color: var(--help-accent); }

.help-topbar-actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.help-theme-btn,
.help-menu-btn,
.help-btn {
    border: 1px solid var(--help-border);
    background: var(--help-surface-2);
    color: var(--help-text);
    border-radius: 10px;
    padding: 0.45rem 0.85rem;
    cursor: pointer;
    font-size: 0.85rem;
    font-weight: 600;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    transition: transform 0.15s, box-shadow 0.15s;
}

.help-theme-btn:hover,
.help-menu-btn:hover,
.help-btn:hover {
    transform: translateY(-1px);
    box-shadow: var(--help-shadow);
}

.help-btn-primary {
    background: linear-gradient(135deg, var(--help-accent), var(--help-accent-2));
    color: #fff;
    border: none;
}

.help-layout {
    display: flex;
    max-width: 1280px;
    margin: 0 auto;
    min-height: calc(100vh - 56px);
}

.help-sidebar {
    width: 280px;
    flex-shrink: 0;
    background: var(--help-sidebar-bg);
    color: #fff;
    padding: 1.25rem 0;
    position: sticky;
    top: 56px;
    height: calc(100vh - 56px);
    overflow-y: auto;
}

.help-sidebar.supplier-theme {
    background: var(--help-sidebar-supplier);
}

.help-sidebar-title {
    padding: 0 1.25rem 1rem;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    opacity: 0.75;
    font-weight: 700;
}

.help-nav-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.65rem 1.25rem;
    color: rgba(255, 255, 255, 0.85);
    text-decoration: none;
    font-size: 0.9rem;
    border-left: 3px solid transparent;
    transition: background 0.2s;
}

.help-nav-link:hover {
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
}

.help-nav-link.active {
    background: rgba(255, 255, 255, 0.18);
    border-left-color: #fff;
    color: #fff;
    font-weight: 600;
}

.help-nav-link i { width: 18px; text-align: center; }

.help-main {
    flex: 1;
    padding: 1.5rem 1.75rem 3rem;
    min-width: 0;
}

.help-card {
    background: var(--help-surface);
    border: 1px solid var(--help-border);
    border-radius: 16px;
    padding: 1.75rem;
    margin-bottom: 1.25rem;
    box-shadow: var(--help-shadow);
}

.help-hero-title {
    font-size: clamp(1.5rem, 4vw, 2rem);
    font-weight: 800;
    margin: 0 0 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.help-hero-title i { color: var(--help-accent); }

.help-intro {
    font-size: 1.05rem;
    color: var(--help-muted);
    margin: 0;
}

/* Flow with arrows */
.help-flow {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.35rem 0.5rem;
    margin: 1rem 0;
}

.help-flow-item {
    background: var(--help-surface-2);
    border: 1px solid var(--help-border);
    border-radius: 999px;
    padding: 0.45rem 1rem;
    font-size: 0.85rem;
    font-weight: 600;
}

.help-flow-arrow {
    color: var(--help-accent);
    font-size: 1.1rem;
    font-weight: 700;
}

/* Steps */
.help-steps {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-top: 1.25rem;
}

.help-step {
    display: flex;
    gap: 1rem;
    align-items: flex-start;
}

.help-step-num {
    flex-shrink: 0;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--help-accent), var(--help-accent-2));
    color: #fff;
    font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.95rem;
}

.help-step-body h3 {
    margin: 0 0 0.35rem;
    font-size: 1rem;
}

.help-step-body p {
    margin: 0;
    color: var(--help-muted);
    font-size: 0.95rem;
}

.help-step-arrow-down {
    text-align: center;
    color: var(--help-accent);
    font-size: 1.25rem;
    margin: -0.25rem 0;
    padding-left: 10px;
}

/* Callouts */
.help-callout {
    border-radius: 12px;
    padding: 1rem 1.15rem;
    margin-bottom: 0.75rem;
    display: flex;
    gap: 0.75rem;
    align-items: flex-start;
    font-size: 0.92rem;
}

.help-callout i { margin-top: 2px; flex-shrink: 0; }

.help-callout-tip {
    background: var(--help-green-bg);
    border: 1px solid rgba(5, 150, 105, 0.25);
    color: var(--help-green);
}

[data-theme="dark"] .help-callout-tip { color: #6ee7b7; }

.help-callout-admin {
    background: var(--help-blue-bg);
    border: 1px solid rgba(29, 78, 216, 0.25);
    color: var(--help-blue);
}

[data-theme="dark"] .help-callout-admin { color: #93c5fd; }

.help-callout-warn {
    background: var(--help-yellow-bg);
    border: 1px solid rgba(180, 83, 9, 0.25);
    color: var(--help-yellow);
}

/* Hub grid */
.help-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 1rem;
    margin-top: 1.5rem;
}

.help-grid-card {
    background: var(--help-surface);
    border: 1px solid var(--help-border);
    border-radius: 14px;
    padding: 1.25rem;
    text-decoration: none;
    color: var(--help-text);
    transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.help-grid-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--help-shadow);
    border-color: var(--help-accent);
    color: var(--help-text);
}

.help-grid-card i {
    font-size: 1.5rem;
    color: var(--help-accent);
}

.help-grid-card span {
    font-weight: 700;
    font-size: 1rem;
}

.help-grid-card small {
    color: var(--help-muted);
    font-size: 0.8rem;
}

.help-choice {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}

.help-choice-card {
    background: var(--help-surface);
    border-radius: 20px;
    padding: 2rem;
    text-align: center;
    border: 2px solid var(--help-border);
    text-decoration: none;
    color: var(--help-text);
    transition: all 0.25s;
}

.help-choice-card:hover {
    border-color: var(--help-accent);
    transform: translateY(-4px);
    box-shadow: var(--help-shadow);
    color: var(--help-text);
}

.help-choice-card i {
    font-size: 3rem;
    margin-bottom: 1rem;
    color: var(--help-accent);
}

.help-choice-card.supplier i { color: #16a34a; }

.help-section-label {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--help-muted);
    margin: 1.5rem 0 0.75rem;
}

.help-section-title {
    font-size: 1.05rem;
    margin: 0 0 0.75rem;
}

.help-nav-footer {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    margin-top: 2rem;
    flex-wrap: wrap;
}

.help-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.45);
    z-index: 150;
}

.help-overlay.show { display: block; }

.help-menu-btn { display: none; }

@media (max-width: 900px) {
    .help-menu-btn { display: inline-flex; }

    .help-sidebar {
        position: fixed;
        left: 0;
        top: 56px;
        z-index: 160;
        transform: translateX(-100%);
        transition: transform 0.3s ease;
        box-shadow: 4px 0 24px rgba(0, 0, 0, 0.2);
    }

    .help-sidebar.open { transform: translateX(0); }

    .help-main { padding: 1rem; }
}

@media (max-width: 480px) {
    .help-topbar { padding: 0.6rem 0.85rem; }
    .help-card { padding: 1.15rem; }
}
