:root {
  --black: #000;
  --white: #f4f4f1;
  --muted: #777;
  --muted-light: #a1a1a1;
  --line: rgba(255, 255, 255, 0.11);
  --line-soft: rgba(255, 255, 255, 0.06);
}

* {
  box-sizing: border-box;
}

html {
  background: var(--black);
}

body {
  margin: 0;
  min-height: 100vh;

  background: var(--black);
  color: var(--white);

  font-family:
    "Helvetica Neue",
    Helvetica,
    Arial,
    sans-serif;

  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

button,
a {
  font: inherit;
}

button {
  border: 0;
}

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


/* ================================================
   APP
================================================ */

.app {
  min-height: 100vh;
}


/* ================================================
   SIDEBAR
================================================ */

.sidebar {
  position: fixed;
  z-index: 50;

  top: 0;
  left: 0;
  bottom: 0;

  width: 230px;

  display: flex;
  flex-direction: column;
  justify-content: space-between;

  padding: 30px 22px;

  border-right: 1px solid var(--line-soft);

  background: var(--black);
}

.brand {
  padding-bottom: 30px;

  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.22em;
}

.section-label {
  margin-bottom: 18px;

  color: #555;

  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.18em;
}

.navigation {
  display: flex;
  flex-direction: column;
}

.nav-link {
  position: relative;

  padding: 9px 0;

  color: #777;

  font-size: 13px;

  transition: color 160ms ease;
}

.nav-link:hover {
  color: var(--white);
}

.nav-link.active {
  color: var(--white);
}

.nav-link.active::before {
  content: "";

  position: absolute;

  left: -22px;
  top: 50%;

  width: 2px;
  height: 14px;

  transform: translateY(-50%);

  background: var(--white);
}

.logout-button {
  padding: 0;

  background: transparent;

  color: #666;

  cursor: pointer;

  font-size: 12px;

  transition: color 160ms ease;
}

.logout-button:hover {
  color: var(--white);
}


/* ================================================
   MOBILE HEADER
================================================ */

.mobile-header {
  display: none;
}


/* ================================================
   MAIN
================================================ */

.main {
  min-height: 100vh;

  margin-left: 230px;

  padding: 52px 58px 34px;
}

.page-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;

  padding-bottom: 38px;

  border-bottom: 1px solid var(--line);
}

.page-kicker,
.section-kicker {
  margin: 0 0 12px;

  color: #666;

  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.19em;
}

.page-header h1 {
  margin: 0;

  font-family:
    Georgia,
    "Times New Roman",
    serif;

  font-size: clamp(44px, 5vw, 68px);
  font-weight: 400;
  letter-spacing: -0.055em;
  line-height: 0.9;
}

.header-date {
  color: #666;

  font-size: 11px;
}


/* ================================================
   METRICS
================================================ */

.metrics {
  display: grid;

  grid-template-columns: repeat(3, 1fr);

  border-bottom: 1px solid var(--line);
}

.metric {
  min-height: 132px;

  padding: 27px 28px 25px 0;

  border-right: 1px solid var(--line-soft);
}

.metric:nth-child(3n) {
  border-right: 0;
}

.metric:nth-child(n + 4) {
  border-top: 1px solid var(--line-soft);
}

.metric:not(:nth-child(3n + 1)) {
  padding-left: 28px;
}

.metric-label {
  display: block;

  margin-bottom: 15px;

  color: #6e6e6e;

  font-size: 10px;
  letter-spacing: 0.04em;
}

.metric strong {
  display: block;

  font-family:
    Georgia,
    "Times New Roman",
    serif;

  color: var(--white);

  font-size: clamp(27px, 3vw, 39px);
  font-weight: 400;
  letter-spacing: -0.04em;
}


/* ================================================
   ACTIVITY
================================================ */

.activity-section {
  padding: 48px 0 52px;

  border-bottom: 1px solid var(--line);
}

.section-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;

  margin-bottom: 30px;
}

.section-heading h2,
.block-heading h2 {
  margin: 0;

  font-family:
    Georgia,
    "Times New Roman",
    serif;

  font-size: 25px;
  font-weight: 400;
  letter-spacing: -0.035em;
}

.section-heading > span {
  color: #555;

  font-size: 10px;
}

.graph-wrap {
  display: flex;

  width: 100%;
}

.graph-y-axis {
  width: 42px;

  display: flex;
  flex-direction: column;
  justify-content: space-between;

  padding: 2px 10px 25px 0;

  color: #4f4f4f;

  font-size: 9px;
  text-align: right;
}

.graph-area {
  position: relative;

  flex: 1;

  min-width: 0;
}

#activityGraph {
  display: block;

  width: 100%;
  height: 260px;

  overflow: visible;
}

.graph-line {
  stroke: rgba(255, 255, 255, 0.07);
  stroke-width: 1;
}

.activity-line {
  fill: none;

  stroke: var(--white);
  stroke-width: 2;

  vector-effect: non-scaling-stroke;
}

.activity-point {
  fill: var(--black);
  stroke: var(--white);
  stroke-width: 1.5;

  vector-effect: non-scaling-stroke;
}

