.bgv2-form-wrap { width: 100%; margin: 0 auto; font-family: inherit; }
.bgv2-form-wrap fieldset { border: 1px solid #ddd; border-radius: 4px; padding: 24px; margin-bottom: 20px; }
.bgv2-form-wrap legend { font-weight: 700; color: #0033ca; padding: 0 8px; font-size: 1.1em; }
.bgv2-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 24px 28px; }
@media (max-width: 640px) { .bgv2-grid { grid-template-columns: 1fr; } }
.bgv2-form-wrap label { display: flex; flex-direction: column; gap: 8px; font-size: 0.95em; font-weight: 700; color: #333; position: relative; }
.bgv2-form-wrap input[type=text], .bgv2-form-wrap input[type=email], .bgv2-form-wrap input[type=tel], .bgv2-form-wrap input[type=date], .bgv2-form-wrap input[type=password], .bgv2-form-wrap input[type=file], .bgv2-form-wrap input[type=url], .bgv2-form-wrap select, .bgv2-form-wrap textarea {
	padding: 12px 14px; border: 1.5px solid #ccc; border-radius: 4px; font-size: 1em; font-weight: 400; color: #111; background: #fff; width: 100%; box-sizing: border-box; transition: border-color .15s, box-shadow .15s;
}
.bgv2-form-wrap input:focus, .bgv2-form-wrap select:focus, .bgv2-form-wrap textarea:focus {
	outline: none; border-color: #0033ca; box-shadow: 0 0 0 3px rgba(0,51,202,.12);
}
.bgv2-form-wrap input[readonly] { background: #f4f4f6; color: #555; }
.bgv2-form-wrap input.bgv2-cf-output { background: #f2f2f2; letter-spacing: 1px; font-family: monospace; }
.bgv2-block { display: block; margin-top: 22px; }
.bgv2-checkbox-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 10px; }
.bgv2-checkbox, .bgv2-radio { display: flex !important; flex-direction: row !important; align-items: flex-start; gap: 10px !important; font-weight: 400 !important; line-height: 1.45; }
.bgv2-checkbox input, .bgv2-radio input { flex: 0 0 auto; width: 17px; height: 17px; margin: 0; transform: translateY(0.2em); accent-color: #0033ca; cursor: pointer; }
.bgv2-genitore-block { border-top: 2px solid #eee; padding-top: 14px; margin-top: 14px; }
.bgv2-genitore-block h4 { color: #fe0000; margin: 0 0 10px; }
.bgv2-autocomplete-list { position: absolute; top: 100%; left: 0; right: 0; background: #fff; border: 1px solid #ccc; border-top: none; border-radius: 0 0 3px 3px; z-index: 50; max-height: 200px; overflow-y: auto; display: none; }
.bgv2-autocomplete-item { padding: 8px 10px; cursor: pointer; font-weight: 400; }
.bgv2-autocomplete-item:hover { background: #f0f4ff; }
.bgv2-datepicker-pop { position: fixed; background: #fff; border: 1px solid #ccc; border-radius: 4px; box-shadow: 0 4px 16px rgba(0,0,0,.15); padding: 10px; z-index: 999999; width: 260px; }
.bgv2-dp-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; font-weight: 700; color: #0033ca; }
.bgv2-dp-header button { background: none; border: none; cursor: pointer; font-size: 1.1em; color: #0033ca; }
.bgv2-dp-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px; text-align: center; }
.bgv2-dp-dow { font-size: 0.75em; color: #888; font-weight: 700; }
.bgv2-dp-day { border: none; background: none; padding: 6px 0; border-radius: 4px; cursor: pointer; }
.bgv2-dp-day:hover { background: #0033ca; color: #fff; }
.bgv2-upload-block { margin-bottom: 16px; padding-bottom: 16px; border-bottom: 1px solid #eee; }
.bgv2-upload-block:last-child { border-bottom: none; }
.bgv2-hint { font-size: 0.82em; color: #666; margin: 4px 0 0; }
.bgv2-consenso-block { margin-bottom: 18px; padding: 12px; background: #f7f8fc; border-radius: 4px; }
.bgv2-consenso-block h4 { margin: 0 0 6px; color: #0033ca; }
.bgv2-consenso-block p { font-size: 0.88em; color: #444; margin: 0 0 10px; }
#bgv2-signature-canvas { border: 2px dashed #0033ca; border-radius: 4px; width: 100%; max-width: 600px; touch-action: none; background: #fff; }
.bgv2-actions { display: flex; justify-content: space-between; gap: 10px; }
.bgv2-btn-primary, .bgv2-btn-secondary { padding: 12px 24px; border-radius: 3px; border: none; cursor: pointer; font-weight: 700; font-size: 0.95em; }
.bgv2-btn-primary { background: #fe0000; color: #fff; margin-left: auto; }
.bgv2-btn-primary:disabled { opacity: 0.6; cursor: not-allowed; }
.bgv2-btn-secondary { background: #eee; color: #333; }
.bgv2-msg { padding: 14px; border-radius: 3px; margin-bottom: 16px; font-weight: 600; }
.bgv2-msg-success { background: #e6f7e9; color: #1b7a2e; }
.bgv2-msg-error { background: #fdeaea; color: #b30000; }
.bgv2-conferma-invio { text-align: center; padding: 50px 20px; animation: bgv2-fade-in 0.4s ease; }
.bgv2-conferma-icona { width: 72px; height: 72px; line-height: 72px; border-radius: 4px; background: #1b7a2e; color: #fff; font-size: 36px; margin: 0 auto 20px; animation: bgv2-pop 0.4s ease; }
.bgv2-conferma-invio h2 { color: #0033ca; font-size: 1.6em; margin: 0 0 14px; }
.bgv2-conferma-invio p { font-size: 1.05em; color: #333; max-width: 480px; margin: 0 auto; line-height: 1.5; }
@keyframes bgv2-fade-in { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }
@keyframes bgv2-pop { 0% { transform: scale(0.5); opacity: 0; } 100% { transform: scale(1); opacity: 1; } }
