.app-container {
  background: #f4f6f8;
}

.navigation.admin-navigation {
  flex: 0 0 17rem;
  min-height: 100vh;
  padding: 1rem 0.875rem;
  background: #ffffff;
  border-right: 1px solid #d9e1ea;
  box-shadow: 1px 0 2px rgba(31, 41, 55, 0.03);
}

.admin-navigation__header {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  padding: 0.25rem 0.25rem 1rem;
  margin-bottom: 0.75rem;
  border-bottom: 1px solid #edf1f5;
  color: #24364a;
}

.admin-navigation__mark {
  display: grid;
  width: 2rem;
  height: 2rem;
  place-items: center;
  border-radius: 0.375rem;
  background: #1f6fcb;
  color: #ffffff;
  font-weight: 700;
  font-size: 0.75rem;
}

.admin-navigation__header strong,
.admin-navigation__header span {
  display: block;
}

.admin-navigation__header strong {
  font-size: 0.875rem;
  line-height: 1.2;
}

.admin-navigation__header span {
  color: #6b7a8c;
  font-size: 0.75rem;
}

.admin-navigation__logout {
  width: 100%;
  margin-bottom: 1rem;
}

.admin-navigation__group {
  margin-top: 1rem;
}

.admin-navigation__group-label {
  margin: 0 0 0.375rem;
  padding: 0 0.45rem;
  color: #708093;
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: uppercase;
}

.navigation__link.admin-navigation__link {
  margin-left: 0;
  margin-bottom: 0.125rem;
  padding: 0.5rem 0.625rem;
  border-radius: 0.375rem;
  color: #25364a;
  font-size: 0.875rem;
  line-height: 1.2;
}

.navigation__link.admin-navigation__link:hover {
  background: #eef4fb;
  color: #17324f;
  text-decoration: none;
}

.navigation__link--active.admin-navigation__link {
  background: #e5f0fb;
  color: #124d86;
  font-weight: 700;
}

.main-content {
  min-width: 0;
  padding: 0;
}

.json-settings-helper {
  display: grid;
  gap: 0.625rem;
  margin-top: 0.75rem;
  max-width: 52rem;
  padding: 0.875rem;
  border: 1px solid #d9e1ea;
  border-radius: 0.375rem;
  background: #f8fafc;
  color: #25364a;
  font-family: inherit;
  line-height: 1.4;
}

.field-unit__field textarea[data-json-settings-textarea] {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  font-size: 0.8125rem;
  line-height: 1.5;
}

.json-settings-helper__header,
.json-settings-helper__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
}

.json-settings-helper__header {
  justify-content: space-between;
}

.json-settings-helper__header strong {
  color: #1c2f43;
  font-size: 0.875rem;
  line-height: 1.3;
}

.json-settings-helper__button {
  min-height: 2rem;
  padding: 0.375rem 0.625rem;
  border: 1px solid #1f6fcb;
  border-radius: 0.25rem;
  background: #1f6fcb;
  color: #ffffff;
  cursor: pointer;
  font-family: inherit;
  font-size: 0.8125rem;
  font-weight: 700;
  line-height: 1.25;
  text-align: center;
  white-space: nowrap;
}

.json-settings-helper__button:hover {
  background: #175ca9;
}

.json-settings-helper__button:focus-visible {
  outline: 3px solid rgba(31, 111, 203, 0.25);
  outline-offset: 2px;
}

.json-settings-helper__button--secondary {
  border-color: #b9c7d7;
  background: #ffffff;
  color: #25364a;
}

.json-settings-helper__button--secondary:hover {
  background: #eef4fb;
}

.json-settings-helper__reference {
  display: grid;
  gap: 0.5rem;
  margin: 0;
}

.json-settings-helper__reference > div {
  display: grid;
  grid-template-columns: minmax(12rem, 0.45fr) minmax(0, 1fr);
  gap: 0.75rem;
  align-items: start;
}

