/* ============================================================
   SHANTI SUTRA — NFC tap landing + owner dashboard
   Black & gold brand. Mobile-first.
   ============================================================ */

:root {
  --bg:        #0A0A0A;
  --bg-soft:   #131211;
  --line:      #2A2620;
  --gold:      #C9A961;
  --gold-soft: #8C7846;
  --gold-light:#E8D4A0;
  --text:      #F5F0E1;
  --muted:     #9C9385;
  --danger:    #E07A5F;
  --success:   #7FB069;

  --serif:  "Cinzel", "Cormorant Garamond", Georgia, serif;
  --sans:   "Manrope", "Inter", -apple-system, BlinkMacSystemFont, sans-serif;

  --radius: 14px;
  --radius-lg: 22px;

  --shadow-gold: 0 8px 28px rgba(201, 169, 97, 0.18);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  min-height: 100%;
}

body {
  background:
    radial-gradient(1200px 600px at 50% -200px, rgba(201,169,97,0.10), transparent 60%),
    radial-gradient(800px 400px at 50% 110%, rgba(201,169,97,0.06), transparent 60%),
    var(--bg);
  min-height: 100dvh;
}

a { color: var(--gold-light); text-decoration: none; }
a:hover { color: var(--gold); }

button { font-family: inherit; cursor: pointer; }

/* ============================================================
   LANDING PAGE
   ============================================================ */

.tap-wrap {
  max-width: 460px;
  margin: 0 auto;
  padding: 36px 22px 60px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  min-height: 100dvh;
}

/* Customer-facing logo (lotus + wordmark, one image) */
.brand-logo {
  width: clamp(180px, 56vw, 240px);
  height: auto;
  display: block;
  margin: 4px auto 26px;
  filter: drop-shadow(0 10px 28px rgba(201, 169, 97, 0.18));
  animation: floatIn 800ms ease-out both;
  /* If the supplied PNG has a black background, this keeps it visually flush
     with the page bg without a hard rectangle edge. */
  border-radius: 16px;
}

.hero-copy {
  margin-bottom: 26px;
  animation: floatIn 900ms 200ms ease-out both;
}

.hero-copy h1 {
  font-family: var(--serif);
  font-weight: 600;
  font-size: clamp(22px, 6vw, 26px);
  line-height: 1.3;
  color: var(--text);
  margin-bottom: 10px;
}

.hero-copy p {
  font-size: 15px;
  color: var(--muted);
  line-height: 1.55;
  max-width: 360px;
  margin: 0 auto;
}

/* Tap-targets / link cards */
.link-stack {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 28px;
  animation: floatIn 900ms 280ms ease-out both;
}

.link-card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 18px;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(255,255,255,0.02), rgba(255,255,255,0));
  color: var(--text);
  font-weight: 600;
  font-size: 15px;
  letter-spacing: 0.02em;
  transition: transform 180ms ease, border-color 180ms ease, background 180ms ease;
  -webkit-tap-highlight-color: transparent;
}

.link-card .icon {
  width: 38px; height: 38px;
  border-radius: 10px;
  display: grid; place-items: center;
  background: rgba(201,169,97,0.10);
  border: 1px solid rgba(201,169,97,0.30);
  color: var(--gold);
  flex-shrink: 0;
}

.link-card .label { flex: 1; text-align: left; }
.link-card .meta  { color: var(--muted); font-weight: 500; font-size: 13px; }

.link-card:hover,
.link-card:active {
  border-color: var(--gold);
  background: linear-gradient(180deg, rgba(201,169,97,0.10), rgba(201,169,97,0.02));
  transform: translateY(-1px);
}

/* Offer card */
.offer {
  width: 100%;
  background:
    linear-gradient(180deg, rgba(201,169,97,0.10), rgba(201,169,97,0.02)),
    var(--bg-soft);
  border: 1px solid rgba(201,169,97,0.35);
  border-radius: var(--radius-lg);
  padding: 24px 22px 22px;
  box-shadow: var(--shadow-gold);
  animation: floatIn 1000ms 360ms ease-out both;
}

