:root {
  --teal: #08aca9;
  --navy: #123653;
  --orange: #ff7421;
  --green: #5dbc63;
  --blue: #079ed2;
  --darkblue: #0d478d;
  --line: #bfc4c8;
  --bg: #f5f5f5;
  --edge: clamp(8px, 1vw, 16px);
  --side: 110px;
  --gap: 0px;
  --header-h: 91px;
}
* {
  box-sizing: border-box;
}
html,
body {
  margin: 0;
  min-height: 100%;
  background: #fff;
  font:
    13px 'Segoe UI',
    Arial,
    sans-serif;
  color: var(--navy);
}
.sidebar {
  position: fixed;
  left: var(--edge);
  top: 8px;
  bottom: 18px;
  width: var(--side);
  background: var(--teal);
  z-index: 3;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.seal-wrap {
  height: 87px;
  display: grid;
  place-items: center;
}
.seal-wrap img {
  width: 72px;
  height: 72px;
  object-fit: contain;
}
.sidebar nav {
  display: grid;
  gap: 9px;
  width: 100%;
  padding: 0 10px;
}
.nav {
  height: 34px;
  border: 0;
  border-radius: 4px;
  background: var(--orange);
  color: #fff;
  text-align: left;
  padding: 0 9px;
  font-size: 10px;
  cursor: pointer;
  white-space: nowrap;
}
.nav span {
  display: inline-block;
  width: 18px;
}
.nav b {
  font-weight: 500;
}
.nav b br {
  display: none;
}
.nav.active {
  background: #fff;
  color: #0e5187;
  font-weight: 700;
}
.side-note {
  margin-top: auto;
  color: #fff;
  font-size: 9px;
  text-align: center;
  padding: 10px;
}
.side-note small {
  display: block;
}
.pulse {
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #fff;
  margin-right: 3px;
}
.report-header {
  position: fixed;
  left: calc(var(--edge) + var(--side));
  right: var(--edge);
  top: 8px;
  height: var(--header-h);
  background: var(--teal);
  z-index: 2;
  color: #fff;
  display: grid;
  grid-template-columns: minmax(300px, 1fr) auto;
  align-items: start;
  padding: 12px 16px 0 4px;
}
.report-name h1 {
  font-size: 27px;
  line-height: 1;
  margin: 0 0 8px;
  font-weight: 700;
}
.report-name p {
  font-size: 16px;
  margin: 0;
}
.filters {
  display: flex;
  gap: 10px;
  align-items: end;
  justify-content: flex-end;
}
.filters label {
  display: grid;
  gap: 6px;
  color: #fff;
  font-size: 10px;
  font-weight: 600;
}
.filters select,
.filters input {
  height: 35px;
  background: #fff;
  border: 0;
  border-radius: 7px;
  color: #555;
  padding: 0 9px;
  min-width: 180px;
}
.date-pair {
  display: flex;
  gap: 0;
}
.date-pair input {
  min-width: 0;
  width: 108px;
  font-size: 10px;
}
.filters button {
  height: 34px;
  background: #fff;
  border: 0;
  border-radius: 7px;
  color: #333;
  min-width: 72px;
  font-weight: 700;
  cursor: pointer;
}
.filters button span {
  display: inline;
  margin-left: 5px;
  font-size: 10px;
}
main {
  position: absolute;
  left: calc(var(--edge) + var(--side));
  right: var(--edge);
  top: calc(8px + var(--header-h));
  width: auto;
  min-height: calc(100vh - var(--header-h) - 26px);
  background: var(--bg);
  padding: 14px;
  box-shadow: 0 2px 10px #2346;
}
.notice {
  padding: 8px;
  background: #fff2d7;
  border: 1px solid #e2bd67;
  margin-bottom: 10px;
}
.loading-page {
  display: grid;
  place-items: center;
  height: 400px;
  color: #607687;
}
.kpis {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 13px;
  margin-bottom: 14px;
}
.card {
  height: 76px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 7px;
  display: grid;
  grid-template-columns: 62px minmax(0, 1fr);
  grid-template-rows: 43px 25px;
  align-items: center;
  min-width: 0;
}
.card-icon {
  grid-row: 1/3;
  width: 41px;
  height: 41px;
  margin-left: 18px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: #e5f1fc;
  color: #4d9bdd;
  font-size: 22px;
}
.card:nth-child(2) .card-icon {
  background: #fff1de;
  color: #e8a64e;
}
.card:nth-child(3) .card-icon {
  background: #e2f7ea;
  color: #31b764;
}
.card:nth-child(4) .card-icon {
  background: #f3e7ff;
  color: #a46eea;
}
.card strong {
  font-size: clamp(18px, 2vw, 24px);
  color: #3976cb;
  align-self: end;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.card:nth-child(2) strong {
  color: #e7a43c;
}
.card:nth-child(3) strong {
  color: #2eb366;
}
.card:nth-child(4) strong {
  color: #a06edc;
}
.card p {
  margin: 0;
  font-size: 10px;
  font-weight: 700;
  align-self: start;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.visual-grid {
  display: grid;
  grid-template-columns: minmax(0, 3fr) minmax(250px, 1fr);
  gap: 12px;
  align-items: stretch;
}
.plan-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  align-items: stretch;
}
.inspection-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  align-items: stretch;
}
.visual {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 9px;
  min-height: 300px;
  position: relative;
  overflow: hidden;
  min-width: 0;
}
.visual h2 {
  font-size: 14px;
  margin: 0 0 12px;
}
.visual.wide {
  grid-column: 1/-1;
}
.chart {
  height: 365px;
}
.chart.medium {
  height: 260px;
}
.chart.short {
  height: 230px;
}
.chart svg {
  width: 100%;
  height: 100%;
  overflow: visible;
}
.axis {
  stroke: #dfe3e5;
  stroke-width: 1;
  stroke-dasharray: 2 3;
}
.chart-label {
  font-size: 9px;
  fill: #2b2b2b;
}
.legend {
  display: flex;
  gap: 8px;
  align-items: center;
  font-size: 9px;
  margin: 0 0 7px;
}
.legend i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  display: inline-block;
  margin-right: 2px;
}
.metric-heading {
  display: flex;
  align-items: center;
  gap: 12px;
  color: #173c81;
  font-size: 20px;
  font-weight: 700;
  padding: 7px 8px 15px;
}
.metric-heading span {
  font-size: 35px;
  color: #5b77d3;
}
.metric-list {
  display: grid;
  gap: 12px;
}
.metric-card {
  height: 56px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fff;
  display: grid;
  grid-template-columns: 47px minmax(0, 1fr);
  grid-template-rows: 30px 18px;
  align-items: center;
  padding: 4px 7px;
  min-width: 0;
}
.metric-card .mini-icon {
  grid-row: 1/3;
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: #e7f3d5;
  color: #8db63f;
  display: grid;
  place-items: center;
  font-size: 18px;
}
.metric-card strong {
  font-size: clamp(15px, 1.6vw, 20px);
  color: #7fa231;
  align-self: end;
  white-space: nowrap;
}
.metric-card p {
  font-size: 9px;
  font-weight: 700;
  margin: 0;
  align-self: start;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.metric-card:nth-child(2) strong {
  color: #3182c5;
}
.metric-card:nth-child(3) strong {
  color: #2aa95e;
}
.metric-card:nth-child(4) strong {
  color: #e55555;
}
.metric-card:nth-child(5) strong {
  color: #9364c8;
}
.metric-card:nth-child(6) strong {
  color: #c77a34;
}
.donut-wrap {
  height: 250px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(18px, 4vw, 50px);
}
.donut {
  width: min(190px, 45%);
  aspect-ratio: 1;
  height: auto;
  border-radius: 50%;
  position: relative;
}
.donut:after {
  content: '';
  position: absolute;
  inset: 21%;
  background: #fff;
  border-radius: 50%;
}
.donut-legend {
  display: grid;
  gap: 7px;
  font-size: 10px;
}
.donut-legend i {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  display: inline-block;
  margin-right: 5px;
}
.preview-badge {
  position: fixed;
  right: 10px;
  bottom: 8px;
  background: #173653;
  color: #fff;
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 9px;
  z-index: 5;
}
@media (max-width: 1000px) {
  :root {
    --side: 100px;
  }
  .sidebar nav {
    padding: 0 7px;
  }
  .report-header {
    grid-template-columns: minmax(240px, 1fr) auto;
  }
  .filters {
    gap: 6px;
  }
  .filters select {
    min-width: 115px;
  }
  .date-pair input {
    width: 92px;
  }
  .card {
    grid-template-columns: 50px 1fr;
  }
  .card-icon {
    margin-left: 10px;
  }
  .visual-grid {
    grid-template-columns: minmax(0, 2.3fr) minmax(230px, 1fr);
  }
}
@media (max-width: 800px) {
  .sidebar {
    position: static;
    width: 100%;
    height: 75px;
    flex-direction: row;
  }
  .seal-wrap {
    height: 75px;
  }
  .sidebar nav {
    display: flex;
  }
  .report-header {
    position: static;
    min-width: 0;
    height: auto;
    padding: 12px;
    display: block;
  }
  .filters {
    margin-top: 12px;
    flex-wrap: wrap;
    justify-content: flex-start;
  }
  main {
    position: static;
    width: auto;
    min-height: 0;
  }
  .kpis {
    grid-template-columns: 1fr 1fr;
  }
  .visual-grid,
  .plan-grid,
  .inspection-grid {
    grid-template-columns: 1fr;
  }
  .visual.wide {
    grid-column: auto;
  }
}