.json-settings-helper__reference dt,
.json-settings-helper__reference dd {
  margin: 0;
  font-size: 0.8125rem;
  line-height: 1.45;
}

.json-settings-helper__reference dd {
  display: grid;
  gap: 0.125rem;
  color: #53657a;
}

.json-settings-helper__reference code {
  display: inline-block;
  max-width: 100%;
  padding: 0.0625rem 0.25rem;
  border: 1px solid #d9e1ea;
  border-radius: 0.25rem;
  background: #ffffff;
  color: #26384c;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  font-size: 0.75rem;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.json-settings-helper__reference small {
  color: #708093;
}

.json-settings-helper__status {
  min-height: 1rem;
  margin: 0;
  color: #24683d;
  font-size: 0.8125rem;
  line-height: 1.4;
  overflow-wrap: anywhere;
}

.json-settings-helper__status--error {
  color: #9f2f24;
}

@media (max-width: 48rem) {
  .json-settings-helper__header,
  .json-settings-helper__actions,
  .json-settings-helper__reference > div {
    display: grid;
    grid-template-columns: 1fr;
  }

  .json-settings-helper__button {
    width: 100%;
    white-space: normal;
  }
}

.admin-header-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.5rem;
}

.admin-header-actions form {
  margin: 0;
}

.usage-report-page-header {
  min-height: 6.75rem;
  padding: 1.25rem 2rem;
}

.usage-report-page-header > div:first-child {
  min-width: 0;
  margin-right: 1.5rem;
}

.usage-report-page-header .main-content__page-title {
  margin: 0;
  color: #24364a;
  font-size: 1.5rem;
  line-height: 1.25;
}

.usage-report__eyebrow {
  display: block;
  margin-bottom: 0.25rem;
  color: #607286;
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: uppercase;
}

.usage-report__subtitle {
  margin: 0.25rem 0 0;
  color: #6b7a8c;
  font-size: 0.875rem;
}

.usage-report-builder,
.usage-report-document {
  color: #26384c;
}

.usage-report-builder {
  padding-top: 0;
}

.usage-report__alert {
  display: grid;
  gap: 0.25rem;
  margin: 1.25rem 0 0;
  padding: 0.75rem 0.875rem;
  border: 1px solid #e5b4ad;
  border-radius: 0.375rem;
  background: #fff5f3;
  color: #8d241b;
}

.usage-report-builder__grid {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(18rem, 0.8fr);
  margin-top: 1.5rem;
  border-top: 1px solid #dce3ea;
  border-bottom: 1px solid #dce3ea;
}

.usage-report-builder__period,
.usage-report-builder__pricing {
  min-width: 0;
  padding: 1.5rem 0;
}

.usage-report-builder__period {
  padding-right: 2rem;
}

.usage-report-builder__pricing {
  padding-left: 2rem;
  border-left: 1px solid #dce3ea;
}

.usage-report__section-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
}

.usage-report__section-heading > div {
  min-width: 0;
}

.usage-report__section-heading h2 {
  margin: 0;
  color: #24364a;
  font-size: 1rem;
  line-height: 1.3;
}

.usage-report__section-heading p,
.usage-report__section-heading span {
  margin: 0.25rem 0 0;
  color: #6b7a8c;
  font-size: 0.75rem;
}

.usage-report__text-link {
  color: #1d64b4;
  font-size: 0.8125rem;
  font-weight: 700;
  white-space: nowrap;
}

.usage-report-period-form__fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

.usage-report-period-form__field {
  display: grid;
  gap: 0.375rem;
  min-width: 0;
}

.usage-report-period-form__field label {
  color: #3a4c60;
  font-size: 0.75rem;
  font-weight: 700;
}

.usage-report-period-form__field input {
  width: 100%;
  height: 2.625rem;
  padding: 0.5rem 0.625rem;
  border: 1px solid #cbd5df;
  border-radius: 0.375rem;
  background: #ffffff;
  color: #1f3043;
  font-size: 0.875rem;
}

