@import "./report-detail.css";

.report-history-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 13px;
}

.report-history-summary article,
.report-record-hero,
.report-record-metrics {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: var(--shadow);
}

.report-history-summary article {
  min-width: 0;
  padding: 15px 17px;
}

.report-history-summary small,
.report-history-summary strong,
.report-history-summary span {
  display: block;
}

.report-history-summary small {
  color: #718197;
  font-size: 8px;
}

.report-history-summary strong {
  margin-top: 9px;
  color: #203750;
  font-size: 20px;
  line-height: 1;
}

.report-history-summary strong em {
  color: #708096;
  font-size: 8px;
  font-style: normal;
  font-weight: 500;
}

.report-history-summary span {
  margin-top: 8px;
  overflow: hidden;
  color: #8a97a8;
  font-size: 7px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.report-history-panel {
  overflow: hidden;
}

.report-history-panel > .panel-body {
  padding: 14px 16px 0;
}

.report-history-filters {
  box-shadow: none;
}

.report-history-table-wrap {
  overflow-x: auto;
}

.report-history-pagination .page-number {
  text-decoration: none;
}

.report-history-pagination .page-number.disabled {
  color: #b6c0cd;
  background: #f6f8fb;
}

.report-history-table {
  min-width: 1020px;
}

.report-history-table th:nth-child(1) { width: 27%; }
.report-history-table th:nth-child(2) { width: 11%; }
.report-history-table th:nth-child(3) { width: 12%; }
.report-history-table th:nth-child(4) { width: 7%; }
.report-history-table th:nth-child(5) { width: 8%; }
.report-history-table th:nth-child(6) { width: 13%; }
.report-history-table th:nth-child(7) { width: 8%; }
.report-history-table th:nth-child(8) { width: 14%; }

.report-file-cell {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 10px;
}

.report-file-cell > i,
.report-record-file > i,
.report-file-preview > i {
  display: grid;
  flex: 0 0 auto;
  place-items: center;
  color: #fff;
  font-style: normal;
  font-weight: 800;
  background: linear-gradient(145deg, #ef5261, #d93449);
  border-radius: 8px;
}

.report-file-cell > i {
  width: 32px;
  height: 37px;
  font-size: 7px;
}

.report-file-cell > span {
  min-width: 0;
}

.report-file-cell b,
.report-file-cell small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.report-file-cell b {
  color: #2b415b;
  font-size: 9px;
}

.report-file-cell small {
  margin-top: 5px;
  color: #8b98a9;
  font-size: 7px;
}

.report-history-empty {
  display: grid;
  min-height: 280px;
  place-content: center;
  justify-items: center;
  color: #8a98aa;
}

.report-history-empty i {
  font-size: 30px;
  font-style: normal;
}

.report-history-empty b {
  margin-top: 10px;
  color: #3d536e;
  font-size: 11px;
}

.report-history-empty span {
  margin-top: 7px;
  font-size: 8px;
}

.report-record-hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 19px 21px;
  margin-bottom: 13px;
}

.report-record-file {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 15px;
}

.report-record-file > i {
  width: 50px;
  height: 58px;
  font-size: 10px;
}

.report-record-file > span {
  min-width: 0;
}

.report-record-file small,
.report-record-file h2,
.report-record-file p {
  display: block;
  margin: 0;
}

.report-record-file small {
  color: var(--primary);
  font-size: 8px;
  font-weight: 700;
}

.report-record-file h2 {
  margin-top: 5px;
  color: #203750;
  font-size: 17px;
}

.report-record-file p {
  margin-top: 7px;
  color: #8290a2;
  font-size: 8px;
}

.report-record-hero > aside {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
  color: #7e8c9f;
  font-size: 8px;
}

.report-record-metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-bottom: 13px;
  overflow: hidden;
}

.report-record-metrics article {
  padding: 16px 18px;
  border-right: 1px solid #e8edf3;
}

.report-record-metrics article:last-child {
  border-right: 0;
}

