/* Aggiunte di REAssist Contratti al tema di Segreteria Digitale (style.css + home.css).
   Niente stili in linea nei template: la Content-Security-Policy li blocca. */

/* --- logo: simbolo casa-fumetto + "REAssist / Contratti" su due righe, come Segreteria Digitale --- */
.ct-logo { gap: 10px; text-decoration: none; }
.ct-logo img { height: 44px; width: 44px; }
.ct-wordmark { display: flex; flex-direction: column; line-height: 1; font-weight: 800; letter-spacing: -.02em; }
.ct-wordmark span { color: #ffffff; font-size: 18px; }
.ct-wordmark b { color: var(--sd-highlight); font-size: 19px; font-weight: 800; margin-top: 2px; }
body.sd .sd-nav a.active { color: #ffffff; box-shadow: inset 0 -2px 0 var(--sd-highlight); }
.ct-badge { font-size: 13px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: #141414; background: var(--sd-highlight);
  border-radius: 999px; padding: 6px 14px; align-self: center; }
.sd-actions form { margin: 0; }
button.sd-btn { font: inherit; cursor: pointer; background: transparent; }
body.sd button.sd-btn-sm { font-size: 15px; }

/* --- pagine interne (body.sd.ct): testi con i loro margini, moduli e riquadri del tema ----------- */
.ct-main { min-height: calc(100vh - 230px); padding: 40px 0 72px; }
body.ct h1 { font-size: 40px; line-height: 1.08; font-weight: 900; letter-spacing: -.03em; margin: 0 0 .5em; }
body.ct h2 { font-size: 24px; line-height: 1.15; font-weight: 800; letter-spacing: -.02em; margin: 0 0 .5em; }
body.ct h3 { font-size: 18px; font-weight: 800; margin: 0 0 .4em; }
body.ct p { margin: 0 0 1em; }
body.ct .muted, body.ct .hint { color: var(--sd-muted); }
body.ct .card { background: var(--sd-surface); border: 1px solid var(--sd-line); border-radius: 20px; }
body.ct .auth.card { box-shadow: 0 40px 80px -40px #0066ff; }
body.ct label { color: #ffffff; }
body.ct input[type=text], body.ct input[type=email], body.ct input[type=password] {
  background: #141414; border-color: #ffffff2e; color: #ffffff; }
body.ct input:focus { outline: 3px solid #0066ff55; border-color: var(--sd-accent); }
body.ct .btn { background: var(--sd-accent); color: #ffffff; border-color: var(--sd-accent); box-shadow: 0 8px 24px -8px #0066ff; font-weight: 700; }
body.ct .btn:hover { background: #1f7aff; color: #ffffff; }
body.ct .btn.secondary, body.ct .btn.ghost { background: transparent; color: #ffffff; border: 1px solid #ffffff33; box-shadow: none; }
body.ct .btn.secondary:hover, body.ct .btn.ghost:hover { border-color: #ffffff80; background: transparent; }
body.ct .btn.danger { background: #3a1b1b; color: #fca5a5; border-color: #fca5a566; box-shadow: none; }
body.ct .btn[disabled] { opacity: .5; cursor: not-allowed; box-shadow: none; }
body.ct .consent input { accent-color: var(--sd-accent); }
body.ct .flash { border-radius: 14px; }
body.ct .flash.ok { background: #00ffff12; color: var(--sd-highlight); border: 1px solid #00ffff40; }
body.ct .badge.ok { background: #00ffff1a; color: var(--sd-highlight); }
body.ct .legal-doc { background: var(--sd-surface); border-color: var(--sd-line); }
body.ct .legal-doc h2 { font-size: 20px; margin-top: 1.8em; }
body.ct summary { cursor: pointer; color: var(--sd-highlight); }

/* campi obbligatori ed errori sui singoli campi */
.req { color: #ff6b6b; font-weight: 700; margin-left: 2px; }
.field-error { color: #fca5a5; font-size: .88rem; margin: 6px 0 0 !important; }
.field.invalid input { border-color: #ff6b6b !important; }
.consent.invalid span { color: #fca5a5; }
.form-note { font-size: .85rem; color: var(--sd-muted); margin: -4px 0 16px !important; }

/* area riservata */
.page-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px 24px; flex-wrap: wrap; margin: 0 0 24px; }
.page-head h1 { margin: 0 0 4px; }
.page-head p { margin: 0; }
.empty-state { text-align: center; padding: 48px 24px; }
.empty-state p { max-width: 540px; margin-left: auto; margin-right: auto; }
.empty-ico { width: 72px; height: 72px; border-radius: 20px; background: var(--sd-accent); display: grid; place-items: center;
  margin: 0 auto 18px; box-shadow: 0 10px 30px -8px #0066ff; }
.stack > * + * { margin-top: 16px; }
.kv { display: grid; grid-template-columns: max-content 1fr; gap: 6px 18px; margin: 0; }
.kv dt { color: var(--sd-muted); }
.kv dd { margin: 0; }
.qr { background: #fff; border-radius: 14px; padding: 8px; display: inline-block; }
.qr img { display: block; width: 220px; height: 220px; }
.secret { font-family: ui-monospace, monospace; letter-spacing: .08em; word-break: break-all; background: #262626;
  padding: 8px 12px; border-radius: 8px; display: inline-block; }
.mt { margin-top: 16px; }
.steps { counter-reset: step; list-style: none; padding: 0; margin: 0; display: grid; gap: 14px; }
.steps li { counter-increment: step; display: flex; gap: 14px; align-items: flex-start; }
.steps li::before { content: counter(step); flex: none; width: 32px; height: 32px; border-radius: 10px; background: var(--sd-accent);
  color: #fff; font-weight: 800; display: grid; place-items: center; }
.draft-banner { background: #ff7a1a1f; color: #ffb27a; border: 1px solid #ff7a1a55; padding: 10px 14px; border-radius: 12px; margin-bottom: 20px; }

/* --- home: scena dell'hero (documento + segnalazioni) ------------------------------------------ */
.ct-scene-doc { position: absolute; right: 0; top: 10px; width: 70%; height: auto; }
.ct-findings { display: flex; flex-direction: column; gap: 8px; margin-top: 4px; }
.ct-finding { display: flex; align-items: center; gap: 8px; font-size: 13px; color: #ffffff; }
.ct-dot { flex: 0 0 auto; width: 10px; height: 10px; border-radius: 50%; }
.ct-l1 { background: #ff4d4d; box-shadow: 0 0 10px #ff4d4d; }
.ct-l2 { background: #ff7a1a; box-shadow: 0 0 10px #ff7a1a; }
.ct-l3 { background: #ffd21a; box-shadow: 0 0 10px #ffd21a; }

/* livelli di gravità nel bento */
.ct-level-art { flex-direction: column; gap: 12px; }
.ct-level-pill { font-size: 13px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; border-radius: 999px; padding: 6px 16px; color: #141414; }
.ct-level-pill.l1 { background: #ff4d4d; } .ct-level-pill.l2 { background: #ff7a1a; } .ct-level-pill.l3 { background: #ffd21a; }
.ct-level-pill.l0 { background: var(--sd-soft); }
body.sd .sd-bento .ct-l1-card:hover { border-color: #ff4d4d; box-shadow: 0 18px 40px -18px #ff4d4d99; }
body.sd .sd-bento .ct-l2-card:hover { border-color: #ff7a1a; box-shadow: 0 18px 40px -18px #ff7a1a99; }
body.sd .sd-bento .ct-l3-card:hover { border-color: #ffd21a; box-shadow: 0 18px 40px -18px #ffd21a99; }

/* esempio di segnalazione */
.ct-report { gap: 14px; }
.ct-report-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.ct-report-head strong { font-size: 17px; }
.ct-quote { border-left: 3px solid #ff4d4d; background: #262626; border-radius: 0 10px 10px 0; padding: 10px 14px; font-size: 14px; color: var(--sd-soft); font-style: italic; }
.ct-fix { background: #00ffff0f; border: 1px solid #00ffff3d; border-radius: 12px; padding: 12px 14px; font-size: 14px; color: #ffffff; }
.ct-fix small, .ct-label { display: block; font-size: 11px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--sd-highlight); margin-bottom: 4px; font-style: normal; }
.ct-report p { font-size: 14px; color: var(--sd-muted); }

/* prezzo: una sola card al centro */
.ct-plans { max-width: 460px; grid-template-columns: 1fr; }

@media (max-width: 640px) {
  .ct-wordmark span { font-size: 15px; }
  .ct-wordmark b { font-size: 16px; }
  .ct-logo img { height: 36px; width: 36px; }
  body.ct h1 { font-size: 30px; }
  .ct-main { padding-top: 24px; }
  .ct-scene-doc { width: 64%; }
}
