@import url("https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800;900&display=swap");

:root {
  --bg: #f7f3ee;
  --card: #ffffff;
  --text: #18202b;
  --muted: #667085;
  --red: #e84d2a;
  --blue: #2764a8;
  --blue-dark: #1d4f88;
  --border: #ebe2d8;
  --soft: #faf7f3;
  --shadow-soft: 0 2px 8px rgba(0, 0, 0, 0.035);
  --shadow-modal: 0 22px 70px rgba(24, 32, 43, 0.22);
  --radius-xl: 30px;
  --radius-lg: 22px;
  --radius-md: 16px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

img {
  max-width: 100%;
  display: block;
}

button,
input,
textarea,
select {
  font: inherit;
}

button {
  cursor: pointer;
  border: none;
}

.site-header {
  max-width: 1180px;
  margin: 0 auto;
  padding: 34px 24px 18px;
}

.hero-branding {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 18px;
  margin-bottom: 26px;
}

.logo-stack {
  display: flex;
  justify-content: center;
  width: 100%;
}

.social-logo {
  width: min(420px, 88vw);
}

.hero-copy {
  max-width: 620px;
}

.eyebrow {
  margin: 0 0 12px;
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: 0.17em;
  text-transform: uppercase;
  color: var(--red);
}

.subhead {
  margin: 0;
  max-width: 620px;
  font-size: 1.08rem;
  line-height: 1.55;
  color: var(--muted);
}

.header-actions {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  justify-content: center;
}

main {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 24px 40px;
}

.page {
  display: none;
}

.page.active {
  display: block;
}

.primary-btn,
.secondary-btn,
.ghost-btn,
.admin-float-btn {
  border-radius: 999px;
  padding: 14px 22px;
  font-weight: 800;
  transition: all 0.2s ease;
}

.primary-btn {
  background: var(--blue);
  color: #ffffff;
}

.primary-btn:hover {
  background: var(--blue-dark);
  transform: translateY(-1px);
}

.secondary-btn {
  background: #ffffff;
  color: var(--blue);
  border: 1px solid #d5e3f4;
}

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

.ghost-btn {
  background: #fff4ef;
  color: var(--red);
  border: 1px solid #f4ddd4;
}

.ghost-btn:hover {
  background: #ffe8de;
}

.campaign-card,
.reward-card,
.admin-panel,
.scan-result-card,
.stat-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-soft);
}

.campaign-card {
  padding: 36px;
}

.campaign-card h2,
.reward-card h2,
.admin-header h2 {
  margin: 0 0 20px;
  font-size: clamp(2.25rem, 5vw, 4rem);
  line-height: 0.98;
  letter-spacing: -0.055em;
}

.participant-card {
  margin: 24px 0;
  padding: 22px;
  background: var(--soft);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
}

.participant-card h3 {
  margin: 0 0 8px;
  font-size: 1.45rem;
}

.participant-card p {
  margin: 0;
  color: var(--muted);
}

.progress-card {
  margin: 26px 0 32px;
}

.progress-topline {
  margin-bottom: 12px;
}

.progress-topline strong {
  font-size: 1.3rem;
}

.progress-track {
  width: 100%;
  height: 14px;
  background: #ebe5dd;
  border-radius: 999px;
  overflow: hidden;
}

.progress-fill {
  width: 0;
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--red), var(--blue));
  transition: width 0.3s ease;
}

.stamp-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.stamp {
  min-height: 138px;
  padding: 22px;
  background: #fcfbfa;
  border: 2px solid #ece3d8;
  border-radius: var(--radius-lg);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  cursor: pointer;
  transition:
    transform 0.18s ease,
    border-color 0.18s ease,
    background 0.18s ease,
    box-shadow 0.18s ease;
  position: relative;
  overflow: hidden;
}

.stamp:hover {
  transform: translateY(-2px);
  border-color: #cdddf0;
  background: #ffffff;
  box-shadow: 0 10px 24px rgba(39, 100, 168, 0.08);
}

.stamp.pending::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(
      135deg,
      rgba(39, 100, 168, 0.015),
      rgba(232, 77, 42, 0.02)
    );
  pointer-events: none;
}

.stamp.collected {
  border-color: #b9d8bf;
  background: linear-gradient(
    180deg,
    #f7fff8 0%,
    #f1fff4 100%
  );
}

.stamp-top {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: flex-start;
}

.stamp-business {
  flex: 1;
}

.stamp-business strong {
  display: block;
  font-size: 1.08rem;
  line-height: 1.25;
  margin-bottom: 7px;
}

.stamp-business span {
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.45;
}

