.contract-sheet{background:white;color:#182934;padding:24px;margin:20px 0;border:1px solid #d9e2e7;font:12px/1.45 Arial,sans-serif}.contract-sheet h1{font-size:23px;margin:12px 0}.contract-sheet h2{font-size:14px;color:#086c98;border-bottom:1px solid #cadbe4;padding-bottom:5px;margin-top:20px}.contract-brand{font-size:24px;font-weight:bold;color:#086c98}.contract-brand span{font-size:10px;float:right;letter-spacing:2px}.draft-warning{padding:9px;border:1px solid #c78614;background:#fff8e6;color:#654609;font-size:11px;font-weight:bold;margin:12px 0}.contract-grid,.docline{display:grid;grid-template-columns:1fr 1fr;gap:7px 22px}.contract-grid small,.docline small{display:block;color:#536774;font-size:10px}.contract-grid strong,.docline strong{font-size:12px;font-weight:normal;overflow-wrap:anywhere;white-space:pre-wrap}.driver-block{margin:10px 0;break-inside:avoid}.legal-copy{white-space:pre-wrap;overflow-wrap:anywhere}.contract-maps{display:grid;grid-template-columns:1fr 1fr;gap:8px}.contract-maps svg{width:100%;height:auto}.handover-print{margin:20px 0}.contract-sheet p{overflow-wrap:anywhere}#contract-preview{max-width:850px;margin:auto}
@media print{@page{size:A4;margin:13mm}body{margin:0}.contract-sheet{border:0;padding:0;margin:0;break-after:page;font-size:10px}.contract-sheet:last-child{break-after:auto}.contract-grid,.docline{gap:5px 16px}.contract-sheet h1{font-size:20px}.contract-sheet h2{margin-top:12px}.contract-grid strong,.docline strong{font-size:10px}.contract-sheet h1,.contract-sheet h2{break-after:avoid}.contract-maps{break-inside:avoid}.contract-maps svg{max-height:120px}.draft-warning{position:relative} }

.standard-texts{padding:24px}.standard-texts label{display:block;margin:18px 0}.standard-texts textarea{margin-top:6px;width:100%;resize:vertical}

dialog:has(.standard-texts){width:min(1180px,96vw);max-width:96vw}.standard-texts textarea{min-height:300px;line-height:1.5;white-space:pre-wrap;overflow-wrap:anywhere}.text-count{display:block;margin-top:6px;color:#536774}.standard-texts textarea:invalid{border-color:#bb3039}

/* Approved contract layout, integrated 2026-10-05. */

.cover-sheet .contract-identifiers{display:grid;grid-template-columns:repeat(3,1fr);gap:16px;margin:8px 0 12px;padding:8px 0;border-bottom:1px solid #e7edf0}.cover-sheet .contract-identifiers small{display:block;font-size:9px;color:#687984;margin-bottom:3px}.cover-sheet .contract-identifiers strong{display:block;font-size:11px;color:#182934;font-weight:500}
.cover-sheet .issuer-header{display:flex;align-items:center;justify-content:space-between;gap:24px;border-bottom:1px solid #cadbe4;padding-bottom:10px;margin-bottom:12px}.cover-sheet .issuer-header .contract-brand{flex:0 0 260px}.cover-sheet .issuer-header .contract-logo{max-width:100%}.cover-sheet .issuer-header .issuer-details{margin:0;padding:0;border:0;text-align:right;flex:1}@media print{.cover-sheet .issuer-header .contract-brand{flex-basis:58mm}}
.cover-sheet .contract-brand{display:flex;align-items:center;justify-content:space-between;gap:20px}.cover-sheet .contract-logo{display:block;width:260px;max-width:65%;height:auto}.cover-sheet .contract-brand span{margin-top:0!important}@media print{.cover-sheet .contract-logo{width:58mm}}
.cover-sheet{scroll-margin-top:190px;border:0;border-top:0;padding:28px 32px;box-shadow:0 8px 30px #12344912;font-size:11px;line-height:1.35}.cover-sheet .issuer-details{display:grid;grid-template-columns:1fr;gap:1px;line-height:1.1;margin:5px 0 12px;padding-bottom:8px;border-bottom:1px solid #cadbe4}.cover-sheet .issuer-details small{font-size:8px;color:#687984;margin-right:5px}.cover-sheet .issuer-details strong{font-size:9px;font-weight:normal;color:#334d5d}.cover-sheet .contract-brand{font-size:30px;letter-spacing:-1px;color:#123449}.cover-sheet .contract-brand span{letter-spacing:2px;font-size:9px;margin-top:12px}.cover-sheet h1{font-size:22px;margin:10px 0 3px;letter-spacing:-.5px}.cover-sheet h1+p{color:#617480;font-size:10px;margin:0 0 12px}.cover-sheet .draft-warning{font-size:9px;padding:7px 10px;border:0;border-left:3px solid #c78614;background:#fff8e6;margin:10px 0 14px}.cover-sheet h2{font-size:10px;text-transform:uppercase;letter-spacing:1.3px;color:#123449;border:0;background:#eaf0f4;padding:7px 10px;margin:14px 0 0;break-after:avoid}.cover-sheet .contract-grid{gap:0 20px;padding:4px 10px 0;grid-template-columns:1fr 1fr}.cover-sheet .contract-grid>div{padding:5px 0;border-bottom:1px solid #e7edf0;break-inside:avoid}.cover-sheet .contract-grid small{font-size:9px;color:#687984;margin-bottom:2px}.cover-sheet .contract-grid strong{font-size:11px;font-weight:500;color:#182934}.cover-sheet h2:nth-of-type(4)+.contract-grid{grid-template-columns:repeat(3,1fr);gap:0 16px}.cover-sheet h2:nth-of-type(4)+.contract-grid>div:nth-last-child(2){background:#123449;padding:5px 8px;border:0}.cover-sheet h2:nth-of-type(4)+.contract-grid>div:nth-last-child(2) small,.cover-sheet h2:nth-of-type(4)+.contract-grid>div:nth-last-child(2) strong{color:white}.cover-sheet p{margin:8px 10px;font-size:10px}.cover-sheet>p:nth-last-child(-n+2){font-size:8px;color:#657783}.cover-sheet .driver-block{padding:0 10px}.cover-sheet .docline{gap:4px 15px}.cover-sheet .docline small{font-size:9px}.cover-sheet .docline strong{font-size:10px}@media print{.cover-sheet{padding:0;border-top:0;box-shadow:none;font-size:9px}.cover-sheet .contract-brand{margin-top:10px;font-size:26px}.cover-sheet h2{margin-top:10px;padding:5px 8px}.cover-sheet .contract-grid>div{padding:4px 0}.cover-sheet .contract-grid strong{font-size:10px}.cover-sheet .contract-grid small{font-size:8px}.cover-sheet{print-color-adjust:exact;-webkit-print-color-adjust:exact}}


.cover-sheet .handover-car-drawing svg{display:block;width:100%;height:auto;margin-top:4px}
.cover-sheet .handover-car-maps{display:grid;grid-template-columns:1fr 1fr;gap:2px;margin-top:3px}.cover-sheet .handover-car-maps svg{display:block;width:100%;height:auto}.cover-sheet .damage-map-legend,.cover-sheet .damage-map-note{font-size:8px;margin:2px 0}
.cover-sheet .customer-signature{padding-top:26px;margin:0 4px 5px;break-inside:avoid}.cover-sheet .signature-line{border-bottom:1px solid #647480;width:100%;height:0}.cover-sheet .customer-signature small{display:block;font-size:9px;color:#526572;margin-top:3px}
.cover-sheet .handover-summary{display:grid;grid-template-columns:1fr 1fr;gap:12px;margin:4px 7px;break-inside:avoid}.cover-sheet .handover-summary-row{display:grid;grid-template-columns:105px 1fr;gap:6px;padding:2px 0;border-bottom:1px solid #e7edf0}.cover-sheet .handover-summary-row small{font-size:9px;color:#687984}.cover-sheet .handover-summary-row strong{font-size:10px;font-weight:500}.cover-sheet .handover-summary h2{margin:0 0 2px}
.cover-sheet{padding:16px 24px;line-height:1.12}
.cover-sheet .issuer-header{gap:16px;padding-bottom:5px;margin-bottom:5px}
.cover-sheet .issuer-header .issuer-details{gap:0;line-height:1.05}
.cover-sheet h1{margin:14px 0 2px}
.cover-sheet .contract-identifiers{gap:10px;margin:3px 0;padding:3px 0}
.cover-sheet .contract-identifiers small{margin-bottom:1px}
.cover-sheet .draft-warning{margin:4px 0;padding:4px 7px}
.cover-sheet h2{margin:5px 0 0;padding:4px 7px}
.cover-sheet .contract-grid{padding:2px 7px 0;gap:0 12px}
.cover-sheet .contract-grid>div{padding:2px 0}
.cover-sheet .contract-grid small{margin-bottom:1px}
.cover-sheet .driver-block{padding:2px 7px;margin:0}
.cover-sheet .docline{gap:2px 12px;margin:2px 0}
.cover-sheet .docline small{margin-bottom:0}
.cover-sheet p{margin:3px 7px;line-height:1.12}
@media print{.cover-sheet{padding:0}.cover-sheet .contract-brand{margin-top:4px}.cover-sheet h2{margin-top:5px;padding:3px 6px}.cover-sheet .contract-grid>div{padding:2px 0}}


.contract-sheet h1#condizioni{font-family:Arial,sans-serif;font-size:22px;font-weight:700;letter-spacing:-.5px;line-height:1.12}
@media print{
.contract-sheet h1#condizioni{font-size:18px}

.cover-sheet{font-size:9px;line-height:1.08}
.cover-sheet .issuer-header{padding-bottom:3px;margin-bottom:3px}
.cover-sheet .issuer-header .contract-brand{flex-basis:48mm;margin-top:0}
.cover-sheet .contract-logo{width:48mm}
.cover-sheet h1{font-size:18px;margin:9px 0 2px}
.cover-sheet .contract-identifiers{margin:2px 0;padding:2px 0}
.cover-sheet .contract-identifiers strong{font-size:9px}
.cover-sheet h2{font-size:9px;padding:3px 5px;margin-top:4px}
.cover-sheet .contract-grid>div{padding:1px 0}
.cover-sheet .contract-grid strong,.cover-sheet .docline strong{font-size:9px}
.cover-sheet .driver-block{padding:1px 5px}
.cover-sheet .docline{gap:1px 10px;margin:1px 0}
.cover-sheet .handover-summary{gap:12px;margin:3px 5px}
.cover-sheet .handover-summary-row{padding:1px 0}
.cover-sheet .handover-car-drawing svg{height:32mm;width:100%;margin-top:2px}
.cover-sheet .customer-signature{padding-top:8mm;margin-bottom:2px}
.cover-sheet .draft-warning{padding:3px 5px;margin:3px 0;font-size:8px}
.cover-sheet p{margin:2px 5px;font-size:9px}
.cover-sheet .damage-map-note,.cover-sheet .damage-map-legend{font-size:7px;margin:1px 0}
.cover-sheet>p:nth-last-child(-n+2){font-size:7px}
}
.legal-flow{column-count:2;column-gap:24px;column-rule:1px solid #d9e2e7;font-size:7pt;line-height:1.08;text-align:justify;hyphens:auto}.legal-flow h2{break-after:avoid}.legal-flow .legal-copy{white-space:normal;overflow-wrap:break-word}.legal-flow .legal-paragraph{margin:0 0 1pt;white-space:normal;text-align:justify;text-align-last:start;line-height:1.08}.legal-flow h2{font-size:11pt;margin:6pt 0 3pt;padding-bottom:2pt}.legal-flow .draft-warning{font-size:7pt;padding:3pt;margin:3pt 0} @media print{.legal-flow{column-count:2;column-gap:6mm;font-size:7pt;line-height:1.08;text-align:justify;hyphens:auto}.legal-flow .draft-warning{break-inside:avoid}.contract-sheet{orphans:3;widows:3}}
@media print{.cover-sheet .handover-car-maps svg{height:16mm;width:100%}.cover-sheet .handover-summary{break-inside:auto}.cover-sheet .handover-summary>section{break-inside:avoid}.cover-sheet .handover-summary-row strong{overflow-wrap:anywhere}}

.legal-sheet>h1{font-family:Arial,sans-serif;font-size:22px;font-weight:700;letter-spacing:-.5px;line-height:1.12}.legal-sheet{margin-top:24px}
@media print{.legal-sheet{break-before:page;page-break-before:always;margin:0}.legal-sheet>h1{font-size:18px;margin:0 0 8px}.legal-sheet:last-child{break-after:auto}}

/* Distribute spare A4 space; an additional driver consumes the spare space first.
   No fixed height, clipping or smaller type: unusually long records may continue. */
@media print{
 .contract-sheet.cover-sheet{
  box-sizing:border-box;
  min-height:270mm; /* A4 297mm minus two 13mm margins and 1mm rounding tolerance */
  display:flex;
  flex-direction:column;
  justify-content:space-between;
  gap:0;
 }
 .cover-sheet> *{flex-shrink:0}
 .cover-sheet .handover-summary{width:auto}
}

/* Compact conditions only: full text remains in normal flow, never clipped. */
.legal-sheet[aria-labelledby="condizioni"] .legal-flow{column-gap:4mm;line-height:1.02}
.legal-sheet[aria-labelledby="condizioni"] .legal-paragraph{margin-bottom:.4pt;line-height:1.02}
@page rental-conditions{size:A4;margin:8mm}
@media print{
 .legal-sheet[aria-labelledby="condizioni"]{page:rental-conditions;orphans:2;widows:2}
 .legal-sheet[aria-labelledby="condizioni"]>h1{margin:0 0 4px}
 .legal-sheet[aria-labelledby="condizioni"] .legal-flow{font-size:7pt;column-gap:4mm;line-height:1.02}
 .legal-sheet[aria-labelledby="condizioni"] .legal-paragraph{margin-bottom:.4pt;line-height:1.02}
 .legal-sheet[aria-labelledby="condizioni"] .draft-warning{padding:2pt;margin:2pt 0;line-height:1.02}
}

/* The signature is outside the columns, reserved at the lower right. */
.legal-sheet[aria-labelledby="condizioni"] .legal-flow{font-size:6pt;line-height:1.4}
.legal-sheet[aria-labelledby="condizioni"] .legal-paragraph{line-height:1.4;margin-bottom:3pt}
.conditions-signature{box-sizing:border-box;margin:12mm 0 0 auto;padding-top:10mm;width:50%;text-align:right;font-size:7pt;white-space:normal;break-inside:avoid}
@media print{
 .legal-sheet[aria-labelledby="condizioni"]{min-height:280mm;box-sizing:border-box;display:flex;flex-direction:column}
 .legal-sheet[aria-labelledby="condizioni"]>h1,.legal-sheet[aria-labelledby="condizioni"]>.legal-flow{flex-shrink:0}
 .legal-sheet[aria-labelledby="condizioni"] .legal-flow{font-size:6pt;line-height:1.4}
 .legal-sheet[aria-labelledby="condizioni"] .legal-paragraph{line-height:1.4;margin-bottom:3pt}
 .legal-sheet[aria-labelledby="condizioni"] .conditions-signature{margin-top:auto;padding-top:12mm;min-height:20mm;flex-shrink:0}
}

/* Privacy: readable two-column body and a dedicated signing area. */
.legal-sheet[aria-labelledby="privacy"] .legal-flow{font-size:9pt;line-height:1.25}
.legal-sheet[aria-labelledby="privacy"] .legal-paragraph{line-height:1.25;margin-bottom:3pt}
.privacy-signature{box-sizing:border-box;width:100%;text-align:right;font-size:9pt;margin-top:12mm;padding-top:12mm;min-height:24mm;break-inside:avoid}
@media print{
 .legal-sheet[aria-labelledby="privacy"]{min-height:270mm;box-sizing:border-box;display:flex;flex-direction:column}
 .legal-sheet[aria-labelledby="privacy"]>h1,.legal-sheet[aria-labelledby="privacy"]>.legal-flow{flex-shrink:0}
 .legal-sheet[aria-labelledby="privacy"] .legal-flow{font-size:9pt;line-height:1.25}
 .legal-sheet[aria-labelledby="privacy"] .legal-paragraph{line-height:1.25;margin-bottom:3pt}
 .legal-sheet[aria-labelledby="privacy"] .privacy-signature{margin-top:auto;flex-shrink:0}
}
