html {
  color: #091838;
  font-family: Source Sans Pro, sans-serif;
  font-size: 9pt;
  line-height: 1.4;
}
body {
  margin: 0;
}

h1 {
  color: #091838;
  font-size: 40pt;
  margin: 0;
}

header {
  margin-bottom: 1em;
}

#logo {
  margin: 0;
}

aside {
  display: flex;
  justify-content: space-between;
  margin: 0;
}
aside address {
  font-style: normal;
  white-space: pre-line;
  font-size: 8pt; /* Smaller address font */
  color: #555;
}
aside address#to {
  text-align: left; /* Align "to" address to the left */
}
aside address#from {
  text-align: right; /* Align "from" address to the right */
}

dl {
  position: relative;
  right: 0;
  text-align: left;
  top: 0;
  width: 50%;
}
dt, dd {
  display: inline;
  margin: 0;
}
dt {
  color: #a9a;
}
dt::before {
  content: '';
  display: block;
}
dt::after {
  content: ':';
}

table {
  border-collapse: collapse;
  width: 100%;
  margin-bottom: 1em;
}
th {
  border-bottom: .1mm solid #a9a;
  color: #a9a;
  font-size: 8pt;
  font-weight: 400;
  padding-bottom: 0.1cm;
  text-transform: uppercase;
  text-align: left;
}
th:first-of-type {
  padding-left: 3mm;
}
th:last-of-type {
  padding-right: 3mm;
}
td {
  padding-top: 3mm;
  padding-bottom: 2mm;
  font-size: 9pt;
  text-align: left;
}
td:last-of-type {
  color: #091838;
  font-weight: 500;
  text-align: right;
  padding-right: 3mm;
}
td:first-of-type {
  padding-left: 3mm;
}
.center {
  text-align: center;
}
.right {
  text-align: right;
}
td:last-of-type, th:last-of-type {
  text-align: right;
}
table tbody tr:nth-child(odd) {
  background-color: #f9f9f9;
}
th:first-of-type, td:first-of-type {
  text-align: left;
}
th:last-of-type, td:last-of-type {
  text-align: right;
}
td .description {
  font-size: 7pt;
  color: #555;
}
footer {
  display: block;
  width: 100%;
}
table#total {
  background: #f6f6f6;
  border-color: #f6f6f6;
  border-style: solid;
  border-width: 4mm 3cm;
  bottom: 0;
  font-size: 12pt;
  margin: 0 -3cm;
  width: 19cm;
}

/* Detailed Breakdown Table - Spreadsheet Style */
.detailed-breakdown-table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 1em;
  font-size: 8pt;
  border: 1px solid #ccc;
}

.detailed-breakdown-table th {
  background-color: #f0f0f0;
  border: 1px solid #ccc;
  padding: 6pt;
  font-weight: bold;
  color: #333;
  text-align: left;
  font-size: 8pt;
  white-space: nowrap;
}

.detailed-breakdown-table td {
  border: 1px solid #ddd;
  padding: 4pt 6pt;
  font-size: 8pt;
  vertical-align: top;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Column widths */
.item-col {
  width: 25%;
}

.description-col {
  width: 35%;
}

.unit-price-col {
  width: 15%;
  text-align: right;
}

.quantity-col {
  width: 10%;
  text-align: center;
}

.amount-col {
  width: 15%;
  text-align: right;
  font-weight: 500;
}

/* Category header styling */
.category-header td {
  background-color: #e8e8e8;
  font-weight: bold;
  color: #091838;
  border-top: 2px solid #091838;
  border-bottom: 1px solid #ccc;
  padding: 6pt;
  font-size: 8pt;
  text-align: left;
}

/* Item rows with alternating colors */
.item-row:nth-child(even) {
  background-color: #fafafa;
}

.item-row:nth-child(odd) {
  background-color: #ffffff;
}

/* Category subtotal styling */
.category-subtotal td {
  background-color: #f5f5f5;
  border-top: 1px solid #bbb;
  font-weight: 500;
}

.category-subtotal .subtotal-label {
  text-align: right;
  font-style: italic;
  color: #666;
}

/* Grand totals styling */
.grand-subtotal td {
  background-color: #e8e8e8;
  border-top: 2px solid #999;
  font-weight: bold;
}

.taxes-row td {
  background-color: #e8e8e8;
  font-weight: bold;
}

.grand-total td {
  background-color: #d0d0d0;
  border-top: 2px solid #666;
  border-bottom: 2px solid #666;
  font-weight: bold;
  color: #091838;
  font-size: 9pt;
}

.subtotal-label {
  text-align: right;
  padding-right: 8pt;
}

/* Description text styling */
.description-text {
  color: #555;
  font-size: 7pt;
  line-height: 1.2;
}

/* Summary Table Styling */
.summary-table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 1em;
}

.summary-table th {
  border-bottom: .1mm solid #a9a;
  color: #a9a;
  font-size: 8pt;
  font-weight: 400;
  padding-bottom: 1mm;
  text-transform: uppercase;
  text-align: left;
}

.summary-table td {
  padding-top: 1.5mm;
  padding-bottom: 1mm;
  font-size: 9pt;
  text-align: left;
  border-bottom: 1px solid #f0f0f0;
}

.summary-table .number-col {
  width: 8%;
  text-align: center;
  padding-left: 3mm;
}

.summary-table .item-name-col {
  width: 25%;
  text-align: left;
}

.summary-table .description-col {
  width: 47%;
  text-align: left;
  color: #555;
  font-size: 8pt;
}

.summary-table .amount-summary-col {
  width: 20%;
  text-align: right;
  font-weight: 500;
  padding-right: 3mm;
}

.summary-table .summary-subtotal {
  border-top: .1mm solid #a9a;
}

.summary-table .subtotal-number {
  font-weight: 400;
  color: #a9a;
  font-size: 9pt;
  text-align: right;
  padding-right: 3mm;
}

.summary-table .subtotal-amount {
  font-weight: bold;
  text-align: right;
  padding-right: 3mm;
}

/* Annex reference styling */
.annex-reference {
  font-size: 8pt;
  color: #666;
  margin-top: 0.5em;
  font-style: italic;
}

/* Service Comments Fieldset */
.service-comments {
  margin-top: 1em;
  border: 1px solid #ddd;
  border-radius: 3px;
  padding: 0.8em;
  background-color: #fafafa;
}

.service-comments legend {
  font-size: 8pt;
  font-weight: bold;
  color: #091838;
  padding: 0 0.5em;
}

.service-comments .comments-content {
  font-size: 8pt;
  color: #666;
  line-height: 1.3;
  margin: 0;
}

/* Car Grid Layout Styles */
.car-grid-container {
  display: grid;
  gap: 4px;
  border: 2px solid #d3d3d3;
  padding: 8px;
  border-radius: 8px;
  position: relative;
  background-color: #fafafa;
  max-width: 600px;
  margin: 0 auto;
  font-family: 'Source Sans Pro', sans-serif;
}

.car-panel {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 1px;
  border: 1px solid #ccc;
  border-radius: 4px;
  text-align: center;
  font-size: 7pt;
  font-weight: 600;
  overflow: hidden;
  background-color: #f0f0f0;
  color: #333;
  line-height: 1.1;
  min-height: 20px;
}


.panel-condition {
  font-size: 6pt;
  opacity: 0.9;
  margin-top: 2px;
  font-weight: normal;
}
