/* --------------------------------------------------
   Grundlæggende layout
-------------------------------------------------- */
body {
  font-family: Arial, sans-serif;
  background-color: #f5f5f5;
  margin: 0;
  padding: 20px;
  color: #333;
}

/* --------------------------------------------------
   Header på forsiden
-------------------------------------------------- */
/* --------------------------------------------------
   Header på forsiden
-------------------------------------------------- */
.site-header {
  display: flex;
  justify-content: space-between; /* admin-knap til højre */
  align-items: flex-start;
  margin-bottom: 20px;
}

.header-left {
  max-width: 900px;
}

.site-header h1 {
  margin: 0 0 10px 0;
  font-size: 1.8rem;
  color: #222;
}

.site-header .intro-text {
  margin: 0 0 15px 0;
  line-height: 1.5;
  font-size: 1rem;
  font-weight: normal; /* ikke fed */
  color: #444;         /* ikke sort */
}
/* --------------------------------------------------
   Genbrugelig knap
-------------------------------------------------- */
.btn {
  display: inline-block;
  padding: 8px 12px;
  background: #1976d2;
  color: #fff;
  text-decoration: none;
  border-radius: 4px;
  font-size: 0.95rem;
}
.logout-btn {
  background: #c62828;
}

/* --------------------------------------------------
   Tabel
-------------------------------------------------- */
table {
  width: 100%;
  border-collapse: collapse;
  background: #fff;
  border-radius: 6px;
  overflow: hidden;
  box-shadow: 0 2px 6px rgba(0,0,0,0.08);
}

thead {
  background-color: #eaeaea;
}

thead th {
  padding: 12px;
  font-size: 16px;
  text-align: left;
  border-bottom: 2px solid #ddd;
}

tbody td {
  padding: 12px;
  border-bottom: 1px solid #eee;
  font-size: 15px;
}

tbody tr:nth-child(even) {
  background-color: #fafafa;
}

/* Billeder i tabel */
tbody img {
  width: 80px;
  border-radius: 4px;
  display: block;
  cursor: pointer;
}

/* --------------------------------------------------
   Status
-------------------------------------------------- */
.sold {
  color: #c62828;
  font-weight: 700;
}
.status-available {
  color: #2d7a2d;
  font-weight: 700;
}

/* --------------------------------------------------
   Knapper i tabel
-------------------------------------------------- */
button {
  padding: 8px 14px;
  font-size: 14px;
  border: none;
  border-radius: 4px;
  cursor: pointer;
}
button:hover {
  opacity: 0.95;
}

button.buy {
  background-color: #2d7a2d;
  color: #fff;
}
button.undo {
  background-color: #b30000;
  color: #fff;
}

/* --------------------------------------------------
   Beskedfelt
-------------------------------------------------- */
.message {
  display: none;
  padding: 10px;
  margin: 10px 0;
  background: #f0f8ff;
  border: 1px solid #cfe8ff;
  border-radius: 4px;
  color: #0b3d91;
}

/* --------------------------------------------------
   Admin form
-------------------------------------------------- */
.admin-form {
  max-width: 420px;
  margin: 0 auto;
  background: #fff;
  padding: 20px;
  border-radius: 6px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.08);
}

.admin-form label {
  display: block;
  margin-top: 12px;
  font-weight: bold;
}

.admin-form input,
.admin-form select,
.admin-form textarea {
  width: 100%;
  padding: 8px;
  margin-top: 6px;
  border: 1px solid #ccc;
  border-radius: 4px;
  box-sizing: border-box;
}

.admin-form button {
  margin-top: 16px;
  width: 100%;
  background-color: #2d7a2d;
  color: white;
  padding: 10px;
  border: none;
  border-radius: 4px;
  cursor: pointer;
}

/* --------------------------------------------------
   Admin topbar
-------------------------------------------------- */
.admin-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
  gap: 12px;
}

.admin-top .right-controls {
  display: flex;
  gap: 10px;
  align-items: center;
}

.total-sold {
  font-size: 1rem;
  color: #222;
}

/* --------------------------------------------------
   Modal (køb)
-------------------------------------------------- */
.modal {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0,0,0,0.4);
  z-index: 9999;
}

.modal-content {
  background: #fff;
  padding: 18px;
  border-radius: 8px;
  width: 320px;
  max-width: 90%;
  box-shadow: 0 6px 18px rgba(0,0,0,0.2);
  text-align: center;
}

.modal-content h2 {
  margin: 0 0 8px;
}

.modal-content input {
  width: 100%;
  padding: 8px;
  margin: 10px 0;
  border: 1px solid #ccc;
  border-radius: 4px;
  text-transform: uppercase;
  letter-spacing: 1px;
  box-sizing: border-box;
}

.modal-actions {
  display: flex;
  gap: 8px;
  justify-content: center;
}

/* --------------------------------------------------
   Popup-billede
-------------------------------------------------- */
.image-modal img {
  max-width: 90vw;
  max-height: 90vh;
  display: block;
  margin: auto;
}

/* --------------------------------------------------
   Mobilvenlig tabel
-------------------------------------------------- */
@media (max-width: 600px) {
  table, thead, tbody, th, td, tr {
    display: block;
  }

  thead { display: none; }

  tr {
    margin-bottom: 15px;
    background: #fff;
    padding: 10px;
    border-radius: 6px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.06);
  }

  td {
    border: none;
    padding: 8px 0;
  }

  td::before {
    content: attr(data-label);
    font-weight: bold;
    display: block;
    margin-bottom: 4px;
    color: #555;
  }
}