/* =========================================================
   CENTRO DE AYUDA Y MANUALES DE USUARIO - PIUQUÉN BIOMÉDICA
   ========================================================= */

.help-center-container {
    padding: 1.5rem;
    max-width: 1400px;
    margin: 0 auto;
    font-family: var(--font-family, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif);
    color: #0f172a;
}

/* Header Banner */
.help-hero-card {
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
    border-radius: 16px;
    padding: 2.2rem 2.5rem;
    color: #ffffff;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.25);
    margin-bottom: 2rem;
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.help-hero-card::after {
    content: '';
    position: absolute;
    top: -50%;
    right: -10%;
    width: 380px;
    height: 380px;
    background: radial-gradient(circle, rgba(99, 102, 241, 0.25) 0%, rgba(0, 0, 0, 0) 70%);
    pointer-events: none;
}

.help-hero-content {
    max-width: 680px;
    z-index: 1;
}

.help-hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(99, 102, 241, 0.35);
    color: #c7d2fe;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.82rem;
    font-weight: 700;
    margin-bottom: 12px;
    border: 1px solid rgba(165, 180, 252, 0.4);
}

.help-hero-title {
    font-size: 1.95rem;
    font-weight: 800;
    margin: 0 0 8px 0;
    letter-spacing: -0.02em;
    color: #ffffff;
}

.help-hero-subtitle {
    font-size: 0.98rem;
    color: #cbd5e1;
    margin: 0;
    line-height: 1.6;
    font-weight: 400;
}

.help-hero-actions {
    display: flex;
    gap: 12px;
    z-index: 1;
}

/* Role Switcher Tabs */
.help-role-tabs {
    display: flex;
    gap: 12px;
    margin-bottom: 2rem;
    background: #ffffff;
    padding: 8px;
    border-radius: 14px;
    border: 1.5px solid #cbd5e1;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.04);
    flex-wrap: wrap;
}

.help-role-btn {
    flex: 1;
    min-width: 220px;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 18px;
    background: transparent;
    border: 1.5px solid transparent;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: left;
}

.help-role-btn:hover {
    background: #f8fafc;
    border-color: #cbd5e1;
}

.help-role-btn.active {
    background: #eff6ff;
    border-color: #2563eb;
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.15);
}

.help-role-icon {
    width: 42px;
    height: 42px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    background: #f1f5f9;
    color: #334155;
    transition: all 0.2s;
}

.help-role-btn.active .help-role-icon {
    background: #2563eb;
    color: #ffffff;
}

.help-role-info {
    display: flex;
    flex-direction: column;
}

.help-role-name {
    font-weight: 800;
    font-size: 0.98rem;
    color: #0f172a;
}

.help-role-desc {
    font-size: 0.8rem;
    color: #334155;
    font-weight: 500;
}

/* Documentation Layout: 2 Columns */
.help-doc-layout {
    display: grid;
    grid-template-columns: 290px 1fr;
    gap: 28px;
    align-items: start;
}

/* Sticky Sidebar (Table of Contents) */
.help-toc-sticky {
    position: sticky;
    top: 20px;
    background: #ffffff;
    border-radius: 14px;
    border: 1.5px solid #cbd5e1;
    padding: 18px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.04);
    max-height: calc(100vh - 40px);
    overflow-y: auto;
}

.help-toc-header {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.88rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #0f172a;
    margin-bottom: 14px;
    padding-bottom: 10px;
    border-bottom: 2px solid #e2e8f0;
}

.help-toc-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.help-toc-link {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 12px;
    border-radius: 8px;
    color: #1e293b;
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 600;
    transition: all 0.15s ease;
    border: 1px solid transparent;
}

.help-toc-link:hover {
    background: #f1f5f9;
    color: #0284c7;
    border-color: #e2e8f0;
    transform: translateX(3px);
}

.help-toc-link.active {
    background: #eff6ff;
    color: #1d4ed8;
    font-weight: 700;
    border-left: 4px solid #2563eb;
    border-color: #bfdbfe #bfdbfe #bfdbfe #2563eb;
}

