:root {
  --page: #e9eff7;
  --surface: #ffffff;
  --ink: #111827;
  --muted: #4b5563;
  --line: #d7dee8;
  --blue-soft: #bae3ff;
  --blue: #0b63ce;
  --green: #5c9638;
  --shadow: 0 20px 60px rgba(31, 41, 55, 0.12);
  color: var(--ink);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
  font-synthesis: none;
  letter-spacing: 0;
}

* {
  box-sizing: border-box;
}

body {
  min-width: 320px;
  min-height: 100vh;
  margin: 0;
  background: var(--page);
}

button,
input,
a {
  font: inherit;
}

button {
  border: 0;
}

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

.sidebar {
  padding: 20px 16px;
}

.sidebar h1 {
  margin: 0 0 66px 14px;
  font-size: 1.55rem;
  font-weight: 500;
}

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

.side-nav__item {
  display: grid;
  width: 100%;
  min-height: 70px;
  grid-template-columns: 40px minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  border-radius: 36px;
  background: transparent;
  color: var(--ink);
  padding: 0 30px 0 22px;
  text-align: left;
  cursor: pointer;
}

.side-nav__item span:not(.nav-icon) {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 1rem;
}

.side-nav__item strong {
  font-size: 0.96rem;
}

.side-nav__item.is-active {
  background: var(--blue-soft);
  font-weight: 800;
}

.nav-icon,
.search-icon,
.megaphone,
.waffle {
  position: relative;
  display: inline-block;
  width: 28px;
  height: 28px;
}

.nav-icon--grid {
  background:
    linear-gradient(var(--muted), var(--muted)) 2px 2px / 8px 8px no-repeat,
    linear-gradient(var(--muted), var(--muted)) 18px 2px / 8px 8px no-repeat,
    linear-gradient(var(--muted), var(--muted)) 2px 18px / 8px 8px no-repeat,
    linear-gradient(var(--muted), var(--muted)) 18px 18px / 8px 8px no-repeat;
}

.nav-icon--compass {
  border: 3px solid var(--muted);
  border-radius: 999px;
}

.nav-icon--compass::after {
  position: absolute;
  inset: 6px 8px 8px 6px;
  background: var(--muted);
  clip-path: polygon(100% 0, 62% 100%, 0 62%);
  content: "";
}

.main-panel {
  min-width: 0;
  padding: 10px 30px 28px 0;
}

.topbar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 20px;
  min-height: 82px;
}

.managed-note {
  display: inline-flex;
  min-height: 84px;
  align-items: center;
  gap: 18px;
  border-radius: 14px;
  background: var(--surface);
  padding: 20px 30px;
}

.managed-note strong {
  font-size: 1rem;
}

.megaphone::before {
  position: absolute;
  inset: 6px 4px;
  border: 3px solid var(--blue);
  border-left-width: 8px;
  border-radius: 4px 12px 12px 4px;
  content: "";
  transform: skewY(-12deg);
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 20px;
  justify-content: flex-end;
}

.add-user {
  position: relative;
  background: transparent;
  color: #0b57d0;
  cursor: pointer;
  font-weight: 700;
}

