/* ==========================================================
   NVSF Admin – Members Overview
   ========================================================== */

/* === Layout === */
#member-overview {
  max-width: 1100px;
  margin: 2rem auto;
  padding: 1rem;
  box-sizing: border-box;
  font-family: "Segoe UI", Roboto, system-ui, sans-serif;
  color: #222;
}

/* === Search bar === */
#member-overview input#search {
  display: block;
  width: 100%;
  max-width: 320px;
  padding: 10px 12px;
  margin-bottom: 1.5rem;
  border: 1px solid #d0d7de;
  border-radius: 10px;
  font-size: 15px;
  outline: none;
  transition: all 0.2s ease;
}

#member-overview input#search:focus {
  border-color: #80b2ff;
  box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.15);
}

/* === Table base === */
.admin-table {
  width: 100%;
  border-collapse: collapse;
  background: #fff;
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
}

.admin-table th,
.admin-table td {
  padding: 12px 16px;
  text-align: left;
  font-size: 15px;
  border-bottom: 1px solid #f0f2f5;
  vertical-align: middle;
}

.admin-table th {
  background: #f7f9fc;
  font-weight: 600;
  color: #333;
  user-select: none;
}

.admin-table tr:last-child td {
  border-bottom: none;
}

/* === Row hover effect === */
.admin-table tbody tr:hover {
  background: #f9fbff;
}

/* === Buttons === */
.admin-table button {
  padding: 6px 10px;
  font-size: 13px;
  border-radius: 8px;
  border: 1px solid #ccc;
  background: #f7f7f7;
  cursor: pointer;
  margin-right: 4px;
  transition: all 0.15s ease;
}

.admin-table button:hover {
  background: #e9efff;
  border-color: #a9c7ff;
}

/* Primary = renew */
.admin-table button.renew {
  background: #e9efff;
  border-color: #a9c7ff;
  color: #003399;
}

/* Danger = delete */
.admin-table button.delete {
  background: #fff1f0;
  border-color: #ffb3af;
  color: #a41c1c;
}

.admin-table button.delete:hover {
  background: #ffd9d6;
}

/* === Status badges === */
.status-badge {
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 500;
  display: inline-block;
}

.status-active {
  background: #e6f6ea;
  color: #1a7a2b;
  border: 1px solid #c2ebce;
}

.status-inactive {
  background: #fceaea;
  color: #a52626;
  border: 1px solid #f1c7c7;
}

/* === Payment badges === */
.payment-badge {
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 500;
  display: inline-block;
}

.payment-valid {
  background: #e8f1ff;
  color: #0a4599;
  border: 1px solid #bfd4ff;
}

.payment-expired {
  background: #fff5d9;
  color: #6b5600;
  border: 1px solid #ffed9a;
}

/* === Messages (error / warning) === */
#member-overview .warning {
  background: #fff8e5;
  border: 1px solid #ffe59c;
  padding: 1rem 1.5rem;
  border-radius: 12px;
  color: #665200;
}

#member-overview .error {
  background: #ffe5e5;
  border: 1px solid #ffbaba;
  padding: 1rem 1.5rem;
  border-radius: 12px;
  color: #9e0000;
}

/* === Modal (for JSON view) === */
.nv-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.35);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
}

.nv-modal-box {
  background: #fff;
  border-radius: 12px;
  width: 90%;
  max-width: 900px;
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.25);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.nv-modal-head {
  padding: 12px 16px;
  border-bottom: 1px solid #eee;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-weight: 600;
  background: #f9fafb;
}

.nv-modal-body {
  padding: 16px;
  max-height: 70vh;
  overflow-y: auto;
  font-family: monospace;
  font-size: 13px;
  background: #fafafa;
  color: #111;
}

/* === Edit Member Modal Enhancements === */
#edit-modal .nv-modal-body form label {
  display: flex;
  flex-direction: column;
  font-size: 14px;
  color: #333;
}
#edit-modal input {
  padding: 8px;
  border: 1px solid #ccc;
  border-radius: 8px;
  font-size: 14px;
  margin-top: 4px;
}
#edit-modal fieldset {
  background: #fafbff;
  margin-top: 10px;
}
#edit-modal legend {
  font-weight: 600;
  color: #222;
}
#edit-modal .btn-save,
#edit-modal button[type="submit"] {
  background: #e9efff;
  border: 1px solid #a9c7ff;
  color: #003399;
  padding: 8px 14px;
  border-radius: 8px;
  cursor: pointer;
  margin-top: 10px;
  align-self: flex-start;
}
#edit-modal .btn-save:hover,
#edit-modal button[type="submit"]:hover {
  background: #dbe7ff;
}


.btn-close {
  background: #f8f8f8;
  border: 1px solid #ccc;
  border-radius: 8px;
  padding: 6px 10px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-close:hover {
  background: #eee;
}
/* === Actions dropdown === */
.actions-dropdown {
  position: relative;
  display: inline-block;
}
.actions-btn {
  padding: 6px 10px;
  font-size: 13px;
  border-radius: 8px;
  border: 1px solid #ccc;
  background: #f7f7f7;
  cursor: pointer;
}
.actions-btn:hover {
  background: #e9efff;
  border-color: #a9c7ff;
}
.actions-menu {
  display: none;
  position: absolute;
  right: 0;
  top: 110%;
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 8px;
  box-shadow: 0 4px 18px rgba(0,0,0,0.12);
  z-index: 10;
  min-width: 160px;
}
.actions-menu.open {
  display: block;
}
.actions-menu button {
  width: 100%;
  background: none;
  border: none;
  text-align: left;
  padding: 8px 12px;
  font-size: 13px;
  cursor: pointer;
}
.actions-menu button:hover {
  background: #f2f5ff;
}
/* === Fix for dropdown cutting off === */
.actions-menu {
  position: absolute;
  right: 0;
  top: 110%;
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 8px;
  box-shadow: 0 4px 18px rgba(0,0,0,0.12);
  z-index: 9999; /* 🚀 Løfter menyen over alt */
  min-width: 160px;
  display: none;
}

.actions-menu.open {
  display: block;
}
#member-overview {
  overflow: visible !important;
}
.admin-table {
  overflow: visible !important;
}
.admin-table tr {
  overflow: visible !important;
}