..stamp-status {
  min-width: 92px;
  border-radius: 18px;
  padding: 12px 10px;
  text-align: center;
  flex-shrink: 0;

  border: 0;
  appearance: none;
  -webkit-appearance: none;
  font-family: inherit;
  cursor: pointer;
}

.pending-status {
  background: #eef5ff;
  border: 1px solid #d8e6f8;
}

.collected-status {
  background: #e9f8ec;
  border: 1px solid #cce9d2;
}

.stamp-status {
  min-width: 104px;
  border-radius: 999px;
  padding: 10px 14px;
  text-align: center;
  flex-shrink: 0;
  border: 1px solid transparent;
  appearance: none;
  -webkit-appearance: none;
  font-family: inherit;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.pending-status {
  background: linear-gradient(135deg, #ffffff, #f3f8ff);
  border-color: #cfe0f4;
  color: var(--blue);
  box-shadow: 0 8px 18px rgba(39, 100, 168, 0.08);
}

.pending-status:hover {
  background: var(--blue);
  color: #ffffff;
  transform: translateY(-1px);
}

.collected-status {
  background: linear-gradient(135deg, #effaf2, #ffffff);
  border-color: #bfe7c7;
  color: #237a3b;
  box-shadow: 0 8px 18px rgba(47, 158, 68, 0.08);
}

.stamp-check {
  font-size: 1rem;
  line-height: 1;
  font-weight: 900;
}

.stamp-qr {
  width: 18px;
  height: 18px;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2px;
}

.stamp-qr span {
  background: currentColor;
  border-radius: 2px;
  opacity: 0.95;
}

.stamp-status small {
  display: block;
  font-size: 0.72rem;
  line-height: 1;
  font-weight: 900;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: currentColor;
}

.stamp-bottom {
  margin-top: 18px;
}

.map-hint {
  width: 100%;
  min-width: unset;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 18px;
  border-radius: 999px;
  background: linear-gradient(135deg, #ffffff, #f3f8ff);
  border: 1px solid #cfe0f4;
  color: var(--blue);
  box-shadow: 0 8px 18px rgba(39, 100, 168, 0.08);
  font-size: 0.72rem;
  line-height: 1;
  font-weight: 900;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.map-hint:hover {
  background: var(--blue);
  color: #ffffff;
  transform: translateY(-1px);
}

.reward-card {
  margin-top: 28px;
  padding: 32px;
}

.reward-list {
  display: grid;
  gap: 14px;
}

.reward {
  display: grid;
  grid-template-columns: 1fr 2fr auto;
  gap: 16px;
  align-items: center;
  padding: 18px 20px;
  border-radius: var(--radius-md);
  background: var(--soft);
  border: 1px solid var(--border);
}

.reward.unlocked {
  background: #f4f8ff;
  border-color: #d5e3f4;
}
.reward-progress {
  display: grid;
  gap: 8px;
  min-width: 150px;
}

.reward-progress-top {
  display: flex;
  justify-content: flex-end;
}

.reward-progress-track {
  width: 100%;
  height: 9px;
  border-radius: 999px;
  background: #ebe5dd;
  overflow: hidden;
}

.reward-progress-fill {
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--red), var(--blue));
  transition: width 0.3s ease;
}
.reward strong {
  font-size: 1rem;
}

.reward span,
.reward small,
.muted {
  color: var(--muted);
}

.scan-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 20px;
}

.scan-result-card {
  padding: 24px;
  margin-bottom: 24px;
}

.admin-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 22px;
  gap: 20px;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 22px;
}

.stat-card {
  padding: 22px;
}

.stat-card strong {
  display: block;
  font-size: 2rem;
  line-height: 1;
}

.stat-card span {
  color: var(--muted);
  font-weight: 600;
}

.admin-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 22px;
  margin-bottom: 22px;
}

.admin-panel {
  padding: 24px;
  margin-bottom: 22px;
}

.admin-panel h3 {
  margin-top: 0;
  margin-bottom: 14px;
  font-size: 1.4rem;
}

.input,
.textarea {
  width: 100%;
  padding: 14px 16px;
  margin-bottom: 12px;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: #ffffff;
  color: var(--text);
  outline: none;
}

.input:focus,
.textarea:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 4px rgba(39, 100, 168, 0.1);
}

.textarea {
  min-height: 140px;
  resize: vertical;
}

.button-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 8px 0 18px;
}

.business-directory {
  max-height: 520px;
  overflow: auto;
  display: grid;
  gap: 10px;
}

.business-row {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 12px;
  padding: 14px;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: var(--soft);
}

.business-row input {
  margin-top: 5px;
  transform: scale(1.15);
}

