:root {
  --navy: #16375b;
  --navy-dark: #0c2744;
  --blue: #1e6a9f;
  --blue-light: #eaf3f8;
  --teal: #2b7a78;
  --green: #2e7d5b;
  --green-light: #e8f5ee;
  --amber: #9a6511;
  --amber-light: #fff6df;
  --ink: #17212b;
  --muted: #637080;
  --line: #dce3e9;
  --surface: #ffffff;
  --background: #f4f7f9;
  --shadow: 0 16px 40px rgba(20, 48, 74, 0.08);
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
  color: var(--ink);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at 95% 0%, rgba(30, 106, 159, 0.08), transparent 26rem),
    var(--background);
  line-height: 1.5;
}

a {
  color: inherit;
}

.site-header {
  min-height: 76px;
  padding: 0 5vw;
  display: flex;
  align-items: center;
  gap: 2rem;
  color: white;
  background: linear-gradient(115deg, var(--navy-dark), var(--navy));
  box-shadow: 0 6px 24px rgba(9, 30, 52, 0.16);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.8rem;
  text-decoration: none;
  letter-spacing: 0.02em;
}

.brand-icon {
  display: block;
  width: 42px;
  height: 42px;
  flex: 0 0 42px;
  object-fit: contain;
}

.brand strong,
.brand small {
  display: block;
}

.brand small {
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.72rem;
  font-weight: 500;
}

.main-nav {
  display: flex;
  gap: 0.3rem;
}

.main-nav a {
  padding: 0.55rem 0.75rem;
  border-radius: 8px;
  color: rgba(255, 255, 255, 0.82);
  text-decoration: none;
}

.main-nav a:hover,
.main-nav a:focus-visible {
  color: white;
  background: rgba(255, 255, 255, 0.1);
}

.user-menu {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 0.8rem;
}

.user-menu form {
  margin: 0;
}

.role-badge {
  padding: 0.28rem 0.6rem;
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 999px;
  color: rgba(255, 255, 255, 0.86);
  font-size: 0.76rem;
}

.text-button {
  padding: 0;
  border: 0;
  color: white;
  background: transparent;
  font: inherit;
  cursor: pointer;
}

.page-shell {
  width: min(1180px, calc(100% - 2rem));
  margin: 0 auto;
  padding: 3rem 0 5rem;
}

.page-heading {
  margin-bottom: 2rem;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 2rem;
}

.page-heading h1,
.login-intro h1 {
  max-width: 760px;
  margin: 0.2rem 0 0.65rem;
  color: var(--navy-dark);
  font-size: clamp(2rem, 4vw, 3.4rem);
  line-height: 1.08;
  letter-spacing: -0.035em;
}

.page-heading p,
.login-intro p {
  max-width: 720px;
  margin: 0;
  color: var(--muted);
}

.page-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.75rem;
}

.sam-upload-action {
  margin-bottom: 1.4rem;
  padding: 1rem 1.1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #f4f8fb;
}

.sam-upload-action p {
  margin: 0.25rem 0 0;
  color: var(--muted);
}

.eyebrow {
  margin: 0 0 0.35rem;
  color: var(--blue);
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.status-pill {
  display: inline-flex;
  width: fit-content;
  padding: 0.28rem 0.62rem;
  border-radius: 999px;
  color: var(--muted);
  background: #edf1f4;
  font-size: 0.78rem;
  font-weight: 700;
  white-space: nowrap;
}

.status-active {
  color: var(--green);
  background: var(--green-light);
}

.status-development {
  color: var(--amber);
  background: var(--amber-light);
}

.metric-grid {
  margin-bottom: 1.25rem;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}

.metric-card {
  min-height: 155px;
  padding: 1.35rem;
  display: flex;
  flex-direction: column;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--surface);
  box-shadow: var(--shadow);
  text-decoration: none;
}

a.metric-card:hover {
  border-color: #a8c5d9;
  transform: translateY(-1px);
}

