/* ═══════════════════════════════════════════════════════════════════════════
   SRIDIRA CMS · Public registration kiosk
   ═══════════════════════════════════════════════════════════════════════════ */

body { display: flex; flex-direction: column; }

/* ── Header ────────────────────────────────────────────────────────────── */
.topbar {
  position: sticky; top: 0; z-index: 50;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 14px clamp(16px, 4vw, 40px);
  background: rgba(250, 248, 242, 0.86);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}
.topbar .brand { cursor: pointer; }
.topbar-right { display: flex; align-items: center; gap: 10px; }

.icon-btn {
  width: 42px; height: 42px; border-radius: 50%; flex-shrink: 0;
  display: grid; place-items: center; text-decoration: none;
  border: 1px solid var(--line); background: rgba(255, 255, 255, .6);
  color: var(--green-800); cursor: pointer; transition: all .25s var(--ease);
}
.icon-btn:hover { background: var(--green-900); color: var(--gold-300); transform: translateY(-1px); }

.project-pill {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 8px 14px; border-radius: 999px; cursor: pointer;
  font-family: var(--font-body); font-size: .74rem; font-weight: 600;
  letter-spacing: .04em; color: var(--green-900);
  background: rgba(255, 255, 255, .75); border: 1px solid rgba(201, 162, 39, .45);
  transition: all .2s;
}
.project-pill:hover { border-color: var(--gold-500); box-shadow: 0 4px 14px rgba(13, 43, 30, .1); }
.pill-change {
  font-size: .62rem; letter-spacing: .1em; text-transform: uppercase;
  color: var(--gold-500); font-weight: 700;
  padding-left: 9px; border-left: 1px solid rgba(201, 162, 39, .35);
}
@media (max-width: 460px) {
  .project-pill { max-width: 46vw; overflow: hidden; }
  .project-pill span:first-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .pill-change { display: none; }
}

/* ── Layout ────────────────────────────────────────────────────────────── */
#app {
  flex: 1; width: 100%; max-width: 1020px; margin: 0 auto;
  padding: clamp(20px, 4vw, 44px) clamp(16px, 4vw, 40px);
}
.view { display: none; }
.view.active { display: block; animation: viewIn .5s var(--ease); }

/* ── Hero ──────────────────────────────────────────────────────────────── */
.hero { text-align: center; margin: clamp(8px, 3vw, 28px) 0 clamp(26px, 5vw, 44px); }
.hero.compact { margin-bottom: clamp(22px, 4vw, 34px); }
.hero-eyebrow {
  letter-spacing: .32em; text-transform: uppercase; font-size: .7rem;
  color: var(--gold-500); font-weight: 600;
}
.hero-title {
  font-family: var(--font-display); font-weight: 600;
  font-size: clamp(2.3rem, 6.6vw, 3.6rem);
  color: var(--green-900); margin-top: 6px; line-height: 1.08;
}
.hero-title.sm { font-size: clamp(1.9rem, 5.2vw, 2.8rem); }
.hero-lead { color: var(--muted); font-size: .94rem; max-width: 46ch; margin: 0 auto; line-height: 1.6; }

/* ── Selection cards ───────────────────────────────────────────────────── */
.card-grid { display: grid; gap: clamp(14px, 2.5vw, 22px); grid-template-columns: 1fr; }
@media (min-width: 640px) { .card-grid { grid-template-columns: 1fr 1fr; } }

