/* PrintOK – controllo automatico del file: caricamento, bollino, problemi, anteprima con taglio e decisione.
   Usato da scheda prodotto, area clienti e admin (variabili di colore con valori di riserva per l'admin). */
:root { --fc-ok: #1f7a4d; --fc-warn: #c98a00; --fc-err: #b42318; }
/* ---------- Controllo automatico del file (scheda prodotto, area clienti, admin) ---------- */
.fc { margin-top: 14px; padding: 14px; border: 1px solid var(--rule-strong, #c3ccd6); border-radius: var(--radius, 8px); background: var(--white, #fff); }
.fc-title { margin: 0; font-family: var(--font-head, Manrope, Inter, system-ui, sans-serif); font-weight: 800; }
.fc-title .bi { color: var(--brand-cyan, #009fe3); }
.fc-spec { margin: 4px 0 12px; font-size: .88rem; color: var(--slate, #5a6678); }
.fc-drop { display: flex; gap: 12px; align-items: center; padding: 18px 16px; border: 2px dashed var(--rule-strong, #c3ccd6); border-radius: var(--radius, 8px); background: var(--paper, #f4f7fa); cursor: pointer; transition: border-color .15s, background-color .15s; }
.fc-drop:hover, .fc-drop.is-over, .fc-drop:focus-within { border-color: var(--brand-cyan, #009fe3); background: #eef8fd; }
.fc-drop input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.fc-drop:focus-within { outline: 3px solid rgba(0, 159, 227, .35); outline-offset: 2px; }
.fc-drop-ic { font-size: 1.9rem; color: var(--blue, #0071a8); }
.fc-drop small { color: var(--slate, #5a6678); }
.fc-progress { padding: 14px 0 4px; }
.fc-bar { height: 8px; border-radius: 4px; background: var(--rule, #dde3ea); overflow: hidden; }
.fc-bar span { display: block; height: 100%; width: 0; background: var(--brand-cyan, #009fe3); transition: width .2s; }
.fc-progress p { margin: 6px 0 0; }
.fc-error { margin: 10px 0 0; padding: 10px 12px; border-radius: var(--radius, 8px); background: #fdecea; color: var(--err, #b42318); font-size: .92rem; }
.fc-later { margin: 10px 0 0; }
.fc-file { display: flex; align-items: center; gap: 10px; padding-bottom: 10px; border-bottom: 1px solid var(--rule, #dde3ea); }
.fc-file > .bi { font-size: 1.4rem; color: var(--blue, #0071a8); }
.fc-file > span { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.fc-body { display: grid; grid-template-columns: minmax(0, 220px) minmax(0, 1fr); gap: 16px; padding-top: 14px; }
.fc-body.no-preview { grid-template-columns: 1fr; }
@media (max-width: 560px) { .fc-body { grid-template-columns: 1fr; } .fc-body .fc-preview { max-width: 280px; } }

/* anteprima: il foglio con abbondanza, taglio e margine */
.fc-preview { margin: 0; }
.fc-stage { position: relative; min-height: 120px; background: repeating-conic-gradient(#eef1f5 0 25%, #fff 0 50%) 0 0 / 14px 14px; border: 1px solid var(--rule, #dde3ea); border-radius: 4px; display: grid; place-items: center; }
.fc-stage.is-loading { min-height: 180px; }
.fc-sheet { display: block; width: 100%; height: auto; box-shadow: 0 1px 3px rgba(20, 38, 61, .18); }
.fc-ov { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.fc-stage:has(.fc-sheet) { display: block; }
.fc-ov-bleed { fill: rgba(230, 0, 126, .22); }
.fc-ov-trim { fill: none; stroke: var(--magenta, #e6007e); }
.fc-ov-safe-bg { fill: none; stroke: rgba(255, 255, 255, .75); }
.fc-ov-safe { fill: none; stroke: var(--brand-cyan, #009fe3); }
.fc-spin { width: 26px; height: 26px; border: 3px solid var(--rule, #dde3ea); border-top-color: var(--brand-cyan, #009fe3); border-radius: 50%; animation: fc-spin .8s linear infinite; }
@keyframes fc-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .fc-spin { animation-duration: 2.4s; } }
.fc-nopreview { margin: 0; padding: 18px; font-size: .85rem; color: var(--slate, #5a6678); text-align: center; }
.fc-pages { display: flex; align-items: center; justify-content: space-between; gap: 6px; margin-top: 6px; font-size: .82rem; }
.fc-legend { display: flex; flex-wrap: wrap; gap: 4px 12px; margin-top: 8px; font-size: .78rem; color: var(--slate, #5a6678); }
.fc-legend span { display: inline-flex; align-items: center; gap: 5px; }
.fc-legend i { display: inline-block; width: 16px; height: 10px; }
.lg-trim { border: 2px solid var(--magenta, #e6007e); }
.lg-bleed { background: rgba(230, 0, 126, .22); }
.lg-safe { border: 2px dashed var(--brand-cyan, #009fe3); }

/* bollino e gravità */
.fc-verdict { display: flex; gap: 14px; align-items: flex-start; --lv: var(--err, #b42318); }
.fc-verdict.is-ok { --lv: var(--ok, #1f7a4d); }
.fc-verdict.is-warn { --lv: #c98a00; }
.fc-seal { position: relative; flex: 0 0 64px; width: 64px; height: 64px; }
.fc-seal svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.fc-seal circle { fill: none; stroke-width: 7; }
.fc-seal-track { stroke: var(--rule, #dde3ea); }
.fc-seal-arc { stroke: var(--lv); stroke-linecap: round; }
.fc-seal b { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-family: var(--font-head, Manrope, Inter, system-ui, sans-serif); font-size: 1.15rem; font-weight: 800; color: var(--lv); }
.fc-seal b small { font-size: .65em; }
.fc-verdict.is-ok .fc-seal b { font-size: 1.6rem; }
.fc-v-title { margin: 2px 0 0; font-family: var(--font-head, Manrope, Inter, system-ui, sans-serif); font-weight: 800; font-size: 1.05rem; color: var(--lv); }
.fc-verdict.is-warn .fc-v-title { color: var(--warn, #9a6200); }
.fc-v-score { margin: 0; font-weight: 700; font-size: .9rem; }
.fc-v-msg { margin: 4px 0 0; font-size: .9rem; }
.fc-issues { list-style: none; margin: 14px 0 0; padding: 0; display: grid; gap: 8px; }
.fc-issues li { padding: 9px 11px; border-left: 4px solid var(--err, #b42318); border-radius: 0 6px 6px 0; background: #fdf3f2; font-size: .88rem; }
.fc-issues li.sev-warn { border-left-color: #c98a00; background: #fff8e6; }
.fc-issues li.sev-info { border-left-color: var(--brand-cyan, #009fe3); background: #eef8fd; }
.fc-issues p { margin: 3px 0 0; }
.fc-i-head { display: flex; justify-content: space-between; gap: 8px; }
.fc-w { flex: none; font-weight: 700; font-variant-numeric: tabular-nums; color: var(--slate, #5a6678); }
.fc-fix { color: var(--ink, #14263d); }
.fc-fix .bi { color: var(--blue, #0071a8); }
.fc-passed { margin-top: 10px; font-size: .86rem; }
.fc-passed summary { cursor: pointer; color: var(--ok, #1f7a4d); font-weight: 600; }
.fc-passed ul { list-style: none; margin: 6px 0 0; padding: 0; }
.fc-passed .bi { color: var(--ok, #1f7a4d); }

/* decisione del cliente */
.fc-decide { margin: 16px 0 0; padding: 14px 0 0; border: 0; border-top: 1px solid var(--rule, #dde3ea); min-width: 0; }
.fc-decide legend { float: left; width: 100%; margin: 0 0 8px; padding: 0; font-size: 1rem; font-weight: 800; font-family: var(--font-head, Manrope, Inter, system-ui, sans-serif); }
.fc-choices, form.fc-decide { clear: both; display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
@media (max-width: 560px) { .fc-choices, form.fc-decide { grid-template-columns: 1fr; } }
.fc-choice { position: relative; cursor: pointer; }
.fc-choice input { position: absolute; top: 14px; left: 12px; }
.fc-choice > span { display: block; height: 100%; padding: 11px 12px 12px 36px; border: 1px solid var(--rule-strong, #c3ccd6); border-radius: var(--radius, 8px); background: var(--white, #fff); }
.fc-choice:hover > span { border-color: var(--ink, #14263d); }
.fc-choice.is-picked > span { border-color: var(--ink, #14263d); box-shadow: inset 0 0 0 1px var(--ink, #14263d); background: #f7fafc; }
.fc-choice strong { display: block; }
.fc-choice em { display: block; font-style: normal; font-weight: 700; color: var(--blue, #0071a8); font-size: .9rem; }
.fc-choice small { display: block; margin-top: 4px; color: var(--slate, #5a6678); }
.fc-rec { display: inline-block; margin: 2px 0; padding: 1px 7px; border-radius: 10px; background: var(--ink, #14263d); color: #fff; font-size: .72rem; font-weight: 700; }
.fc-accept { grid-column: 1 / -1; display: flex; gap: 8px; align-items: flex-start; padding: 10px 12px; border-radius: var(--radius, 8px); background: #fff8e6; font-size: .88rem; }
.fc-accept input { margin-top: 3px; flex: none; }
.fc-wait { margin: 0 0 8px; font-size: .88rem; font-weight: 600; color: var(--magenta-text, #c2006a); }

/* rapporto salvato (area clienti) */
.pf-box { margin: 10px 0; padding: 12px; border: 1px solid var(--rule, #dde3ea); border-radius: var(--radius, 8px); background: var(--white, #fff); }
.pf-box .fc-body { padding-top: 0; }
.pf-badge { display: inline-flex; align-items: center; gap: 5px; padding: 1px 8px; border-radius: 10px; font-size: .78rem; font-weight: 700; color: #fff; background: var(--err, #b42318); vertical-align: middle; }
.pf-badge.is-ok { background: var(--ok, #1f7a4d); }
.pf-badge.is-warn { background: #c98a00; color: var(--ink, #14263d); }
.pf-badge.is-none { background: var(--slate, #5a6678); }
.cart-file { margin: 6px 0 0; } .cart-file .pf-badge { margin-right: 4px; }

/* rilettura dei testi */
.fc-text { margin-top: 12px; padding: 10px 12px; border-radius: 8px; background: #f4f7fa; font-size: .88rem; }
.fc-text.is-issues { background: #fff8e6; }
.fc-text.is-ok .fc-t-title { color: var(--ok, #1f7a4d); }
.fc-t-title { margin: 0; font-weight: 700; display: flex; align-items: center; gap: 6px; }
.fc-t-list { list-style: none; margin: 8px 0 0; padding: 0; display: grid; gap: 6px; }
.fc-t-list li { line-height: 1.45; }
.fc-t-list q { quotes: "«" "»"; font-weight: 600; overflow-wrap: anywhere; }
.fc-t-sugg { color: var(--ok, #1f7a4d); }
.fc-t-list small { display: block; color: var(--slate, #5a6678); }
.fc-t-type { display: inline-block; padding: 0 6px; border-radius: 8px; background: #fff; border: 1px solid #e5d5a8; font-size: .74rem; font-weight: 700; color: #6b5300; }
.fc-t-note { margin: 8px 0 0; font-size: .8rem; color: var(--slate, #5a6678); }
.fc-spin-sm { width: 14px; height: 14px; border-width: 2px; display: inline-block; }
.fc-convert { margin: 12px 0 0; font-size: .86rem; }
.fc-convert .bi { color: var(--blue, #0071a8); }
