:root {
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: #172033;
  background: #f4f6fb;
  color-scheme: light;
}

* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body { min-height: 100vh; background: #f4f6fb; }
button, input { font: inherit; }

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

.sidebar {
  position: sticky;
  top: 0;
  display: flex;
  flex-direction: column;
  height: 100vh;
  padding: 28px 20px 22px;
  border-right: 1px solid #e8ebf2;
  background: rgba(255,255,255,.92);
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  color: inherit;
  text-decoration: none;
}

.brand__mark {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 13px;
  color: #fff;
  background: linear-gradient(135deg, #635bff, #8b7cff);
  box-shadow: 0 9px 24px rgba(99, 91, 255, .24);
  font-size: 19px;
  font-weight: 900;
}

.brand__text strong,
.brand__text small { display: block; }
.brand__text strong { font-size: 16px; }
.brand__text small { margin-top: 2px; color: #9aa3b5; font-size: 11px; }

.nav {
  display: grid;
  gap: 6px;
  margin-top: 42px;
}

.nav__item {
  display: flex;
  align-items: center;
  gap: 11px;
  min-height: 43px;
  padding: 0 12px;
  border-radius: 12px;
  color: #7b8599;
  text-decoration: none;
  font-size: 13px;
  font-weight: 700;
}

.nav__item:hover { background: #f6f7fb; color: #434d62; }
.nav__item--active { color: #554df1; background: #f0efff; }
.nav__icon { width: 20px; text-align: center; font-size: 15px; }

.sidebar__project {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: auto;
  padding: 14px 12px;
  border: 1px solid #eceef4;
  border-radius: 14px;
  background: #fafbfe;
}

.project-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #39c79c;
  box-shadow: 0 0 0 5px rgba(57,199,156,.10);
}

.sidebar__project strong,
.sidebar__project small { display: block; }
.sidebar__project strong { font-size: 12px; }
.sidebar__project small { margin-top: 3px; color: #9aa3b5; font-size: 10px; }

.profile {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 12px;
  padding: 10px 8px;
}

.avatar {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 12px;
  color: #554df1;
  background: #eeedff;
  font-size: 12px;
  font-weight: 900;
}

.profile strong,
.profile small { display: block; }
.profile strong { font-size: 12px; }
.profile small { margin-top: 2px; color: #a0a8b8; font-size: 9px; }

.content {
  width: min(1320px, calc(100% - 56px));
  margin: 0 auto;
  padding: 42px 0 28px;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 28px;
}

.topbar__date {
  margin: 0 0 7px;
  color: #989fb0;
  font-size: 12px;
  font-weight: 700;
  text-transform: capitalize;
}

.topbar h1 {
  margin: 0;
  color: #172033;
  font-size: clamp(28px, 4vw, 42px);
  letter-spacing: -.04em;
}

.topbar__subtitle { margin: 8px 0 0; color: #818a9d; font-size: 14px; }

.icon-button {
  width: 42px;
  height: 42px;
  border: 1px solid #e4e7ef;
  border-radius: 13px;
  color: #647087;
  background: #fff;
  cursor: pointer;
  box-shadow: 0 8px 24px rgba(28,39,61,.04);
}

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

.metric {
  min-height: 145px;
  padding: 18px;
  border: 1px solid #e8ebf2;
  border-radius: 20px;
  background: #fff;
  box-shadow: 0 12px 34px rgba(28,39,61,.045);
}

.metric--accent {
  color: #fff;
  border-color: transparent;
  background: linear-gradient(135deg, #625af6 0%, #756cff 58%, #897fff 100%);
  box-shadow: 0 18px 38px rgba(99,91,255,.20);
}

.metric__top { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.metric__label { color: #929bad; font-size: 11px; font-weight: 800; }
.metric--accent .metric__label { color: rgba(255,255,255,.72); }

.metric__icon {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 10px;
  color: #5b54ee;
  background: #f0efff;
  font-size: 12px;
  font-weight: 900;
}

.metric--accent .metric__icon { color: #fff; background: rgba(255,255,255,.15); }
.metric__icon--green { color: #1e9c72; background: #eaf9f4; }
.metric__icon--orange { color: #d88d31; background: #fff5e8; }
.metric__icon--purple { color: #885ac8; background: #f5edff; }

.metric > strong {
  display: block;
  margin-top: 17px;
  font-size: 30px;
  line-height: 1;
  letter-spacing: -.04em;
}

.metric__caption {
  display: block;
  max-width: 100%;
  margin-top: 8px;
  overflow: hidden;
  color: #9aa3b5;
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.metric--accent .metric__caption { color: rgba(255,255,255,.68); }

.metric-progress {
  height: 5px;
  margin-top: 13px;
  overflow: hidden;
  border-radius: 999px;
  background: #eef0f5;
}

.metric-progress span {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: #ffad52;
  transition: width .2s ease;
}

.workspace {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(330px, .7fr);
  gap: 18px;
  align-items: start;
}

.workspace__main,
.workspace__side {
  overflow: hidden;
  border: 1px solid #e8ebf2;
  border-radius: 22px;
  background: #fff;
  box-shadow: 0 14px 40px rgba(28,39,61,.045);
}

.app-host { display: block; min-height: 420px; }

.footer {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin-top: 20px;
  padding: 8px 2px;
  color: #a1a8b7;
  font-size: 10px;
}

@media (max-width: 1180px) {
  .overview { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .workspace { grid-template-columns: 1fr; }
}

@media (max-width: 820px) {
  .app-shell { grid-template-columns: 1fr; }
  .sidebar {
    position: static;
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    height: auto;
    padding: 16px 20px;
    border-right: 0;
    border-bottom: 1px solid #e8ebf2;
  }
  .nav { display: flex; justify-content: center; margin: 0; }
  .nav__item { min-height: 38px; padding: 0 10px; }
  .nav__icon { display: none; }
  .sidebar__project { display: none; }
  .profile { margin: 0; }
  .profile > div { display: none; }
  .content { width: min(100% - 28px, 1320px); padding-top: 28px; }
}

@media (max-width: 560px) {
  .brand__text { display: none; }
  .sidebar { grid-template-columns: auto 1fr auto; padding: 12px 14px; }
  .nav { gap: 2px; }
  .nav__item { font-size: 11px; }
  .overview { grid-template-columns: 1fr 1fr; gap: 10px; }
  .metric { min-height: 130px; padding: 15px; border-radius: 17px; }
  .topbar__subtitle { line-height: 1.5; }
  .footer { flex-direction: column; }
}
