/* houselist_frontend/styles.css */

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    Helvetica, Arial, sans-serif;
  background: #f5f7fa;
  color: #333;
}

header.header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem;
  background: #004c99;
  color: white;
}

header h1 { margin: 0; }

.header-actions button {
  margin-left: .5rem;
  padding: .4rem .8rem;
  font-size: .9rem;
  border: none;
  background: rgba(255,255,255,.2);
  color: white;
  cursor: pointer;
}

header-actions button:hover { background: rgba(255,255,255,.3); }

.filters {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
  padding: 1rem;
  background: #fff;
  border-bottom: 1px solid #ddd;
}

.filters label {
  margin-right:.4rem;
}

.items-grid {
  display: grid;
  gap: .8rem;
  padding: 1rem;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
}

.item-card {
  background: white;
  border-radius: .5rem;
  box-shadow: 0 2px 6px rgba(0,0,0,.05);
  padding: .8rem;
  display: flex;
  flex-direction: column;
  cursor: pointer;
  transition: transform .1s ease-in-out;
}

.item-card:hover { transform: translateY(-2px); }

.item-photo {
  width: 100%;
  height: 80px;
  object-fit: cover;
  border-radius: .4rem;
  background: #eee;
  margin-bottom:.5rem;
}

.item-name { font-weight: bold; }
.item-location, .item-quantity { font-size: .9rem; color:#555; }

.modal.hidden { display:none; }
.modal {
  position: fixed;
  inset:0;
  background: rgba(0,0,0,.4);
  display:flex;
  align-items:center;
  justify-content:center;
  padding:1rem;
}

.modal-content {
  background:white;
  border-radius:.5rem;
  max-width:600px;
  width:100%;
  padding:1.5rem;
  position:relative;
}
.close {position:absolute;top:.8rem;right:.8rem;font-size:1.4rem;cursor:pointer;}
.form-actions{display:flex;gap:.6rem;margin-top:1rem;}
.form-actions button{padding:.4rem .9rem;border:none;background:#004c99;color:white;cursor:pointer;}
.form-actions button:hover{background:#003d7a;}

@media (max-width: 480px) {
  header.header { flex-direction:column; align-items:flex-start; }
  .header-actions { margin-top:.5rem; }
}
