/* ============================================================
   EDIT YOUR APP COLORS HERE
   ============================================================ */
:root {
  --background: #9bd5f5;
  --foreground: #2a2118;
  --card: #ec83a3;
  --muted: #020100;
  --accent: #f1d58b;
  --accent-dark: #7b9657;
  --ink: #1f1710;
  --gold: #d4a017;
  --danger: #9f1f1f;
  --success: #1f6b45;
  --radius: 1.5rem;
  --shadow: 0 1px 0 rgba(255, 255, 255, 0.7) inset,
    0 18px 40px -24px rgba(42, 33, 24, 0.45);
}

/* EDIT FONTS HERE (must match the <link> in each HTML file) */
:root {
  --font-sans: "DM Sans", ui-sans-serif, system-ui, sans-serif;
  --font-mono: "DM Mono", ui-monospace, monospace;
}

/* ---------- Base layout ---------- */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
}

body.page {
  font-family: var(--font-sans);
  background: var(--background);
  color: var(--foreground);
  line-height: 1.5;
}

.page-center {
  display: grid;
  place-items: center;
  min-height: 100vh;
}

.narrow {
  width: min(32rem, calc(100% - 2rem));
  margin: 0 auto;
  padding: 2.5rem 0 3rem;
}

.wide {
  width: min(40rem, calc(100% - 2rem));
  margin: 0 auto;
  padding: 2.5rem 0 3rem;
}

h1,
h2 {
  margin: 0;
  color: var(--ink);
  letter-spacing: -0.02em;
}

h1 {
  font-size: clamp(1.75rem, 4vw, 2.25rem);
}

h2 {
  font-size: 1.15rem;
}

p {
  margin: 0;
}

.muted {
  color: var(--muted);
  font-size: 0.95rem;
}

.mono {
  font-family: var(--font-mono);
}

.eyebrow {
  margin: 0 0 0.35rem;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent);
}

.lede {
  margin-top: 1rem;
  max-width: 36rem;
  color: var(--muted);
}

.lede.tight {
  max-width: 38rem;
  margin-bottom: 1.25rem;
}

/* ---------- Cards ---------- */
.paper-card {
  background:
    radial-gradient(1200px 400px at 10% -10%, rgba(212, 160, 23, 0.12), transparent 50%),
    var(--card);
  box-shadow: var(--shadow);
  border-radius: var(--radius);
  padding: 1.5rem;
}

@media (min-width: 640px) {
  .paper-card {
    padding: 2rem;
  }
}

.wide > .paper-card + .paper-card,
.wide > .banner {
  margin-top: 1.25rem;
}

/* ---------- Header ---------- */
.app-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 2rem;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.brand-name {
  font-weight: 650;
  color: var(--ink);
  font-size: 0.95rem;
}

.brand-meta {
  font-size: 0.75rem;
  color: var(--muted);
}

.logo-mark {
  /* display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 3rem;
  height: 3rem;
  border-radius: 1rem;
  background: var(--ink);
  font-size: 1.35rem; */
  img {
    width: auto;
    height: 10rem;
    object-fit: cover;
  }
}

.logo-mark.sm {
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 999px;
  font-size: 1rem;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  height: 2.75rem;
  padding: 0 1.15rem;
  border: 0;
  border-radius: 0.85rem;
  font: inherit;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
}

.btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.btn-primary {
  width: 100%;
  background: var(--accent);
  color: #fff;
}

.btn-primary:hover {
  background: #fcc326;
}

.btn-ink {
  background: var(--ink);
  color: #fff;
  border-radius: 999px;
}

.btn-ink:hover {
  background: #000;
}

.btn-ghost {
  height: 2.1rem;
  border-radius: 999px;
  border: 1px solid rgba(0, 0, 0, 0.1);
  background: #fff;
  color: var(--ink);
  font-weight: 500;
  font-size: 0.875rem;
}

.btn-ghost:hover {
  background: rgba(0, 0, 0, 0.04);
}

.btn-google {
  width: 100%;
  background: #fff;
  color: var(--ink);
  border: 1px solid rgba(0, 0, 0, 0.1);
  font-weight: 500;
}

.btn-google:hover {
  background: rgba(0, 0, 0, 0.04);
}

/* ---------- Landing ---------- */
.page-landing {
  min-height: 100vh;
}

.landing {
  width: min(24rem, calc(100% - 2rem));
  min-height: 100vh;
  margin: 0 auto;
  padding: 2.5rem 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1.5rem;
  text-align: center;
}

.landing-copy {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.landing .auth-card {
  width: 100%;
  text-align: left;
}

.landing h1 {
  font-size: clamp(2.4rem, 6vw, 3.2rem);
}

.feature-grid {
  list-style: none;
  padding: 0;
  margin: 1.75rem 0 0;
  display: grid;
  gap: 0.75rem;
}

@media (min-width: 640px) {
  .feature-grid {
    grid-template-columns: 1fr 1fr;
  }
}

.feature-grid li {
  background: rgba(255, 255, 255, 0.6);
  border-radius: 1rem;
  padding: 0.85rem 1rem;
  font-size: 0.9rem;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.05);
}

.config-warning {
  margin-top: 1.25rem;
  padding: 0.85rem 1rem;
  border-radius: 1rem;
  background: #fff7e6;
  color: #5c3b00;
  box-shadow: 0 0 0 1px #f1d48a;
  font-size: 0.9rem;
}

code {
  font-family: var(--font-mono);
  font-size: 0.85em;
}

