body {
  display: block;
  padding: 0;
}

.apps-shell {
  position: relative;
  z-index: 1;
  width: min(1180px, calc(100% - 40px));
  margin: 0 auto;
  padding: 34px 0 64px;
}

.apps-topbar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 24px;
  padding: 18px 0 30px;
  border-bottom: 1px solid var(--line);
}

.brand-kicker {
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.apps-topbar h1 {
  margin-top: 4px;
  font-size: 34px;
  font-weight: 800;
  letter-spacing: 0;
}

.top-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.user-chip,
.text-btn {
  min-height: 36px;
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--card-border);
  border-radius: var(--radius);
  font: inherit;
  font-size: 13px;
}

.user-chip {
  max-width: 280px;
  padding: 0 12px;
  overflow: hidden;
  color: var(--muted);
  background: rgba(255, 255, 255, .045);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.text-btn {
  padding: 0 13px;
  background: var(--accent-soft);
  color: #99f6e4;
  cursor: pointer;
  font-weight: 700;
}

.text-btn:hover {
  border-color: rgba(245, 158, 11, .34);
  color: #fcd34d;
}

.apps-section {
  margin-top: 30px;
}

.section-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 18px;
  margin-bottom: 14px;
}

.section-head h2 {
  font-size: 18px;
  font-weight: 750;
}

.section-head p {
  max-width: 520px;
  color: var(--muted);
  font-size: 13px;
}

.app-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.app-card,
.empty-state {
  min-height: 124px;
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  gap: 14px;
  align-items: flex-start;
  padding: 18px;
  border: 1px solid var(--card-border);
  border-radius: var(--radius);
  background: rgba(16, 20, 18, .72);
  color: var(--text);
  text-decoration: none;
  box-shadow: var(--shadow-sm);
  transition: border-color .18s, background .18s, transform .18s, box-shadow .18s;
}

.app-card:hover {
  border-color: rgba(20, 184, 166, .36);
  background: rgba(255, 255, 255, .07);
  box-shadow: var(--shadow-md);
  transform: translateY(-1px);
}

.app-mark {
  width: 44px;
  height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(20, 184, 166, .2);
  border-radius: var(--radius);
  background: rgba(20, 184, 166, .12);
  color: #99f6e4;
  font-weight: 800;
}

.app-body {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.app-body strong,
.empty-state strong {
  font-size: 16px;
  font-weight: 750;
}

.app-body span,
.empty-state span {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.app-body code {
  margin-top: 8px;
  color: #99f6e4;
  font-size: 12px;
  overflow-wrap: anywhere;
}

.empty-state {
  grid-column: 1 / -1;
  grid-template-columns: 1fr;
  justify-content: center;
}

@media (max-width: 780px) {
  .apps-shell {
    width: min(100% - 24px, 560px);
    padding-top: 20px;
  }

  .apps-topbar,
  .section-head {
    grid-template-columns: 1fr;
    align-items: flex-start;
  }

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

  .user-chip {
    min-width: 0;
    max-width: none;
  }

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

@media (max-width: 460px) {
  .apps-shell {
    width: min(100% - 20px, 560px);
    padding-bottom: 40px;
  }

  .apps-topbar h1 {
    font-size: 28px;
  }

  .top-actions {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .app-card,
  .empty-state {
    min-height: 0;
    grid-template-columns: 38px minmax(0, 1fr);
    padding: 15px;
  }

  .app-mark {
    width: 38px;
    height: 38px;
  }
}

@media (prefers-color-scheme: light) {
  .user-chip,
  .app-card,
  .empty-state {
    background: rgba(255, 255, 255, .86);
  }

  .text-btn {
    color: #0f766e;
  }

  .app-card:hover {
    background: #fff;
  }

  .app-mark {
    color: #0f766e;
    border-color: rgba(13, 148, 136, .18);
    background: rgba(13, 148, 136, .08);
  }

  .app-body code {
    color: #0f766e;
  }
}