/* Main Manual Document Body */
.help-doc-body {
    background: #ffffff;
    border-radius: 16px;
    border: 1.5px solid #cbd5e1;
    padding: 2.8rem 3.2rem;
    box-shadow: 0 6px 16px -2px rgba(0, 0, 0, 0.05);
    color: #0f172a;
    line-height: 1.75;
}

.help-doc-body h1.doc-section-title {
    font-size: 1.8rem;
    font-weight: 800;
    color: #0f172a;
    margin: 0 0 1.5rem 0;
    padding-bottom: 1rem;
    border-bottom: 2px solid #e2e8f0;
    display: flex;
    align-items: center;
    gap: 12px;
}

.help-doc-body h2 {
    font-size: 1.4rem;
    font-weight: 800;
    color: #0f172a;
    margin: 2.2rem 0 1rem 0;
    display: flex;
    align-items: center;
    gap: 10px;
}

.help-doc-body h3 {
    font-size: 1.15rem;
    font-weight: 700;
    color: #0f172a;
    margin: 1.6rem 0 0.8rem 0;
}

.help-doc-body h4 {
    font-size: 1.02rem;
    font-weight: 700;
    color: #0f172a;
    margin: 1.2rem 0 0.5rem 0;
}

.help-doc-body p {
    margin: 0 0 1.2rem 0;
    font-size: 0.97rem;
    color: #1e293b;
    font-weight: 400;
}

.help-doc-body strong {
    color: #0f172a;
    font-weight: 700;
}

.help-doc-body ul, .help-doc-body ol {
    margin: 0 0 1.4rem 0;
    padding-left: 1.5rem;
    color: #1e293b;
}

.help-doc-body li {
    margin-bottom: 0.6rem;
    font-size: 0.97rem;
    color: #1e293b;
}

/* Callout Boxes */
.doc-callout {
    border-radius: 12px;
    padding: 16px 20px;
    margin: 1.5rem 0;
    display: flex;
    gap: 14px;
    align-items: flex-start;
    font-size: 0.94rem;
    line-height: 1.6;
    font-weight: 500;
}

.doc-callout-icon {
    font-size: 1.35rem;
    flex-shrink: 0;
    margin-top: 2px;
}

