body {
  font-family: 'Inter', Arial, sans-serif;
  background: #f7f9fa;
  margin: 0;
}

h1 {
  font-size: 2rem;
  font-weight: 700;
  color: #26344a;
  margin: 0;
}

header {
  background: #fff;
  padding: 32px 32px 16px 32px;
  box-shadow: 0 2px 8px #0001;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

input[type="text"] {
  border: 1px solid #e0e4ea;
  border-radius: 8px;
  padding: 10px 16px;
  font-size: 1rem;
  width: 320px;
  background: #f7f9fa;
  outline: none;
  transition: border 0.2s;
}

input[type="text"]:focus {
  border-color: #4f8cff;
}

section {
  margin: 32px;
}

h2 {
  font-size: 1.3rem;
  font-weight: 700;
  color: #26344a;
  margin-bottom: 12px;
}

.contact-list {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
}

.contact-card {
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 2px 8px #0001;
  padding: 24px 32px 20px 24px;
  width: 370px;
  height: 140px;
  display: flex;
  align-items: center;
  gap: 18px;
  position: relative;
  transition: box-shadow 0.2s;
  box-sizing: border-box;
}

.contact-card:hover {
  box-shadow: 0 4px 16px #0002;
}

.avatar {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: #e0e4ea;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  font-weight: 700;
  color: #4f8cff;
  overflow: hidden;
}

.contact-info {
  flex: 1;
}

.contact-name {
  font-size: 1.1rem;
  font-weight: 700;
  color: #26344a;
  margin-bottom: 6px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 220px;
  white-space: normal;
  height: 2.6em; /* Aproximadamente dos líneas */
}

.contact-label {
  font-weight: 600;
  color: #4f8cff;
}

.contact-value {
  color: #26344a;
  font-weight: 500;
}

.fav-btn {
  position: absolute;
  top: 18px;
  right: 18px;
  background: none;
  border: none;
  cursor: pointer;
  font-size: 1.5rem;
  color: #e0e4ea;
  transition: color 0.2s;
  z-index: 2;
}

.fav-btn.fav {
  color: #f5b301;
}

.fav-btn:hover {
  color: #f5b301;
}

.empty-msg {
  margin: 48px;
  color: #888;
  font-size: 1.2rem;
  text-align: center;
}