/*
Theme Name: Portale delle Fidejussioni
Theme URI: https://www.portaledellefidejussioni.it/
Author: BCEE / CESVED Project
Author URI: https://www.portaledellefidejussioni.it/
Description: Tema istituzionale per il Portale delle Fidejussioni - Registro Digitale Garanzie. Layout dedicato alla verifica telematica di fidejussioni, cauzioni, garanzie e polizze fideiussorie.
Version: 1.0.29
Requires at least: 6.0
Tested up to: 6.5
Requires PHP: 7.4
License: Proprietary
Text Domain: portale-fidejussioni
*/

:root {
  --pdf-blue-900: #0B1F3A;
  --pdf-blue-800: #102B4E;
  --pdf-blue-700: #123C69;
  --pdf-blue-100: #EAF0F7;
  --pdf-green: #1F8A4C;
  --pdf-yellow: #D99A00;
  --pdf-red: #B3261E;
  --pdf-gray-900: #1F2933;
  --pdf-gray-700: #2F3A45;
  --pdf-gray-500: #667085;
  --pdf-gray-200: #E6EAF0;
  --pdf-gray-100: #F4F6F8;
  --pdf-white: #FFFFFF;
  --pdf-radius-sm: 8px;
  --pdf-radius-md: 14px;
  --pdf-radius-lg: 24px;
  --pdf-shadow-sm: 0 8px 24px rgba(11,31,58,.08);
  --pdf-shadow-md: 0 18px 50px rgba(11,31,58,.16);
  --pdf-container: 1180px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--pdf-gray-700);
  background: var(--pdf-white);
  line-height: 1.58;
  font-size: 16px;
}
a { color: var(--pdf-blue-700); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; height: auto; }

.pdf-container {
  width: min(var(--pdf-container), calc(100% - 40px));
  margin: 0 auto;
}

.pdf-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255,255,255,.96);
  border-bottom: 1px solid var(--pdf-gray-200);
  backdrop-filter: blur(10px);
}
.pdf-header__inner {
  min-height: 82px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}
.pdf-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--pdf-blue-900);
}
.pdf-brand:hover { text-decoration: none; }
.pdf-brand__mark {
  width: 46px;
  height: 46px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--pdf-blue-900), var(--pdf-blue-700));
  display: grid;
  place-items: center;
  box-shadow: var(--pdf-shadow-sm);
  flex: 0 0 auto;
}
.pdf-brand__mark svg { width: 28px; height: 28px; }
.pdf-brand__title {
  display: block;
  font-weight: 800;
  letter-spacing: .015em;
  line-height: 1.05;
  font-size: 18px;
  text-transform: uppercase;
}
.pdf-brand__payoff {
  display: block;
  color: var(--pdf-gray-500);
  font-size: 12px;
  font-weight: 600;
  margin-top: 2px;
}

.pdf-nav {
  display: flex;
  align-items: center;
  gap: 18px;
  font-size: 14px;
  font-weight: 700;
}
.pdf-nav a { color: var(--pdf-gray-700); }
.pdf-nav a:hover { color: var(--pdf-blue-700); text-decoration: none; }

