.bill-page,
.bill-receipt-page {
  padding-bottom: clamp(4rem, 9vw, 8rem);
}
.bill-head p {
  max-width: 62ch;
}
.bill-head > a,
.bill-hint a,
.bill-field small a,
.bill-receipt-page a {
  color: var(--blue, #194caa);
  text-underline-offset: 0.2em;
}
.bill-head > a {
  display: inline-block;
  margin-top: 0.85rem;
  font-weight: 550;
}
.bill-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.8fr) minmax(17rem, 0.86fr);
  align-items: start;
  gap: clamp(2rem, 6.6vw, 6.5rem);
  margin-top: clamp(2.5rem, 5vw, 4.5rem);
}
.bill-page [hidden],
.bill-receipt-page [hidden] {
  display: none !important;
}
.bill-section {
  padding: 1.55rem 0 2.25rem;
  border-top: 1px solid var(--ink, #18242b);
}
.bill-section h2,
.bill-summary h2 {
  margin: 0 0 1.4rem;
  font-size: clamp(1.35rem, 2.2vw, 1.85rem);
  line-height: 1.15;
  letter-spacing: -0.043em;
  font-weight: 550;
}
.bill-hint,
.bill-field small,
.bill-payment small {
  color: var(--muted, #505c66);
  font-size: 0.92rem;
  line-height: 1.5;
  font-weight: 400;
}
.bill-section h2 + .bill-hint {
  margin: -0.45rem 0 1.2rem;
}
.bill-field,
.bill-type legend {
  font-size: 0.9rem;
  font-weight: 550;
  line-height: 1.4;
}
.bill-two {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.1rem;
}
.bill-field {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  margin: 0 0 1.15rem;
  min-width: 0;
}
.bill-field input,
.bill-field select,
.bill-field textarea {
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
  background: #fff;
  color: var(--ink, #18242b);
  font: 400 1rem/1.35 var(--sans, Arial, sans-serif);
  border: 1px solid var(--line, #bdc4c6);
  border-radius: 3px;
  padding: 0.72rem 0.8rem;
  min-height: 2.9rem;
}
.bill-unit-price {
  display: flex;
  align-items: center;
  min-height: 2.9rem;
  font-size: 0.98rem;
  font-variant-numeric: tabular-nums;
}
.bill-field textarea {
  resize: vertical;
  min-height: 4.7rem;
}
.bill-field input:focus,
.bill-field textarea:focus,
.bill-field select:focus {
  outline: 2px solid var(--blue, #194caa);
  outline-offset: 1px;
}
.bill-type {
  display: flex;
  gap: 0.8rem 1.3rem;
  flex-wrap: wrap;
  border: 0;
  margin: 0 0 1.25rem;
  padding: 0;
}
.bill-type legend {
  padding: 0 0 0.45rem;
}
.bill-type label,
.bill-payment label {
  cursor: pointer;
  line-height: 1.4;
}
.bill-type input,
.bill-payment input {
  accent-color: var(--blue, #194caa);
  width: 1rem;
  height: 1rem;
  vertical-align: -2px;
  margin: 0 0.2rem 0 0;
}
.bill-line {
  display: grid;
  grid-template-columns: minmax(10rem, 1fr) minmax(3.65rem, 0.27fr) minmax(5.2rem, 0.36fr) 2.1rem;
  gap: 0.55rem;
  align-items: end;
  border-top: 1px solid var(--line, #bdc4c6);
  padding: 0.95rem 0;
}
.bill-line .bill-field {
  margin: 0;
  font-size: 0.81rem;
}
.bill-line .bill-field input,
.bill-line .bill-field select {
  font-size: 0.94rem;
  padding-left: 0.6rem;
  padding-right: 0.3rem;
}
.bill-remove,
.bill-secondary,
.bill-print,
.bill-primary {
  font: inherit;
  cursor: pointer;
}
.bill-remove {
  width: 2.1rem;
  min-height: 2.9rem;
  padding: 0;
  color: var(--muted, #505c66);
  font-size: 1.35rem;
  border: 0;
  background: transparent;
}
.bill-remove:disabled {
  opacity: 0.3;
  cursor: default;
}
.bill-secondary {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--line, #bdc4c6);
  padding: 0.55rem 0.85rem;
  color: var(--blue, #194caa);
  font-weight: 550;
  font-size: 0.9rem;
  border-radius: 3px;
  background: transparent;
}
.bill-secondary:hover {
  border-color: var(--blue, #194caa);
}
.bill-payment {
  display: grid;
  gap: 0.8rem;
}
.bill-payment label {
  display: flex;
  gap: 0.55rem;
  align-items: baseline;
}
.bill-payment strong,
.bill-payment small {
  display: block;
}
.bill-payment strong {
  font-weight: 550;
}
.bill-payment small {
  margin-top: 0.15rem;
}
.bill-aside {
  position: sticky;
  top: 2rem;
}
.bill-summary {
  padding: 1.55rem 1.55rem 1.15rem;
  background: #f4f6f7;
  border-top: 2px solid var(--blue, #194caa);
}
.bill-summary h2 {
  font-size: 1.35rem;
}
.bill-summary dl,
.bill-result dl {
  margin: 0;
}
.bill-summary dl > div,
.bill-result dl > div {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.38rem 0;
  font-size: 0.98rem;
}
.bill-summary dd,
.bill-result dd {
  margin: 0;
  font-variant-numeric: tabular-nums;
  text-align: right;
}
.bill-summary .bill-total,
.bill-result .bill-total {
  border-top: 1px solid var(--line, #bdc4c6);
  margin: 0.65rem 0 0;
  padding-top: 0.85rem;
  font-weight: 550;
  font-size: 1.14rem;
}
.bill-summary .bill-total dd,
.bill-result .bill-total dd {
  font-size: 1.5rem;
  letter-spacing: -0.04em;
}
.bill-summary .bill-hint {
  margin: 1rem 0;
}
.bill-primary,
.bill-print {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.9rem;
  padding: 0.75rem 1rem;
  border-radius: 3px;
  font-weight: 550;
  background: var(--blue, #194caa);
  border: 1px solid transparent;
  color: #fff;
  text-align: center;
  line-height: 1.3;
}
.bill-primary {
  width: 100%;
}
.bill-primary:disabled {
  opacity: 0.65;
  cursor: default;
}
#bill-error {
  color: #8e2c23;
  font-size: 0.94rem;
  line-height: 1.5;
}
.bill-tools {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: clamp(2.5rem, 6vw, 5rem) 0 2rem;
}
.bill-tools h1 {
  font-size: clamp(2.1rem, 4vw, 4rem);
  font-weight: 550;
  letter-spacing: -0.055em;
  line-height: 1.05;
  margin: 0;
}
.bill-tools p {
  margin: 1rem 0 0;
  max-width: 64ch;
  line-height: 1.5;
}
.bill-tools b {
  overflow-wrap: anywhere;
}
.bill-print {
  flex-shrink: 0;
}
.bill-paper {
  max-width: 61rem;
  margin: 1.25rem auto 0;
  border: 1px solid var(--line, #bdc4c6);
  padding: clamp(1.2rem, 4vw, 3.8rem);
  background: white;
  color: #19232d;
  font-family: var(--sans, Arial, sans-serif);
}
.bill-document-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  padding: 0 0 1rem;
  border-bottom: 2px solid #253e60;
}
.bill-doc-title {
  font-size: clamp(1.7rem, 3vw, 2.8rem);
  font-weight: 550;
  letter-spacing: -0.055em;
  line-height: 1.15;
}
.bill-doc-title .bill-translation {
  display: inline;
  font-size: 0.65em;
  font-weight: 450;
  margin-left: 0.5em;
  letter-spacing: -0.03em;
}
.bill-translation {
  display: block;
  font-weight: 400;
  color: #505962;
}
.bill-doc-number {
  font-variant-numeric: tabular-nums;
  text-align: right;
}
.bill-doc-dates,
.bill-parties,
.bill-result {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 2rem;
}
.bill-doc-dates {
  padding: 1rem 0;
  font-size: 0.84rem;
}
.bill-doc-dates b {
  display: block;
  font-weight: 550;
}
.bill-parties {
  padding: 1.35rem 0 1.8rem;
}
.bill-paper h2 {
  margin: 0 0 0.5rem;
  font-size: 0.95rem;
  letter-spacing: -0.01em;
  line-height: 1.2;
  font-weight: 650;
}
.bill-parties h3 {
  margin: 0 0 0.35rem;
  font-size: 1.12rem;
  font-weight: 550;
  line-height: 1.25;
  letter-spacing: -0.02em;
}
.bill-parties p,
.bill-payment-note p {
  font-size: 0.9rem;
  line-height: 1.45;
  margin: 0.18rem 0;
}
.bill-parties section,
.bill-parties p,
.bill-payment-note p {
  min-width: 0;
  overflow-wrap: anywhere;
}
.bill-parties b,
.bill-payment-note b {
  font-weight: 550;
}
.bill-address {
  white-space: pre-line;
}
.bill-table-wrap {
  overflow-x: auto;
}
.bill-paper table {
  width: 100%;
  border-collapse: collapse;
  font-variant-numeric: tabular-nums;
}
.bill-paper th,
.bill-paper td {
  text-align: right;
  font-size: 0.86rem;
  line-height: 1.35;
  padding: 0.65rem 0.45rem;
  vertical-align: top;
}
.bill-paper th:first-child,
.bill-paper td:first-child {
  text-align: left;
  padding-left: 0;
}
.bill-paper th:last-child,
.bill-paper td:last-child {
  padding-right: 0;
}
.bill-paper thead {
  border-top: 1px solid #8392a0;
  border-bottom: 1px solid #bac2c8;
}
.bill-paper th {
  font-weight: 600;
}
.bill-paper td {
  border-bottom: 1px solid #d6dcdf;
}
.bill-paper .bill-desc {
  width: 46%;
  overflow-wrap: anywhere;
  font-weight: 550;
}
.bill-result {
  margin: 1.45rem 0 1.8rem;
  align-items: start;
  grid-template-columns: minmax(0, 1.25fr) minmax(0, 0.8fr);
}
.bill-tax-table th,
.bill-tax-table td {
  font-size: 0.78rem;
}
.bill-result dl > div {
  font-size: 0.9rem;
}
.bill-payment-note,
.bill-tax-notes {
  padding: 1.15rem 0 0;
  margin-top: 1.1rem;
  border-top: 1px solid #c7cfd5;
}
.bill-tax-notes p {
  font-size: 0.82rem;
  line-height: 1.5;
  margin: 0.7rem 0 0;
}
.bill-tax-notes .bill-translation {
  margin-top: 0.2rem;
}
.bill-pending {
  max-width: 61rem;
}
.bill-link-tools {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 1rem;
  margin-top: 1.15rem;
}
.bill-link-tools a {
  min-width: 0;
  color: var(--blue, #194caa);
  overflow-wrap: anywhere;
  text-underline-offset: 0.2em;
}
.bill-request-summary h2 {
  font-size: clamp(1.65rem, 3vw, 2.45rem);
  letter-spacing: -0.045em;
  padding-bottom: 0.85rem;
  border-bottom: 2px solid #253e60;
}
.bill-saved-fields {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 16rem), 1fr));
  gap: 1rem 2rem;
  margin: 1.4rem 0 2rem;
}
.bill-saved-fields dt {
  font-size: 0.85rem;
  color: var(--muted, #505c66);
}
.bill-saved-fields dd {
  overflow-wrap: anywhere;
  white-space: pre-line;
}
.bill-request-summary caption {
  text-align: left;
  font-weight: 600;
  padding-bottom: 0.65rem;
}
.bill-request-summary tfoot td {
  font-weight: 600;
  border-bottom: 0;
}
@media (max-width: 850px) {
  .bill-grid {
    grid-template-columns: minmax(0, 1.6fr) minmax(13.5rem, 0.85fr);
    gap: 1.5rem;
  }
  .bill-summary {
    padding: 1.2rem;
  }
  .bill-line {
    grid-template-columns: 1fr 1fr 2rem;
  }
  .bill-line-service {
    grid-column: 1/-1;
  }
}
@media (max-width: 680px) {
  .bill-grid {
    display: block;
    margin-top: 2rem;
  }
  .bill-aside {
    position: static;
  }
  .bill-tools {
    display: block;
  }
  .bill-tools button {
    margin-top: 1rem;
  }
  .bill-print {
    white-space: normal;
  }
  .bill-parties,
  .bill-result {
    gap: 1rem;
  }
  .bill-result {
    display: block;
  }
  .bill-result dl {
    margin: 1rem 0 0 auto;
    max-width: 20rem;
  }
  .bill-doc-dates {
    gap: 0.65rem;
  }
  .bill-document-head {
    align-items: flex-start;
  }
  .bill-doc-number {
    font-size: 0.88rem;
  }
  .bill-paper th,
  .bill-paper td {
    font-size: 0.76rem;
    padding: 0.5rem 0.3rem;
  }
  .bill-result th,
  .bill-result td {
    font-size: 0.8rem;
  }
}
@media (max-width: 440px) {
  .bill-two {
    grid-template-columns: 1fr;
    gap: 0;
  }
  .bill-document-head {
    display: block;
  }
  .bill-doc-number {
    text-align: left;
    margin-top: 0.5rem;
  }
  .bill-parties {
    grid-template-columns: 1fr;
  }
  .bill-doc-dates {
    grid-template-columns: 1fr;
    gap: 0.5rem;
  }
  .bill-parties {
    gap: 1.1rem;
  }
  .bill-doc-dates b {
    display: inline;
  }
  .bill-paper {
    padding: 0.85rem;
  }
  .bill-invoice-lines {
    min-width: 21rem;
  }
  .bill-section {
    padding-bottom: 1.6rem;
  }
}
@page {
  size: A4;
  margin: 13mm;
}
@media print {
  html,
  body,
  main,
  .container,
  .bill-receipt-page {
    display: block !important;
    position: static !important;
    margin: 0 !important;
    padding: 0 !important;
    min-height: 0 !important;
    max-width: none !important;
    width: auto !important;
    background: white !important;
    color: black !important;
  }
  body > header,
  body > footer,
  body > nav,
  .bill-tools,
  .bill-link-tools button,
  #bill-copy-status,
  .skip,
  .site-footer,
  header:not(.bill-document-head),
  footer {
    display: none !important;
  }
  .bill-paper {
    display: block;
    max-width: none;
    margin: 0;
    border: 0;
    padding: 0;
    box-shadow: none;
    background: white;
    font-size: 9pt;
  }
  .bill-document-head {
    display: flex;
    padding-bottom: 8pt;
  }
  .bill-doc-title {
    font-size: 20pt;
  }
  .bill-doc-number {
    font-size: 11pt;
  }
  .bill-doc-dates,
  .bill-parties,
  .bill-result {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 18pt;
  }
  .bill-parties {
    padding: 10pt 0 14pt;
  }
  .bill-doc-dates {
    padding: 8pt 0;
  }
  .bill-doc-dates b {
    display: block;
  }
  .bill-paper table {
    min-width: 0;
  }
  .bill-table-wrap {
    overflow: visible;
  }
  .bill-result {
    margin: 12pt 0 14pt;
  }
  .bill-result dl {
    max-width: none;
    margin: 0;
  }
  .bill-paper td,
  .bill-paper th,
  .bill-parties p,
  .bill-payment-note p,
  .bill-doc-dates {
    font-size: 8pt;
  }
  .bill-tax-notes p {
    font-size: 7.8pt;
  }
  .bill-paper h2 {
    font-size: 9.5pt;
  }
  .bill-parties h3 {
    font-size: 11pt;
  }
  .bill-paper th,
  .bill-paper td {
    padding: 4pt 3pt;
  }
  .bill-tax-notes,
  .bill-payment-note {
    padding-top: 7pt;
    margin-top: 7pt;
  }
  .bill-paper thead {
    display: table-header-group;
  }
  .bill-paper tr,
  .bill-result,
  .bill-parties section,
  .bill-payment-note,
  .bill-tax-notes p {
    break-inside: avoid;
  }
  .bill-paper h2 {
    break-after: avoid;
  }
  .bill-invoice-lines {
    min-width: 0;
  }
}
