body {
    font-family: Arial, sans-serif;
    margin: 0;
    background: linear-gradient(180deg, #eef1ff, #ffffff);
      }
  
  header {
    padding: 16px;
    text-align: center;
    background: #1f4fd6;
    color: white;
  }
  
  #search {
    padding: 16px;
    text-align: center;
  }
  
  select {
    padding: 8px;
    font-size: 16px;
  }
  
  .grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 10px;
    padding: 16px;
  }
  
  .photo-card {
    background: white;
    border-radius: 6px;
    overflow: hidden;
    box-shadow: 0 2px 5px rgba(0,0,0,0.15);
  }
  
  .photo-card img {
    width: 100%;
    display: block;
  }
  
  .caption {
    padding: 8px;
    font-size: 14px;
  }
  /* greeting bar */
#topBar {
    display: flex;
    justify-content: flex-end;
    padding: 12px 20px;
    background: #f7f7f7;
    border-bottom: 1px solid #ddd;
  }
  
  .welcome {
    font-weight: 700;
    font-size: 16px;
  }
  
  /* page header */
  #pageHeader {
    text-align: center;
    margin-top: 25px;
  }
  
  #pageHeader h1 {
    margin: 0;
    font-size: 32px;
  }
  
  .subtitle {
    margin-top: 6px;
    font-size: 16px;
    opacity: 0.8;
  }
  /* LOGIN CARD */
#loginBox {
    max-width: 420px;
    margin: 90px auto;
    padding: 28px 24px;
    border-radius: 14px;
    background: white;
    box-shadow: 0 18px 45px rgba(0,0,0,.08);
    text-align: center;
  }
  
  #loginBox h2 {
    margin-bottom: 16px;
  }
  
  #loginBox input {
    width: 100%;
    padding: 10px 12px;
    font-size: 15px;
    border-radius: 8px;
    border: 1px solid #d1d5db;
    outline: none;
    margin-bottom: 12px;
  }
  
  #loginBox input:focus {
    border-color: #1f4bf0;
    box-shadow: 0 0 0 2px rgba(31,75,240,0.15);
  }
  
  #loginBox button {
    width: 100%;
    padding: 10px;
    border-radius: 8px;
    border: none;
    background: #1f4bf0;
    color: white;
    font-weight: 600;
    cursor: pointer;
  }
  
  #loginBox button:hover {
    background: #1539b8;
  }
  
  #loginError {
    margin-top: 10px;
  }
  /* tagline text */
.loginTagline {
    margin-top: 0;
    margin-bottom: 18px;
    color: #6b7280;
    font-size: 14px;
  }
  
  /* fade + slide animation */
  #loginBox {
    animation: fadeUp 0.6s ease-out both;
  }
  
  @keyframes fadeUp {
    from {
      opacity: 0;
      transform: translateY(12px);
    }
    to {
      opacity: 1;
      transform: translateY(0);
    }
  }
  
  /* subtle pulse on button hover */
  #loginBox button:hover {
    background: #1539b8;
    transform: translateY(-1px);
    box-shadow: 0 10px 18px rgba(0,0,0,.08);
    transition: all .18s ease-out;
  }
  .welcomeBox {
    text-align: right;
  }
  
  #switchUser {
    display: block;
    margin-top: 2px;
    font-size: 13px;
    color: #1f4bf0;
    text-decoration: none;
    cursor: pointer;
  }
  
  #switchUser:hover {
    text-decoration: underline;
  }
  .filterRow {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
    margin-bottom: 10px;
  }
  
  #search label {
    display: block;
    margin-bottom: 4px;
    font-size: 13px;
  }
  
  #search select {
    width: 100%;
    padding: 6px;
    border-radius: 6px;
  }
  #matchAllWrapper {
    display: none;
  }
  .clear-btn {
    padding: 8px 14px;
    border-radius: 8px;
    border: 1px solid #ccc;
    background: white;
    cursor: pointer;
  }
  
  .clear-btn:hover {
    background: #f3f3f3;
  }
  #clearFilters {
    display: none;
  }
  .search-box {
    padding: 8px 10px;
    font-size: 15px;
    width: 280px;
    border-radius: 6px;
  }
/* ---- Modal ---- */
.modal {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.75);
  justify-content: center;
  align-items: center;
  z-index: 9999;
}

.modal-content {
  background: white;
  padding: 16px;
  border-radius: 14px;
  max-width: 850px;
  width: 95%;
  display: flex;
  gap: 18px;
}

.modal img {
  max-width: 380px;
  border-radius: 10px;
}

.close {
  float: right;
  font-size: 26px;
  cursor: pointer;
}

.modal-info {
  flex: 1;
}

/* ---- People badges ---- */
.badge {
  display: inline-block;
  background: #e6f0ff;
  color: #1f4fd1;
  border-radius: 999px;
  padding: 6px 10px;
  margin: 5px 4px 0 0;
  font-size: 12px;
}

/* ---- 🔍 rounded search ---- */
.search-box {
  padding: 10px 14px;
  width: 100%;
  max-width: 340px;
  border-radius: 18px;
  border: 1px solid #ddd;
  outline: none;
}

.search-box::placeholder {
  content: "🔍 Search…";
}
.search-wrap {
  position: relative;
  display: inline-block;
}

.search-icon {
  position: absolute;
  left: 10px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 14px;
  pointer-events: none;
}

  .search-box {
    padding: 10px 14px 10px 32px;
    width: 100%;
    max-width: 520px;   /* ⬅️ wider */
    border-radius: 18px;
    border: 1px solid #ddd;
    outline: none;
  }  
  /* default: 4 columns (desktop) */
.filterRow {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
}

/* tablets */
@media (max-width: 900px) {
  .filterRow {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* phones */
@media (max-width: 600px) {
  .filterRow {
    grid-template-columns: 1fr;
  }
}
.search-wrap {
  width: 100%;
  max-width: 560px;
  margin: 0 auto;
}

.search-box {
  width: 100%;
}
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 12px;
}

/* phones */
@media (max-width: 480px) {
  .grid {
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  }
}
.modal-content {
  flex-wrap: wrap;
  max-height: 90vh;
  overflow-y: auto;
}

.modal img {
  max-width: 100%;
  height: auto;
}
button, input, select {
  min-height: 40px;
}
@media (max-width: 600px) {
  header {
    padding: 12px;
  }

  #pageHeader h1 {
    font-size: 24px;
  }

  .subtitle {
    font-size: 14px;
  }

  #search {
    padding: 10px;
  }
}
.modal {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.85);
  justify-content: center;
  align-items: center;
  z-index: 9999;
  animation: fadeIn .25s ease-out;
}

.modal-content {
  background: white;
  border-radius: 14px;
  padding: 16px;
  max-width: 900px;
  width: 95%;
  display: flex;
  gap: 18px;
  animation: pop .25s ease-out;
}

.modal img {
  max-width: 420px;
  width: 100%;
  border-radius: 10px;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

@keyframes pop {
  from { transform: scale(.94); opacity: 0; }
  to   { transform: scale(1);   opacity: 1; }
}