.usage-report-period-form__field input:focus {
  border-color: #1f6fcb;
  box-shadow: 0 0 0 3px rgba(31, 111, 203, 0.12);
  outline: none;
}

.usage-report-period-form__actions {
  display: flex;
  justify-content: flex-end;
  margin-top: 1.25rem;
}

.usage-report-pricing-summary__title {
  display: grid;
  gap: 0.125rem;
  margin-bottom: 0.875rem;
}

.usage-report-pricing-summary__title strong {
  color: #24364a;
}

.usage-report-pricing-summary__title span,
.usage-report-pricing-summary > p {
  color: #6b7a8c;
  font-size: 0.75rem;
}

.usage-report-pricing-summary dl {
  display: grid;
  gap: 0;
  margin: 0;
}

.usage-report-pricing-summary dl > div {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.5rem 0;
  border-top: 1px solid #e8edf2;
}

.usage-report-pricing-summary dt,
.usage-report-pricing-summary dd {
  margin: 0;
  font-size: 0.8125rem;
}

.usage-report-pricing-summary dd {
  color: #24364a;
  font-weight: 700;
  text-align: right;
}

.usage-report-pricing-summary > p {
  margin: 0.75rem 0 0;
  line-height: 1.5;
}

.usage-report-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-bottom: 2rem;
  border: 1px solid #d7e0e8;
  border-radius: 0.375rem;
  background: #f8fafc;
  overflow: hidden;
}

.usage-report-summary__metric {
  display: grid;
  gap: 0.35rem;
  min-width: 0;
  padding: 1rem 1.125rem;
  border-right: 1px solid #d7e0e8;
}

.usage-report-summary__metric:last-child {
  border-right: 0;
}

.usage-report-summary__metric span {
  color: #66778a;
  font-size: 0.6875rem;
  font-weight: 700;
  text-transform: uppercase;
}

.usage-report-summary__metric strong {
  color: #24364a;
  font-size: 1.125rem;
  line-height: 1.2;
  overflow-wrap: anywhere;
}

.usage-report-summary__metric--credit strong {
  color: #8a5a16;
}

.usage-report-summary__metric--due strong {
  color: #167246;
}

.usage-report__section {
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid #dce3ea;
}

.usage-report__section--first {
  margin-top: 0;
  padding-top: 0;
  border-top: 0;
}

.usage-report-document__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  margin-bottom: 1.5rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid #d7e0e8;
}

.usage-report-print-header__brand {
  display: flex;
  align-items: center;
  gap: 0.625rem;
}

.usage-report-print-header__brand > span {
  display: grid;
  width: 2rem;
  height: 2rem;
  place-items: center;
  border-radius: 0.375rem;
  background: #1f6fcb;
  color: #ffffff;
  font-size: 0.6875rem;
  font-weight: 700;
}

.usage-report-print-header__brand strong,
.usage-report-print-header__brand small,
.usage-report-print-header__company strong,
.usage-report-print-header__company span,
.usage-report-print-header__company small {
  display: block;
}

.usage-report-print-header__brand small,
.usage-report-print-header__company span,
.usage-report-print-header__company small {
  margin-top: 0.125rem;
  color: #647589;
  font-size: 0.6875rem;
}

.usage-report-print-header__company {
  text-align: right;
}

.usage-report__note {
  margin-top: 1rem;
  padding: 0.75rem 0.875rem;
  border-left: 3px solid #8fa4b8;
  background: #f5f7f9;
  color: #536579;
  font-size: 0.75rem;
  line-height: 1.5;
}

.usage-report__table-wrap {
  width: 100%;
  overflow-x: auto;
}

.usage-report__table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
}

.usage-report__table th,
.usage-report__table td {
  padding: 0.7rem 0.75rem;
  border-bottom: 1px solid #e3e8ed;
  text-align: right;
  vertical-align: middle;
}

