/* Guía del sistema — optimizada para imprimir / Guardar como PDF */
.guia-body {
    background: #e8edf4;
    margin: 0;
    font-family: "Plus Jakarta Sans", "Segoe UI", system-ui, sans-serif;
    color: #0f172a;
    line-height: 1.55;
}

.guia-toolbar {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    align-items: center;
    padding: 16px 24px;
    background: #fff;
    border-bottom: 1px solid #e2e8f0;
    position: sticky;
    top: 0;
    z-index: 50;
    box-shadow: 0 2px 8px rgba(15, 23, 42, 0.06);
}

.guia-toolbar p {
    margin: 0;
    flex: 1;
    font-size: 14px;
    color: #64748b;
}

.guia-document {
    max-width: 920px;
    margin: 24px auto 48px;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 12px 40px rgba(15, 23, 42, 0.1);
    overflow: hidden;
}

.guia-cover {
    background: linear-gradient(135deg, #312e81 0%, #4f46e5 45%, #059669 100%);
    color: #fff;
    padding: 48px 56px 40px;
}

.guia-cover-kicker {
    display: inline-block;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    background: rgba(255, 255, 255, 0.15);
    padding: 6px 12px;
    border-radius: 999px;
    margin-bottom: 20px;
}

.guia-cover h1 {
    margin: 0 0 12px;
    font-size: 34px;
    font-weight: 800;
    letter-spacing: -0.03em;
    line-height: 1.15;
}

.guia-cover-sub {
    margin: 0;
    font-size: 17px;
    opacity: 0.92;
    max-width: 620px;
}

.guia-cover-meta {
    margin-top: 28px;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.25);
    font-size: 13px;
    opacity: 0.85;
}

.guia-content {
    padding: 40px 56px 56px;
}

.guia-section {
    margin-bottom: 36px;
    page-break-inside: avoid;
}

.guia-section h2 {
    margin: 0 0 14px;
    font-size: 20px;
    font-weight: 800;
    letter-spacing: -0.02em;
    color: #1e1b4b;
    padding-bottom: 10px;
    border-bottom: 2px solid #e2e8f0;
}

.guia-section h3 {
    margin: 20px 0 10px;
    font-size: 15px;
    font-weight: 700;
    color: #334155;
}

.guia-section p,
.guia-section li {
    font-size: 14px;
    color: #334155;
}

.guia-lead {
    font-size: 16px !important;
    color: #475569 !important;
    margin-bottom: 16px !important;
}

.guia-highlight {
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    border-left: 4px solid #059669;
    border-radius: 10px;
    padding: 18px 20px;
    margin: 16px 0;
}

.guia-highlight strong {
    color: #047857;
}

.guia-grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin: 16px 0;
}

.guia-card {
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 16px 18px;
    background: #f8fafc;
}

.guia-card h4 {
    margin: 0 0 8px;
    font-size: 14px;
    font-weight: 700;
    color: #1e293b;
}

.guia-card p {
    margin: 0;
    font-size: 13px;
}

.guia-card-problem {
    border-left: 4px solid #dc2626;
    background: #fef2f2;
}

.guia-card-solution {
    border-left: 4px solid #059669;
    background: #ecfdf5;
}

.guia-benefits {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    margin: 16px 0;
    list-style: none;
    padding: 0;
}

.guia-benefits li {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    padding: 12px 14px;
    background: #eef2ff;
    border-radius: 10px;
    font-size: 13px;
    font-weight: 600;
}

.guia-benefits li::before {
    content: "✓";
    flex-shrink: 0;
    width: 22px;
    height: 22px;
    background: #4f46e5;
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 800;
}

.guia-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 12.5px;
    margin: 14px 0;
}

.guia-table th,
.guia-table td {
    border: 1px solid #cbd5e1;
    padding: 9px 10px;
    text-align: left;
    vertical-align: top;
}

.guia-table th {
    background: #1e1b4b;
    color: #fff;
    font-weight: 700;
}

.guia-table tr:nth-child(even) td {
    background: #f8fafc;
}

.guia-table .yes {
    color: #059669;
    font-weight: 800;
    text-align: center;
}

.guia-table .no {
    color: #94a3b8;
    text-align: center;
}

.guia-table .role-name {
    font-weight: 700;
    white-space: nowrap;
}

.guia-flow {
    display: flex;
    flex-direction: column;
    gap: 0;
    margin: 18px 0;
}

.guia-flow-step {
    display: flex;
    gap: 16px;
    align-items: flex-start;
    position: relative;
    padding-bottom: 20px;
}

.guia-flow-step:not(:last-child)::before {
    content: "";
    position: absolute;
    left: 17px;
    top: 36px;
    bottom: 0;
    width: 2px;
    background: #c7d2fe;
}

.guia-flow-num {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: #4f46e5;
    color: #fff;
    font-weight: 800;
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.guia-flow-body {
    flex: 1;
    padding-top: 4px;
}

.guia-flow-body strong {
    display: block;
    font-size: 14px;
    margin-bottom: 4px;
}

.guia-flow-body span {
    font-size: 13px;
    color: #64748b;
}

.guia-roles-detail {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 14px;
    margin-top: 16px;
}

.guia-role-box {
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 14px 16px;
    page-break-inside: avoid;
}

.guia-role-box h4 {
    margin: 0 0 6px;
    font-size: 14px;
    font-weight: 800;
}

.guia-role-box .guia-role-badge {
    display: inline-block;
    font-size: 11px;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: 999px;
    margin-bottom: 8px;
}

.guia-role-admin { background: #ede9fe; color: #5b21b6; }
.guia-role-approver { background: #dbeafe; color: #1d4ed8; }
.guia-role-user { background: #d1fae5; color: #047857; }
.guia-role-viewer { background: #f1f5f9; color: #475569; }

.guia-role-box p {
    margin: 0;
    font-size: 12.5px;
}

.guia-team-example {
    background: #fffbeb;
    border: 1px solid #fde68a;
    border-radius: 10px;
    padding: 16px 18px;
    margin-top: 14px;
}

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

.guia-team-example th,
.guia-team-example td {
    padding: 8px 10px;
    border-bottom: 1px solid #fde68a;
    text-align: left;
}

.guia-footer {
    margin-top: 40px;
    padding-top: 20px;
    border-top: 2px solid #e2e8f0;
    font-size: 12px;
    color: #64748b;
    text-align: center;
}

@media print {
    @page {
        size: A4;
        margin: 14mm 12mm;
    }

    .no-print {
        display: none !important;
    }

    .guia-body {
        background: #fff;
    }

    .guia-document {
        max-width: none;
        margin: 0;
        box-shadow: none;
        border-radius: 0;
    }

    .guia-cover {
        padding: 32px 0 28px;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }

    .guia-content {
        padding: 24px 0 0;
    }

    .guia-section {
        page-break-inside: avoid;
    }

    .guia-table th {
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }
}

@media (max-width: 768px) {
    .guia-cover,
    .guia-content {
        padding-left: 24px;
        padding-right: 24px;
    }

    .guia-grid-2,
    .guia-benefits,
    .guia-roles-detail {
        grid-template-columns: 1fr;
    }
}
