:root {
  --color-page: #fbfbfb;
  --color-surface: #fdfdfd;
  --color-surface-muted: #f4f3f2;
  --color-evergreen: #04281b;
  --color-green: #1c3d2b;
  --color-green-mid: #557f68;
  --color-green-pale: #dce9df;
  --color-gold: #d99a08;
  --color-muted: #70766f;
  --color-border: #dedfda;
  --color-stone: #b0b0a3;
  --font-heading: "DM Serif Display", Georgia, serif;
  --font-body: "Lato", Arial, sans-serif;
  --shadow-card: 0 2px 8px rgba(4, 40, 27, 0.045);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  margin: 0;
  overflow-x: hidden;
  color: #17221c;
  background: var(--color-page);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.5;
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}

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

button,
input {
  font: inherit;
}

button {
  color: inherit;
}

svg {
  display: block;
}

:focus-visible {
  outline: 3px solid #e3ad2b;
  outline-offset: 3px;
}

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

.app-shell {
  width: 100%;
  min-height: 100vh;
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
}

.sidebar {
  position: relative;
  z-index: 3;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  color: #fff;
  background: radial-gradient(circle at 42% 36%, #075139 0, #043526 40%, var(--color-evergreen) 80%);
}

.brand {
  width: 220px;
  margin: 22px auto 20px;
}

.brand img {
  width: 100%;
}

.side-nav {
  display: grid;
  gap: 5px;
  padding: 10px 16px;
}

.side-nav__link {
  display: flex;
  align-items: center;
  gap: 15px;
  min-height: 44px;
  padding: 9px 13px;
  border-radius: 8px;
  font-size: 16px;
  font-weight: 600;
  transition: background-color 160ms ease, transform 160ms ease;
}

.side-nav__link:hover {
  background: rgba(255, 255, 255, 0.09);
  transform: translateX(2px);
}

.side-nav__link--active {
  background: linear-gradient(90deg, rgba(130, 152, 45, 0.34), rgba(80, 140, 68, 0.38));
}

.side-nav__link img {
  width: 23px;
  height: 23px;
  flex: 0 0 23px;
  object-fit: contain;
}

.insight-card {
  position: relative;
  z-index: 2;
  margin: 24px 20px 280px;
  padding: 18px 16px 16px;
  border: 1px solid rgba(218, 157, 17, 0.8);
  border-radius: 10px;
  background: rgba(4, 40, 27, 0.58);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12);
}

.insight-card h2 {
  margin: 0 0 8px;
  font-family: var(--font-body);
  font-size: 16px;
  font-weight: 700;
}

.insight-card p {
  margin: 0 0 14px;
  font-size: 14px;
  line-height: 1.45;
}

.insight-card a {
  display: inline-flex;
  padding: 8px 12px;
  border-radius: 6px;
  background: rgba(57, 119, 73, 0.8);
  font-size: 14px;
  font-weight: 700;
}

