/* Pagine /juster/attiva/ — modulo di attivazione della prova gratuita e condizioni */
:root {
    --ink: #0f1b2d;
    --muted: #5b6676;
    --line: #dfe5ee;
    --bg: #f4f7fb;
    --card: #ffffff;
    --brand: #0169fe;
    --brand-dark: #0d3b80;
    --brand-soft: #e6f0ff;
    --ok: #13795b;
    --err: #c0362c;
    --radius: 14px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
    margin: 0;
    background: var(--bg);
    color: var(--ink);
    font: 400 16px/1.6 'Poppins', system-ui, -apple-system, 'Segoe UI', sans-serif;
}
a { color: var(--brand); }
a:hover { color: var(--brand-dark); }

/* Testata */
.top {
    background: linear-gradient(135deg, #0b1a33 0%, #0d3b80 60%, #0169fe 100%);
    color: #fff;
    position: relative;
    overflow: hidden;
}
.top::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image: radial-gradient(rgba(255, 255, 255, 0.10) 1px, transparent 1px);
    background-size: 22px 22px;
    pointer-events: none;
}
.top .wrap { position: relative; }
.bar { display: flex; align-items: center; justify-content: space-between; padding: 18px 0; }
.logo { color: #fff; text-decoration: none; font-weight: 700; font-size: 22px; letter-spacing: -0.5px; }
.logo:hover { color: #fff; }
.bar a.back { color: rgba(255, 255, 255, 0.85); text-decoration: none; font-size: 14px; }
.bar a.back:hover { color: #fff; }
.hero { padding: 28px 0 120px; max-width: 720px; }
.kicker { display: inline-block; font-size: 13px; font-weight: 600; letter-spacing: 2px; color: #9fd8ff; margin-bottom: 8px; }
.hero h1 { font-size: clamp(28px, 5vw, 42px); line-height: 1.15; margin: 0 0 14px; font-weight: 700; }
.hero p { margin: 0; color: rgba(255, 255, 255, 0.85); font-size: 17px; }

.wrap { width: 100%; max-width: 1080px; margin: 0 auto; padding: 0 16px; }

/* Griglia: modulo + riepilogo offerta */
.layout { display: grid; grid-template-columns: 1fr; gap: 24px; margin-top: -90px; padding-bottom: 64px; position: relative; }
@media (min-width: 960px) {
    .layout { grid-template-columns: minmax(0, 1fr) 320px; align-items: start; }
    .aside { position: sticky; top: 24px; }
}

.card { background: var(--card); border-radius: var(--radius); box-shadow: 0 12px 40px rgba(15, 27, 45, 0.10); }
.form-card { padding: 28px 20px; }
@media (min-width: 600px) { .form-card { padding: 36px 40px; } }

fieldset { border: 0; padding: 0; margin: 0 0 32px; min-width: 0; }
legend { padding: 0; margin-bottom: 4px; font-weight: 700; font-size: 19px; display: flex; align-items: center; gap: 10px; }
legend .n {
    display: inline-grid; place-items: center; width: 28px; height: 28px; border-radius: 50%;
    background: var(--brand-soft); color: var(--brand-dark); font-size: 14px; font-weight: 700; flex: none;
}
.hint { color: var(--muted); font-size: 14px; margin: 0 0 16px; }

.grid { display: grid; grid-template-columns: 1fr; gap: 14px 16px; }
@media (min-width: 600px) {
    .grid.two { grid-template-columns: 1fr 1fr; }
    .grid.city { grid-template-columns: 1fr 110px; }
}
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field label, .label { font-size: 14px; font-weight: 500; }
.field label .opt, .label .opt { color: var(--muted); font-weight: 400; }
input[type=text], input[type=email], input[type=tel], input[type=url], select, textarea {
    width: 100%; font: inherit; font-size: 16px; color: var(--ink);
    padding: 11px 13px; border: 1px solid #c9d2df; border-radius: 9px; background: #fff;
    transition: border-color .15s, box-shadow .15s;
}
textarea { resize: vertical; min-height: 84px; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px rgba(1, 105, 254, 0.18); }
.field.has-err input, .field.has-err select, .field.has-err textarea { border-color: var(--err); }
.err-msg { color: var(--err); font-size: 13px; min-height: 0; }
.err-msg:empty { display: none; }

/* Periti */
.perito { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; padding: 12px; border: 1px solid var(--line); border-radius: 10px; margin-bottom: 10px; position: relative; }
.perito .email { grid-column: 1 / -1; }
@media (min-width: 720px) {
    .perito { grid-template-columns: 1fr 1fr 1.4fr 36px; align-items: center; border: 0; padding: 0; }
    .perito .email { grid-column: auto; }
}
.perito input { padding: 9px 11px; }
.btn-x { width: 36px; height: 36px; border: 0; background: transparent; color: var(--muted); border-radius: 8px; cursor: pointer; font-size: 20px; line-height: 1; }
.btn-x:hover { background: #fdecea; color: var(--err); }
@media (max-width: 719px) { .btn-x { position: absolute; top: 4px; right: 4px; } .perito { padding-right: 44px; } }
.row-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 6px; }
.btn-link { border: 1px dashed #9db6d8; background: #fff; color: var(--brand-dark); font: inherit; font-size: 14px; font-weight: 500; padding: 8px 14px; border-radius: 9px; cursor: pointer; }
.btn-link:hover { background: var(--brand-soft); }
.incolla { margin-top: 12px; }
.incolla[hidden] { display: none; }

/* Logo */
.logo-box { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.logo-prev { width: 120px; height: 64px; border: 1px dashed #c9d2df; border-radius: 10px; display: grid; place-items: center; background: #fafbfd; color: var(--muted); font-size: 12px; overflow: hidden; }
.logo-prev img { max-width: 100%; max-height: 100%; object-fit: contain; }

/* Scelte */
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { position: relative; }
.chip input { position: absolute; opacity: 0; pointer-events: none; }
.chip span { display: inline-block; padding: 7px 13px; border: 1px solid #c9d2df; border-radius: 20px; font-size: 14px; cursor: pointer; user-select: none; background: #fff; }
.chip input:checked + span { background: var(--brand-soft); border-color: var(--brand); color: var(--brand-dark); font-weight: 500; }
.chip input:focus-visible + span { box-shadow: 0 0 0 3px rgba(1, 105, 254, 0.25); }

.check { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; }
.check input { width: 18px; height: 18px; margin-top: 3px; flex: none; accent-color: var(--brand); }

.consenso { background: #f7f9fc; border: 1px solid var(--line); border-radius: 10px; padding: 16px; }
.privacy-note { color: var(--muted); font-size: 13px; margin: 12px 0 0; }

.submit-row { display: flex; flex-direction: column; gap: 12px; align-items: stretch; margin-top: 24px; }
@media (min-width: 600px) { .submit-row { flex-direction: row; align-items: center; } }
.btn-primary {
    font: inherit; font-weight: 600; font-size: 16px; color: #fff; border: 0; border-radius: 30px; cursor: pointer;
    padding: 15px 34px; background: linear-gradient(135deg, #0088cc 0%, #0169fe 100%);
    box-shadow: 0 8px 20px rgba(1, 105, 254, 0.28);
}
.btn-primary:hover { filter: brightness(1.06); }
.btn-primary:disabled { opacity: .6; cursor: progress; }
.form-err { color: var(--err); font-size: 14px; }

.hp { position: absolute !important; left: -10000px; width: 1px; height: 1px; overflow: hidden; }

/* Riepilogo offerta */
.aside .card { padding: 24px; }
.aside h2 { font-size: 17px; margin: 0 0 14px; }
.price { display: flex; align-items: baseline; gap: 10px; margin-bottom: 4px; }
.price .old { color: #9aa4b2; text-decoration: line-through; font-size: 22px; }
.price .new { font-size: 44px; font-weight: 700; line-height: 1; }
.price-note { font-size: 14px; color: var(--muted); margin: 0 0 16px; }
.badge { display: inline-block; background: var(--brand-soft); color: var(--brand-dark); font-weight: 700; font-size: 12px; letter-spacing: 1px; padding: 5px 12px; border-radius: 20px; margin-bottom: 10px; }
.ticks { list-style: none; padding: 0; margin: 0; font-size: 14px; }
.ticks li { padding-left: 24px; position: relative; margin-bottom: 9px; }
.ticks li::before { content: ""; position: absolute; left: 2px; top: 6px; width: 12px; height: 7px; border-left: 2px solid var(--brand); border-bottom: 2px solid var(--brand); transform: rotate(-45deg); }
.steps { counter-reset: s; list-style: none; padding: 0; margin: 18px 0 0; border-top: 1px solid var(--line); padding-top: 16px; font-size: 14px; color: var(--muted); }
.steps li { counter-increment: s; padding-left: 30px; position: relative; margin-bottom: 10px; }
.steps li::before { content: counter(s); position: absolute; left: 0; top: 1px; width: 20px; height: 20px; border-radius: 50%; background: var(--bg); color: var(--ink); font-size: 12px; font-weight: 600; display: grid; place-items: center; }

/* Esito */
.done { text-align: center; padding: 48px 24px; }
.done .ok { width: 64px; height: 64px; border-radius: 50%; background: #e3f5ee; color: var(--ok); display: grid; place-items: center; margin: 0 auto 18px; font-size: 32px; }
.done h2 { margin: 0 0 10px; font-size: 26px; }
.done p { color: var(--muted); max-width: 520px; margin: 0 auto 12px; }

/* Condizioni */
.doc { padding: 28px 20px; margin-top: -90px; margin-bottom: 64px; position: relative; }
@media (min-width: 600px) { .doc { padding: 40px 48px; } }
.doc h2 { font-size: 20px; margin: 32px 0 10px; }
.doc h2:first-child { margin-top: 0; }
.doc h3 { font-size: 16px; margin: 20px 0 6px; }
.doc p, .doc li { color: #2c3747; }
.doc .meta { color: var(--muted); font-size: 14px; }

.foot { color: var(--muted); font-size: 13px; text-align: center; padding: 0 16px 40px; }
.foot a { color: var(--muted); }