.offer-eyebrow {
  font-size: 11px;
  letter-spacing: 0.32em;
  color: var(--gold);
  text-transform: uppercase;
  margin-bottom: 8px;
}

.offer h2 {
  font-family: var(--serif);
  font-weight: 600;
  font-size: clamp(22px, 6vw, 26px);
  color: var(--gold-light);
  line-height: 1.25;
  margin-bottom: 8px;
}

.offer p.lead {
  font-size: 14px;
  color: var(--muted);
  line-height: 1.55;
  margin-bottom: 16px;
}

/* Form */
.form-row { display: flex; flex-direction: column; gap: 10px; }

.field {
  position: relative;
}

.field input {
  width: 100%;
  padding: 14px 16px;
  background: rgba(0,0,0,0.45);
  border: 1px solid var(--line);
  border-radius: 12px;
  color: var(--text);
  font-size: 16px; /* 16px prevents iOS auto-zoom */
  font-family: var(--sans);
  transition: border-color 160ms ease, background 160ms ease;
}

.field input::placeholder { color: #6E6555; }
.field input:focus { outline: none; border-color: var(--gold); background: rgba(0,0,0,0.6); }

.toggle-row {
  display: flex;
  gap: 8px;
  background: rgba(0,0,0,0.4);
  border: 1px solid var(--line);
  padding: 4px;
  border-radius: 12px;
  margin-bottom: 10px;
}
.toggle-row button {
  flex: 1;
  background: transparent;
  border: 0;
  color: var(--muted);
  padding: 9px 8px;
  border-radius: 9px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.04em;
  transition: color 160ms, background 160ms;
}
.toggle-row button.is-active {
  background: rgba(201,169,97,0.16);
  color: var(--gold-light);
}

.consent {
  display: flex;
  gap: 9px;
  align-items: flex-start;
  font-size: 12px;
  color: var(--muted);
  line-height: 1.5;
  margin: 4px 2px 0;
  text-align: left;
}
.consent input { accent-color: var(--gold); margin-top: 2px; }

.btn-primary {
  margin-top: 12px;
  width: 100%;
  padding: 15px 18px;
  border: 0;
  border-radius: 12px;
  background: linear-gradient(180deg, var(--gold-light), var(--gold));
  color: #1a1408;
  font-weight: 800;
  font-size: 15px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  transition: transform 160ms ease, box-shadow 160ms ease, filter 160ms ease;
}
.btn-primary:hover { transform: translateY(-1px); box-shadow: var(--shadow-gold); }
.btn-primary:active { transform: translateY(0); }
.btn-primary:disabled { opacity: 0.55; cursor: progress; }

.form-error {
  color: var(--danger);
  font-size: 13px;
  margin-top: 10px;
  min-height: 16px;
  text-align: left;
}

/* Success state */
.success {
  text-align: center;
  padding: 8px 4px 0;
  animation: floatIn 500ms ease-out both;
}
.success .check {
  width: 56px; height: 56px;
  margin: 0 auto 14px;
  border-radius: 50%;
  background: rgba(127,176,105,0.12);
  border: 1px solid rgba(127,176,105,0.45);
  color: var(--success);
  display: grid; place-items: center;
}
.success h3 {
  font-family: var(--serif);
  color: var(--gold-light);
  font-weight: 600;
  font-size: 22px;
  margin-bottom: 6px;
}
.success p.lead {
  color: var(--muted);
  font-size: 14px;
  margin-bottom: 16px;
  line-height: 1.55;
}
.code-pill {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 12px 18px;
  border-radius: 12px;
  background: rgba(0,0,0,0.5);
  border: 1px dashed var(--gold);
  font-family: "SF Mono", "JetBrains Mono", ui-monospace, monospace;
  letter-spacing: 0.14em;
  font-size: 18px;
  color: var(--gold-light);
}
.code-pill button {
  background: transparent;
  border: 0;
  color: var(--gold);
  font-size: 13px;
  padding: 4px 8px;
  border-radius: 6px;
}
.code-pill button:hover { background: rgba(201,169,97,0.10); }

.footer-note {
  margin-top: 28px;
  font-size: 11px;
  letter-spacing: 0.18em;
  color: #5C5446;
  text-transform: uppercase;
  text-align: center;
  animation: floatIn 1200ms 500ms ease-out both;
}
.footer-note a { color: var(--gold-soft); }

@keyframes floatIn {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ============================================================
   ADMIN DASHBOARD
   ============================================================ */

.admin-shell {
  max-width: 1100px;
  margin: 0 auto;
  padding: 28px 22px 60px;
}

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

.admin-brand {
  display: flex; align-items: center; gap: 14px;
}
.admin-brand .admin-mark {
  width: 56px; height: 56px;
  border-radius: 10px;
  display: block;
  flex-shrink: 0;
}
.admin-brand .title {
  font-family: var(--serif);
  letter-spacing: 0.16em;
  color: var(--gold-light);
  font-size: 18px;
}
.admin-brand .sub {
  font-size: 11px;
  letter-spacing: 0.28em;
  color: var(--muted);
  text-transform: uppercase;
}

.admin-actions { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }

.btn-ghost {
  padding: 10px 14px;
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 10px;
  color: var(--text);
  font-size: 13px;
  font-weight: 600;
}
.btn-ghost:hover { border-color: var(--gold); color: var(--gold-light); }

.btn-gold {
  padding: 10px 14px;
  border: 0;
  border-radius: 10px;
  background: linear-gradient(180deg, var(--gold-light), var(--gold));
  color: #1a1408;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 12px;
  margin-bottom: 22px;
}
.stat-card {
  background: var(--bg-soft);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px 18px;
}
.stat-card .num {
  font-family: var(--serif);
  font-size: 30px;
  color: var(--gold-light);
  line-height: 1.1;
  margin-bottom: 4px;
}
.stat-card .label {
  font-size: 11px;
  letter-spacing: 0.22em;
  color: var(--muted);
  text-transform: uppercase;
}

.search-row {
  display: flex; gap: 10px; align-items: center;
  margin-bottom: 14px;
}
.search-row input {
  flex: 1;
  padding: 11px 14px;
  background: rgba(0,0,0,0.45);
  border: 1px solid var(--line);
  border-radius: 10px;
  color: var(--text);
  font-size: 14px;
  font-family: inherit;
}
.search-row input:focus { outline: none; border-color: var(--gold); }

.table-wrap {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--bg-soft);
}

table.leads {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}
table.leads thead th {
  background: rgba(201,169,97,0.06);
  color: var(--gold);
  text-align: left;
  padding: 12px 14px;
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
}
table.leads tbody td {
  padding: 14px 14px;
  border-bottom: 1px solid rgba(255,255,255,0.04);
  color: var(--text);
  vertical-align: top;
}
table.leads tbody tr:last-child td { border-bottom: 0; }
table.leads tbody tr:hover td { background: rgba(255,255,255,0.015); }

.tag {
  display: inline-block;
  padding: 3px 9px;
  border-radius: 999px;
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  background: rgba(201,169,97,0.10);
  border: 1px solid rgba(201,169,97,0.30);
  color: var(--gold-light);
}
.tag.dim { background: rgba(255,255,255,0.04); border-color: var(--line); color: var(--muted); }

.empty {
  text-align: center;
  padding: 60px 20px;
  color: var(--muted);
  font-size: 14px;
}
.empty .big {
  font-family: var(--serif);
  color: var(--gold-light);
  font-size: 22px;
  margin-bottom: 8px;
}

/* Mobile table → cards */
@media (max-width: 640px) {
  table.leads thead { display: none; }
  table.leads, table.leads tbody, table.leads tr, table.leads td { display: block; width: 100%; }
  table.leads tr {
    background: var(--bg-soft);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    margin-bottom: 10px;
    padding: 6px 0;
  }
  table.leads td {
    border-bottom: 0 !important;
    padding: 6px 14px;
  }
  table.leads td::before {
    content: attr(data-label);
    display: block;
    font-size: 10px;
    letter-spacing: 0.18em;
    color: var(--gold);
    text-transform: uppercase;
    margin-bottom: 3px;
  }
  .table-wrap { background: transparent; border: 0; }
}