.business-row strong,
.business-row small {
  display: block;
}

.business-row small {
  margin-top: 4px;
  color: var(--muted);
}

.qr-list,
.email-history,
.admin-user-list {
  display: grid;
  gap: 12px;
}

.qr-row,
.email-row,
.admin-user-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 14px;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: var(--soft);
}

.qr-row small,
.email-row small,
.admin-user-row small {
  color: var(--muted);
}

.qr-row small {
  word-break: break-all;
}

.qr-row button,
.admin-user-row button {
  padding: 10px 14px;
  border-radius: 999px;
  background: var(--blue);
  color: #ffffff;
  font-weight: 700;
}

.faux-map {
  position: relative;
  min-height: 320px;
  overflow: hidden;
  border-radius: var(--radius-xl);
  background:
    linear-gradient(90deg, rgba(39, 100, 168, 0.05) 1px, transparent 1px),
    linear-gradient(rgba(39, 100, 168, 0.05) 1px, transparent 1px),
    #f6efe6;
  background-size: 44px 44px;
  border: 1px solid var(--border);
}
.qualification-list {
  display: grid;
  gap: 18px;
  margin-top: 18px;
}

.qualification-tier {
  border: 1px solid var(--border);
  background: var(--soft);
  border-radius: 18px;
  padding: 16px;
}

.qualification-tier h4 {
  margin: 0 0 10px;
  font-size: 1rem;
}

.qualified-person {
  display: grid;
  grid-template-columns: 1fr;
  gap: 3px;
  padding: 12px 0;
  border-top: 1px solid var(--border);
}

.qualified-person strong {
  font-size: 0.95rem;
}

.qualified-person span {
  color: var(--muted);
  font-size: 0.85rem;
}

.postal-heat-map {
  display: grid;
  gap: 14px;
  margin-top: 18px;
}

.postal-row {
  display: grid;
  grid-template-columns: minmax(190px, 1.2fr) 1.8fr 44px;
  gap: 16px;
  align-items: center;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
}

.postal-row:last-child {
  border-bottom: 0;
}

.postal-prefix {
  font-weight: 900;
  color: var(--text);
}
.postal-area {
  margin-top: 4px;
  color: var(--muted);
  font-size: 0.8rem;
  line-height: 1.35;
  max-width: 230px;
}
.postal-bar-track {
  height: 14px;
  border-radius: 999px;
  background: #ebe5dd;
  overflow: hidden;
}

.postal-bar-fill {
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--red), var(--blue));
}

.postal-count {
  color: var(--muted);
  font-size: 0.85rem;
  font-weight: 900;
  text-align: right;
}
.pin {
  position: absolute;
  width: 34px;
  height: 34px;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background: var(--red);
  color: #ffffff;
  display: grid;
  place-items: center;
  font-weight: 800;
  font-size: 0.85rem;
}

.admin-float-btn {
  display: block;
  margin: 0 auto 30px;
  background: var(--text);
  color: #ffffff;
  box-shadow: var(--shadow-soft);
}

.admin-float-btn:hover {
  background: var(--red);
  transform: translateY(-1px);
}

.site-footer {
  max-width: 1180px;
  margin: 0 auto;
  padding: 10px 24px 80px;
  display: flex;
  justify-content: center;
}

.footer-logo {
  width: 120px;
  opacity: 0.45;
  filter: grayscale(10%);
}

.modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: start center;
  padding: 24px;
  background: rgba(24, 32, 43, 0.52);
  backdrop-filter: blur(8px);
  overflow-y: auto;
}

.modal.hidden {
  display: none;
}

.modal-card {
  width: min(100%, 520px);
  max-height: calc(100vh - 48px);
  overflow-y: auto;
  padding: 34px;
  border-radius: 30px;
  background: #ffffff;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-modal);
  -webkit-overflow-scrolling: touch;
}

.modal-card h2 {
  margin: 0 0 8px;
  font-size: 2.25rem;
  line-height: 1;
  letter-spacing: -0.055em;
}

.modal-card p {
  margin: 0 0 22px;
  color: var(--muted);
  line-height: 1.55;
}

.modal-card small {
  display: block;
  margin-top: 10px;
  text-align: center;
  color: var(--muted);
}

.modal-card .input {
  margin-bottom: 16px;
  background: var(--soft);
}

.modal-card .button-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
  margin: 0;
}

.modal-card .primary-btn,
.modal-card .ghost-btn {
  width: 100%;
}

#adminLoginModal .modal-card {
  text-align: left;
  position: relative;
}