.report-record-metrics small,
.report-record-metrics strong {
  display: block;
}

.report-record-metrics small {
  color: #8190a3;
  font-size: 8px;
}

.report-record-metrics strong {
  margin-top: 8px;
  color: #273e58;
  font-size: 15px;
}

.report-record-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(300px, .8fr);
  gap: 13px;
}

.report-file-preview {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  min-height: 76px;
  padding: 13px;
  background: #f8fafd;
  border: 1px solid #e5eaf1;
  border-radius: 9px;
}

.report-file-preview > i {
  width: 42px;
  height: 49px;
  font-size: 8px;
}

.report-file-preview b,
.report-file-preview small {
  display: block;
}

.report-file-preview b {
  color: #2c425c;
  font-size: 9px;
}

.report-file-preview small {
  margin-top: 6px;
  color: #8391a3;
  font-size: 7px;
}

.report-file-preview > div {
  display: flex;
  gap: 10px;
}

.report-file-preview a {
  color: var(--primary);
  font-size: 8px;
  font-weight: 650;
}

.report-archive-meta {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0;
  margin: 0;
}

.report-archive-meta > div {
  padding: 11px 10px;
  border-bottom: 1px solid #edf1f5;
}

.report-archive-meta > div:nth-last-child(-n + 2) {
  border-bottom: 0;
}

.report-archive-meta dt,
.report-archive-meta dd {
  margin: 0;
}

.report-archive-meta dt {
  color: #8a97a8;
  font-size: 7px;
}

.report-archive-meta dd {
  margin-top: 6px;
  color: #30465f;
  font-size: 9px;
  font-weight: 650;
}

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

  .report-record-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  .report-history-summary,
  .report-record-metrics {
    grid-template-columns: 1fr 1fr;
  }

  .report-history-filters {
    flex-wrap: wrap;
  }

  .report-history-filters .filter-input,
  .report-history-filters .filter-select {
    width: 100%;
  }

  .report-history-filters .filter-spacer {
    display: none;
  }

  .report-record-hero {
    align-items: flex-start;
  }

  .report-record-file h2 {
    font-size: 14px;
  }
}