.metric-card span,
.metric-card small {
  color: var(--muted);
}

.metric-card strong {
  margin: auto 0 0;
  color: var(--navy);
  font-size: 2.3rem;
  line-height: 1;
}

.metric-card small {
  margin-top: 0.45rem;
}

.dashboard-heading {
  margin-bottom: 1.35rem;
}

.dashboard-heading h1 {
  font-size: clamp(2rem, 3.2vw, 3rem);
}

.dashboard-metric-grid {
  margin-bottom: 1rem;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1rem;
}

.dashboard-metric {
  min-height: 150px;
}

.dashboard-metric .metric-date {
  font-size: clamp(1.55rem, 2.3vw, 2rem);
}

.dashboard-content-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
  align-items: start;
}

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

.dashboard-panel-heading h2 {
  margin-bottom: 0;
}

.dashboard-panel-heading > a,
.dashboard-panel-link {
  color: var(--blue);
  font-size: 0.84rem;
  font-weight: 750;
  text-decoration: none;
}

.dashboard-panel-heading > a:hover,
.dashboard-panel-link:hover {
  text-decoration: underline;
}

.dashboard-change-list {
  margin: 0;
  padding: 0;
  display: grid;
  list-style: none;
}

.dashboard-change-list > li {
  padding: 1rem 0;
  border-top: 1px solid var(--line);
}

.dashboard-change-list > li:first-child {
  padding-top: 0;
  border-top: 0;
}

.dashboard-change-list > li:last-child {
  padding-bottom: 0;
}

.dashboard-change-main {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
}

.dashboard-change-main strong,
.dashboard-change-main span {
  display: block;
}

.dashboard-change-main strong {
  color: var(--navy-dark);
}

.dashboard-change-main span,
.dashboard-change-main time {
  color: var(--muted);
  font-size: 0.78rem;
}

.dashboard-change-main time {
  flex: 0 0 auto;
  white-space: nowrap;
}

.dashboard-change-details {
  margin-top: 0.65rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.dashboard-change-details > span {
  padding: 0.32rem 0.55rem;
  border-radius: 8px;
  color: #365066;
  background: var(--blue-light);
  font-size: 0.76rem;
}

.dashboard-change-details strong {
  margin-right: 0.25rem;
  color: var(--blue);
}

.dashboard-breakdown,
.dashboard-fetch-status {
  margin: 0;
}

.dashboard-breakdown > div,
.dashboard-fetch-status > div {
  padding: 0.7rem 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  border-top: 1px solid var(--line);
}

.dashboard-breakdown > div:first-child,
.dashboard-fetch-status > div:first-child {
  border-top: 0;
}

.dashboard-breakdown dt,
.dashboard-fetch-status dt {
  color: var(--muted);
}

.dashboard-breakdown dd,
.dashboard-fetch-status dd {
  margin: 0;
  color: var(--navy-dark);
  font-weight: 800;
  text-align: right;
}

.dashboard-breakdown dd {
  min-width: 2rem;
  font-size: 1.15rem;
}

.dashboard-panel-link {
  margin-top: 0.9rem;
  display: inline-block;
}

.dashboard-empty-state {
  margin: 0;
  padding: 1rem;
  color: var(--muted);
  border-radius: 10px;
  background: #f6f8fa;
}

.dashboard-resource-heading {
  margin: 1.75rem 0 1rem;
}

.content-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(280px, 0.75fr);
  gap: 1rem;
}

.section-heading {
  margin: 0 0 1rem;
  color: var(--navy-dark);
  font-size: 1.55rem;
}

.customer-resource-card {
  margin-bottom: 1.25rem;
}

.billing-card {
  margin-top: 1.25rem;
}

.billing-card .panel-heading {
  padding: 1.35rem 1.6rem 1rem;
}

.inline-action {
  margin: 0 0 1rem;
  display: inline-block;
}

