* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: Arial, sans-serif;
  background: linear-gradient(135deg, #eef2f7, #f9fbfd);
  color: #222;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: linear-gradient(90deg, #00c6ff, #0072ff, #7b2ff7);
  color: #fff;
  padding: 15px 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  box-shadow: 0 8px 20px rgba(0,0,0,0.12);
}

.brand {
  font-size: 22px;
  font-weight: bold;
}

.member-box,
.top-link {
  background: rgba(255,255,255,0.15);
  padding: 10px 14px;
  border-radius: 10px;
  color: #fff;
  text-decoration: none;
}

.page-wrap {
  width: 100%;
  padding: 30px 15px;
}

.card,
.home-card {
  max-width: 1100px;
  margin: 0 auto;
  background: #fff;
  border-radius: 18px;
  padding: 25px;
  box-shadow: 0 12px 30px rgba(0,0,0,0.08);
}

.home-card {
  max-width: 700px;
  text-align: center;
}

.home-card h1 {
  margin-bottom: 10px;
}

.home-card p {
  color: #555;
  margin-bottom: 25px;
}

.home-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 15px;
}

.home-btn {
  text-decoration: none;
  background: linear-gradient(90deg, #0072ff, #7b2ff7);
  color: #fff;
  padding: 15px;
  border-radius: 12px;
  font-weight: bold;
}

.section-title {
  margin-bottom: 20px;
  font-size: 26px;
}

.agent-form .form-group {
  margin-bottom: 16px;
}

.agent-form label {
  display: block;
  margin-bottom: 8px;
  font-weight: bold;
}

.agent-form input {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid #d8d8d8;
  border-radius: 10px;
  outline: none;
}

.agent-form small {
  color: #666;
}

.form-actions {
  display: flex;
  gap: 12px;
  margin-top: 20px;
  flex-wrap: wrap;
}

.btn-primary,
.btn-light {
  text-decoration: none;
  border: none;
  cursor: pointer;
  padding: 12px 18px;
  border-radius: 10px;
  font-size: 15px;
  font-weight: bold;
}

.btn-primary {
  background: linear-gradient(90deg, #0072ff, #7b2ff7);
  color: #fff;
}

.btn-light {
  background: #edf2f7;
  color: #333;
}

.center {
  text-align: center;
}

.success-text {
  color: #15803d;
  margin-bottom: 12px;
}

.qr-preview img {
  width: 180px;
  margin: 20px 0;
}

.table-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 15px;
  flex-wrap: wrap;
}

#searchInput {
  padding: 12px 14px;
  border: 1px solid #ddd;
  border-radius: 10px;
  min-width: 250px;
}

.table-wrap {
  width: 100%;
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
}

table thead th {
  background: linear-gradient(90deg, #0072ff, #7b2ff7);
  color: #fff;
  padding: 12px;
  text-align: left;
}

table tbody td {
  padding: 12px;
  border-bottom: 1px solid #eee;
  vertical-align: top;
}

.table-img {
  width: 120px;
  height: auto;
  border-radius: 8px;
}

.qr-thumb {
  width: 70px;
}

.scanner-card {
  max-width: 600px;
  text-align: center;
}

#reader {
  width: 100%;
  max-width: 420px;
  margin: 0 auto;
}

.scan-status {
  margin-top: 20px;
  font-weight: bold;
  color: #444;
}

.report-card {
  max-width: 900px;
}

.report-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 14px;
  margin-bottom: 25px;
}

.report-item {
  background: #f8fafc;
  padding: 14px;
  border-radius: 10px;
}

.report-images {
  display: grid;
  grid-template-columns: 1fr 280px;
  gap: 20px;
  align-items: start;
}

.report-images h4 {
  margin-bottom: 10px;
}

.report-banner {
  width: 100%;
  max-height: 260px;
  object-fit: cover;
  border-radius: 12px;
}

.report-qr {
  width: 200px;
}

.center-actions {
  justify-content: center;
}

@media (max-width: 768px) {
  .topbar {
    flex-direction: column;
    gap: 10px;
    align-items: flex-start;
  }

  .report-images {
    grid-template-columns: 1fr;
  }

  .report-qr {
    width: 160px;
  }
}
.action-btns {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.btn-small {
  text-decoration: none;
  padding: 8px 12px;
  border-radius: 8px;
  color: #fff;
  font-size: 13px;
  font-weight: bold;
  display: inline-block;
}

.btn-edit {
  background: #2563eb;
}

.btn-delete {
  background: #dc2626;
}

.edit-preview {
  width: 220px;
  max-width: 100%;
  border-radius: 10px;
  box-shadow: 0 8px 18px rgba(0,0,0,0.08);
}