@import url('https://fonts.googleapis.com/css2?family=Nunito:ital,wght@0,200..1000;1,200..1000&display=swap');
@import url('https://fonts.googleapis.com/css2?family=El+Messiri:wght@400;500;600;700&display=swap');

:root {
  --bg: #e5ece3;
  --card: #f6fbf6;
  --primary: #335c3b;
  --text: #2b3a33;
  --muted: #6e7c75;
  --chip: #dfece1;
  --chip-text: #2e4d3a;
}

* {
  box-sizing: border-box;
}

html, body {
  height: 100%;
}

body {
  margin: 0;
  font-family: 'Nunito', system-ui, -apple-system, "Segoe UI", Roboto, Inter, Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  overflow: hidden;
}

.wrap {
  height: 100vh;
  width: 100%;
  margin: 0;
  padding: 32px 20px 24px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.controls {
  display: flex;
  align-items: center;
  gap: 18px;
  flex-wrap: wrap;
}

.date-input {
  display: flex;
  align-items: center;
  gap: 8px;
}

.date-input label {
  font-family: 'Nunito', sans-serif;
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
}

.date-input input[type="date"] {
  font-family: 'Nunito', sans-serif;
  background: #fff;
  border: 2px solid #d6e5da;
  border-radius: 8px;
  padding: 8px 12px;
  font-size: 14px;
  font-weight: 600;
  outline: none;
  min-width: 150px;
}

.chip {
  font-family: 'Nunito', sans-serif;
  background: var(--chip);
  color: var(--chip-text);
  padding: 12px 26px;
  border-radius: 28px;
  font-weight: 700;
  border: 2px solid #cfe1d4;
  cursor: pointer;
}

.chip--active {
  background: #cadfcf;
  border-color: #b9d0c0;
}

.search {
  margin-left: auto;
  position: relative;
  flex: 1 1 320px;
  max-width: 520px;
}

.search input {
  font-family: 'Nunito', sans-serif;
  width: 100%;
  background: #fff;
  border: 2px solid #d6e5da;
  border-radius: 8px;
  padding: 12px 44px 12px 16px;
  font-size: 16px;
  font-weight: 600;
  outline: none;
}

.search .x {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 20px;
  color: #87978f;
  cursor: pointer;
}

.list {
  flex: 1;
  min-height: 0;
  overflow: auto;
  padding-top: 8px;
  -webkit-overflow-scrolling: touch;
}

.grid {
  display: grid;
  gap: 34px 46px;
  grid-template-columns: repeat(2, 1fr);
}

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

@media (max-width: 480px) {
  .card {
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 20px;
  }
  
  .avatar {
    width: 120px;
    height: 120px;
    min-width: 120px;
    margin: 0 auto;
  }
  
  .avatar img {
    margin: 0 auto;
    display: block;
  }
  
  .info {
    text-align: center;
    width: 100%;
  }
  
  .date, .name, .meta, .line, .cem {
    text-align: center;
  }
}

.card {
  display: flex;
  gap: 28px;
  align-items: flex-start;
  background: var(--card);
  border: 2px solid #dbe9df;
  border-radius: 16px;
  padding: 22px;
  text-align: left;
}

.avatar {
  width: 140px;
  height: 140px;
  min-width: 140px;
  border-radius: 50%;
  border: 4.5px solid #274b34;
  display: grid;
  place-items: center;
  background: #e7e7e7;
}

.avatar img {
  max-width: 84%;
  max-height: 84%;
  display: block;
}

.date {
  font-family: 'El Messiri', serif;
  font-size: 14px;
  color: #6b7a71;
  margin-bottom: 3px;
  font-weight: 600;
}

.name {
  font-family: 'El Messiri', serif;
  font-size: 22px;
  color: #1e3e2b;
  font-weight: 700;
  margin: 0 0 6px;
}

.meta {
  font-size: 16px;
  font-weight: 600;
}

.meta b {
  font-family: 'El Messiri', serif;
  font-weight: 700;
}

.line {
  font-family: 'El Messiri', serif;
  margin: 4px 0 0;
  color: #55655d;
  font-weight: 600;
}

.line b {
  font-family: 'El Messiri', serif;
  font-weight: 700;
}

.cem {
  margin-top: 8px;
}

.cem b {
  font-family: 'Nunito', sans-serif;
  display: block;
  color: #6e7c75;
  font-weight: 700;
  margin-bottom: 2px;
  font-size: 14px;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.cem .place {
  font-family: 'Nunito', sans-serif;
  color: #585f73;
  font-weight: 700;
}

.loading {
  text-align: center;
  padding: 40px;
  grid-column: 1 / -1;
}

.loading-text {
  color: var(--muted);
  font-size: 18px;
}

.error {
  text-align: center;
  padding: 40px;
  grid-column: 1 / -1;
}

.error-message {
  color: #dc3545;
  font-size: 18px;
  margin-bottom: 10px;
}

.btn-retry {
  background: var(--primary);
  color: white;
  border: none;
  padding: 10px 20px;
  border-radius: 5px;
  cursor: pointer;
}