/* #reports list page: scoped to avoid changing the report detail view. */
.report-history-page { color: #10213d; }
.report-history-page .page-toolbar { min-height: 40px; margin-bottom: 16px; }
.report-history-page .btn { min-height: 40px; height: 40px; padding-inline: 16px; font-size: 14px; border-radius: 6px; }
.report-history-page .report-history-summary { gap: 16px; margin-bottom: 16px; }
.report-history-page .report-history-summary article {
  min-height: 116px;
  padding: 18px 20px;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  box-shadow: none;
}
.report-history-page .report-history-summary small { color: #526278; font-size: 14px; line-height: 22px; }
.report-history-page .report-history-summary strong {
  margin-top: 8px;
  color: #1677ff;
  font-size: 30px;
  font-weight: 650;
  line-height: 40px;
  font-variant-numeric: tabular-nums;
}
.report-history-page .report-history-summary strong em { color: #526278; font-size: 13px; line-height: 20px; }
.report-history-page .report-history-summary span { margin-top: 4px; color: #7a889c; font-size: 12px; line-height: 18px; }
.report-history-page .report-history-panel { overflow: hidden; border-color: #e2e8f0; border-radius: 8px; box-shadow: none; }
.report-history-page .report-history-panel > .panel-head { min-height: 52px; padding: 0 20px; border-bottom-color: #e2e8f0; }
.report-history-page .report-history-panel > .panel-head h3 { color: #10213d; font-size: 16px; line-height: 24px; }
.report-history-page .report-history-panel > .panel-head > span { color: #526278; font-size: 12px; line-height: 18px; }
.report-history-page .report-history-panel > .panel-body { padding: 0; }
.report-history-page .report-history-filters {
  gap: 12px;
  padding: 16px;
  margin: 0;
  background: #fff;
  border: 0;
  border-bottom: 1px solid #e2e8f0;
  border-radius: 0;
  box-shadow: none;
}
.report-history-page .report-history-filters :is(.filter-input, .filter-select) {
  height: 40px;
  padding-inline: 12px;
  color: #10213d;
  font-size: 14px;
  background: #fff;
  border-color: #cbd5e1;
  border-radius: 6px;
}
.report-history-page .report-history-filters .filter-input { width: 280px; }
.report-history-page .report-history-filters .filter-select { min-width: 156px; }
.report-history-page .report-history-filters :is(.filter-input, .filter-select):focus {
  border-color: #1677ff;
  box-shadow: 0 0 0 2px #e6f4ff;
}
.report-history-page .report-history-table-wrap { overflow-x: auto; }
.report-history-page .report-history-table { min-width: 1040px; table-layout: fixed; }
.report-history-page .report-history-table :is(th, td) { height: 52px; padding: 12px 16px; font-size: 14px; border-bottom-color: #e2e8f0; }
.report-history-page .report-history-table th { height: 44px; color: #526278; font-size: 13px; font-weight: 600; background: #f8fafc; }
.report-history-page .report-history-table td { color: #34465f; }
.report-history-page .report-history-table tr:hover td { background: #f7fbff; }
.report-history-page .report-file-cell { gap: 12px; }
.report-history-page .report-file-cell > i {
  width: 34px;
  height: 40px;
  color: #d94453;
  font-size: 12px;
  background: #fff0f2;
  border: 1px solid #ffd4d8;
  border-radius: 6px;
}
.report-history-page .report-file-cell b { color: #10213d; font-size: 14px; font-weight: 600; line-height: 22px; }
.report-history-page .report-file-cell small { margin-top: 2px; color: #7a889c; font-size: 12px; line-height: 18px; }
.report-history-page .report-history-table .badge { min-height: 24px; height: 24px; padding-inline: 8px; font-size: 12px; border-radius: 12px; }
.report-history-page .report-history-table .table-actions { gap: 12px; }
.report-history-page .report-history-table .table-actions a { color: #1677ff; font-size: 13px; font-weight: 500; }
.report-history-page .report-history-pagination { gap: 8px; min-height: 60px; padding: 14px 16px; color: #526278; font-size: 13px; border-top-color: #e2e8f0; }
.report-history-page .report-history-pagination .page-number { width: 32px; height: 32px; border-color: #e2e8f0; border-radius: 6px; }
.report-history-page .report-history-empty { min-height: 300px; color: #7a889c; }
.report-history-page .report-history-empty i { color: #1677ff; font-size: 32px; }
.report-history-page .report-history-empty b { margin-top: 12px; color: #10213d; font-size: 16px; line-height: 24px; }
.report-history-page .report-history-empty span { margin-top: 4px; font-size: 12px; line-height: 18px; }

@media (max-width: 1120px) {
  .report-history-page .report-history-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .report-history-page .report-history-filters { flex-wrap: wrap; }
  .report-history-page .report-history-filters .filter-spacer { display: none; }
  .report-history-page .report-history-filters .filter-input { flex: 1 1 100%; width: 100%; }
  .report-history-page .report-history-filters .filter-select { flex: 1 1 200px; }
}

@media (max-width: 760px) {
  .report-history-page .report-history-summary { grid-template-columns: 1fr; }
  .report-history-page .report-history-filters :is(.filter-input, .filter-select, .btn) { width: 100%; }
  .report-history-page .report-history-pagination { flex-wrap: wrap; justify-content: flex-start; }
  .report-history-page .report-history-table :is(th:first-child, td:first-child) { position: sticky; left: 0; z-index: 1; background: #fff; }
  .report-history-page .report-history-table th:first-child { z-index: 2; background: #f8fafc; }
  .report-history-page .report-history-table :is(th:last-child, td:last-child) { position: sticky; right: 0; z-index: 1; background: #fff; }
  .report-history-page .report-history-table th:last-child { z-index: 2; background: #f8fafc; }
}