.add-user::before {
  display: inline-block;
  width: 20px;
  height: 20px;
  margin-right: 6px;
  background:
    radial-gradient(circle at 9px 7px, #3f3f46 0 3px, transparent 4px),
    radial-gradient(circle at 15px 9px, #3f3f46 0 2px, transparent 3px),
    linear-gradient(#3f3f46, #3f3f46) 4px 14px / 10px 2px no-repeat,
    linear-gradient(#3f3f46, #3f3f46) 8px 10px / 2px 8px no-repeat,
    linear-gradient(#3f3f46, #3f3f46) 15px 14px / 6px 2px no-repeat;
  content: "";
  vertical-align: -5px;
}

.icon-button {
  width: 42px;
  height: 42px;
  border-radius: 999px;
  background: transparent;
  cursor: pointer;
}

.waffle {
  width: 24px;
  height: 24px;
  background-image: radial-gradient(circle, #3f3f46 2px, transparent 3px);
  background-position: 0 0;
  background-size: 8px 8px;
}

.avatar {
  display: inline-grid;
  width: 44px;
  height: 44px;
  place-items: center;
  border-radius: 999px;
  background: var(--green);
  color: #fff;
  cursor: pointer;
  font-size: 1.08rem;
  font-weight: 800;
}

.avatar--small {
  width: 38px;
  height: 38px;
  cursor: default;
  font-size: 0.95rem;
}

.profile-menu {
  position: relative;
}

.user-switcher {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  z-index: 5;
  display: none;
  min-width: 260px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
  padding: 8px;
}

.profile-menu:hover .user-switcher,
.profile-menu:focus-within .user-switcher {
  display: grid;
  gap: 4px;
}

.user-switcher__item {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  border-radius: 8px;
  background: transparent;
  padding: 9px;
  text-align: left;
  cursor: pointer;
}

.user-switcher__item.is-active,
.user-switcher__item:hover {
  background: #eef5ff;
}

.user-switcher__item strong,
.user-switcher__item small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.user-switcher__item small {
  color: var(--muted);
}

.apps-view,
.recommendations-view {
  padding-top: 36px;
}

.page-heading {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-bottom: 38px;
}

.page-heading h2,
.recommendations-view h2 {
  margin: 0;
  font-size: clamp(2rem, 4vw, 2.65rem);
  line-height: 1;
  text-align: center;
}

.info-dot {
  display: inline-grid;
  width: 26px;
  height: 26px;
  place-items: center;
  border: 3px solid #50565f;
  border-radius: 999px;
  color: #50565f;
  font-weight: 900;
}

.search-box {
  position: relative;
  display: block;
  width: min(1040px, 74vw);
  margin: 0 auto 84px;
}

.search-box span:first-child {
  position: absolute;
  top: 50%;
  left: 22px;
  z-index: 1;
  color: #354050;
  font-size: 1.35rem;
  transform: translateY(-50%);
  pointer-events: none;
}

.search-box input {
  width: 100%;
  height: 70px;
  border: 0;
  border-radius: 34px;
  background: #dfe6ee;
  color: var(--ink);
  padding: 0 68px 0 22px;
  font-size: 1.2rem;
  outline: 0;
}

.search-box.is-filled span:first-child,
.search-box:focus-within span:first-child {
  display: none;
}

.search-icon {
  position: absolute;
  top: 50%;
  right: 22px;
  width: 30px;
  height: 30px;
  transform: translateY(-50%);
}

.search-icon::before {
  position: absolute;
  width: 14px;
  height: 14px;
  border: 4px solid #3f3f46;
  border-radius: 999px;
  content: "";
}

.search-icon::after {
  position: absolute;
  top: 18px;
  left: 19px;
  width: 12px;
  height: 4px;
  border-radius: 999px;
  background: #3f3f46;
  content: "";
  transform: rotate(45deg);
  transform-origin: left center;
}

.apps-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(120px, 1fr));
  gap: 86px 54px;
  max-width: 1340px;
  margin: 0 auto;
}

.app-icon {
  display: grid;
  min-width: 0;
  justify-items: center;
  gap: 10px;
  background: transparent;
  color: #05070a;
  text-align: center;
  cursor: pointer;
  text-decoration: none;
}

.app-orb {
  display: inline-grid;
  width: 90px;
  height: 90px;
  place-items: center;
  border-radius: 999px;
  background: #fff;
  box-shadow: 0 1px 0 rgba(17, 24, 39, 0.05);
}

.app-orb img {
  width: 52px;
  height: 52px;
  display: block;
}

.app-icon strong,
.app-icon small,
.app-icon em {
  max-width: 140px;
  overflow-wrap: anywhere;
}

.app-icon strong {
  font-size: 1.05rem;
}

.app-icon small {
  margin-top: -4px;
  color: var(--muted);
}

.app-icon em {
  margin-top: -6px;
  color: #0b57d0;
  font-size: 0.76rem;
  font-style: normal;
  font-weight: 750;
}

.handoff-bar {
  position: fixed;
  right: 30px;
  bottom: 24px;
  z-index: 4;
  display: grid;
  gap: 5px;
  max-width: min(560px, calc(100vw - 60px));
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
  padding: 14px 16px;
}

.handoff-bar span,
.handoff-bar code {
  color: var(--muted);
  overflow-wrap: anywhere;
}

.handoff-bar code {
  border-radius: 6px;
  background: #f3f6fa;
  padding: 7px;
}

.handoff-bar.is-issued {
  border-color: #b8dbca;
  background: #f2fbf6;
}

.recommendations-view h2 {
  margin-top: 4px;
  margin-bottom: 28px;
}

.filter-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin-bottom: 34px;
}

.filter-row button {
  min-height: 40px;
  border: 1px solid #7b8491;
  border-radius: 12px;
  background: transparent;
  color: #172033;
  padding: 0 28px;
  cursor: pointer;
}

.filter-row .is-selected {
  background: var(--blue-soft);
}

.recommendation-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(280px, 1fr));
  gap: 30px;
  max-width: 1260px;
  margin: 0 auto;
}

.recommendation-card {
  display: grid;
  grid-template-columns: 180px minmax(0, 1fr);
  align-items: center;
  min-height: 220px;
  gap: 26px;
  border-radius: 24px;
  background: var(--surface);
  padding: 30px;
}

.recommendation-card h3,
.recommendation-card p {
  margin: 0;
}

.recommendation-card h3 {
  font-size: 1.2rem;
}

.recommendation-card p {
  margin-top: 16px;
  color: #243044;
  line-height: 1.45;
}

.recommendation-card button {
  margin-top: 22px;
  background: transparent;
  color: #0b57d0;
  cursor: pointer;
  font-weight: 700;
}

.recommendation-art {
  position: relative;
  height: 136px;
}

.recommendation-art span {
  position: absolute;
  border-radius: 18px;
  transform: rotate(-18deg);
}

.recommendation-art span:nth-child(1) {
  inset: 34px 34px 18px 18px;
  background: #7fb3ff;
}

.recommendation-art span:nth-child(2) {
  inset: 16px 62px 46px 46px;
  background: #f16f54;
}

.recommendation-art span:nth-child(3) {
  inset: 58px 18px 14px 84px;
  background: #f2b84b;
}

.recommendation-card--green .recommendation-art span:nth-child(1) {
  background: #72c49a;
}

.recommendation-card--orange .recommendation-art span:nth-child(1) {
  background: #f2b84b;
}

@media (max-width: 1180px) {
  #app {
    grid-template-columns: 292px minmax(0, 1fr);
  }

  .apps-grid {
    grid-template-columns: repeat(4, minmax(110px, 1fr));
  }

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

@media (max-width: 860px) {
  #app {
    grid-template-columns: 1fr;
  }

  .sidebar {
    padding-bottom: 0;
  }

  .sidebar h1 {
    margin-bottom: 18px;
  }

  .side-nav {
    grid-template-columns: 1fr 1fr;
  }

  .main-panel {
    padding: 14px;
  }

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

  .topbar-actions {
    justify-content: flex-start;
  }

  .search-box {
    width: 100%;
    margin-bottom: 48px;
  }

  .apps-grid {
    grid-template-columns: repeat(3, minmax(96px, 1fr));
    gap: 42px 18px;
  }
}

@media (max-width: 560px) {
  .side-nav {
    grid-template-columns: 1fr;
  }

  .managed-note {
    padding: 16px;
  }

  .apps-grid {
    grid-template-columns: repeat(2, minmax(96px, 1fr));
  }

  .recommendation-card {
    grid-template-columns: 1fr;
  }
}