.sidebar-house {
  position: absolute;
  inset: auto 0 0;
  z-index: 1;
  width: 100%;
  height: 275px;
  object-fit: cover;
  object-position: 50% center;
  -webkit-mask-image: linear-gradient(to bottom, transparent 0, #000 20%);
  mask-image: linear-gradient(to bottom, transparent 0, #000 20%);
}

.page-column {
  min-width: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.topbar {
  position: relative;
  z-index: 4;
  min-height: 68px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 12px 28px;
  border-bottom: 1px solid var(--color-border);
  background: rgba(253, 253, 253, 0.96);
}

.search {
  width: min(365px, 38vw);
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 13px;
  border: 1px solid var(--color-border);
  border-radius: 7px;
  background: #fff;
}

.search svg {
  width: 19px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
}

.search input {
  width: 100%;
  min-height: 40px;
  border: 0;
  outline: 0;
  color: var(--color-evergreen);
  background: transparent;
  font-size: 14px;
}

.topbar__actions {
  display: flex;
  align-items: center;
  gap: 20px;
}

.date-button {
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 0 13px;
  border: 1px solid var(--color-border);
  border-radius: 7px;
  background: #fff;
  font-size: 14px;
  font-weight: 600;
}

.date-button svg {
  width: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
}

.notification {
  position: relative;
  padding: 7px;
  border: 0;
  background: transparent;
}

.notification svg {
  width: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
}

.notification span {
  position: absolute;
  top: -4px;
  right: -5px;
  width: 19px;
  height: 19px;
  display: grid;
  place-items: center;
  border: 2px solid #fff;
  border-radius: 50%;
  color: #fff;
  background: var(--color-gold);
  font-size: 11px;
  font-weight: 700;
}

.profile {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 0;
  border: 0;
  background: transparent;
  text-align: left;
}

.profile > svg {
  width: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
}

.avatar {
  width: 42px;
  height: 42px;
  overflow: hidden;
  flex: 0 0 42px;
  border-radius: 50%;
}

.profile__copy {
  display: grid;
  line-height: 1.3;
}

.profile__copy strong {
  font-size: 14px;
}

.profile__copy small {
  color: var(--color-muted);
  font-size: 12px;
}

main {
  flex: 1;
  min-width: 0;
}

.dashboard {
  position: relative;
  width: min(100%, 1280px);
  margin: 0 auto;
  padding: 22px 28px 18px;
}

.pine-decoration {
  position: absolute;
  z-index: 0;
  top: 0;
  right: 0;
  width: 180px;
  pointer-events: none;
}

.page-heading {
  position: relative;
  z-index: 1;
  margin-bottom: 18px;
}

.page-heading h1 {
  margin: 0 0 3px;
  color: #111713;
  font-family: var(--font-heading);
  font-size: clamp(34px, 3.2vw, 44px);
  font-weight: 400;
  line-height: 1.15;
}

.page-heading p {
  margin: 0;
  color: #4f5752;
  font-size: 16px;
}

.metrics {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}

.metric-card {
  min-width: 0;
  min-height: 134px;
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  align-content: start;
  gap: 6px 9px;
  padding: 14px 12px 10px;
  border: 1px solid var(--color-border);
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: var(--shadow-card);
}

.metric-card > img {
  width: 34px;
  height: 34px;
  object-fit: contain;
}

.metric-card > svg.metric-icon {
  width: 34px;
  height: 34px;
  padding: 8px;
  border-radius: 50%;
  background: var(--color-green-pale);
  color: var(--color-green);
}

.metric-card h2 {
  margin: 1px 0 3px;
  font-family: var(--font-body);
  font-size: 12.5px;
  font-weight: 700;
  line-height: 1.25;
  white-space: nowrap;
}

.metric-card strong {
  display: block;
  font-size: 22px;
  line-height: 1.15;
}

.metric-card p {
  margin: 4px 0 0;
  color: #5f655f;
  font-size: 10px;
  white-space: nowrap;
}

.metric-card p span {
  color: #398426;
  font-weight: 700;
}

.sparkline {
  width: 100%;
  height: 26px;
  grid-column: 1 / -1;
  align-self: end;
}

.sparkline polyline {
  fill: none;
  stroke: #075638;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.6;
}

.analytics-grid {
  display: grid;
  grid-template-columns: 1.45fr 1.1fr 1.16fr;
  gap: 12px;
  margin-bottom: 12px;
}

.panel {
  min-width: 0;
  padding: 14px;
  overflow: hidden;
  border: 1px solid var(--color-border);
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: var(--shadow-card);
}

.panel h2 {
  margin: 0 0 10px;
  color: #182019;
  font-family: var(--font-heading);
  font-size: 17px;
  font-weight: 400;
  line-height: 1.2;
}

.legend {
  display: flex;
  gap: 18px;
  margin-bottom: 5px;
  font-size: 10px;
}

.legend span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.legend i {
  width: 18px;
  border-top: 3px solid #075638;
  border-radius: 3px;
}

.legend__dashed {
  border-top: 2px dashed #a9cab5 !important;
}

.trend-chart {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 92px;
  align-items: start;
  gap: 8px;
}

.trend-chart__plot svg {
  width: 100%;
  height: 150px;
}

.chart-grid {
  fill: none;
  stroke: #e7e8e4;
  stroke-width: 1;
}

.axis-copy {
  fill: #6f746e;
  font: 10px var(--font-body);
}

.trend-last {
  fill: none;
  stroke: #acd1bc;
  stroke-dasharray: 5 4;
  stroke-width: 2;
}

.trend-current {
  fill: none;
  stroke: #075638;
  stroke-linecap: round;
  stroke-width: 2.4;
}

.chart-total {
  display: grid;
  padding-top: 2px;
}

.chart-total strong {
  font-family: var(--font-heading);
  font-size: 22px;
  font-weight: 400;
}

.chart-total span,
.chart-total small {
  font-size: 11px;
}

.chart-total b {
  margin-top: 20px;
  color: #398426;
  font-size: 15px;
}

.donut-layout {
  min-height: 164px;
  display: grid;
  grid-template-columns: 152px minmax(0, 1fr);
  align-items: center;
  gap: 12px;
}

.donut {
  position: relative;
  width: 150px;
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  border-radius: 50%;
}

.donut::after {
  position: absolute;
  width: 57%;
  aspect-ratio: 1;
  border-radius: 50%;
  background: #fff;
  content: "";
}

.donut--leads {
  background: conic-gradient(#004832 0 38%, #4f896b 38% 62%, #ffb20b 62% 80%, #9cbea9 80% 92%, #dedede 92% 100%);
}

.donut span {
  position: relative;
  z-index: 1;
  display: grid;
  text-align: center;
}

.donut strong {
  font-family: var(--font-heading);
  font-size: 22px;
  font-weight: 400;
  line-height: 1.1;
}

.donut small {
  font-size: 11px;
}

.key-list {
  display: grid;
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: 10px;
}

.key-list li {
  display: grid;
  grid-template-columns: 9px 1fr auto;
  align-items: center;
  gap: 7px;
}

.key-list i {
  width: 9px;
  height: 9px;
  border-radius: 2px;
}

.key-list b {
  font-weight: 500;
  white-space: nowrap;
}

.key--one {
  background: #004832;
}

.key--two {
  background: #6ba7e8;
}

.key--three {
  background: #ffb20b;
}

.key--four {
  background: #7ba58a;
}

.key--five {
  background: #dedede;
}

.funnel-layout {
  display: grid;
  grid-template-columns: 43% 57%;
  gap: 10px;
  align-items: center;
}

.funnel {
  min-height: 128px;
  display: grid;
  justify-items: center;
}

.funnel i {
  height: 32px;
  background: #004832;
  clip-path: polygon(6% 0, 94% 0, 82% 100%, 18% 100%);
}

.funnel i:nth-child(1) {
  width: 130px;
}

.funnel i:nth-child(2) {
  width: 104px;
  opacity: 0.78;
}

.funnel i:nth-child(3) {
  width: 80px;
  opacity: 0.55;
}

.funnel i:nth-child(4) {
  width: 56px;
  opacity: 0.32;
}

.funnel-data {
  margin: 0;
  font-size: 10px;
}

.funnel-data div {
  min-height: 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  border-bottom: 1px solid #ecece8;
}

.funnel-data dd {
  margin: 0;
  font-weight: 700;
  white-space: nowrap;
}

.conversion {
  display: flex;
  justify-content: space-between;
  align-items: end;
  margin-top: 8px;
  padding-left: 15px;
  color: #074d35;
  font-size: 12px;
}

.conversion strong {
  color: #182019;
  font-family: var(--font-heading);
  font-size: 22px;
  font-weight: 400;
}

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

.report-card {
  display: flex;
  flex-direction: column;
}

.panel-heading {
  position: relative;
  min-height: 22px;
  padding-right: 56px;
}

.panel-heading h2 {
  font-size: 12.5px;
  line-height: 1.25;
  letter-spacing: -0.1px;
}

.panel-heading span {
  position: absolute;
  top: 0;
  right: 0;
  padding: 3px 6px;
  border: 1px solid #e5e5e1;
  border-radius: 5px;
  font-size: 8.5px;
  white-space: nowrap;
}

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

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 10px;
  white-space: nowrap;
}

th,
td {
  padding: 7px 5px;
  border-bottom: 1px solid #e9e9e5;
  text-align: left;
}

th {
  color: #666d67;
  font-size: 9px;
  font-weight: 500;
}

th:last-child,
td:last-child {
  text-align: right;
}

.panel-link {
  display: inline-flex;
  margin-top: auto;
  padding-top: 12px;
  color: #075139;
  font-size: 10px;
  font-weight: 700;
}

.donut-layout--capacity {
  min-height: 148px;
  grid-template-columns: 145px minmax(0, 1fr);
}

.donut--capacity {
  width: 140px;
  background: conic-gradient(#005139 0 78%, #77a78c 78% 100%);
}

.donut--capacity strong {
  font-size: 15px;
}

.capacity-list {
  display: grid;
  gap: 18px;
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: 10px;
}

.capacity-list li {
  display: flex;
  align-items: start;
  gap: 8px;
}

.capacity-list i {
  width: 10px;
  height: 10px;
  margin-top: 3px;
  flex: 0 0 10px;
  border-radius: 2px;
  background: #005139;
}

.capacity-list li:nth-child(2) i {
  background: #ffb20b;
}

.capacity-list span {
  display: grid;
}

.capacity-list strong {
  font-size: 15px;
}

.capacity-list small {
  color: #6d746e;
  font-size: 9px;
}

.bottom-grid {
  display: grid;
  grid-template-columns: 1.3fr 1.02fr 1.02fr;
  gap: 12px;
}

.comparison-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr);
  gap: 12px;
}

.comparison-layout table {
  font-size: 9.5px;
}

.comparison-layout th,
.comparison-layout td {
  padding: 7px 3px;
}

.positive {
  color: #238122;
  font-weight: 700;
}

.rating {
  color: #ce8d00;
}

.bar-chart {
  display: grid;
  gap: 7px;
  align-content: start;
  padding-top: 4px;
}

.bar-legend {
  display: flex;
  justify-content: space-between;
  font-size: 8px;
}

.bar-legend span::before {
  width: 8px;
  height: 8px;
  display: inline-block;
  margin-right: 4px;
  border-radius: 2px;
  background: #075638;
  content: "";
}

.bar-legend span:last-child::before {
  background: #c9d9ce;
}

.bar-chart > i {
  position: relative;
  height: 14px;
  display: block;
  background: linear-gradient(to right, #edf0ed 1px, transparent 1px) 0 0 / 25% 100%;
}

.bar-chart > i::before,
.bar-chart > i::after {
  position: absolute;
  left: 0;
  height: 5px;
  content: "";
}

.bar-chart > i::before {
  top: 1px;
  width: var(--current);
  background: #075638;
}

.bar-chart > i::after {
  bottom: 1px;
  width: var(--last);
  background: #c9d9ce;
}

.bar-axis {
  display: flex;
  justify-content: space-between;
  color: #6f756f;
  font-size: 8px;
}

.footer {
  width: min(100%, 1280px);
  margin: auto auto 0;
  padding: 0 28px 28px;
  color: #737a74;
}

.footer p {
  margin: 0;
  font-size: 12px;
}

@media (max-width: 1250px) {
  .app-shell {
    grid-template-columns: 220px minmax(0, 1fr);
  }

  .brand {
    width: 185px;
  }

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

  .operations-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .analytics-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .panel--wide {
    grid-column: 1 / -1;
  }

  .bottom-grid {
    grid-template-columns: 1fr 1fr;
  }

  .bottom-grid > article:first-child {
    grid-column: 1 / -1;
  }

  .profile__copy {
    display: none;
  }
}

@media (max-width: 900px) {
  .app-shell {
    display: flex;
    flex-direction: column;
  }

  .sidebar {
    min-height: auto;
    overflow: visible;
  }

  .brand {
    width: 200px;
    margin: 16px 20px 10px;
  }

  .side-nav {
    display: flex;
    overflow-x: auto;
    padding: 10px 16px 16px;
  }

  .side-nav__link {
    min-width: max-content;
  }

  .insight-card {
    margin: 0 16px 18px;
  }

  .sidebar-house {
    position: relative;
    height: 220px;
    object-position: center 55%;
  }

  .topbar {
    flex-wrap: wrap;
    padding: 12px 20px;
  }

  .search {
    width: 100%;
    order: 2;
  }

  .topbar__actions {
    width: 100%;
    justify-content: space-between;
  }

  .profile__copy {
    display: grid;
  }

  .dashboard {
    padding-inline: 20px;
  }

  .pine-decoration {
    width: 135px;
  }
}

@media (max-width: 700px) {
  .page-heading {
    max-width: calc(100% - 80px);
  }

  .page-heading h1 {
    font-size: 34px;
  }

  .metrics,
  .analytics-grid,
  .operations-grid,
  .bottom-grid {
    grid-template-columns: 1fr;
  }

  .panel--wide,
  .bottom-grid > article:first-child {
    grid-column: auto;
  }

  .metric-card {
    min-height: 128px;
  }

  .trend-chart,
  .comparison-layout {
    grid-template-columns: 1fr;
  }

  .chart-total {
    grid-template-columns: repeat(2, 1fr);
    align-items: end;
  }

  .chart-total b {
    margin-top: 0;
  }

  .donut-layout {
    grid-template-columns: 145px minmax(0, 1fr);
  }

  .date-button span {
    font-size: 13px;
  }

  .footer {
    padding-inline: 20px;
  }
}

@media (max-width: 480px) {
  .topbar__actions {
    gap: 8px;
  }

  .date-button {
    padding-inline: 9px;
  }

  .date-button span {
    max-width: 150px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .profile__copy {
    display: none;
  }

  .dashboard {
    padding: 18px 14px;
  }

  .pine-decoration {
    width: 105px;
  }

  .page-heading {
    max-width: calc(100% - 55px);
  }

  .page-heading p {
    font-size: 15px;
  }

  .donut-layout,
  .donut-layout--capacity,
  .funnel-layout {
    grid-template-columns: 1fr;
    justify-items: center;
  }

  .key-list,
  .capacity-list,
  .funnel-data {
    width: 100%;
  }

  .conversion {
    padding-left: 0;
  }

  .footer {
    padding: 0 14px 22px;
  }
}
