/* Material impresso — Colaboradores N1/N2 */
@page {
    size: A4 portrait;
    margin: 12mm;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

body.print-doc {
    margin: 0;
    padding: 0;
    font-family: 'Inter', system-ui, sans-serif;
    font-size: 11pt;
    line-height: 1.45;
    color: #1a1a1a;
    background: #fff;
}

.print-toolbar {
    position: sticky;
    top: 0;
    z-index: 10;
    display: flex;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    background: #f5f5f5;
    border-bottom: 1px solid #ddd;
}

.print-toolbar button,
.print-toolbar a {
    font-family: inherit;
    font-size: 0.875rem;
    padding: 0.4rem 0.9rem;
    border-radius: 4px;
    text-decoration: none;
    cursor: pointer;
}

.print-toolbar button {
    background: #2563eb;
    color: #fff;
    border: none;
}

.print-toolbar a {
    background: #fff;
    color: #333;
    border: 1px solid #ccc;
}

.print-page {
    max-width: 180mm;
    margin: 0 auto;
    padding: 8mm 0;
}

.print-page + .print-page {
    page-break-before: always;
}

.print-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid #2563eb;
}

.print-header img {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    object-fit: cover;
}

.print-header h1 {
    margin: 0;
    font-size: 1.35rem;
    font-weight: 700;
    line-height: 1.2;
}

.print-header .subtitle {
    margin: 0.15rem 0 0;
    font-size: 0.85rem;
    color: #555;
    font-weight: 500;
}

h2 {
    font-size: 1rem;
    font-weight: 700;
    margin: 1rem 0 0.4rem;
    color: #1e40af;
}

h3 {
    font-size: 0.9rem;
    font-weight: 600;
    margin: 0.75rem 0 0.35rem;
}

p {
    margin: 0 0 0.5rem;
}

ul, ol {
    margin: 0 0 0.5rem;
    padding-left: 1.25rem;
}

li {
    margin-bottom: 0.25rem;
}

.meta-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.85rem;
    margin: 0.5rem 0 0.75rem;
}

.meta-table th,
.meta-table td {
    border: 1px solid #ccc;
    padding: 0.35rem 0.5rem;
    text-align: left;
}

.meta-table th {
    background: #f0f4ff;
    font-weight: 600;
}

.meta-table td:last-child {
    text-align: right;
    font-weight: 600;
}

/* Pirâmide — diagrama em camadas (SVG) */
.pyramid-chart {
    margin: 0.5rem 0 0.75rem;
    text-align: center;
}

.pyramid-svg {
    display: block;
    width: 100%;
    max-width: 440px;
    height: auto;
    margin: 0 auto;
}

.pyramid-svg--n2 {
    max-width: 360px;
}

.pyramid-tier {
    stroke-width: 1.5;
}

.pyramid-tier--top {
    fill: url(#pyr-n1-top);
    stroke: #1e40af;
}

.pyramid-tier--mid {
    fill: url(#pyr-n1-mid);
    stroke: #2563eb;
}

.pyramid-svg--n2 .pyramid-tier--mid {
    fill: url(#pyr-n2-top);
    stroke: #1e40af;
}

.pyramid-tier--base {
    fill: url(#pyr-n1-base);
    stroke: #d97706;
}

.pyramid-svg--n2 .pyramid-tier--base {
    fill: url(#pyr-n2-base);
}

.pyramid-svg-label {
    fill: #1e3a8a;
    font-family: 'Inter', system-ui, sans-serif;
    font-size: 11px;
    font-weight: 700;
    text-anchor: middle;
}

.pyramid-svg-label--light {
    fill: #fff;
}

.pyramid-svg-label--dark {
    fill: #92400e;
}

.pyramid-svg-label--system {
    fill: #5b21b6;
}

.pyramid-svg-text--halo {
    paint-order: stroke fill;
    stroke: rgba(30, 64, 175, 0.45);
    stroke-width: 2.5px;
    stroke-linejoin: round;
}

.pyramid-svg-value {
    fill: #1e40af;
    font-family: 'Inter', system-ui, sans-serif;
    font-size: 14px;
    font-weight: 700;
    text-anchor: middle;
}

.pyramid-svg-value--light {
    fill: #fff;
}

.pyramid-svg-value--dark {
    fill: #b45309;
}

.pyramid-svg-value--system {
    fill: #6d28d9;
    font-size: 13px;
}

.pyramid-svg-sub {
    fill: #475569;
    font-family: 'Inter', system-ui, sans-serif;
    font-size: 9px;
    font-weight: 500;
    text-anchor: middle;
}

.pyramid-svg-sub--light {
    fill: rgba(255, 255, 255, 0.9);
}

.pyramid-svg-sub--dark {
    fill: #78716c;
}

.pyramid-svg-sub--system {
    fill: #7c3aed;
}

.pyramid-arrow {
    fill: none;
    stroke: #94a3b8;
    stroke-width: 1.5;
}

.pyramid-arrow-label {
    fill: #64748b;
    font-family: 'Inter', system-ui, sans-serif;
    font-size: 8px;
    font-weight: 600;
    text-anchor: middle;
}

.pyramid-legend {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
    max-width: 440px;
    margin: 0.5rem auto 0;
    text-align: left;
    font-size: 0.75rem;
}

.pyramid-legend-item {
    display: flex;
    align-items: center;
    gap: 0.45rem;
}

.pyramid-legend-swatch {
    flex-shrink: 0;
    width: 14px;
    height: 14px;
    border-radius: 3px;
    border: 1px solid rgba(0, 0, 0, 0.15);
}

.pyramid-legend-swatch--top {
    background: #2563eb;
}

.pyramid-legend-swatch--mid {
    background: #60a5fa;
}

.pyramid-svg--rede {
    max-width: 440px;
}

.pyramid-legend-swatch--system {
    background: #ddd6fe;
    border-color: #8b5cf6;
}

.pyramid-caption {
    font-size: 0.75rem;
    color: #64748b;
    margin-top: 0.5rem;
}

@media print {
    .pyramid-svg {
        max-width: 100%;
    }
}

.role-grid {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 0.5rem;
    margin: 0.5rem 0;
}

.role-grid--4 {
    grid-template-columns: 1fr 1fr;
}

.role-card {
    border: 1px solid #ddd;
    border-radius: 5px;
    padding: 0.45rem 0.55rem;
    font-size: 0.8rem;
}

.role-card strong {
    display: block;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.02em;
    color: #2563eb;
    margin-bottom: 0.2rem;
}

.reach-box {
    background: #eff6ff;
    border: 2px solid #2563eb;
    border-radius: 8px;
    padding: 0.65rem 0.85rem;
    text-align: center;
    margin: 0.75rem 0;
}

.reach-box .reach-number {
    font-size: 1.5rem;
    font-weight: 700;
    color: #1e40af;
    line-height: 1.1;
}

.reach-box .reach-label {
    font-size: 0.8rem;
    font-weight: 600;
    color: #333;
}

.reach-box .reach-detail {
    font-size: 0.72rem;
    color: #555;
    margin-top: 0.25rem;
}

.print-footer {
    margin-top: 1rem;
    padding-top: 0.5rem;
    border-top: 1px solid #ddd;
    font-size: 0.72rem;
    color: #888;
    text-align: center;
}

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

    body.print-doc {
        font-size: 10.5pt;
    }

    .print-page {
        padding: 0;
        max-width: none;
    }

    .print-toolbar {
        display: none;
    }
}