.graph-labels {
  display: flex;
  justify-content: space-between;

  padding-top: 10px;

  color: #4f4f4f;

  font-size: 9px;
}


/* ================================================
   LOWER GRID
================================================ */

.overview-grid {
  display: grid;

  grid-template-columns: 1fr 1fr;

  gap: 0;

  border-bottom: 1px solid var(--line);
}

.overview-block {
  min-width: 0;

  padding: 42px 0 48px;
}

.overview-block:first-child {
  padding-right: 38px;

  border-right: 1px solid var(--line);
}

.overview-block:last-child {
  padding-left: 38px;
}

.block-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;

  margin-bottom: 26px;
}

.block-heading a {
  color: #777;

  font-size: 10px;

  transition: color 160ms ease;
}

.block-heading a:hover {
  color: var(--white);
}


/* ================================================
   LIST
================================================ */

.list {
  border-top: 1px solid var(--line-soft);
}

.loading-row {
  padding: 17px 0;

  color: #555;

  font-size: 11px;
}

.data-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;

  min-height: 65px;

  border-bottom: 1px solid var(--line-soft);
}

.data-main {
  min-width: 0;
}

.data-title {
  overflow: hidden;

  color: #ddd;

  font-size: 12px;
  font-weight: 500;

  text-overflow: ellipsis;
  white-space: nowrap;
}

.data-meta {
  margin-top: 6px;

  color: #555;

  font-size: 10px;
}

.data-side {
  flex-shrink: 0;

  color: #777;

  font-size: 10px;
  text-align: right;
}


/* ================================================
   STATUS
================================================ */

.page-status {
  display: flex;
  align-items: center;
  gap: 8px;

  padding-top: 25px;

  color: #555;

  font-size: 10px;
}

.status-dot {
  width: 5px;
  height: 5px;

  border-radius: 50%;

  background: #777;
}


/* ================================================
   MOBILE OVERLAY
================================================ */

.mobile-overlay {
  display: none;
}


/* ================================================
   TABLET
================================================ */

@media (max-width: 900px) {

  .sidebar {
    width: 205px;
  }

  .main {
    margin-left: 205px;

    padding: 42px 35px 30px;
  }

  .metric {
    min-height: 115px;
  }

  .metric:not(:nth-child(3n + 1)) {
    padding-left: 20px;
  }

  .overview-block:first-child {
    padding-right: 25px;
  }

  .overview-block:last-child {
    padding-left: 25px;
  }

}


/* ================================================
   MOBILE
================================================ */

@media (max-width: 680px) {

  .mobile-header {
    position: fixed;
    z-index: 40;

    top: 0;
    left: 0;
    right: 0;

    height: 62px;

    display: flex;
    align-items: center;
    justify-content: center;

    border-bottom: 1px solid var(--line-soft);

    background: var(--black);
  }

  .mobile-brand {
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.2em;
  }

  .menu-button {
    position: absolute;

    left: 20px;

    width: 25px;
    height: 25px;

    padding: 0;

    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 6px;

    background: transparent;

    cursor: pointer;
  }

  .menu-button span {
    display: block;

    width: 18px;
    height: 1px;

    background: #aaa;
  }

  .sidebar {
    z-index: 60;

    width: min(280px, 82vw);

    transform: translateX(-100%);

    transition: transform 220ms ease;
  }

  .sidebar.open {
    transform: translateX(0);
  }

  .mobile-overlay {
    position: fixed;
    z-index: 55;

    inset: 0;

    background: rgba(0, 0, 0, 0.7);
  }

  .mobile-overlay.visible {
    display: block;
  }

  .main {
    margin-left: 0;

    padding: 92px 22px 28px;
  }

  .page-header {
    align-items: flex-start;
    flex-direction: column;
    gap: 20px;

    padding-bottom: 30px;
  }

  .page-header h1 {
    font-size: 50px;
  }

  .header-date {
    font-size: 10px;
  }

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

  .metric {
    min-height: 110px;

    padding: 22px 16px 20px 0;
  }

  .metric:nth-child(3n) {
    border-right: 1px solid var(--line-soft);
  }

  .metric:nth-child(2n) {
    border-right: 0;
  }

  .metric:nth-child(n + 3) {
    border-top: 1px solid var(--line-soft);
  }

  .metric:not(:nth-child(3n + 1)) {
    padding-left: 16px;
  }

  .metric:nth-child(odd) {
    padding-left: 0;
  }

  .metric strong {
    font-size: 29px;
  }

  .activity-section {
    padding: 38px 0 40px;
  }

  .section-heading h2,
  .block-heading h2 {
    font-size: 22px;
  }

  #activityGraph {
    height: 210px;
  }

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

  .overview-block {
    padding: 36px 0;
  }

  .overview-block:first-child {
    padding-right: 0;

    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .overview-block:last-child {
    padding-left: 0;
  }

}


/* ================================================
   SMALL PHONE
================================================ */

@media (max-width: 380px) {

  .main {
    padding-left: 17px;
    padding-right: 17px;
  }

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

  .metric-label {
    font-size: 9px;
  }

  .metric strong {
    font-size: 26px;
  }

  .graph-y-axis {
    width: 30px;

    padding-right: 7px;
  }

}