.usage-report__table th:first-child,
.usage-report__table td:first-child {
  width: 32%;
  text-align: left;
}

.usage-report__table thead th {
  color: #596b7e;
  background: #f7f9fb;
  font-size: 0.6875rem;
  font-weight: 700;
  text-transform: uppercase;
}

.usage-report__table tbody th,
.usage-report__table tbody td {
  color: #2b3d51;
  font-size: 0.8125rem;
}

.usage-report__table tbody th {
  font-weight: 700;
}

.usage-report__table--billing th:first-child,
.usage-report__table--billing td:first-child {
  width: 38%;
}

.usage-report__table--billing tfoot th,
.usage-report__table--billing tfoot td {
  padding: 0.5rem 0.75rem;
  border-bottom: 0;
  color: #42556a;
  font-size: 0.8125rem;
  text-align: right;
}

.usage-report__table--billing tfoot tr:first-child th,
.usage-report__table--billing tfoot tr:first-child td {
  padding-top: 0.875rem;
  border-top: 1px solid #bdc9d4;
}

.usage-report__table--billing .usage-report__total-row th,
.usage-report__table--billing .usage-report__total-row td {
  padding-top: 0.75rem;
  color: #173e2b;
  font-size: 0.9375rem;
  font-weight: 700;
}

.usage-report__table--usage th:first-child,
.usage-report__table--usage td:first-child {
  width: 17%;
}

.usage-report__empty {
  color: #6b7a8c !important;
  text-align: center !important;
}

/* Metrics page: a handful of compact tables, numbers that never wrap. */
.metrics-filters {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
}

.metrics-filters select {
  width: auto;
  margin: 0;
}

.usage-report-summary__metric small {
  color: #66778a;
  font-size: 0.75rem;
  line-height: 1.4;
}

.metrics-section {
  margin-top: 1.75rem;
}

.metrics-section h2 {
  margin: 0 0 0.5rem;
  color: #24364a;
  font-size: 0.9375rem;
}

.metrics-table {
  width: 100%;
  border-collapse: collapse;
}

.metrics-table th,
.metrics-table td {
  padding: 0.5rem 0.75rem;
  border-bottom: 1px solid #e3e8ed;
  color: #2b3d51;
  font-size: 0.8125rem;
  text-align: right;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

.metrics-table th:first-child,
.metrics-table td:first-child {
  width: 100%;
  text-align: left;
}

.metrics-table thead th {
  color: #596b7e;
  background: #f7f9fb;
  font-size: 0.6875rem;
  font-weight: 700;
  text-transform: uppercase;
}

.metrics-table tbody th {
  font-weight: 500;
}

.metrics-heading {
  margin: 0 0 0.5rem;
  color: #24364a;
  font-size: 0.9375rem;
}

.metrics-change {
  color: #66778a;
  font-size: 0.75rem;
  font-weight: 600;
}

.metrics-change--good {
  color: #167246;
}

.metrics-change--bad {
  color: #b42318;
}

.usage-report__activity {
  margin: 0.875rem 0 0;
  color: #5c6d80;
  font-size: 0.75rem;
}

.usage-report__muted {
  color: #6b7a8c;
  font-size: 0.8125rem;
}

.usage-report__footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.5rem 1.5rem;
  margin-top: 2rem;
  padding-top: 1rem;
  border-top: 1px solid #dce3ea;
  color: #6b7a8c;
  font-size: 0.6875rem;
}

