
body {
    font-family: 'Noto Serif', 'Times New Roman', serif;
    background: #fff;
    margin: 0;
    padding: 0;
}

h2 {
    font-weight: bold;
    font-size: 24px;
    text-align: center;
    color: #005baa;
    margin-top: 20px;
    margin-bottom: 15px;
    position: relative;
}
h2::after {
    content: '';
    display: block;
    border-bottom: 1px solid #005baa;
    width: 100px;
    position: absolute;
    bottom: -12px;
    left: 50%;
    transform: translateX(-50%);
}

h6 {
    font-weight: bold;
    font-size: 18px;
    text-align: left;
    color: #005baa;
    margin-top: 15px;
    margin-bottom: 10px;
    position: relative;
}

h6::after {
    content: '';
    display: block;
    border-bottom: 1px solid #005baa;
    width: 70px;
    position: absolute;
    bottom: -10px;
}

.highlight {
    font-weight: bold;
}

.main-doc, .document {
    max-width: 900px;
    margin: 0px auto;
    background: #fff;
    padding: 28px 40px 20px 40px;
    position: relative;
    box-sizing: border-box;
    font-size: 15px;
    color: #000;
    font-family: 'Noto Serif', 'Times New Roman', serif;
    text-rendering: geometricPrecision;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.preview-content,
.preview-content * {
    text-rendering: geometricPrecision;
    -webkit-font-smoothing: antialiased;
}

.pdf-export-mode,
.pdf-export-mode * {
    text-rendering: geometricPrecision !important;
    -webkit-font-smoothing: antialiased !important;
    font-kerning: normal;
}

.main-doc::before,
.document::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 330px;
    height: 330px;
    background-image: url('../images/logo.png');
    background-repeat: no-repeat;
    background-position: center;
    background-size: contain;
    opacity: 0.09;
    pointer-events: none;
    z-index: 0;
}

.main-doc > *,
.document > * {
    position: relative;
    z-index: 1;
}

p {
    margin-bottom: .4rem;
}

p,
li,
td,
th {
    font-size: 15px;
    line-height: 1.5;
}

li:empty {
    display: none;
}

.section {
    margin-bottom: 20px;
}

.info-table,
.payment-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 10px;
    margin-bottom: 10px;
}

.info-table td,
.payment-table th,
.payment-table td {
    border: 1px solid #ccc;
    padding: 8px;
}


.document-header {
    text-align: center;
    margin-bottom: 10px;
    font-size: 13px;
    line-height: 1.6;
}

.document-title {
    text-align: center;
    margin-bottom: 15px;
}

.document-title h1 {
    font-size: 20px;
    font-weight: bold;
    color: #000;
    margin: 0 0 8px 0;
    text-transform: uppercase;
}

.document-title hr {
    border: none;
    border-top: 2px solid #000;
    margin: 0;
}

.document-content {
    margin-bottom: 10px;
}

.document-content h3 {
    font-size: 14px;
    font-weight: bold;
    color: #005baa;
    margin: 10px 0 6px 0;
    padding-bottom: 4px;
    border-bottom: 2px solid #005baa;
}

.document-content p {
    margin: 4px 0;
    font-size: 14px;
}

.document-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 8px 0;
    font-size: 13px;
}

.document-content table thead {
    background-color: #f5f5f5;
    font-weight: bold;
}

.document-content table thead tr {
    border: 1px solid #000;
}

.document-content table thead th {
    padding: 5px 6px;
    text-align: center;
    border: 1px solid #000;
    background-color: #e8f0ff;
    color: #005baa;
    font-weight: 600;
}

.document-content table tbody tr {
    border: 1px solid #ddd;
    height: 28px;
}

.document-content table tbody td {
    padding: 4px 6px;
    border: 1px solid #ddd;
}

.document-content table tbody tr:hover {
    background-color: #fafafa;
}

.signature-section {
    display: flex;
    justify-content: space-between;
    margin-top: 12px;
    gap: 8px;
}

.signature-block {
    flex: 1;
    text-align: center;
    padding-top: 4px;
}
.signature-block .title {
    font-weight: bold;
    font-size: 14px;
    margin-bottom: 5px;
    text-transform: uppercase;
    color: #000;
}

.signature-block .subtitle {
    font-size: 12px;
    margin-bottom: 8px;
    color: #666;
}

.signature-item {
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 4px;
    background: transparent !important;
    border: none !important;
}

.signature-image {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent !important;
}

.signature-image img {
    max-width: 100%;
    height: 80px;
    object-fit: contain;
    background: transparent !important;
    mix-blend-mode: normal;
    image-rendering: auto;
}

