/* Páginas por folha. Shared PDF and converter CSS stay; this file only restyles this page. */
.nup-page { --nup-blue: #2563eb; --nup-ink: #172033; }

.nup-mark {
  display: grid;
  place-items: center;
  width: 64px;
  height: 64px;
  margin: 0 0 16px;
  border-radius: 18px;
  background: linear-gradient(180deg, #fb7185, #e11d48);
  box-shadow: 0 10px 22px rgba(225, 29, 72, 0.22);
}
.nup-mark svg { width: 36px; height: 36px; display: block; }

.article .nup-page .conv-title {
  margin-bottom: 12px;
  font-size: clamp(1.85rem, 2.4vw, 2.45rem);
  line-height: 1.02;
}
.article .nup-page .conv-lede { color: #5b6b8a; }

.nup-perk {
  width: 36px;
  height: 36px;
  flex: none;
  border-radius: 50%;
  background: #fff center / 18px no-repeat;
}
.nup-perk.is-fast {
  background-color: #fef3c7;
  background-image: url("data:image/svg+xml;charset=UTF-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%23d97706' d='M13 2 4 13.5h6.2L9.2 22l9-11.5h-6.1z'/%3E%3C/svg%3E");
}
.nup-perk.is-big {
  background-color: #ffe4e6;
  background-image: url("data:image/svg+xml;charset=UTF-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%23e11d48' d='M14 2H7a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h10a2 2 0 0 0 2-2V8z'/%3E%3Cpath fill='%23fff' d='M9 11h6v1.5H9zm0 3h4.2V15.5H9z'/%3E%3Cpath fill='%23fecdd3' d='M14 2v4.5A1.5 1.5 0 0 0 15.5 8H20z'/%3E%3C/svg%3E");
}
.nup-page .conv-perk.is-device {
  background-color: #dbeafe;
  background-image: url("data:image/svg+xml;charset=UTF-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%232563eb' stroke-width='2'%3E%3Crect x='8' y='2' width='8' height='20' rx='2'/%3E%3Cpath d='M11 18h2'/%3E%3C/svg%3E");
}

.article .nup-art {
  display: block;
  width: calc(100% + 8px);
  max-width: 280px;
  height: auto;
  margin: 18px 0 0 -8px;
}

.nup-page .cpdf-app { display: flex; flex-direction: column; gap: 12px; }
.nup-page .cpdf-app.pvc-app > .cpdf-toolbar { display: flex !important; }
.nup-page .conv-board { width: 100%; grid-template-columns: minmax(0, 1fr) 320px; }
.nup-page .conv-stack { grid-template-columns: minmax(0, 1fr); }
.nup-page .conv-stack,
.nup-page .conv-card,
.nup-page .nup-grid { min-width: 0; max-width: 100%; }
.nup-page .cpdf-side { margin-top: 0; gap: 12px; }

.nup-page .conv-steps { display: flex; align-items: center; gap: 0; padding: 14px 18px; }
.article .nup-page .conv-steps li { flex: 1 1 0; margin: 0; }
.article .nup-page .conv-steps li::before { content: none; }
.nup-page .conv-steps li > span:first-child {
  width: 34px; height: 34px; border: 2px solid #bfdbfe; background: #fff; color: var(--nup-blue); font-size: 0.95rem;
}
.nup-page .conv-steps li.is-on > span:first-child,
.nup-page .conv-steps li.is-done > span:first-child { border-color: var(--nup-blue); background: var(--nup-blue); color: #fff; }
.nup-page .conv-steps strong { color: var(--nup-blue); font-size: 0.92rem; white-space: nowrap; }
.nup-page .conv-steps small { color: #64748b; }
.nup-page .conv-steps li:not(:last-child)::after { content: "→"; margin-left: auto; padding: 0 10px; color: #94a3b8; font-size: 1.05rem; }

.nup-page .conv-card { padding: 16px 16px 18px; border-radius: 18px; }
.nup-page .cpdf-drop {
  min-height: 240px; padding: 28px 18px 18px; border: 1.5px dashed #93c5fd; border-radius: 16px; background: #f3f8ff;
}
.nup-page .conv-cloud { width: 72px; height: 72px; background-size: 46px; }
.nup-page .cpdf-drop-title { font-size: 1.2rem; }
.nup-page .cpdf-drop-hint { color: var(--nup-blue); font-weight: 750; }
.nup-page .cpdf-drop-actions { margin-top: 8px; }
.nup-page .cpdf-app .cpdf-drop-cta {
  min-height: 46px; padding: 0 18px; border: 0; border-radius: 12px; background: var(--nup-blue); color: #fff;
  box-shadow: 0 8px 16px rgba(37, 99, 235, 0.22);
}
.nup-page .cpdf-app #nup-btn-sample {
  min-height: 46px; padding: 0 16px; border: 1px solid #e2e8f0; border-radius: 12px; background: #fff; color: var(--nup-ink);
}
.nup-page .cpdf-btn-icon { width: 18px; height: 18px; fill: currentColor; }
.nup-page .cpdf-btn-icon.is-stroke { fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.article .nup-meta { margin: 12px 0 0; color: #64748b; font-size: 0.82rem; text-align: center; }

.article .nup-page h2.nup-block-title,
.nup-block-title {
  display: flex; align-items: center; gap: 10px; margin: 0 0 14px; color: var(--nup-ink);
  font-size: 1.05rem; font-weight: 800; text-align: left;
}
.nup-block-title > span,
.nup-block-head .nup-block-title > span {
  display: grid; place-items: center; width: 28px; height: 28px; flex: none; border-radius: 50%;
  background: var(--nup-blue); color: #fff;
}
.nup-block-title > span svg { width: 16px; height: 16px; display: block; }
.nup-block-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.nup-block-head .nup-block-title { margin: 0; }
.nup-count { color: #64748b; font-size: 0.84rem; font-weight: 700; }
.nup-label { margin: 0 0 8px; color: var(--nup-ink); font-size: 0.92rem; font-weight: 800; }

.nup-tiles { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; }
.nup-tile {
  display: flex; flex-direction: column; align-items: flex-start; gap: 6px; position: relative;
  min-height: 92px; padding: 10px; border: 1.5px solid #e6edf5; border-radius: 14px; background: #fff;
  color: var(--nup-ink); text-align: left; cursor: pointer;
}
.nup-tile:hover { border-color: #bfdbfe; }
.nup-tile.is-on { border-color: #60a5fa; background: #f5f9ff; box-shadow: 0 0 0 1px #60a5fa inset; }
.nup-tile strong, .nup-tile small { display: block; }
.nup-tile strong { font-size: 0.86rem; font-weight: 800; }
.nup-tile.is-on strong { color: #1d4ed8; }
.nup-tile small { margin-top: 2px; color: #64748b; font-size: 0.72rem; font-weight: 600; line-height: 1.25; }
.nup-ico { width: 36px; height: 28px; color: #94a3b8; }
.nup-ico rect { fill: none; stroke: currentColor; stroke-width: 1.6; }
.nup-tile.is-on .nup-ico { color: #2563eb; }
.nup-tick {
  position: absolute; top: 8px; right: 8px; width: 18px; height: 18px; border: 2px solid #d5deea; border-radius: 50%; background: #fff;
}
.nup-tile.is-on .nup-tick {
  border-color: var(--nup-blue);
  background: var(--nup-blue) url("data:image/svg+xml;charset=UTF-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='none' stroke='%23fff' stroke-width='3' stroke-linecap='round' stroke-linejoin='round' d='m6 12 4 4 8-8'/%3E%3C/svg%3E") center / 12px no-repeat;
}

.nup-custom {
  display: flex; align-items: center; gap: 8px; margin-top: 10px;
}
.nup-custom label { display: flex; align-items: center; gap: 8px; color: #475569; font-size: 0.82rem; font-weight: 700; }
.nup-custom input {
  width: 72px; min-height: 40px; margin: 0; padding: 0 10px; border: 1px solid #e2e8f0; border-radius: 10px; background: #fff;
}

.nup-options {
  display: grid; grid-template-columns: minmax(0, 1.2fr) auto minmax(0, 1fr); gap: 14px; align-items: end; margin-top: 16px;
}
.nup-opt { display: grid; gap: 6px; min-width: 0; }
.nup-opt > span, .nup-opt > span b { color: var(--nup-ink); font-size: 0.92rem; font-weight: 800; }
.nup-page #nup-size {
  width: 100%; min-height: 44px; margin: 0; padding: 0 12px; border: 1px solid #e2e8f0; border-radius: 12px; background: #fff; color: var(--nup-ink);
}
.nup-orients { display: flex; gap: 8px; }
.nup-orients button {
  display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 0 12px;
  border: 1.5px solid #e6edf5; border-radius: 12px; background: #fff; color: var(--nup-ink); font-weight: 750; cursor: pointer;
}
.nup-orients button svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; }
.nup-orients button.is-on { border-color: #60a5fa; background: #eff6ff; color: #1d4ed8; }
.nup-page #nup-margin { width: 100%; margin: 6px 0 0; accent-color: #2563eb; }
.nup-scale { display: flex; justify-content: space-between; color: #94a3b8; font-size: 0.72rem; font-style: normal; font-weight: 650; }

.nup-grid { display: grid; width: 100%; grid-template-columns: repeat(auto-fit, minmax(104px, 1fr)); gap: 10px; }
.nup-sheet { min-width: 0; }
.nup-sheet-hit { position: relative; display: grid; gap: 6px; margin: 0; cursor: pointer; }
.nup-page .nup-pick {
  position: absolute; top: 8px; left: 8px; z-index: 1; width: 22px; height: 22px; margin: 0; padding: 0;
  border: 2px solid #d5deea; border-radius: 7px; background: #fff; appearance: none; cursor: pointer;
}
.nup-page .nup-pick:checked {
  border-color: var(--nup-blue);
  background: var(--nup-blue) url("data:image/svg+xml;charset=UTF-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='none' stroke='%23fff' stroke-width='3' stroke-linecap='round' stroke-linejoin='round' d='m6 12 4 4 8-8'/%3E%3C/svg%3E") center / 14px no-repeat;
}
.nup-sheet-frame { display: block; overflow: hidden; border: 1px solid #e6edf5; border-radius: 12px; background: #fff; }
.nup-sheet-frame img { display: block; width: 100%; height: auto; background: #fff; }
.nup-sheet-name { color: #64748b; font-size: 0.78rem; font-weight: 700; text-align: center; }
.nup-page .cpdf-list-empty { margin: 0; padding: 8px 0 0; border: 0; background: transparent; color: #64748b; font-style: normal; text-align: left; }

.nup-page .cpdf-card.nup-summary {
  padding: 16px; border: 1px solid var(--cv-line, #e3e9f1); border-radius: 16px; background: #fff; box-shadow: 0 8px 20px rgba(30, 50, 90, 0.04);
}
.nup-page .cpdf-card-label,
.article .nup-tips h2 {
  display: flex; align-items: center; gap: 8px; margin: 0 0 12px; color: var(--nup-ink);
  font-size: 1rem; font-weight: 800; letter-spacing: 0; text-transform: none; text-align: left;
}
.nup-card-ico { width: 28px; height: 28px; flex: none; border-radius: 8px; background: #e8f0fe center / 16px no-repeat; }
.nup-card-ico.is-file { background-image: url("data:image/svg+xml;charset=UTF-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%232563eb' d='M14 2H7a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h10a2 2 0 0 0 2-2V8z'/%3E%3Cpath fill='%23fff' d='M9 12h6v1.4H9zm0 3h4v1.4H9z'/%3E%3C/svg%3E"); }
.nup-card-ico.is-bulb { background-color: transparent; background-image: url("data:image/svg+xml;charset=UTF-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%23f5b400' d='M12 2a7 7 0 0 0-4 12.7V17a1 1 0 0 0 1 1h6a1 1 0 0 0 1-1v-2.3A7 7 0 0 0 12 2z'/%3E%3Cpath fill='%23d97706' d='M9 19h6v1.2a2 2 0 0 1-2 2h-2a2 2 0 0 1-2-2z'/%3E%3C/svg%3E"); }
.nup-page .cpdf-stat { align-items: center; padding: 8px 4px; border-bottom: 1px solid #eef2f7; font-size: 0.84rem; }
.nup-page .cpdf-stat:last-child { border-bottom: 0; }
.nup-page .cpdf-stat-label { color: #64748b; font-weight: 650; }
.nup-page .cpdf-stat-value { overflow-wrap: anywhere; text-align: right; color: var(--nup-ink); font-weight: 750; }
.nup-page .cpdf-status:empty { display: none; }
.nup-page .cpdf-status { margin-top: 8px; }
.nup-page .nup-tips { background: #fff8e8; border-color: #f6e3b0; }
.article .nup-tips ul { display: grid; gap: 8px; margin: 0; padding: 0; list-style: none; }
.article .nup-tips li { display: flex; align-items: flex-start; gap: 8px; margin: 0; color: #3d4658; font-size: 0.84rem; line-height: 1.35; }
.article .nup-tips li::before {
  content: ""; width: 18px; height: 18px; flex: none; margin-top: 1px;
  background: url("data:image/svg+xml;charset=UTF-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Ccircle cx='12' cy='12' r='10' fill='%2322a55a'/%3E%3Cpath d='m7 12.2 3.2 3.2L17 9' fill='none' stroke='%23fff' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 18px no-repeat;
}

.nup-actions { display: grid; gap: 8px; }
.nup-page .cpdf-app #nup-btn-process,
.nup-page .cpdf-app #nup-btn-process:hover,
.nup-page .cpdf-app #nup-btn-process:disabled {
  width: 100%; min-height: 52px; border: 0 !important; border-radius: 12px; background: #f5b400 !important;
  color: #1f2937 !important; font-size: 1rem; font-weight: 800; box-shadow: none !important; opacity: 1;
}
.nup-page .cpdf-app #nup-btn-process:disabled { opacity: 0.72; cursor: not-allowed; }
.nup-page .cpdf-app #nup-btn-process .cpdf-btn-icon { fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linejoin: round; }
.nup-action-row { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.nup-page .cpdf-app .nup-action-row .cpdf-btn {
  min-height: 44px; border: 1px solid #e6edf5; border-radius: 12px; background: #fff; color: var(--nup-ink); font-weight: 750;
}
.nup-page .cpdf-toolbar #nup-btn-download { width: auto; min-height: 0; }
.nup-page .cpdf-toolbar #nup-btn-download:disabled { display: inline-flex; }

body.page-paginas-por-folha-pdf .article .nup-page .pdf-related {
  margin: 0; padding: 14px; border: 1px solid #e4def8; border-radius: 16px; background: #f6f3ff; box-shadow: none;
}
body.page-paginas-por-folha-pdf .article .nup-page h2.pdf-related-title { display: none !important; }
body.page-paginas-por-folha-pdf .article .nup-page .pdf-related-head { margin-bottom: 10px; padding: 0; }
body.page-paginas-por-folha-pdf .article .nup-page .pdf-related-sub {
  display: flex; align-items: center; gap: 8px; color: #5b21b6; font-size: 0.98rem; font-weight: 800;
}
body.page-paginas-por-folha-pdf .article .nup-page .pdf-related-sub::before {
  content: ""; width: 22px; height: 22px; flex: none;
  background: url("data:image/svg+xml;charset=UTF-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%237c3aed' d='M4 4h7v7H4zm9 0h7v7h-7zM4 13h7v7H4zm9 0h7v7h-7z'/%3E%3C/svg%3E") center / 18px no-repeat;
}
body.page-paginas-por-folha-pdf .article .nup-page .pdf-related-grid { grid-template-columns: 1fr 1fr !important; gap: 8px; }
body.page-paginas-por-folha-pdf .article .nup-page a.pdf-related-card { gap: 8px; padding: 8px; border-color: #ece7f8; background: #fff; }
body.page-paginas-por-folha-pdf .article .nup-page .pdf-related-name { font-size: 0.78rem; }
body.page-paginas-por-folha-pdf .article .nup-page .pdf-related-hint { font-size: 0.68rem; }
body.page-paginas-por-folha-pdf .article .nup-page .pdf-related-icon { width: 32px; height: 32px; }
body.page-paginas-por-folha-pdf .article .nup-page .pdf-related-grid a:nth-child(1) .pdf-related-icon { background: #ffe4e6; color: #e11d48; }
body.page-paginas-por-folha-pdf .article .nup-page .pdf-related-grid a:nth-child(2) .pdf-related-icon { background: #ede9fe; color: #7c3aed; }

.nup-page .nup-hist:not(:has(.itool-hist-host:not([hidden]))) { display: none; }
.nup-page .nup-hist .itool-hist-card { padding: 16px; border: 1px solid var(--cv-line, #e3e9f1); border-radius: 18px; background: #fff; }
.nup-page .nup-hist .itool-hist-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 12px; }
.nup-page .nup-hist .itool-hist-label { color: var(--nup-ink); font-size: 0.95rem; font-weight: 800; letter-spacing: 0; text-transform: none; }
.nup-page .nup-hist .itool-hist-hint { display: block; color: #64748b; font-size: 0.75rem; }
.nup-page .nup-hist .itool-hist-list { display: flex; gap: 10px; margin: 0; padding: 0 0 4px; overflow-x: auto; list-style: none; }
.article .nup-page .nup-hist .itool-hist-list > li { margin: 0; }
.article .nup-page .nup-hist .itool-hist-list > li::before { content: none; }
.nup-page .nup-hist .itool-hist-item {
  display: flex; flex: 0 0 190px; flex-direction: column; gap: 6px; min-width: 0; padding: 8px;
  border: 1px solid #e6edf5; border-radius: 14px; background: #fff;
}
.nup-page .nup-hist .pdf-hist-thumb { width: 100%; aspect-ratio: 3 / 4; overflow: hidden; border-radius: 10px; background: #fff; }
.nup-page .nup-hist .pdf-hist-thumb img { width: 100%; height: 100%; object-fit: contain; }
.nup-page .nup-hist .itool-hist-name { overflow: hidden; color: var(--nup-ink); font-size: 0.78rem; font-weight: 750; text-overflow: ellipsis; white-space: nowrap; }
.nup-page .nup-hist .itool-hist-actions { display: flex; gap: 6px; }
.nup-page .nup-hist .itool-hist-btn { min-height: 30px; padding: 0 8px; border: 1px solid #e6edf5; border-radius: 8px; background: #fff; font-size: 0.75rem; font-weight: 750; }
.nup-page .cpdf-success, .nup-page .cpdf-progress-wrap { border-radius: 16px; }

@media (max-width: 1100px) {
  .nup-page .conv-board { grid-template-columns: 1fr; }
  .nup-tiles { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .nup-options { grid-template-columns: 1fr; }
}
@media (max-width: 980px) { .article .nup-art { display: none; } }
@media (max-width: 720px) {
  .nup-page .conv-steps { display: flex; flex-direction: column; align-items: stretch; gap: 10px; }
  .nup-page .conv-steps li:not(:last-child)::after { content: none; }
  .nup-tiles { grid-template-columns: 1fr 1fr; }
  body.page-paginas-por-folha-pdf .article .nup-page .pdf-related-grid { grid-template-columns: 1fr !important; }
}

html[data-theme="dark"] .nup-page { --nup-ink: #f8fafc; }
html[data-theme="dark"] .article .nup-page .conv-lede,
html[data-theme="dark"] .nup-tile small,
html[data-theme="dark"] .nup-count,
html[data-theme="dark"] .nup-page .cpdf-stat-label { color: #94a3b8; }
html[data-theme="dark"] .nup-tile,
html[data-theme="dark"] .nup-orients button,
html[data-theme="dark"] .nup-page #nup-size,
html[data-theme="dark"] .nup-page .cpdf-card.nup-summary,
html[data-theme="dark"] .nup-page .cpdf-app .nup-action-row .cpdf-btn,
html[data-theme="dark"] .nup-page .cpdf-app #nup-btn-sample,
html[data-theme="dark"] .nup-sheet-frame { background: #1e293b; border-color: #334155; color: #e2e8f0; }
html[data-theme="dark"] .nup-tile.is-on,
html[data-theme="dark"] .nup-orients button.is-on { background: #172554; }
html[data-theme="dark"] .nup-page .cpdf-drop { background: #0f1b33; }
html[data-theme="dark"] .nup-page .nup-tips { background: #3b2f12; border-color: #854d0e; }
html[data-theme="dark"] .article .nup-tips li { color: #e2e8f0; }
html[data-theme="dark"] body.page-paginas-por-folha-pdf .article .nup-page .pdf-related { background: #221c33; border-color: #3b3358; }
html[data-theme="dark"] .nup-page .cpdf-stat { border-bottom-color: #334155; }
html[data-theme="dark"] .nup-page .nup-hist .itool-hist-card,
html[data-theme="dark"] .nup-page .nup-hist .itool-hist-item { background: #1e293b; border-color: #334155; }
html[data-theme="dark"] .nup-page .nup-hist .itool-hist-label,
html[data-theme="dark"] .nup-page .nup-hist .itool-hist-name { color: #f8fafc; }