.doc-callout.tip {
    background: #f0fdf4;
    border: 1.5px solid #86efac;
    color: #14532d;
}
.doc-callout.tip .doc-callout-icon { color: #15803d; }
.doc-callout.tip strong { color: #14532d; }

.doc-callout.info {
    background: #eff6ff;
    border: 1.5px solid #93c5fd;
    color: #1e3a8a;
}
.doc-callout.info .doc-callout-icon { color: #1d4ed8; }
.doc-callout.info strong { color: #1e3a8a; }

.doc-callout.warning {
    background: #fffbeb;
    border: 1.5px solid #fcd34d;
    color: #78350f;
}
.doc-callout.warning .doc-callout-icon { color: #b45309; }
.doc-callout.warning strong { color: #78350f; }

/* Step-by-Step Cards */
.doc-steps-list {
    display: flex;
    flex-direction: column;
    gap: 14px;
    margin: 1.5rem 0;
}

.doc-step-card {
    display: flex;
    gap: 16px;
    background: #f8fafc;
    border: 1.5px solid #e2e8f0;
    border-radius: 12px;
    padding: 18px 20px;
    transition: all 0.2s;
}

.doc-step-card:hover {
    border-color: #94a3b8;
    background: #ffffff;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
}

.doc-step-number {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: #2563eb;
    color: #ffffff;
    font-weight: 800;
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.doc-step-content h4 {
    margin: 0 0 6px 0;
    font-size: 1.02rem;
    color: #0f172a;
    font-weight: 800;
}

.doc-step-content p {
    margin: 0;
    font-size: 0.92rem;
    color: #1e293b;
    line-height: 1.55;
}

/* Feature Grid Cards inside Manual */
.doc-feature-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
    margin: 1.5rem 0;
}

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

.doc-feature-box {
    background: #f8fafc;
    border: 1.5px solid #e2e8f0;
    border-radius: 12px;
    padding: 20px 22px;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    transition: all 0.2s ease;
}

.doc-feature-box:hover {
    border-color: #94a3b8;
    background: #ffffff;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
}

.doc-feature-box i {
    font-size: 1.6rem;
    margin-bottom: 12px;
    display: inline-block;
}

.doc-feature-box h4 {
    margin: 0 0 8px 0;
    font-size: 1.02rem;
    color: #0f172a;
    font-weight: 800;
}

.doc-feature-box p {
    margin: 0;
    font-size: 0.92rem;
    color: #1e293b;
    line-height: 1.55;
}

/* Tables inside Help */
.help-doc-body table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.5rem 0;
    font-size: 0.92rem;
    color: #0f172a;
    border: 1.5px solid #cbd5e1;
    border-radius: 8px;
    overflow: hidden;
}

.help-doc-body table thead tr {
    background: #f1f5f9;
    border-bottom: 2px solid #cbd5e1;
    text-align: left;
}

.help-doc-body table th {
    padding: 12px 14px;
    font-weight: 800;
    color: #0f172a;
}

.help-doc-body table td {
    padding: 12px 14px;
    border-bottom: 1px solid #e2e8f0;
    color: #1e293b;
}

.help-doc-body table tbody tr:hover {
    background: #f8fafc;
}

/* Keyboard Badges */
kbd {
    background: #f1f5f9;
    border: 1px solid #94a3b8;
    border-radius: 5px;
    box-shadow: 0 1px 0 rgba(0, 0, 0, 0.15);
    color: #0f172a;
    font-family: monospace;
    font-size: 0.82rem;
    font-weight: 700;
    padding: 2px 7px;
}

/* Search Box inside Manuals */
.manual-search-wrapper {
    margin-bottom: 1.5rem;
    position: relative;
}

.manual-search-wrapper input {
    width: 100%;
    padding: 12px 18px 12px 42px;
    border-radius: 10px;
    border: 1.5px solid #cbd5e1;
    font-size: 0.95rem;
    color: #0f172a;
    background: #ffffff;
    box-sizing: border-box;
    transition: all 0.2s;
    font-weight: 500;
}

.manual-search-wrapper input::placeholder {
    color: #64748b;
}

.manual-search-wrapper input:focus {
    border-color: #2563eb;
    outline: none;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.2);
}

.manual-search-wrapper i {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: #64748b;
    font-size: 1.1rem;
}

/* Quick FAQs */
.help-faq-card {
    border: 1.5px solid #cbd5e1;
    border-radius: 12px;
    margin-bottom: 12px;
    overflow: hidden;
    background: #ffffff;
}

.help-faq-question {
    padding: 14px 18px;
    font-weight: 700;
    font-size: 0.98rem;
    color: #0f172a;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #f8fafc;
    transition: background 0.15s;
}

.help-faq-question:hover {
    background: #f1f5f9;
}

.help-faq-answer {
    padding: 16px 18px;
    font-size: 0.94rem;
    color: #1e293b;
    line-height: 1.65;
    border-top: 1px solid #e2e8f0;
}

/* =========================================================
   PRINT STYLES FOR PDF MANUAL GENERATION
   ========================================================= */
@media print {
    body * {
        visibility: hidden;
    }

    #appScreen, .main-content, .app-main, .help-center-container, .help-doc-body, .help-doc-body * {
        visibility: visible;
    }

    .help-hero-card,
    .help-role-tabs,
    .help-toc-sticky,
    .manual-search-wrapper,
    .sidebar,
    .app-header,
    .header-actions {
        display: none !important;
    }

    .help-doc-layout {
        display: block !important;
    }

    .help-doc-body {
        border: none !important;
        box-shadow: none !important;
        padding: 0 !important;
        margin: 0 !important;
        width: 100% !important;
        color: #000000 !important;
    }

    .doc-section-title {
        page-break-before: always;
    }
}

/* Responsive Breakpoints */
@media (max-width: 992px) {
    .help-doc-layout {
        grid-template-columns: 1fr;
    }
    .help-toc-sticky {
        display: none;
    }
    .help-hero-card {
        flex-direction: column;
        align-items: flex-start;
        gap: 16px;
    }
    .help-doc-body {
        padding: 1.8rem 1.5rem;
    }
}