.type-card {
  position: relative; text-align: left; cursor: pointer;
  display: flex; flex-direction: column; gap: 6px;
  padding: clamp(22px, 3.5vw, 32px);
  border-radius: var(--radius);
  background: var(--glass-bg); border: 1px solid var(--glass-border);
  backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  box-shadow: var(--shadow-soft);
  transition: transform .35s var(--ease), box-shadow .35s var(--ease), border-color .35s;
  overflow: hidden; font-family: var(--font-body);
}
.type-card::before {
  content: ""; position: absolute; inset: 0 auto 0 0; width: 4px;
  background: var(--gold-grad); opacity: 0; transition: opacity .35s;
}
.type-card:hover, .type-card:focus-visible {
  transform: translateY(-4px); box-shadow: var(--shadow-lift);
  border-color: rgba(201, 162, 39, .45);
}
.type-card:hover::before { opacity: 1; }
.type-icon {
  width: 54px; height: 54px; border-radius: 14px;
  display: grid; place-items: center; margin-bottom: 8px;
  color: var(--gold-300); background: var(--green-900);
  box-shadow: 0 6px 18px rgba(13, 43, 30, .28);
}
.type-icon svg { width: 26px; height: 26px; }
.type-name {
  font-family: var(--font-display); font-size: 1.5rem; font-weight: 600;
  color: var(--green-900); line-height: 1.2;
}
.type-desc { font-size: .82rem; color: var(--muted); line-height: 1.55; padding-right: 26px; }
.type-arrow {
  position: absolute; right: 22px; bottom: 20px;
  color: var(--gold-500); font-size: 1.15rem; transition: transform .35s var(--ease);
}
.type-card:hover .type-arrow { transform: translateX(5px); }

/* ── Form shell ────────────────────────────────────────────────────────── */
.form-shell { max-width: 640px; margin: 0 auto; padding: clamp(22px, 4vw, 36px); }
.form-title {
  font-family: var(--font-display); font-weight: 600;
  font-size: clamp(1.7rem, 4.5vw, 2.15rem); color: var(--green-900);
}
.form-sub { font-size: .85rem; color: var(--muted); margin: 4px 0 20px; line-height: 1.55; }

.visit-stamp {
  display: flex; flex-wrap: wrap; gap: 8px 18px;
  padding: 12px 15px; margin-bottom: 22px;
  border-radius: 12px;
  background: rgba(13, 43, 30, .045); border: 1px solid var(--line);
  font-size: .74rem; color: var(--muted);
}
.visit-stamp b { color: var(--green-900); font-weight: 600; }
.visit-stamp .vs-item { display: flex; gap: 6px; align-items: baseline; }

/* ── Existing-customer nudge on the first-visit form ───────────────────── */
.known-panel {
  margin: -4px 0 18px; padding: 14px 16px; border-radius: 12px;
  background: rgba(201, 162, 39, .1); border: 1px solid rgba(201, 162, 39, .42);
  font-size: .82rem; color: #7a5d00; line-height: 1.6;
  animation: viewIn .35s var(--ease);
}
.known-panel strong { color: var(--green-900); }
.known-panel .kp-action {
  display: inline-block; margin-top: 9px; padding: 8px 15px;
  border-radius: 9px; border: 1px solid var(--gold-500); background: #fff;
  color: var(--green-900); font-family: var(--font-body); font-size: .76rem;
  font-weight: 600; cursor: pointer;
}
.known-panel .kp-action:hover { background: var(--green-900); color: var(--gold-300); }