.sig-name {
    font-weight: 600;
    font-size: 14px;
    margin-top: 4px;
    margin-bottom: 0;
    border-top: 1px solid #000;
    padding-top: 4px;
}

.payment-table th {
    background-color: #f0f0f0;
}

.signature {
    margin-top: 16px;
    display: flex;
    justify-content: space-between;
    font-size: 16px;
    position: relative;
}

.signature.style-2 {
    justify-content: flex-end;
}

.signature div {
    text-align: center;
}

.signature-item {
    position: relative;
}

.signature-image {
    height: 80px;
    margin-top: 0;
    z-index: 4;
    position: relative;
}
.signature-image img {
    height: 80px;
    width: auto;
    object-fit: contain;
    image-rendering: auto;
}
.signature-image img[src=""] {
    display: none;
}
.signature-item .signature-image {
    position: relative;
    z-index: 7;
}

.signature-item .stamp-image {
    position: absolute;
    top: 56%;
    left: 52%;
    opacity: 0.72;
    z-index: 6;
    transform: translate(-50%, -50%) rotate(-8deg);
    pointer-events: none;
}

.signature-item .stamp-image img {
    height: 155px;
    width: auto;
    max-height: unset !important;
}
.stamp-image img[src=""] {
    display: none;
}
.signature-text {
    margin-bottom: 0;
    font-weight: bold;
}

.signature-block {
    width: 45%;
    text-align: center;
}

.signature-right {
    float: right;
    width: 50%;
    text-align: center;
    clear: both;
}

.signature-space {
    height: 16px;
    margin: 4px 0;
    text-align: center;
}

.sig-name {
    margin: 0;
    font-weight: bold;
    text-align: center;
}

.signature-image img[src=""],
.stamp-image img[src=""] {
    display: none;
}

.muted {
    margin: 0;
    font-weight: 700;
    color: #6c757d;
    text-align: center;
}

.italic {
    margin: 8px 0;
    font-style: italic;
    text-align: center;
}

@media print {
    .main-doc, .document {
        padding: 0;
        margin: 0;
    }
    @page { size: A4; margin: 2cm 2.5cm; }
}

.document h1,
.document h2,
.document h3 {
    font-weight: bold;
    text-align: center;
    margin: 15px 0;
    text-transform: uppercase;
}

.document h1 {
    font-size: 18px;
    margin-top: 0;
}

.document h2 {
    font-size: 16px;
}

.document h3 {
    font-size: 14px;
    font-weight: normal;
}

.document p {
    margin: 8px 0;
    text-align: justify;
}

.document strong {
    font-weight: bold;
}

.document em {
    font-style: italic;
}

.document-header {
    margin-bottom: 10px;
    position: relative;
}

.document-header .left-header {
    float: none;
    width: auto;
    text-align: center;
    font-weight: bold;
}

.document-header .right-header {
    float: none;
    width: auto;
    text-align: center;
    font-weight: bold;    
    font-size: 0.9em;
}

.document-header::after {
    content: '';
    display: table;
    clear: both;
}

.document-title {
    text-align: center;
    margin: 10px 0 15px 0;
}

.document-title h1 {
    font-size: 20px;
    font-weight: bold;
    margin: 5px 0;
    color: rgb(16, 61, 92);
}

.document-title h2 {
    font-size: 16px;
    font-weight: normal;
    font-style: italic;
    margin: 5px 0;
}

.document-content {
    margin: 10px 0;
}

.indent {
    text-indent: 40px;
}

.document table {
    width: 100%;
    border-collapse: collapse;
    margin: 15px 0;
}

.document table th,
.document table td {
    border: 1px solid #000;
    padding: 8px 12px;
    text-align: left;
}

.document table th {
    background: #f5f5f5;
    font-weight: bold;
    text-align: center;
}

.document .sig-name,
.main-doc .sig-name {
    border-top: none !important;
    padding-top: 0 !important;
}

.document .indent,
.main-doc .indent {
    text-indent: 0 !important;
    margin-left: 0 !important;
}

.document .document-content p,
.main-doc .document-content p {
    margin-left: 0;
}

.document table td.number {
    text-align: right;
}

.document table td.center {
    text-align: center;
}

.document ul,
.document ol {
    margin: 10px 0;
    padding-left: 30px;
}

.document li {
    margin: 5px 0;
}

.signature-section {
    margin-top: 16px;
    display: flex;
    justify-content: space-between;
}

.signature-block {
    flex: 1;
    text-align: center;
}