.table-note {
  margin: 0;
  padding: 0.85rem 1.1rem;
  color: var(--muted);
  border-top: 1px solid var(--line);
  font-size: 0.82rem;
}

.table-subline {
  margin-top: 0.25rem;
  display: block;
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 500;
}

.total-row th {
  color: var(--navy-dark);
  border-top: 2px solid var(--blue);
  background: #f7fafc;
  font-size: 0.95rem;
}

.endpoint-error-row td {
  padding: 0.8rem 1rem 1rem;
  background: #fff7f7;
}

.endpoint-error {
  color: #7f2525;
}

.endpoint-error summary {
  font-weight: 800;
  cursor: pointer;
}

.endpoint-error pre {
  margin: 0.75rem 0 0;
  padding: 0.9rem;
  overflow-x: auto;
  color: #4a2020;
  border: 1px solid #efcaca;
  border-radius: 10px;
  background: white;
  font: 0.8rem/1.55 ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  white-space: pre-wrap;
}

.panel,
.table-card,
.login-card {
  padding: 1.6rem;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.panel h2,
.login-card h2 {
  margin: 0 0 0.8rem;
  color: var(--navy-dark);
  font-size: 1.35rem;
}

.next-panel {
  color: white;
  border: 0;
  background: linear-gradient(140deg, var(--navy), #245f82);
}

.next-panel .eyebrow,
.next-panel h2,
.next-panel p {
  color: white;
}

.next-panel p {
  color: rgba(255, 255, 255, 0.78);
}

.check-list {
  margin: 1.2rem 0 0;
  padding: 0;
  display: grid;
  gap: 0.8rem;
  list-style: none;
}

.check-list li {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.check-list span {
  display: grid;
  flex: 0 0 28px;
  height: 28px;
  place-items: center;
  border-radius: 50%;
  color: var(--green);
  background: var(--green-light);
  font-weight: 800;
}

.primary-button,
.secondary-button {
  display: inline-flex;
  min-height: 44px;
  padding: 0.68rem 1rem;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 10px;
  font: inherit;
  font-weight: 750;
  text-decoration: none;
  cursor: pointer;
}

.primary-button {
  color: white;
  background: var(--blue);
}

.secondary-button {
  margin-top: 0.6rem;
  color: var(--navy);
  background: white;
}

.table-card {
  padding: 0;
  overflow: hidden;
}

.table-scroll {
  overflow-x: auto;
}

.panel .table-scroll td > strong + small {
  display: block;
  margin-top: 0.28rem;
  color: var(--muted);
  line-height: 1.3;
}

.sam-comparison-heading {
  padding: 1.35rem 1.5rem 0.4rem;
}

.sam-comparison-heading h2 {
  margin: 0;
}

.sam-profitability-note {
  max-width: 920px;
  color: var(--muted);
}

.sam-profitability-grid {
  margin: 1.25rem 0;
}

.report-quantity-table {
  table-layout: fixed;
  font-size: 0.9rem;
}

.report-quantity-table th,
.report-quantity-table td {
  padding: 0.85rem 0.65rem;
  vertical-align: top;
}

.report-quantity-table th:first-child {
  width: 26%;
}

.report-quantity-table th:nth-child(2) {
  width: 12%;
}

.report-quantity-table th:nth-child(3) {
  width: 15%;
}

.report-quantity-table th:nth-child(4) {
  width: 17%;
}

.report-quantity-table th:nth-child(5) {
  width: 14%;
}

.report-quantity-table th:nth-child(6) {
  width: 16%;
}

.report-quantity-table th:not(:first-child),
.report-quantity-table td:not(:first-child) {
  text-align: right;
  white-space: nowrap;
}

.report-quantity-table .report-customer-cell {
  white-space: normal;
  overflow-wrap: anywhere;
}

.quantity-breakdown {
  display: grid;
  gap: 0.32rem;
  margin: 0;
}

.quantity-breakdown > div {
  display: block;
}

.quantity-breakdown dt,
.quantity-single-label {
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 650;
}

.quantity-breakdown dd {
  margin: 0.08rem 0 0;
  font-weight: 650;
}

.quantity-breakdown .quantity-billable {
  margin-top: 0.08rem;
  padding-top: 0.28rem;
  border-top: 1px solid var(--line);
}

.quantity-breakdown .quantity-billable dt,
.quantity-breakdown .quantity-billable dd {
  color: var(--navy-dark);
  font-weight: 800;
}

.quantity-single-label {
  display: block;
  margin-bottom: 0.28rem;
}

.quantity-single-spaced {
  margin-top: 0.75rem;
  padding-top: 0.38rem;
  border-top: 1px solid var(--line);
  color: var(--navy-dark);
  font-weight: 800;
}

.report-schedule {
  display: block;
  margin-top: 0.3rem;
  color: var(--muted);
  font-size: 0.74rem;
  line-height: 1.3;
}

.report-filter-panel {
  margin-bottom: 1.25rem;
  padding: 1rem 1.25rem;
}

.report-filter {
  display: flex;
  align-items: end;
  gap: 1rem;
}

.report-filter > div {
  flex: 1;
}

.report-filter label {
  display: block;
  margin-bottom: 0.35rem;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.report-filter select,
.report-filter input[type="date"] {
  width: 100%;
  min-height: 44px;
  padding: 0.65rem 0.75rem;
  border: 1px solid var(--line);
  border-radius: 10px;
  color: var(--navy-dark);
  background: white;
  font: inherit;
}

.report-download-button {
  margin-top: 0;
  border: 1px solid var(--line);
}

.resource-history-metrics {
  margin-bottom: 1.25rem;
}

.procurement-metrics {
  margin-bottom: 1.25rem;
}

.procurement-unmatched-panel {
  margin-bottom: 1.25rem;
  border-color: #efcaca;
  background: #fffafa;
}

.procurement-unmatched-list {
  margin: 1rem 0;
  padding: 0;
  display: grid;
  gap: 0.6rem;
  list-style: none;
}

.procurement-unmatched-list li {
  padding: 0.7rem 0.85rem;
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  border-radius: 10px;
  background: white;
}

.procurement-unmatched-list span {
  color: var(--muted);
}

.procurement-table {
  min-width: 1100px;
  font-size: 0.86rem;
}

.procurement-table th,
.procurement-table td {
  padding: 0.75rem;
  vertical-align: top;
}

.procurement-table td:first-child {
  min-width: 250px;
}

.procurement-table td:first-child strong {
  display: block;
  margin-top: 0.4rem;
}

.resource-chart-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.25rem;
  margin-bottom: 1.25rem;
}

.resource-chart-card {
  min-width: 0;
  padding: 1.4rem 1.5rem 1.25rem;
}

.resource-chart-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
}

.resource-chart-heading h2 {
  margin: 0.15rem 0 0;
  font-size: 1.35rem;
}

.resource-chart-current {
  display: flex;
  align-items: baseline;
  gap: 0.35rem;
  color: var(--navy-dark);
  text-align: right;
  white-space: nowrap;
}

.resource-chart-current strong {
  font-size: 1.45rem;
}

.resource-chart-current span {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 700;
}

.resource-chart-plot {
  margin-top: 1rem;
}

.resource-chart-plot svg {
  display: block;
  width: 100%;
  height: auto;
  overflow: visible;
}

.resource-chart-gridline {
  stroke: #dce6ee;
  stroke-width: 1;
}

.resource-chart-line {
  fill: none;
  stroke: var(--blue);
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 4;
  vector-effect: non-scaling-stroke;
}

.resource-chart-point {
  fill: white;
  stroke: var(--blue);
  stroke-width: 4;
  vector-effect: non-scaling-stroke;
}

.resource-chart-scale {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 0.75rem;
  margin-top: -0.1rem;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 650;
}

.resource-chart-scale span:nth-child(2) {
  text-align: center;
}

.resource-chart-scale span:last-child {
  text-align: right;
}

.resource-chart-summary {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
  margin: 1rem 0 0;
  padding-top: 0.9rem;
  border-top: 1px solid var(--line);
}

.resource-chart-summary div:last-child {
  text-align: right;
}

.resource-chart-summary dt {
  color: var(--muted);
  font-size: 0.7rem;
  font-weight: 700;
}

.resource-chart-summary dd {
  margin: 0.2rem 0 0;
  color: var(--navy-dark);
  font-size: 0.88rem;
  font-weight: 800;
}

.resource-history-table {
  table-layout: fixed;
}

.resource-history-table th:first-child {
  width: 22%;
}

.resource-history-table th:not(:first-child),
.resource-history-table td:not(:first-child) {
  text-align: right;
}

.resource-history-table td small {
  display: block;
  margin-top: 0.25rem;
  color: var(--muted);
  font-size: 0.75rem;
  white-space: normal;
}

.history-delta {
  font-weight: 600;
}

.billing-run-table th,
.billing-run-table td {
  white-space: nowrap;
}

.billing-run-table th:nth-child(7),
.billing-run-table td:nth-child(7) {
  white-space: normal;
  overflow-wrap: anywhere;
}

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

.resource-table {
  table-layout: fixed;
}

.resource-table th,
.resource-table td {
  padding: 0.8rem 0.7rem;
  overflow: hidden;
  text-overflow: ellipsis;
}

.resource-table th:nth-child(1) { width: 220px; }
.resource-table th:nth-child(2) { width: 135px; }
.resource-table th:nth-child(3) { width: 120px; }
.resource-table th:nth-child(4) { width: 125px; }
.resource-table th:nth-child(5) { width: 55px; }
.resource-table th:nth-child(6) { width: 70px; }
.resource-table th:nth-child(7) { width: 85px; }
.resource-table th:nth-child(8) { width: 90px; }
.resource-table th:nth-child(9) { width: 105px; }

th,
td {
  padding: 1rem 1.1rem;
  border-bottom: 1px solid var(--line);
  text-align: left;
  white-space: nowrap;
}

th {
  color: var(--muted);
  background: #f8fafb;
  font-size: 0.75rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

tbody tr:last-child td {
  border-bottom: 0;
}

tbody tr:hover {
  background: #f9fbfc;
}

code {
  color: var(--blue);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
}

.row-link,
.back-link a {
  color: var(--blue);
  font-weight: 700;
  text-decoration: none;
}

.back-link {
  margin: -1rem 0 1.5rem;
}

.cell-note {
  display: block;
  margin-top: 0.2rem;
  color: var(--muted);
  font-size: 0.76rem;
}

.row-action {
  padding: 0.45rem 0.65rem;
  border: 1px solid #a8c5d9;
  border-radius: 8px;
  color: var(--blue);
  background: white;
  font: inherit;
  font-size: 0.8rem;
  font-weight: 700;
  cursor: pointer;
}

.row-action:hover {
  background: var(--blue-light);
}

.status-error {
  color: #9c2f2f;
  background: #fff0f0;
}

.section-spacing {
  margin-top: 1rem;
}

.run-list {
  display: grid;
}

.run-list > div {
  padding: 0.8rem 0;
  display: grid;
  grid-template-columns: 150px 100px 160px 1fr;
  align-items: center;
  gap: 1rem;
  border-bottom: 1px solid var(--line);
}

.run-list > div:last-child {
  border-bottom: 0;
}

.detail-list {
  margin: 1.2rem 0 0;
}

.detail-list div,
.service-row {
  padding: 0.75rem 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  border-bottom: 1px solid var(--line);
}

.detail-list div:last-child,
.service-row:last-child {
  border-bottom: 0;
}

.detail-list dt,
.service-row small {
  color: var(--muted);
}

.detail-list dd {
  margin: 0;
  font-weight: 700;
}

.service-row small {
  display: block;
}

.service-amount {
  text-align: right;
  font-weight: 700;
}

.login-layout {
  min-height: calc(100vh - 180px);
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(320px, 0.8fr);
  align-items: center;
  gap: clamp(2rem, 8vw, 7rem);
}

.login-intro h1 {
  font-size: clamp(2.6rem, 5.5vw, 4.9rem);
}

.login-card {
  padding: 2rem;
}

.form-stack {
  display: grid;
  gap: 1rem;
}

.form-stack label {
  display: block;
  margin-bottom: 0.35rem;
  color: var(--navy-dark);
  font-size: 0.86rem;
  font-weight: 700;
}

.form-stack input {
  width: 100%;
  min-height: 46px;
  padding: 0.7rem 0.8rem;
  border: 1px solid #bfcbd4;
  border-radius: 9px;
  background: white;
  font: inherit;
}

.form-stack input:focus {
  outline: 3px solid rgba(30, 106, 159, 0.16);
  border-color: var(--blue);
}

.form-error {
  padding: 0.75rem;
  border-radius: 8px;
  color: #9c2f2f;
  background: #fff0f0;
}

.included-resources {
  margin: 0 1.25rem 1rem;
  padding: 1rem 1.1rem;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #f6f9fb;
}

.included-resources > strong {
  color: var(--navy-dark);
}

.included-resources dl {
  margin: 0.7rem 0 0;
  display: grid;
  grid-template-columns: repeat(3, max-content);
  justify-content: start;
  gap: 0.75rem 2.5rem;
}

.actual-resources dl {
  grid-template-columns: repeat(5, max-content);
}

.included-resources dl div {
  display: flex;
  align-items: baseline;
  gap: 0.55rem;
}

.included-resources dt {
  color: var(--muted);
}

.included-resources dd {
  margin: 0;
  color: var(--navy-dark);
  font-weight: 700;
}

.fine-print,
.empty-state {
  color: var(--muted);
  font-size: 0.85rem;
}

.field-help {
  margin-top: 0.45rem;
  color: var(--muted);
  font-size: 0.78rem;
}

.field-help ul,
.errorlist {
  margin: 0.4rem 0 0;
  padding-left: 1.1rem;
}

.errorlist {
  color: #9c2f2f;
  font-size: 0.82rem;
}

.fine-print {
  margin: 1rem 0 0;
}

.login-help-link {
  display: inline-block;
  margin-top: 1rem;
  color: var(--blue);
  font-size: 0.88rem;
  font-weight: 750;
  text-decoration: none;
}

.login-help-link:hover {
  text-decoration: underline;
}

.development-box {
  margin-top: 1.2rem;
  padding: 1rem;
  border: 1px solid #d7b566;
  border-radius: 10px;
  background: var(--amber-light);
}

.development-box p {
  margin: 0.35rem 0 0.8rem;
  color: #684609;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

@media (max-width: 1100px) {
  .dashboard-metric-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .dashboard-content-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 820px) {
  .billing-run-table,
  .billing-run-table tbody,
  .billing-run-table tr,
  .billing-run-table td {
    display: block;
    width: 100%;
  }

  .billing-run-table thead {
    display: none;
  }

  .billing-run-table tr {
    padding: 0.85rem 1rem;
    border-bottom: 1px solid var(--line);
  }

  .billing-run-table td {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.32rem 0;
    border-bottom: 0;
    text-align: right;
    white-space: normal;
  }

  .billing-run-table td::before {
    content: attr(data-label);
    color: var(--muted);
    font-weight: 700;
    text-align: left;
  }

  .report-quantity-table,
  .report-quantity-table tbody,
  .report-quantity-table tr,
  .report-quantity-table td {
    display: block;
    width: 100%;
  }

  .report-quantity-table thead {
    display: none;
  }

  .report-quantity-table tr {
    padding: 0.8rem 1rem;
    border-bottom: 1px solid var(--line);
  }

  .report-quantity-table td {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.28rem 0;
    border-bottom: 0;
  }

  .report-quantity-table td:not(:first-child) {
    text-align: right;
    white-space: normal;
  }

  .report-quantity-table td:not(:first-child)::before {
    content: attr(data-label);
    color: var(--muted);
    font-weight: 700;
    text-align: left;
  }

  .report-quantity-table .quantity-breakdown {
    width: min(68%, 300px);
  }

  .report-quantity-table .quantity-single-label {
    display: none;
  }

  .report-quantity-table .report-customer-cell {
    display: block;
    margin-bottom: 0.45rem;
    text-align: left;
  }

  .report-filter {
    align-items: stretch;
    flex-direction: column;
  }

  .report-filter .primary-button {
    width: 100%;
  }

  .report-filter .report-download-button {
    width: 100%;
  }

  .site-header {
    padding: 0.8rem 1rem;
    flex-wrap: wrap;
    gap: 0.8rem 1rem;
  }

  .main-nav {
    order: 3;
    width: 100%;
    overflow-x: auto;
  }

  .role-badge {
    display: none;
  }

  .page-shell {
    padding-top: 2rem;
  }

  .page-heading {
    align-items: flex-start;
    flex-direction: column;
    gap: 1rem;
  }

  .page-actions {
    width: 100%;
    justify-content: flex-start;
  }

  .sam-upload-action {
    align-items: flex-start;
    flex-direction: column;
  }

  .metric-grid,
  .dashboard-metric-grid,
  .dashboard-content-grid,
  .resource-chart-grid,
  .content-grid,
  .login-layout {
    grid-template-columns: 1fr;
  }

  .dashboard-change-main,
  .dashboard-panel-heading {
    flex-direction: column;
  }

  .run-list > div {
    grid-template-columns: 1fr 1fr;
  }

  .login-layout {
    align-content: start;
  }
}

@media (max-width: 520px) {
  .resource-chart-card {
    padding: 1.1rem 1rem;
  }

  .resource-chart-heading {
    align-items: flex-start;
    flex-direction: column;
  }

  .resource-chart-current {
    text-align: left;
  }

  .resource-chart-scale span:nth-child(2) {
    display: none;
  }

  .resource-chart-scale {
    grid-template-columns: 1fr 1fr;
  }

  .included-resources dl {
    grid-template-columns: 1fr;
  }

  .actual-resources dl {
    grid-template-columns: 1fr;
  }

  .resource-history-table,
  .resource-history-table tbody,
  .resource-history-table tr,
  .resource-history-table td {
    display: block;
    width: 100%;
  }

  .resource-history-table thead {
    display: none;
  }

  .resource-history-table tr {
    padding: 0.8rem 1rem;
    border-bottom: 1px solid var(--line);
  }

  .resource-history-table td {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.35rem 0;
    border-bottom: 0;
    white-space: normal;
  }

  .resource-history-table td:not(:first-child)::before {
    content: attr(data-label);
    color: var(--muted);
    font-weight: 700;
    text-align: left;
  }

  .resource-history-table td > strong,
  .resource-history-table td > small {
    text-align: right;
  }

  .resource-history-table .history-date-cell {
    display: block;
    margin-bottom: 0.4rem;
    text-align: left;
  }

  .resource-history-table .history-date-cell small {
    text-align: left;
  }

  .brand small {
    display: none;
  }

  .page-shell {
    width: min(100% - 1.2rem, 1180px);
  }

  .page-heading h1,
  .login-intro h1 {
    font-size: 2.25rem;
  }

  .panel,
  .login-card {
    padding: 1.25rem;
  }
}
