/* ===============================
   GLOBAL STYLES
   =============================== */
* {
  box-sizing: border-box;
  font-family: "Segoe UI", Tahoma, sans-serif;
}

body {
  background: #f4f6f9;
  margin: 0;
  padding: 30px;
  color: #333;
}

h1 {
  font-weight: 700;
  letter-spacing: 0.5px;
}

h2 {
  margin-bottom: 15px;
}

input {
  display: block;
  width: 100%;
  max-width: 400px;
  padding: 10px;
  margin-bottom: 10px;
  border-radius: 6px;
  border: 1px solid #ccc;
}

button {
  padding: 10px 18px;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  background: #007bff;
  color: white;
  font-size: 14px;
}

button:hover {
  background: #0056b3;
}

.secondary-btn {
  background: #6c757d;
}

.secondary-btn:hover {
  background: #5a6268;
}

/* ===============================
   LANDING PAGE
   =============================== */
#landing-page {
  max-width: 400px;
  margin: 0 auto;
}

/* ===============================
   ADMIN LIST
   =============================== */
.members-container {
  background: white;
  border-radius: 10px;
  padding: 15px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.08);
  max-width: 900px;
  margin: 0 auto;
}

#clients-list,
#history-list,
#activated-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.member-card {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px;
  border-bottom: 1px solid #eee;
}

.member-card:last-child {
  border-bottom: none;
}

.member-info {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.member-name {
  font-weight: 600;
  font-size: 15px;
}

.member-meta {
  font-size: 13px;
  color: #666;
}

.due-soon {
  color: #dc3545;
  font-weight: 600;
}

.member-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: flex-end;
}

.activate-btn {
  background: #fd7e14;
}

.activate-btn:hover {
  background: #ca6510;
}

.activate-btn:disabled {
  background: #09ad61;
  cursor: not-allowed;
}

.edit-loan-btn {
  background: #0d6efd;
}

.edit-loan-btn:hover {
  background: #146c43;
}

.delete-btn {
  background: none;
  border: none;
  color: #d9534f;
  font-size: 18px;
  cursor: pointer;
}

.delete-btn:hover {
  color: #b52b27;
}

.archive-btn {
  background: #dc3545;
}

.archive-btn:hover {
  background: #b02a37;
}

/* ===== DELETE MODAL ===== */
.modal {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}

.modal.hidden {
  display: none;
}

.modal-content {
  background: white;
  padding: 22px;
  border-radius: 14px;
  width: 90%;
  max-width: 360px;
  text-align: center;
  box-shadow: 0 20px 40px rgba(0,0,0,0.2);
}

.modal-content h3 {
  margin: 0 0 8px;
}

.modal-content p {
  font-size: 14px;
  color: #666;
}

.modal-actions {
  display: flex;
  gap: 10px;
  margin-top: 16px;
}

.danger-btn {
  background: #dc3545;
}

.danger-btn:hover {
  background: #b02a37;
}

/* ===== UNDO TOAST ===== */
.undo-toast {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  background: #222;
  color: white;
  padding: 12px 18px;
  border-radius: 10px;
  display: flex;
  gap: 12px;
  align-items: center;
  box-shadow: 0 8px 20px rgba(0,0,0,0.3);
  z-index: 1001;
}

.undo-toast.hidden {
  display: none;
}

.undo-toast button {
  background: none;
  border: none;
  color: #0d6efd;
  font-weight: 600;
  cursor: pointer;
}

/* ===== DELETE ANIMATION ===== */
.member-card.removing {
  opacity: 0;
  transform: translateX(40px);
  transition: all 0.3s ease;
}

/* ===============================
   MOBILE RESPONSIVE
   =============================== */