.signature-block .title {
    font-weight: bold;
    font-style: italic;
    margin-bottom: 5px;
    text-align: center;
}

.signature-block .subtitle {
    font-style: italic;
    font-size: 13px;
    margin-bottom: 8px;
    text-align: center;
}

.signature-block .name {
    font-weight: bold;
    margin-top: 5px;
    text-align: center;
}
.signature-block .italic{
    font-style: italic;
    margin-top: 5px;
    text-align: center;
}
.signature-block img {
    max-width: 200px;
    height: 80px;
    object-fit: contain;
    margin: 10px auto;
}

.signature-right {
    float: right;
    width: 50%;
    text-align: center;
    clear: both;
}

.signature-space {
    height: 16px;
    margin: 4px 0;
}

.sig-name {
    margin: 0;
    font-weight: bold;
    text-align: center !important;
}

.muted {
    margin: 0;
    font-weight: 700;
    color: var(--bs-gray-700, #6c757d);
    text-align: center !important;
}

.italic {
    margin: 8px 0;
    font-style: italic;
}

.stamp-container {
    position: relative;
    display: inline-block;
}


.document-date {
    text-align: right;
    margin: 20px 0;
    font-style: italic;
}

.document-footer {
    margin-top: 20px;
    border-top: 1px solid #ddd;
    padding-top: 10px;
    font-size: 12px;
    color: #666;
    text-align: center;
}

.form-control {
    border: 1.5px solid #e0e0e0;
    border-radius: 6px;
    padding: 10px 12px;
    font-size: 14px;
    transition: all 0.3s ease;
}

.form-control:focus {
    border-color: #0066cc;
    box-shadow: 0 0 0 3px rgba(0, 102, 204, 0.1);
    outline: none;
}

.form-control::placeholder {
    color: #b0b0b0;
}

.input-group {
    display: flex;
    gap: 0;
}

.input-group .form-control {
    border-radius: 6px 0 0 6px;
}

.input-group-text {
    background: #f5f5f5;
    border: 1.5px solid #e0e0e0;
    border-left: none;
    border-radius: 0 6px 6px 0;
    padding: 10px 14px;
    font-weight: 600;
    color: #0066cc;
    font-size: 13px;
}

.input-group .form-control:focus ~ .input-group-text,
.input-group .form-control:focus {
    border-color: #0066cc;
}

.form-input-wrapper {
    display: flex;
    align-items: center;
    position: relative;
}

.form-input-wrapper .form-control {
    padding-left: 38px;
}

.form-input-wrapper .input-icon {
    position: absolute;
    left: 12px;
    font-size: 16px;
    color: #0066cc;
    pointer-events: none;
    z-index: 1;
}

.input-icon.icon-user { color: #7c3aed; }
.input-icon.icon-phone { color: #059669; }
.input-icon.icon-email { color: #0891b2; }
.input-icon.icon-map { color: #dc2626; }
.input-icon.icon-calendar { color: #f59e0b; }
.input-icon.icon-money { color: #16a34a; }
.input-icon.icon-id { color: #7c3aed; }
.input-icon.icon-text { color: #0066cc; }

.field-highlight {
    background: rgba(255, 235, 59, 0.3);
    padding: 2px 4px;
    border-radius: 2px;
    transition: background 0.2s;
}

.field-highlight:hover {
    background: rgba(255, 235, 59, 0.5);
}

@media print {
    .document {
        padding: 0;
        margin: 0;
    }
    
    .document-header,
    .document-title,
    .document-content,
    .signature-section {
        page-break-inside: avoid;
    }
    
    @page {
        size: A4;
        margin: 2cm 2.5cm;
    }
}

@media (max-width: 768px) {
    .document {
        padding: 20px;
        font-size: 13px;
    }
    
    .signature-section {
        flex-direction: column;
    }
    
    .signature-block {
        width: 100%;
        margin-bottom: 30px;
    }
}

.document .signature-image img {
    width: auto !important;
    height: auto !important;
    max-width: 100% !important;
    max-height: 48px !important;
    object-fit: contain;
    image-rendering: -webkit-optimize-contrast;
    image-rendering: crisp-edges;
}

.document .signature-item {
    height: 54px !important;
}

.document .document-header {
    position: relative !important;
    min-height: 90px;
}

.document .document-header .left-header {
    flex: 0 0 96px !important;
}

.document .document-header .right-header {
    position: absolute !important;
    top: 0;
    right: 0;
    width: 320px !important;
    margin: 0 !important;
    text-align: center !important;
}

.document .stamp-image img {
    image-rendering: -webkit-optimize-contrast;
    image-rendering: crisp-edges;
}