/* ── Revisit result panel ──────────────────────────────────────────────── */
.found-panel {
  margin: 6px 0 20px; padding: 20px; border-radius: 14px;
  background: linear-gradient(150deg, rgba(13, 43, 30, .97), rgba(26, 77, 53, .95));
  color: #eef5f0; border: 1px solid rgba(201, 162, 39, .55);
  box-shadow: var(--shadow-lift); animation: viewIn .45s var(--ease);
}
.fp-badge {
  display: inline-flex; align-items: center; gap: 7px;
  font-size: .66rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase;
  color: var(--green-950); background: var(--gold-grad);
  padding: 5px 11px; border-radius: 999px; margin-bottom: 12px;
}
.fp-name { font-family: var(--font-display); font-size: 1.6rem; font-weight: 600; color: #fff; line-height: 1.15; }
.fp-id { font-size: .74rem; color: var(--gold-300); letter-spacing: .07em; margin-bottom: 14px; }
.fp-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; margin-bottom: 12px; }
@media (min-width: 480px) { .fp-grid { grid-template-columns: repeat(4, 1fr); } }
.fp-stat { background: rgba(255, 255, 255, .08); border-radius: 10px; padding: 10px 8px; text-align: center; }
.fp-stat b { display: block; font-size: .95rem; color: var(--gold-300); font-weight: 600; line-height: 1.3; }
.fp-stat span { font-size: .6rem; letter-spacing: .06em; text-transform: uppercase; color: rgba(238, 245, 240, .72); }
.fp-history { max-height: 168px; overflow-y: auto; border-top: 1px solid rgba(255, 255, 255, .15); padding-top: 10px; }
.fp-history-title {
  font-size: .64rem; letter-spacing: .12em; text-transform: uppercase;
  color: rgba(238, 245, 240, .6); margin-bottom: 8px;
}
.fp-visit {
  display: flex; justify-content: space-between; gap: 10px; font-size: .75rem;
  padding: 6px 0; color: rgba(238, 245, 240, .92);
  border-bottom: 1px dashed rgba(255, 255, 255, .1);
}
.fp-visit:last-child { border-bottom: none; }
.fp-visit .fv-type { color: var(--gold-300); font-size: .7rem; }
.fp-note {
  margin-top: 13px; font-size: .76rem; line-height: 1.6; color: rgba(238, 245, 240, .9);
  background: rgba(201, 162, 39, .16); border-radius: 9px; padding: 10px 12px;
}
.fp-none {
  margin: 6px 0 20px; padding: 15px 16px; border-radius: 12px;
  background: rgba(176, 58, 46, .07); border: 1px solid rgba(176, 58, 46, .3);
  color: var(--danger); font-size: .83rem; line-height: 1.6;
  animation: viewIn .35s var(--ease);
}
.fp-none strong { color: var(--green-900); }

/* ── Success ───────────────────────────────────────────────────────────── */
.success-shell { max-width: 540px; margin: 3vh auto 0; padding: clamp(30px, 5vw, 46px); text-align: center; }
.success-ring { width: 92px; height: 92px; margin: 0 auto 18px; }
.success-ring svg { width: 100%; height: 100%; }
.success-ring .ring {
  stroke: var(--gold-500); stroke-width: 2;
  stroke-dasharray: 151; stroke-dashoffset: 151;
  animation: draw .7s var(--ease) forwards;
}
.success-ring .tick {
  stroke: var(--green-700); stroke-width: 3; stroke-linecap: round; stroke-linejoin: round;
  stroke-dasharray: 36; stroke-dashoffset: 36;
  animation: draw .45s .55s var(--ease) forwards;
}
@keyframes draw { to { stroke-dashoffset: 0; } }
.success-title { font-family: var(--font-display); font-size: 2rem; font-weight: 600; color: var(--green-900); }
.success-msg { font-size: .9rem; color: var(--muted); margin: 8px 0 20px; line-height: 1.65; }
.success-meta { display: flex; flex-direction: column; gap: 8px; margin-bottom: 22px; text-align: left; }
.success-meta .meta-row {
  display: flex; justify-content: space-between; align-items: baseline; gap: 12px;
  padding: 12px 15px; font-size: .82rem;
  background: rgba(255, 255, 255, .78); border: 1px solid var(--line); border-radius: 11px;
}
.success-meta .meta-row span { color: var(--muted); }
.success-meta .meta-row b { color: var(--green-900); font-weight: 600; text-align: right; }
.success-meta .meta-row b.gold { color: var(--gold-500); font-weight: 700; letter-spacing: .04em; }
.kiosk-count { margin-top: 14px; font-size: .74rem; color: var(--muted); }
.kiosk-count span { color: var(--gold-500); font-weight: 700; }

/* ── Footer ────────────────────────────────────────────────────────────── */
.footer {
  text-align: center; padding: 20px 16px;
  font-size: .66rem; letter-spacing: .2em; text-transform: uppercase;
  color: var(--muted); border-top: 1px solid var(--line);
}
@media (max-width: 520px) {
  .footer { font-size: .58rem; letter-spacing: .12em; }
}