@media screen and (max-width: 768px) {

  body {
    padding: 14px;
  }

  #landing-page,
  #member-page,
  #admin-login-page,
  #admin-view {
    width: 100%;
    max-width: 100%;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 0 12px;
    margin: 0 auto;
  }

  h1 {
    font-size: 24px;
  }

  h2 {
    font-size: 20px;
  }

  input {
    width: 100%;
    font-size: 16px;
    padding: 12px;
    margin-bottom: 10px;
    border-radius: 10px;
  }

  button {
    width: 100%;
    font-size: 16px;
    padding: 14px;
    border-radius: 12px;
    margin-top: 8px;
  }

  button:active {
    transform: scale(0.97);
  }

  button:not(.secondary-btn):not(.delete-btn):not(.activate-btn) {
    background: linear-gradient(135deg, #0d6efd, #0b5ed7);
    box-shadow: 0 6px 14px rgba(13, 110, 253, 0.35);
  }

  button:not(.secondary-btn):not(.delete-btn):not(.activate-btn):hover {
    background: linear-gradient(135deg, #0b5ed7, #084298);
  }

  .secondary-btn {
    background: #f1f3f5;
    color: #333;
    box-shadow: none;
  }

  .secondary-btn:hover {
    background: #e9ecef;
  }

  /* Admin member list */
  .members-container {
    padding: 12px;
    width: 100%;
  }

  #view-history-btn,
  #history-back-btn,
  #admin-dashboard-back-btn {
    width: 100%;
  }

  .member-card {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
    padding: 12px;
    border-radius: 12px;
    background: #fff;
  }

  .member-info {
    width: 100%;
  }

  .member-name {
    font-size: 16px;
  }

  .member-meta {
    font-size: 14px;
  }

   .member-actions {
    width: 100%;
    flex-direction: row;
    justify-content: flex-end;
    gap: 8px;
  }

  .activate-btn,
  .edit-loan-btn,
  .danger-btn,
  .delete-btn {
    width: auto;
    align-self: flex-end;
    font-size: 15px;
    padding: 8px 10px;
    border-radius: 8px;
    margin-top: 0;
    transition: transform 0.2s ease, background 0.2s ease;
  }

  .activate-btn {
    background: #fd7e14;
    color: #fff;
  }

  .activate-btn:hover {
    background: #ca6510;
  }

  .activate-btn:disabled {
    background: #09ad61;
  }

  .edit-loan-btn {
    background: #198754;
    color: #fff;
  }

  .delete-btn {
    background: transparent;
    color: #dc3545;
    transition: transform 0.2s ease, background 0.2s ease;
  }

  .delete-btn:hover {
    background: rgba(220, 53, 69, 0.1);
    transform: scale(1.05);
  }

  .total-count {
    text-align: center;
    font-size: 14px;
    margin-top: 12px;
    color: #555;
  }

  .modal-content {
    width: 90%;
    max-width: 320px;
    padding: 16px;
  }

  .modal-actions {
    flex-direction: column;
    gap: 10px;
  }

  .undo-toast {
    bottom: 16px;
    padding: 10px 14px;
    font-size: 14px;
    flex-direction: column;
    gap: 8px;
  }
}
.proof-image {
  width: 140px;
  max-width: 100%;
  margin-top: 6px;
  border-radius: 8px;
  border: 1px solid #ddd;
}

.proof-toggle-btn {
  padding: 4px 10px;
  font-size: 12px;
  margin-left: 6px;
}

#view-activated-btn,
#view-history-btn {
  margin-bottom: 12px;
  margin-right: 8px;
}

#team-leader-filters,
#activated-team-leader-filters {
  margin-bottom: 12px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.filter-btn {
  width: auto;
}

.active-filter {
  background: #0d6efd;
  color: #fff;
}

#team-leader-btn {
  margin-top: 8px;
}

.team-leader-member-filter-btn {
  background: #6c757d;
  color: #fff;
  font-size: 12px;
  padding: 4px 10px;
  margin-left: 6px;
}

.team-leader-member-filter-btn:hover {
  background: #5a6268;
}

.team-leader-member-filter-btn:disabled {
  background: #adb5bd;
  cursor: not-allowed;
}