#adminLoginModal .modal-card::before {
  content: "Admin";
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 18px;
  padding: 7px 12px;
  border-radius: 999px;
  background: #fff4ef;
  color: var(--red);
  font-size: 0.76rem;
  font-weight: 900;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

#adminPassword {
  font-size: 1rem;
}

@media (max-width: 900px) {
  .stamp-grid,
  .stats-grid,
  .admin-grid {
    grid-template-columns: 1fr;
  }

  .reward {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 680px) {
  .site-header,
  main,
  .site-footer {
    padding-left: 16px;
    padding-right: 16px;
  }
.stamp-top {
  flex-direction: column;
}

.stamp-status {
  width: 100%;
  min-width: unset;
  justify-content: center;
  padding: 14px 18px;
  margin-top: 4px;
}

.stamp-business {
  width: 100%;
}

.stamp-business strong {
  font-size: 1.3rem;
  margin-bottom: 10px;
}

.stamp-business span {
  font-size: 1rem;
  line-height: 1.55;
}

.stamp-qr {
  width: 20px;
  height: 20px;
}
  .social-logo {
    width: min(330px, 92vw);
  }

  .header-actions {
    width: 100%;
  }

  .header-actions button {
    flex: 1;
  }

  .campaign-card,
  .reward-card,
  .admin-panel {
    padding: 24px;
    border-radius: 24px;
  }

  .campaign-card h2,
  .reward-card h2,
  .admin-header h2 {
    font-size: 2.85rem;
  }

  .stamp-grid {
    grid-template-columns: 1fr;
  }

  .primary-btn,
  .secondary-btn,
  .ghost-btn {
    width: 100%;
  }

  .footer-logo {
    width: 105px;
  }

  .modal {
    padding: 16px;
  }

  .modal-card {
    padding: 26px;
    border-radius: 26px;
  }

  .modal-card h2 {
    font-size: 2rem;
  }
}
.consent-box {
  margin-top: 18px;
  margin-bottom: 18px;
  padding: 16px;
  border-radius: 18px;
  background: rgba(255,255,255,0.72);
  border: 1px solid rgba(0,0,0,0.08);
}

.consent-check {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  font-size: 13px;
  line-height: 1.6;
  color: #475569;
}

.consent-check input {
  margin-top: 3px;
  transform: scale(1.08);
}

.consent-note {
  margin: 14px 0 0;
  padding-top: 14px;
  border-top: 1px solid rgba(0,0,0,0.08);
  font-size: 12px;
  line-height: 1.6;
  color: #64748b;
}
.camera-demo-modal {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(0, 0, 0, 0.88);
  display: grid;
  place-items: center;
  padding: 20px;
}

.camera-demo-card {
  width: min(100%, 520px);
  display: grid;
  gap: 16px;
}

#cameraPreview {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  border-radius: 28px;
  background: #000;
}

#closeCameraDemoBtn {
  width: 100%;
  border: 0;
  border-radius: 999px;
  padding: 16px 20px;
  background: var(--red);
  color: #ffffff;
  font-weight: 900;
  font-size: 1rem;
}
.business-form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px;
  margin: 22px 0;
  max-width: 1100px;
}

.business-form-grid input,
.business-form-grid select {
  width: 100%;
  height: 56px;
  padding: 0 18px;
  border-radius: 14px;
  border: 1px solid #d7deea;
  background: #ffffff;
  font-size: 16px;
  font-weight: 500;
  color: #1d2736;
  box-sizing: border-box;
}

.business-form-grid input:focus,
.business-form-grid select:focus {
  outline: none;
  border-color: #2f67b2;
  box-shadow: 0 0 0 4px rgba(47, 103, 178, 0.12);
}

.admin-card {
  padding: 28px;
  border-radius: 24px;
  background: #ffffff;
  border: 1px solid #e5ebf3;
  margin-top: 20px;
}

.section-heading h3 {
  margin-bottom: 8px;
}

.section-heading p {
  margin-top: 0;
  color: #6b7280;
}
.rp-footer {
  text-align: center;
  font-size: 0.7rem;
  color: #999;
  padding: 16px 0 24px;
}

.rp-footer a {
  color: inherit;
  text-decoration: none;
  font-weight: 600;
}

.rp-footer a:hover {
  text-decoration: underline;
}
.footer-admin {
  margin-top: 8px;
  text-align: center;
}

.footer-admin button,
.footer-admin a {
  font-size: 0.7rem;
  color: #999;
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  text-decoration: none;
}

.footer-admin button:hover,
.footer-admin a:hover {
  text-decoration: underline;
}
.footer-logo-wrapper {
  text-align: center;
}
