@page {
    size: A4;
    margin: 0;
}

body {
    margin: 0;
    padding: 0;
    background-color: #f5f5f5;
    font-family: 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    font-size: 11pt;
    /* Restoring to 11pt */
    line-height: 1.5;
    /* Increased from 1.4 but less than original 1.6 */
    color: #333;
}

.page {
    width: 210mm;
    min-height: 297mm;
    padding: 15mm 20mm;
    /* Keeping tight padding */
    margin: 10mm auto;
    background: white;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    box-sizing: border-box;
}

@media print {

    body,
    .page {
        margin: 0;
        box-shadow: none;
        width: 210mm;
        height: 297mm;
        background: white;
        padding: 5mm 15mm !important;
        /* Minimized padding */
    }

    .top-bar,
    .main-header,
    footer,
    .mobile-menu-btn,
    .cta-section,
    .outorgados-control,
    .fab-container {
        display: none !important;
    }

    /* Print Optimization: Ultra Compact Layout */
    body {
        font-size: 9pt;
        /* Reduced to 9pt */
        line-height: 1.1;
        /* Very tight line height */
    }

    h1 {
        font-size: 14pt;
        margin-bottom: 2mm;
        padding-bottom: 0;
        border-bottom-width: 1px;
    }

    h2 {
        font-size: 10pt;
        margin-bottom: 2px;
        margin-top: 5px;
        padding-bottom: 1px;
    }

    .section {
        margin-bottom: 5px;
    }

    .form-row {
        margin-bottom: 2px;
        gap: 10px;
    }

    /* Force input height to be minimal */
    .field input {
        font-size: 9pt;
        padding: 0;
        height: 16px;
        border-bottom-width: 1px;
    }

    .field label {
        font-size: 0.65em;
        /* Smaller labels */
        margin-bottom: 0;
    }

    .outorgado-block {
        margin-top: 5px !important;
        padding-top: 3px !important;
        border-top-width: 1px;
    }

    .footer {
        margin-top: 10px;
    }

    .date-line {
        margin-bottom: 20px;
        /* Minimized */
        font-size: 9pt;
    }

    .signature-box {
        padding-top: 2px;
        width: 70%;
        margin-top: 0;
    }

    .signature-box span {
        font-size: 0.75em;
    }

    /* Drastically reduce Powers block */
    .powers-block {
        padding: 5px;
        font-size: 7.5pt;
        /* Very small legal text */
        line-height: 1.1;
        text-align: justify;
        margin-bottom: 5px;
    }

    .intro-text {
        margin-bottom: 2px;
        font-size: 0.8em;
    }

    /* Compacting Vehicle Grid */
    .vehicle-grid .field input {
        height: 14px;
    }

    .vehicle-grid {
        margin-bottom: 5px;
    }
}

.signature-box span {
    font-size: 0.8em;
}

.powers-block {
    padding: 5px 10px;
    font-size: 9pt;
    /* Smaller legal text */
    line-height: 1.25;
    text-align: justify;
}

.intro-text {
    margin-bottom: 5px;
    font-size: 0.9em;
}
}

/* Outorgados Control */
.outorgados-control {
    background: #eef2f5;
    padding: 10px 15px;
    border-radius: 6px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border: 1px solid #ddd;
}

.outorgados-control span {
    font-weight: 600;
    color: #444;
    font-size: 0.9em;
}

.outorgados-control .radio-group {
    display: flex;
    gap: 15px;
}

.outorgados-control label {
    display: flex;
    align-items: center;
    gap: 5px;
    cursor: pointer;
    font-size: 0.9em;
    font-weight: 500;
}

.outorgados-control input[type="radio"] {
    cursor: pointer;
}

/* Typography & Layout */
h1 {
    text-align: center;
    text-transform: uppercase;
    font-size: 20pt;
    /* Increased from 18pt */
    letter-spacing: 2px;
    margin-bottom: 5mm;
    color: #000;
    border-bottom: 2px solid #333;
    padding-bottom: 1mm;
    margin-top: 0;
}

h2 {
    font-size: 11.5pt;
    /* Slightly larger */
    text-transform: uppercase;
    color: #555;
    border-bottom: 1px solid #eee;
    margin-bottom: 10px;
    padding-bottom: 3px;
    font-weight: 600;
}

.section {
    margin-bottom: 20px;
    /* Increased from 15px */
}

.intro-text {
    margin-bottom: 12px;
    font-style: italic;
    color: #666;
}

/* Form Rows */
.form-row {
    display: flex;
    gap: 15px;
    margin-bottom: 10px;
    /* Increased from 8px */
    align-items: flex-end;
}

.field {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.field label {
    font-size: 0.85em;
    /* Slightly larger labels */
    font-weight: bold;
    color: #444;
    margin-bottom: 2px;
    text-transform: uppercase;
}

.field input {
    width: 100%;
    border: none;
    border-bottom: 1px solid #ccc;
    font-family: inherit;
    font-size: 11pt;
    padding: 3px 0;
    outline: none;
    transition: border-color 0.2s;
    background: transparent;
}

.field input:focus {
    border-bottom: 1px solid #000;
}

/* Vehicle Grid */
.vehicle-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    margin-bottom: 0;
}

/* Text Block */
.powers-block {
    text-align: justify;
    background: #f9f9f9;
    padding: 12px 15px;
    border-radius: 4px;
    font-size: 10.5pt;
    /* Slightly larger */
    border: 1px solid #eee;
    line-height: 1.5;
}

/* Interactive Elements inside text */
.inline-select,
.inline-input {
    font-family: inherit;
    font-size: inherit;
    font-weight: bold;
    color: #000;
    border: none;
    background: transparent;
    padding: 0;
    margin: 0;
    outline: none;
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    text-decoration: underline;
    text-underline-offset: 3px;
}

.inline-input {
    width: 120px;
    text-align: center;
    text-decoration: none;
    border-bottom: 1px solid #333;
}

/* Footer */
.footer {
    margin-top: 40px;
    /* Increased */
    display: flex;
    flex-direction: column;
    align-items: center;
}

.date-line {
    text-align: right;
    margin-bottom: 100px;
    /* Increased from 70px */
    font-size: 11pt;
}

.signature-box {
    width: 65%;
    text-align: center;
    border-top: 1px solid #000;
    padding-top: 8px;
    /* Increased */
}

.signature-box span {
    display: block;
    font-size: 0.9em;
    color: #555;
}