/* ---------- Auth form ---------- */
.tabs {
  display: flex;
  padding: 0.25rem;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.05);
  margin-bottom: 1.25rem;
}

.tab {
  flex: 1;
  border: 0;
  background: transparent;
  border-radius: 999px;
  padding: 0.5rem;
  font: inherit;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--muted);
  cursor: pointer;
}

.tab.is-active {
  background: #fff;
  color: var(--ink);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
}

[hidden] {
  display: none !important;
}

label {
  display: block;
  margin-bottom: 0.75rem;
  font-size: 0.9rem;
}

label span {
  display: block;
  margin-bottom: 0.3rem;
  color: var(--muted);
}

input {
  width: 100%;
  height: 2.75rem;
  padding: 0 0.8rem;
  border: 1px solid rgba(0, 0, 0, 0.1);
  border-radius: 0.85rem;
  background: #fff;
  font: inherit;
  color: var(--ink);
  outline: none;
}

input:focus {
  box-shadow: 0 0 0 3px rgba(196, 92, 38, 0.28);
}

.divider {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin: 1.1rem 0;
  color: var(--muted);
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.divider::before,
.divider::after {
  content: "";
  height: 1px;
  flex: 1;
  background: rgba(0, 0, 0, 0.1);
}

.auth-message {
  margin-top: 1rem;
  font-size: 0.9rem;
  color: var(--muted);
}

/* ---------- Customer card ---------- */
.punch-card h1 {
  margin-top: 0.35rem;
}

.reward-banner {
  margin-bottom: 1.25rem;
  padding: 0.9rem 1rem;
  border-radius: 1rem;
  background: var(--gold);
  color: var(--ink);
  text-align: center;
}

.reward-title {
  font-size: 0.85rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.progress-block {
  margin-top: 1.75rem;
}

.progress-labels {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  font-size: 0.9rem;
  font-weight: 600;
}

.visit-count {
  font-family: var(--font-mono);
  font-size: 1.05rem;
}

.progress-track {
  margin-top: 0.7rem;
  height: 0.5rem;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.1);
  overflow: hidden;
}

.progress-bar {
  height: 100%;
  width: 0;
  background: var(--accent);
  transition: width 0.3s ease;
}

.progress-bar.is-reward {
  background: var(--gold);
}

.punch-list {
  list-style: none;
  padding: 0;
  margin: 1rem 0 0;

  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 0.5rem;
}

/* PHONE */
@media (max-width: 479px) {
  .punch-list {
    grid-template-columns: repeat(5, 1fr);
    gap: 0.5rem;
  }
}

/* COMPUTER */
@media (min-width: 480px) {
  .punch-list {
    grid-template-columns: repeat(5, 1fr);
    gap: 0.35rem;
  }
}

/* --- THE INDIVIDUAL PUNCHES --- */
.punch {
  width: 100%;
  aspect-ratio: 1;

  display: flex;
  align-items: center;
  justify-content: center;

  border-radius: 50%;
  border: 2px solid rgba(0, 0, 0, 0.15);
  box-sizing: border-box;
}

/* Hides the icon by default */
.punch .punch-icon {
  display: none;
}

/* --- FILLED/REWARD STATES --- */
.punch.is-filled {
  border-color: var(--accent);
  background: var(--accent);
}

.punch-list.is-reward .punch.is-filled {
  border-color: var(--gold);
  background: var(--gold);
}

.punch.is-filled .punch-icon {
  display: block;
  font-size: max(3rem, 3vw);
  color: #000000;
}

.barcode-wrap {
  display: flex;
  justify-content: center;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  margin-top: 1.75rem;
  padding: 1rem 0.75rem;
  border-radius: 1rem;
  background: #fff;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.05);
  text-align: center;
}

.barcode-wrap div {
  max-width: 100%;
  height: auto;
}

.barcode-caption {
  margin-top: 0.25rem;
  font-size: 0.75rem;
  color: var(--muted);
}

/* ---------- Admin scanner ---------- */
#qr-reader video {
  width: 100% !important;
  border-radius: 1rem;
}

.scanner-wrap {
  margin-top: 1.1rem;
  overflow: hidden;
  border-radius: 1rem;
  background: #111;
}

.manual-form {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-top: 1rem;
}

@media (min-width: 640px) {
  .manual-form {
    flex-direction: row;
  }

  .manual-form .btn {
    width: auto;
    white-space: nowrap;
  }
}

.banner {
  padding: 1rem 1.15rem;
  border-radius: 1rem;
}

.banner-kicker {
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.banner-body {
  margin-top: 0.25rem;
}

.banner-error {
  background: #fff1f1;
  color: var(--danger);
  box-shadow: 0 0 0 1px #f3c1c1;
}

.banner-success {
  background: #eefaf3;
  color: var(--ink);
  box-shadow: 0 0 0 1px #b7e4c7;
}

.banner-reward {
  background: #fff6d8;
  color: var(--ink);
  box-shadow: 0 0 0 1px rgba(212, 160, 23, 0.5);
}

.log-list {
  list-style: none;
  padding: 0;
  margin: 0.75rem 0 0;
}

.log-row {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.65rem 0;
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
  font-size: 0.9rem;
}

.log-id {
  font-family: var(--font-mono);
  font-weight: 600;
}

.log-time {
  font-size: 0.75rem;
  color: var(--muted);
}

.log-meta {
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.log-reward {
  display: block;
  font-size: 0.75rem;
  font-weight: 700;
  color: #ffdd00;
}