@media (max-width: 1000px) {
  .usage-report-builder__grid {
    grid-template-columns: 1fr;
  }

  .usage-report-builder__period {
    padding-right: 0;
  }

  .usage-report-builder__pricing {
    padding-left: 0;
    border-top: 1px solid #dce3ea;
    border-left: 0;
  }

  .usage-report-summary {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 720px) {
  .usage-report-page-header {
    align-items: flex-start;
    flex-direction: column;
    gap: 1rem;
    padding: 1rem;
  }

  .usage-report-page-header > div:first-child {
    margin-right: 0;
  }

  .usage-report-builder,
  .usage-report-document {
    padding: 1rem;
  }

  .usage-report-period-form__fields,
  .usage-report-summary {
    grid-template-columns: 1fr;
  }

  .usage-report-summary__metric {
    border-right: 0;
    border-bottom: 1px solid #d7e0e8;
  }

  .usage-report-summary__metric:last-child {
    border-bottom: 0;
  }

  .usage-report__section-heading {
    display: grid;
  }

  .usage-report__table {
    min-width: 36rem;
  }
}

@media print {
  @page {
    size: A4 portrait;
    margin: 13mm;
  }

  html,
  body,
  .app-container,
  .main-content {
    width: 100%;
    min-width: 0;
    margin: 0;
    padding: 0;
    background: #ffffff;
    box-shadow: none;
  }

  body {
    color: #172536;
    font-size: 9pt;
    print-color-adjust: exact;
    -webkit-print-color-adjust: exact;
  }

  .navigation,
  .report-screen-only,
  .flash,
  .flashes {
    display: none !important;
  }

  .usage-report-document {
    padding: 0;
  }

  .usage-report-document__header {
    align-items: center;
    justify-content: space-between;
    margin-bottom: 8mm;
    padding-bottom: 4mm;
    border-bottom: 1px solid #cbd5df;
  }

  .usage-report-print-header__brand {
    display: flex;
    align-items: center;
    gap: 2.5mm;
  }

  .usage-report-print-header__brand > span {
    display: grid;
    width: 8mm;
    height: 8mm;
    place-items: center;
    border-radius: 1.5mm;
    background: #1f6fcb;
    color: #ffffff;
    font-size: 7pt;
    font-weight: 700;
  }

  .usage-report-print-header__brand strong,
  .usage-report-print-header__brand small,
  .usage-report-print-header__company strong,
  .usage-report-print-header__company span {
    display: block;
  }

  .usage-report-print-header__brand small,
  .usage-report-print-header__company span,
  .usage-report-print-header__company small {
    color: #617387;
    font-size: 7.5pt;
  }

  .usage-report-print-header__company {
    text-align: right;
  }

  .usage-report-summary {
    margin-bottom: 6mm;
    break-inside: avoid;
  }

  .usage-report-summary__metric {
    padding: 3.5mm;
  }

  .usage-report-summary__metric span {
    font-size: 6.5pt;
  }

  .usage-report-summary__metric strong {
    font-size: 10pt;
  }

  .usage-report__section {
    margin-top: 6mm;
    padding-top: 4mm;
    break-inside: auto;
  }

  .usage-report__section-heading {
    margin-bottom: 2.5mm;
    break-after: avoid;
  }

  .usage-report__section-heading h2 {
    font-size: 10pt;
  }

  .usage-report__section-heading p,
  .usage-report__section-heading span,
  .usage-report__footer,
  .usage-report__note {
    font-size: 7pt;
  }

  .usage-report__table-wrap {
    overflow: visible;
  }

  .usage-report__table {
    min-width: 0;
  }

  .usage-report__table th,
  .usage-report__table td {
    padding: 2.2mm 2.5mm;
  }

  .usage-report__table thead th {
    font-size: 6.5pt;
  }

  .usage-report__table thead {
    display: table-header-group;
  }

  .usage-report__table tfoot {
    display: table-row-group;
  }

  .usage-report__table tr {
    break-inside: avoid;
  }

  .usage-report__table tbody th,
  .usage-report__table tbody td {
    font-size: 7.5pt;
  }

  .usage-report__note {
    margin-top: 3mm;
    padding: 2.5mm 3mm;
  }

  .usage-report__footer {
    margin-top: 6mm;
    padding-top: 3mm;
  }

  a {
    color: inherit;
    text-decoration: none;
  }
}