.pdf-btn,
.wp-block-button__link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 0;
  border-radius: 999px;
  padding: 12px 20px;
  font-weight: 800;
  cursor: pointer;
  transition: transform .18s ease, box-shadow .18s ease, background .18s ease;
  line-height: 1.1;
}
.pdf-btn:hover { transform: translateY(-1px); text-decoration: none; }
.pdf-btn--primary { background: var(--pdf-blue-700); color: var(--pdf-white); box-shadow: 0 10px 24px rgba(18,60,105,.24); }
.pdf-btn--primary:hover { background: var(--pdf-blue-900); color: var(--pdf-white); }
.pdf-btn--green { background: var(--pdf-green); color: var(--pdf-white); box-shadow: 0 10px 24px rgba(31,138,76,.2); }
.pdf-btn--ghost { color: #000000 !important; background: var(--pdf-blue-100); }
.pdf-btn--light { color: #000000 !important; background: var(--pdf-white); }

.pdf-hero {
  position: relative;
  overflow: hidden;
  color: var(--pdf-white);
  background:
    radial-gradient(circle at 15% 20%, rgba(31,138,76,.32), transparent 30%),
    linear-gradient(135deg, var(--pdf-blue-900), var(--pdf-blue-700));
}
.pdf-hero:after {
  content: "";
  position: absolute;
  inset: 0;
  background-image: linear-gradient(rgba(255,255,255,.04) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.04) 1px, transparent 1px);
  background-size: 38px 38px;
  pointer-events: none;
}
.pdf-hero__inner {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1.08fr .92fr;
  align-items: center;
  gap: 52px;
  padding: 82px 0 88px;
}
.pdf-kicker {
  color: #BBD2EE;
  text-transform: uppercase;
  letter-spacing: .12em;
  font-weight: 900;
  font-size: 13px;
}
.pdf-hero h1,
.pdf-section h2,
.pdf-page-title h1 {
  margin: 12px 0 18px;
  color: inherit;
  line-height: 1.08;
  letter-spacing: -.025em;
}
.pdf-hero h1 { font-size: clamp(38px, 5vw, 64px); max-width: 840px; }
.pdf-hero p { font-size: 19px; color: rgba(255,255,255,.86); max-width: 720px; }
.pdf-hero__actions { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 30px; }

.pdf-verify-card {
  background: var(--pdf-white);
  color: var(--pdf-gray-700);
  border-radius: var(--pdf-radius-lg);
  padding: 28px;
  box-shadow: var(--pdf-shadow-md);
}
.pdf-verify-card h2 { margin: 0 0 8px; color: var(--pdf-blue-900); font-size: 24px; }
.pdf-verify-card p { color: var(--pdf-gray-500); font-size: 14px; margin: 0 0 18px; }
.pdf-form-row { display: flex; gap: 10px; }
.pdf-input {
  width: 100%;
  border: 1px solid var(--pdf-gray-200);
  border-radius: 999px;
  padding: 14px 16px;
  font: inherit;
  outline: none;
}
.pdf-input:focus { border-color: var(--pdf-blue-700); box-shadow: 0 0 0 4px rgba(18,60,105,.1); }
.pdf-verify-icons { display: grid; grid-template-columns: repeat(3,1fr); gap: 10px; margin-top: 18px; }
.pdf-mini-feature { border: 1px solid var(--pdf-gray-200); border-radius: var(--pdf-radius-md); padding: 12px; font-size: 13px; font-weight: 800; color: var(--pdf-blue-900); text-align: center; background: var(--pdf-gray-100); }

.pdf-section { padding: 78px 0; }
.pdf-section--soft { background: var(--pdf-gray-100); }
.pdf-section__head { max-width: 760px; margin-bottom: 34px; }
.pdf-section__head.center { margin-left: auto; margin-right: auto; text-align: center; }
.pdf-section h2 { font-size: clamp(30px, 3vw, 44px); color: var(--pdf-blue-900); }
.pdf-section__lead { font-size: 18px; color: var(--pdf-gray-500); }

.pdf-grid-3 { display: grid; grid-template-columns: repeat(3,1fr); gap: 22px; }
.pdf-grid-2 { display: grid; grid-template-columns: repeat(2,1fr); gap: 28px; align-items: stretch; }
.pdf-card {
  background: var(--pdf-white);
  border: 1px solid var(--pdf-gray-200);
  border-radius: var(--pdf-radius-lg);
  padding: 26px;
  box-shadow: var(--pdf-shadow-sm);
}
.pdf-card h3 { color: var(--pdf-blue-900); margin: 12px 0 8px; font-size: 21px; }
.pdf-card p { margin: 0; color: var(--pdf-gray-500); }
.pdf-icon {
  width: 44px;
  height: 44px;
  border-radius: 13px;
  display: grid;
  place-items: center;
  background: var(--pdf-blue-100);
  color: var(--pdf-blue-700);
  font-weight: 900;
}

.pdf-result-demo {
  background: var(--pdf-white);
  border-radius: var(--pdf-radius-lg);
  border: 1px solid var(--pdf-gray-200);
  overflow: hidden;
  box-shadow: var(--pdf-shadow-md);
}
.pdf-result-demo__top { padding: 22px 24px; border-bottom: 1px solid var(--pdf-gray-200); display: flex; justify-content: space-between; align-items: center; gap: 16px; }
.pdf-status { display: inline-flex; align-items: center; gap: 8px; font-weight: 900; border-radius: 999px; padding: 8px 12px; font-size: 13px; }
.pdf-status:before { content: ""; width: 10px; height: 10px; border-radius: 50%; background: currentColor; }
.pdf-status--green { color: var(--pdf-green); background: rgba(31,138,76,.1); }
.pdf-status--yellow { color: var(--pdf-yellow); background: rgba(217,154,0,.12); }
.pdf-status--red { color: var(--pdf-red); background: rgba(179,38,30,.1); }
.pdf-result-demo__body { padding: 24px; display: grid; grid-template-columns: repeat(2,1fr); gap: 14px; }
.pdf-data-item { background: var(--pdf-gray-100); border-radius: var(--pdf-radius-md); padding: 14px; }
.pdf-data-item span { display: block; color: var(--pdf-gray-500); font-size: 12px; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; }
.pdf-data-item strong { color: var(--pdf-blue-900); font-size: 16px; }

.pdf-list { list-style: none; padding: 0; margin: 20px 0 0; display: grid; gap: 10px; }
.pdf-list li { padding-left: 30px; position: relative; }
.pdf-list li:before { content: "✓"; position: absolute; left: 0; top: 0; color: var(--pdf-green); font-weight: 900; }

.pdf-page-title { background: var(--pdf-blue-900); color: var(--pdf-white); padding: 58px 0; }
.pdf-page-title h1 { font-size: clamp(34px, 4vw, 54px); }
.pdf-page-title p { color: rgba(255,255,255,.82); max-width: 800px; font-size: 18px; }

.pdf-content { padding: 56px 0; }
.pdf-content article { max-width: 920px; margin: 0 auto; }
.pdf-content h1, .pdf-content h2, .pdf-content h3 { color: var(--pdf-blue-900); line-height: 1.15; }

.pdf-footer { background: var(--pdf-blue-900); color: rgba(255,255,255,.78); padding: 48px 0 24px; }
.pdf-footer a { color: var(--pdf-white); }
.pdf-footer__grid { display: grid; grid-template-columns: 1.4fr .8fr .8fr; gap: 36px; }
.pdf-footer h3 { color: var(--pdf-white); margin: 0 0 12px; }
.pdf-footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 7px; }
.pdf-footer-owner { margin-top: 34px; padding: 24px; border: 1px solid rgba(255,255,255,.16); border-radius: var(--pdf-radius-lg); background: rgba(255,255,255,.055); color: rgba(255,255,255,.82); }
.pdf-footer-owner h3 { margin: 0 0 12px; color: var(--pdf-white); }
.pdf-footer-owner p { margin: 6px 0; line-height: 1.55; }
.pdf-footer-owner strong { color: var(--pdf-white); }
.pdf-footer-owner a { color: #CFEAFF; text-decoration: none; font-weight: 800; }
.pdf-footer-owner a:hover { color: var(--pdf-white); text-decoration: underline; }
.pdf-disclaimer { margin-top: 24px; padding-top: 20px; border-top: 1px solid rgba(255,255,255,.16); font-size: 12px; color: rgba(255,255,255,.64); }

.pdf-mobile-toggle { display: none; background: none; border: 0; color: var(--pdf-blue-900); font-weight: 900; font-size: 16px; }

@media (max-width: 980px) {
  .pdf-hero__inner,
  .pdf-grid-2 { grid-template-columns: 1fr; }
  .pdf-grid-3 { grid-template-columns: 1fr; }
  .pdf-nav { display: none; position: absolute; left: 20px; right: 20px; top: 82px; background: var(--pdf-white); border: 1px solid var(--pdf-gray-200); border-radius: 18px; padding: 18px; box-shadow: var(--pdf-shadow-md); flex-direction: column; align-items: flex-start; }
  .pdf-nav.is-open { display: flex; }
  .pdf-mobile-toggle { display: block; }
  .pdf-footer__grid { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .pdf-container { width: min(100% - 28px, var(--pdf-container)); }
  .pdf-header__inner { min-height: 74px; }
  .pdf-brand__title { font-size: 15px; }
  .pdf-form-row { flex-direction: column; }
  .pdf-verify-icons,
  .pdf-result-demo__body { grid-template-columns: 1fr; }
  .pdf-hero__inner { padding: 54px 0 58px; }
  .pdf-section { padding: 54px 0; }
}


/* STEP 33 - Testi legali pubblici */
.pdf-legal-page { max-width: 980px; margin: 0 auto; }
.pdf-legal-hero { background: linear-gradient(135deg, var(--pdf-blue-900), var(--pdf-blue-700)); color: #fff; border-radius: 24px; padding: 38px; margin: 20px 0 28px; box-shadow: var(--pdf-shadow-sm); }
.pdf-legal-hero h1 { color: #fff; margin: 0 0 10px; font-size: clamp(34px, 4vw, 52px); }
.pdf-legal-hero p { margin: 0; color: rgba(255,255,255,.82); font-size: 18px; }
.pdf-legal-kicker { text-transform: uppercase; letter-spacing: .08em; font-weight: 900; font-size: 12px !important; margin-bottom: 12px !important; color: rgba(255,255,255,.7) !important; }
.pdf-legal-content { background: #fff; border: 1px solid var(--pdf-gray-200); border-radius: 20px; padding: 34px; box-shadow: var(--pdf-shadow-sm); line-height: 1.7; }
.pdf-legal-content h2 { color: var(--pdf-blue-900); margin-top: 28px; }
.pdf-legal-content h2:first-child { margin-top: 0; }
.pdf-legal-content ul { padding-left: 24px; }
.pdf-legal-alert { border-left: 5px solid var(--pdf-yellow); background: #FFF9EA; border-radius: 12px; padding: 14px 16px; margin-bottom: 24px; color: var(--pdf-blue-900); }
.pdf-legal-updated { border-top: 1px solid var(--pdf-gray-200); margin-top: 30px; padding-top: 18px; font-size: 13px; color: var(--pdf-gray-500); }
@media (max-width: 640px) { .pdf-legal-hero, .pdf-legal-content { padding: 24px; border-radius: 18px; } }


/* STEP 34 - Rifinitura commerciale sito pubblico */
.pdf-hero--commercial .pdf-hero__inner { padding-top: 92px; padding-bottom: 96px; }
.pdf-trust-row { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 28px; }
.pdf-trust-row span { border: 1px solid rgba(255,255,255,.22); background: rgba(255,255,255,.10); color: rgba(255,255,255,.9); border-radius: 999px; padding: 8px 12px; font-weight: 800; font-size: 13px; }
.pdf-section--tight { padding: 42px 0; }
.pdf-home-emittenti-cta { margin-top: -82px; position: relative; z-index: 3; display: grid; grid-template-columns: 1.2fr .8fr; gap: 22px; align-items: center; background: #fff; border: 1px solid var(--pdf-gray-200); border-radius: 26px; padding: 30px; box-shadow: var(--pdf-shadow-md); }
.pdf-home-emittenti-cta h2 { margin: 4px 0 10px; color: var(--pdf-blue-900); font-size: clamp(26px, 3vw, 38px); line-height: 1.1; }
.pdf-home-emittenti-cta p { margin: 0; color: var(--pdf-gray-500); }
.pdf-commercial-page { max-width: 1120px; margin: 0 auto; padding: 10px 0 40px; }
.pdf-commercial-hero { background: linear-gradient(135deg, var(--pdf-blue-900), var(--pdf-blue-700)); color: #fff; border-radius: 28px; padding: clamp(30px, 5vw, 54px); margin: 20px 0 30px; box-shadow: var(--pdf-shadow-md); }
.pdf-commercial-hero h1 { color: #fff; margin: 8px 0 12px; font-size: clamp(34px, 5vw, 56px); line-height: 1.06; letter-spacing: -.025em; }
.pdf-commercial-hero p { color: rgba(255,255,255,.84); font-size: 18px; max-width: 840px; }
.pdf-commercial-kicker { color: #BBD2EE !important; text-transform: uppercase; letter-spacing: .12em; font-weight: 900; font-size: 13px !important; margin: 0 0 8px !important; }
.pdf-commercial-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 24px; }
.pdf-commercial-content { display: grid; gap: 24px; }
.pdf-commercial-grid { display: grid; gap: 22px; }
.pdf-commercial-grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.pdf-commercial-grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.pdf-commercial-card { background: #fff; border: 1px solid var(--pdf-gray-200); border-radius: 22px; padding: 26px; box-shadow: var(--pdf-shadow-sm); }
.pdf-commercial-card h2 { color: var(--pdf-blue-900); font-size: 24px; margin: 0 0 10px; }
.pdf-commercial-card p { color: var(--pdf-gray-500); margin-top: 0; }
.pdf-commercial-card ul { margin: 16px 0 0; padding-left: 20px; color: var(--pdf-gray-700); }
.pdf-commercial-card li { margin: 7px 0; }
.pdf-commercial-step { width: 44px; height: 44px; display: grid; place-items: center; border-radius: 13px; background: var(--pdf-blue-100); color: var(--pdf-blue-700); font-weight: 900; margin-bottom: 16px; }
.pdf-commercial-band { background: var(--pdf-blue-100); border: 1px solid #d8e5f3; border-radius: 24px; padding: 30px; color: var(--pdf-gray-700); }
.pdf-commercial-band h2 { color: var(--pdf-blue-900); margin-top: 0; }
.pdf-faq-list { display: grid; gap: 12px; }
.pdf-faq-list details { background: #fff; border: 1px solid var(--pdf-gray-200); border-radius: 18px; padding: 18px 20px; box-shadow: var(--pdf-shadow-sm); }
.pdf-faq-list summary { cursor: pointer; font-weight: 900; color: var(--pdf-blue-900); font-size: 18px; }
.pdf-faq-list p { color: var(--pdf-gray-500); margin-bottom: 0; }
.pdf-card--feature { position: relative; overflow: hidden; }
.pdf-card--feature:after { content: ""; position: absolute; right: -40px; top: -40px; width: 140px; height: 140px; border-radius: 50%; background: var(--pdf-blue-100); opacity: .72; }
.pdf-card--cta { border-color: #d5e7f5; }
.pdf-center-action { text-align: center; margin-top: 30px; }
.pdf-final-cta { background: linear-gradient(135deg, var(--pdf-blue-900), var(--pdf-blue-700)); color: #fff; text-align: center; }
.pdf-final-cta h2 { color: #fff; font-size: clamp(32px, 4vw, 48px); margin: 0 0 10px; }
.pdf-final-cta p { color: rgba(255,255,255,.82); font-size: 18px; max-width: 720px; margin: 0 auto; }
@media (max-width: 980px) { .pdf-home-emittenti-cta, .pdf-commercial-grid-2, .pdf-commercial-grid-3 { grid-template-columns: 1fr; } .pdf-home-emittenti-cta { margin-top: 0; } }
@media (max-width: 640px) { .pdf-commercial-hero, .pdf-commercial-card, .pdf-commercial-band, .pdf-home-emittenti-cta { border-radius: 18px; padding: 22px; } }


/* STEP 35 - Documenti commerciali emittenti */
.pdf-sales-document { max-width: 1080px; margin: 0 auto; padding: 12px 0 42px; }
.pdf-sales-hero { background: linear-gradient(135deg, var(--pdf-blue-900), var(--pdf-blue-700)); color: #fff; border-radius: 28px; padding: clamp(30px, 5vw, 54px); margin: 20px 0 30px; box-shadow: var(--pdf-shadow-md); }
.pdf-sales-hero h1 { color: #fff; margin: 8px 0 12px; font-size: clamp(34px, 5vw, 56px); line-height: 1.06; letter-spacing: -.025em; }
.pdf-sales-hero p { color: rgba(255,255,255,.84); font-size: 18px; max-width: 850px; }
.pdf-sales-content { display: grid; gap: 22px; }
.pdf-sales-section { background: #fff; border: 1px solid var(--pdf-gray-200); border-radius: 22px; padding: 28px; box-shadow: var(--pdf-shadow-sm); line-height: 1.65; }
.pdf-sales-section h2 { margin-top: 0; color: var(--pdf-blue-900); }
.pdf-sales-section p { color: var(--pdf-gray-600); }
.pdf-sales-section ul, .pdf-sales-section ol { margin: 14px 0 0; padding-left: 22px; color: var(--pdf-gray-700); }
.pdf-sales-section li { margin: 7px 0; }
.pdf-sales-cta { background: var(--pdf-blue-100); border: 1px solid #d8e5f3; border-radius: 24px; padding: 30px; }
.pdf-sales-cta h2 { margin-top: 0; color: var(--pdf-blue-900); }
.pdf-sales-note { margin-top: 24px; background: #fff9ea; border-left: 5px solid var(--pdf-yellow); border-radius: 14px; padding: 16px 18px; color: var(--pdf-blue-900); }
.pdf-email-box { background: #f8fafc; border: 1px solid var(--pdf-gray-200); border-radius: 18px; padding: 24px; }
.pdf-signature-box { background: #fff; border: 1px dashed var(--pdf-gray-400); border-radius: 20px; padding: 26px; color: var(--pdf-blue-900); }
.pdf-print-actions button.pdf-btn { border: 0; cursor: pointer; font: inherit; }
@media print {
  .pdf-header, .pdf-footer, .pdf-print-actions, .pdf-mobile-toggle { display: none !important; }
  .pdf-main, .pdf-content, .pdf-sales-document { padding: 0 !important; margin: 0 !important; max-width: none !important; }
  .pdf-sales-hero { background: #fff !important; color: #000 !important; box-shadow: none !important; border: 1px solid #ddd !important; }
  .pdf-sales-hero h1, .pdf-sales-hero p, .pdf-commercial-kicker { color: #000 !important; }
  .pdf-sales-section, .pdf-commercial-card, .pdf-sales-cta, .pdf-sales-note, .pdf-email-box, .pdf-signature-box { box-shadow: none !important; break-inside: avoid; }
}


/* STEP 41 - Centro Messaggi & Workflow */
.pdf-message-list{display:grid;gap:18px;margin-top:22px}.pdf-message-card{border:1px solid rgba(10,31,68,.14);border-radius:18px;background:#fff;padding:18px;box-shadow:0 12px 32px rgba(10,31,68,.07)}.pdf-message-meta{display:flex;gap:10px;flex-wrap:wrap;margin-bottom:10px}.pdf-message-meta span{background:#eef3fb;border-radius:999px;padding:5px 10px;font-size:12px;font-weight:700;color:#14315f}.pdf-priority-card-urgente{border-left:6px solid #b42318}.pdf-priority-card-alta{border-left:6px solid #b76e00}.pdf-priority-card-normale{border-left:6px solid #1d4ed8}.pdf-priority-card-bassa{border-left:6px solid #64748b}.pdf-front-reply-form textarea{width:100%;margin:10px 0;border-radius:12px;border:1px solid rgba(10,31,68,.18);padding:12px}.pdf-empty-state{border:1px dashed rgba(10,31,68,.24);border-radius:18px;padding:24px;background:#f8fbff}.pdf-priority-urgente{background:#fee4e2!important;color:#912018!important}.pdf-priority-alta{background:#fef0c7!important;color:#93370d!important}.pdf-priority-normale{background:#dbeafe!important;color:#1e3a8a!important}.pdf-priority-bassa{background:#f1f5f9!important;color:#334155!important}


/* STEP 45 manuale operativo */
.pdf-manuale-step45 .pdf-manuale-content {
  background: var(--pdf-white);
  border: 1px solid var(--pdf-gray-200);
  border-radius: var(--pdf-radius-lg);
  box-shadow: var(--pdf-shadow-sm);
  padding: 28px;
  line-height: 1.65;
}
.pdf-manuale-step45 .pdf-manuale-content h2 {
  color: var(--pdf-blue-900);
  margin-top: 26px;
}
.pdf-manuale-step45 .pdf-checklist li { margin: 8px 0; }
.pdf-print-tools { margin-top: 18px; }
@media print {
  .pdf-header, .pdf-footer, .pdf-print-tools { display: none !important; }
  .pdf-manuale-step45 .pdf-manuale-content { box-shadow: none; border: 0; padding: 0; }
  body { background: #fff !important; }
}


/* STEP 46 release candidate */
.pdf-admin-wrap .postbox h2 { margin-top: 0; }
.pdf-admin-wrap code { background: #f4f6f8; padding: 2px 5px; border-radius: 4px; }


/* STEP 49 - Monitoraggio post-lancio */
.pdf-step49-public h2 { color: var(--pdf-blue-900); margin-top: 24px; }
.pdf-step49-public ul { padding-left: 22px; }
.pdf-step49-cta:hover { filter: brightness(1.08); }


/* STEP 51A - Area Riservata frontend armonizzata al tema */
.pdf-reserved-hero {
  position: relative;
  overflow: hidden;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 30px;
  align-items: center;
  margin: 34px 0 28px;
  padding: 46px;
  color: var(--pdf-white);
  border-radius: var(--pdf-radius-lg);
  background:
    radial-gradient(circle at 12% 20%, rgba(31,138,76,.35), transparent 32%),
    linear-gradient(135deg, var(--pdf-blue-900), var(--pdf-blue-700));
  box-shadow: var(--pdf-shadow-md);
}
.pdf-reserved-hero:after {
  content: "";
  position: absolute;
  inset: 0;
  background-image: linear-gradient(rgba(255,255,255,.06) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.06) 1px, transparent 1px);
  background-size: 38px 38px;
  pointer-events: none;
}
.pdf-reserved-hero__content,
.pdf-reserved-hero__badge { position: relative; z-index: 1; }
.pdf-reserved-hero h1 { margin: 8px 0 14px; font-size: clamp(32px, 5vw, 54px); line-height: 1.02; letter-spacing: -.04em; color: var(--pdf-white); }
.pdf-reserved-hero p { max-width: 760px; margin: 0; color: rgba(255,255,255,.86); font-size: 18px; }
.pdf-reserved-hero__badge {
  min-width: 230px;
  padding: 22px;
  border: 1px solid rgba(255,255,255,.22);
  border-radius: var(--pdf-radius-md);
  background: rgba(255,255,255,.10);
  backdrop-filter: blur(12px);
}
.pdf-reserved-hero__badge strong { display: block; font-size: 22px; color: var(--pdf-white); }
.pdf-reserved-hero__badge span { display: block; margin-top: 6px; font-size: 13px; color: rgba(255,255,255,.78); font-weight: 700; }
.pdf-reserved-panel { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(300px, .55fr); gap: 24px; margin: 0 0 56px; }
.pdf-reserved-card {
  padding: 30px;
  border: 1px solid var(--pdf-gray-200);
  border-radius: var(--pdf-radius-lg);
  background: var(--pdf-white);
  box-shadow: var(--pdf-shadow-sm);
}
.pdf-reserved-card--wide { grid-column: 1 / -1; }
.pdf-reserved-card h2,
.pdf-reserved-card h3 { margin-top: 0; color: var(--pdf-blue-900); line-height: 1.12; }
.pdf-reserved-card h2 { font-size: clamp(28px, 3vw, 38px); }
.pdf-reserved-card p { color: var(--pdf-gray-500); }
.pdf-area-loginform { display: grid; gap: 11px; margin-top: 20px; }
.pdf-area-loginform label { font-weight: 800; color: var(--pdf-blue-900); font-size: 14px; }
.pdf-area-loginform input[type="text"],
.pdf-area-loginform input[type="password"] {
  width: 100%;
  min-height: 50px;
  padding: 12px 14px;
  border: 1px solid var(--pdf-gray-200);
  border-radius: 14px;
  background: var(--pdf-gray-100);
  color: var(--pdf-gray-900);
  font-size: 16px;
  outline: none;
}
.pdf-area-loginform input[type="text"]:focus,
.pdf-area-loginform input[type="password"]:focus { border-color: var(--pdf-blue-700); box-shadow: 0 0 0 4px rgba(18,60,105,.12); background: var(--pdf-white); }
.pdf-login-remember { display: inline-flex !important; align-items: center; gap: 9px; margin: 6px 0 4px; color: var(--pdf-gray-700) !important; }
.pdf-login-remember input { width: 18px; height: 18px; }
.pdf-reserved-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 22px; }
.pdf-reserved-links { display: flex; justify-content: space-between; gap: 14px; flex-wrap: wrap; margin-top: 18px; font-weight: 800; }
.pdf-reserved-help ul { margin: 18px 0 22px; padding-left: 20px; color: var(--pdf-gray-700); }
.pdf-form-alert { padding: 12px 14px; border-radius: 14px; margin: 16px 0; font-weight: 800; }
.pdf-form-alert--error { color: #7F1D1D; background: #FEE2E2; border: 1px solid #FECACA; }
.pdf-form-alert--success { color: #14532D; background: #DCFCE7; border: 1px solid #BBF7D0; }
@media (max-width: 860px) {
  .pdf-reserved-hero { grid-template-columns: 1fr; padding: 32px 24px; }
  .pdf-reserved-panel { grid-template-columns: 1fr; }
}


/* STEP 51B - Revisione leggibilità titoli e testi su fondi blu
   Obiettivo: evitare scritte nere/blu scuro su sezioni blu istituzionali.
   Le regole sono mirate alle aree con background blu e non alterano card, form e box chiari interni. */
:root {
  --pdf-text-on-blue: #FFFFFF;
  --pdf-text-on-blue-soft: #D7EFFF;
  --pdf-text-on-blue-muted: rgba(255,255,255,.86);
}

:is(
  .pdf-page-title,
  .pdf-legal-hero,
  .pdf-commercial-hero,
  .pdf-sales-hero,
  .pdf-final-cta,
  .pdf-reserved-hero
) :where(h1,h2,h3,h4,h5,h6,.wp-block-heading,.entry-title,.page-title,strong,b) {
  color: var(--pdf-text-on-blue) !important;
}

:is(
  .pdf-page-title,
  .pdf-legal-hero,
  .pdf-commercial-hero,
  .pdf-sales-hero,
  .pdf-final-cta,
  .pdf-reserved-hero
) :where(p,li,span,small,em) {
  color: var(--pdf-text-on-blue-muted) !important;
}

:is(
  .pdf-page-title,
  .pdf-legal-hero,
  .pdf-commercial-hero,
  .pdf-sales-hero,
  .pdf-final-cta,
  .pdf-reserved-hero
) :where(.pdf-kicker,.pdf-commercial-kicker,.pdf-legal-kicker) {
  color: var(--pdf-text-on-blue-soft) !important;
}

:is(
  .pdf-page-title,
  .pdf-legal-hero,
  .pdf-commercial-hero,
  .pdf-sales-hero,
  .pdf-final-cta,
  .pdf-reserved-hero
) a:not(.pdf-btn):not(.wp-block-button__link) {
  color: var(--pdf-text-on-blue-soft) !important;
}

:is(
  .pdf-page-title,
  .pdf-legal-hero,
  .pdf-commercial-hero,
  .pdf-sales-hero,
  .pdf-final-cta,
  .pdf-reserved-hero
) a:not(.pdf-btn):not(.wp-block-button__link):hover {
  color: var(--pdf-text-on-blue) !important;
}

/* Home hero: esclusione del form/box bianco di verifica, che deve restare con testo scuro. */
.pdf-hero > .pdf-container > div:first-child :where(h1,h2,h3,h4,h5,h6,.wp-block-heading,.entry-title,.page-title,strong,b) {
  color: var(--pdf-text-on-blue) !important;
}
.pdf-hero > .pdf-container > div:first-child :where(p,li,span,small,em) {
  color: var(--pdf-text-on-blue-muted) !important;
}
.pdf-hero > .pdf-container > div:first-child :where(.pdf-kicker) {
  color: var(--pdf-text-on-blue-soft) !important;
}
.pdf-hero > .pdf-container > div:first-child a:not(.pdf-btn):not(.wp-block-button__link) {
  color: var(--pdf-text-on-blue-soft) !important;
}

/* Copertura per blocchi WordPress con sfondo blu impostato dall'editor. */
:is(
  .has-pdf-blue-900-background-color,
  .has-pdf-blue-800-background-color,
  .has-pdf-blue-700-background-color,
  .has-blue-background-color,
  .has-navy-background-color,
  .has-primary-background-color,
  .wp-block-cover[style*="background-color:#0B1F3A" i],
  .wp-block-cover[style*="background-color: #0B1F3A" i],
  .wp-block-cover[style*="background-color:#102B4E" i],
  .wp-block-cover[style*="background-color: #102B4E" i],
  .wp-block-cover[style*="background-color:#123C69" i],
  .wp-block-cover[style*="background-color: #123C69" i],
  .wp-block-group[style*="background-color:#0B1F3A" i],
  .wp-block-group[style*="background-color: #0B1F3A" i],
  .wp-block-group[style*="background-color:#102B4E" i],
  .wp-block-group[style*="background-color: #102B4E" i],
  .wp-block-group[style*="background-color:#123C69" i],
  .wp-block-group[style*="background-color: #123C69" i]
) :where(h1,h2,h3,h4,h5,h6,.wp-block-heading,.entry-title,.page-title,strong,b) {
  color: var(--pdf-text-on-blue) !important;
}

:is(
  .has-pdf-blue-900-background-color,
  .has-pdf-blue-800-background-color,
  .has-pdf-blue-700-background-color,
  .has-blue-background-color,
  .has-navy-background-color,
  .has-primary-background-color,
  .wp-block-cover[style*="background-color:#0B1F3A" i],
  .wp-block-cover[style*="background-color: #0B1F3A" i],
  .wp-block-cover[style*="background-color:#102B4E" i],
  .wp-block-cover[style*="background-color: #102B4E" i],
  .wp-block-cover[style*="background-color:#123C69" i],
  .wp-block-cover[style*="background-color: #123C69" i],
  .wp-block-group[style*="background-color:#0B1F3A" i],
  .wp-block-group[style*="background-color: #0B1F3A" i],
  .wp-block-group[style*="background-color:#102B4E" i],
  .wp-block-group[style*="background-color: #102B4E" i],
  .wp-block-group[style*="background-color:#123C69" i],
  .wp-block-group[style*="background-color: #123C69" i]
) :where(p,li,span,small,em) {
  color: var(--pdf-text-on-blue-muted) !important;
}

:is(
  .has-pdf-blue-900-background-color,
  .has-pdf-blue-800-background-color,
  .has-pdf-blue-700-background-color,
  .has-blue-background-color,
  .has-navy-background-color,
  .has-primary-background-color,
  .wp-block-cover[style*="background-color:#0B1F3A" i],
  .wp-block-cover[style*="background-color: #0B1F3A" i],
  .wp-block-cover[style*="background-color:#102B4E" i],
  .wp-block-cover[style*="background-color: #102B4E" i],
  .wp-block-cover[style*="background-color:#123C69" i],
  .wp-block-cover[style*="background-color: #123C69" i],
  .wp-block-group[style*="background-color:#0B1F3A" i],
  .wp-block-group[style*="background-color: #0B1F3A" i],
  .wp-block-group[style*="background-color:#102B4E" i],
  .wp-block-group[style*="background-color: #102B4E" i],
  .wp-block-group[style*="background-color:#123C69" i],
  .wp-block-group[style*="background-color: #123C69" i]
) a:not(.pdf-btn):not(.wp-block-button__link) {
  color: var(--pdf-text-on-blue-soft) !important;
}

/* Salvaguardia: card, form e box chiari interni alle sezioni blu mantengono la palette scura originale. */
:is(.pdf-verify-card,.pdf-card,.pdf-commercial-card,.pdf-sales-section,.pdf-reserved-card,.pdf-legal-content,.pdf-home-emittenti-cta,.pdf-accreditamento-form,.pdf-aderente-card) :where(h1,h2,h3,h4,h5,h6,.wp-block-heading,.entry-title,.page-title,strong,b) {
  color: var(--pdf-blue-900) !important;
}
:is(.pdf-verify-card,.pdf-card,.pdf-commercial-card,.pdf-sales-section,.pdf-reserved-card,.pdf-legal-content,.pdf-home-emittenti-cta,.pdf-accreditamento-form,.pdf-aderente-card) :where(p,li,span,small,em) {
  color: var(--pdf-gray-500) !important;
}


/* STEP 51D - Leggibilità bottoni chiari
   Obiettivo: ogni bottone con fondo grigio chiaro/bianco deve avere testo nero ben visibile,
   anche quando è inserito dentro hero o sezioni blu dove il testo ereditato può diventare chiaro. */
:root {
  --pdf-text-on-light-button: #000000;
}

:is(
  .pdf-btn--light,
  .pdf-btn--ghost,
  .pdf-btn-light,
  .pdf-btn-secondary,
  .pdf-button-light,
  .wp-block-button.is-style-outline .wp-block-button__link,
  .wp-block-button__link.has-background.has-white-background-color,
  .wp-block-button__link.has-background.has-light-background-color,
  .wp-block-button__link.has-background.has-pdf-blue-100-background-color
) {
  color: var(--pdf-text-on-light-button) !important;
  text-shadow: none !important;
}

:is(
  .pdf-btn--light,
  .pdf-btn--ghost,
  .pdf-btn-light,
  .pdf-btn-secondary,
  .pdf-button-light,
  .wp-block-button.is-style-outline .wp-block-button__link,
  .wp-block-button__link.has-background.has-white-background-color,
  .wp-block-button__link.has-background.has-light-background-color,
  .wp-block-button__link.has-background.has-pdf-blue-100-background-color
) :where(span,strong,em,small,b,i) {
  color: var(--pdf-text-on-light-button) !important;
  text-shadow: none !important;
}

/* Riconoscimento dei bottoni chiari creati da editor o shortcode con background inline. */
:where(a,button,input[type="button"],input[type="submit"],.wp-block-button__link)[style*="background:#fff" i],
:where(a,button,input[type="button"],input[type="submit"],.wp-block-button__link)[style*="background: #fff" i],
:where(a,button,input[type="button"],input[type="submit"],.wp-block-button__link)[style*="background-color:#fff" i],
:where(a,button,input[type="button"],input[type="submit"],.wp-block-button__link)[style*="background-color: #fff" i],
:where(a,button,input[type="button"],input[type="submit"],.wp-block-button__link)[style*="background:#f" i],
:where(a,button,input[type="button"],input[type="submit"],.wp-block-button__link)[style*="background: #f" i],
:where(a,button,input[type="button"],input[type="submit"],.wp-block-button__link)[style*="background-color:#f" i],
:where(a,button,input[type="button"],input[type="submit"],.wp-block-button__link)[style*="background-color: #f" i] {
  color: var(--pdf-text-on-light-button) !important;
  text-shadow: none !important;
}

/* Correzione specifica per i pulsanti chiari dentro hero e box blu. */
:is(
  .pdf-hero,
  .pdf-page-title,
  .pdf-legal-hero,
  .pdf-commercial-hero,
  .pdf-sales-hero,
  .pdf-final-cta,
  .pdf-reserved-hero
) :is(.pdf-btn--light,.pdf-btn--ghost,.pdf-btn-light,.pdf-btn-secondary) {
  color: var(--pdf-text-on-light-button) !important;
}

:is(
  .pdf-hero,
  .pdf-page-title,
  .pdf-legal-hero,
  .pdf-commercial-hero,
  .pdf-sales-hero,
  .pdf-final-cta,
  .pdf-reserved-hero
) :is(.pdf-btn--light,.pdf-btn--ghost,.pdf-btn-light,.pdf-btn-secondary) :where(span,strong,em,small,b,i) {
  color: var(--pdf-text-on-light-button) !important;
}
