:root {
  --bg: #eef7fb;
  --sky: #8fd3e6;
  --tosca: #27c9d4;
  --tosca-deep: #0f8fa6;
  --teal: #1a6f8a;
  --navy: #0d3a4a;
  --ink: #14212a;
  --muted: #5b6b77;
  --line: #e4eef2;
  --tint: #e8f7fa;
  --radius: 28px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; }

body {
  font-family: "Jost", system-ui, -apple-system, "Segoe UI", sans-serif;
  background: var(--bg);
  color: var(--ink);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 32px 16px 28px;
}

a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; border: 0; background: none; color: inherit; }
svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex-shrink: 0; }

.card {
  width: 100%;
  max-width: 400px;
  background: #fff;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 18px 50px rgba(15, 95, 120, .10);
  padding-bottom: 22px;
}

/* ---------- Header ---------- */
.card__top {
  position: relative;
  height: 172px;
  padding: 20px 20px 0;
  background:
    radial-gradient(120% 90% at 0% 0%, #c9f0f6 0%, rgba(201, 240, 246, 0) 55%),
    linear-gradient(160deg, #a6e2ee 0%, #7fcbe0 55%, #5fbcd6 100%);
  overflow: hidden;
}
.bubble { position: absolute; border-radius: 50%; background: rgba(255, 255, 255, .22); }
.bubble--1 { width: 120px; height: 120px; right: -34px; top: 46px; }
.bubble--2 { width: 46px; height: 46px; left: 26px; top: 92px; background: rgba(255, 255, 255, .18); }
.bubble--3 { width: 16px; height: 16px; right: 104px; top: 70px; background: rgba(255, 255, 255, .35); }

.cobrand {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 14px;
  width: fit-content;
  margin: 0 auto;
  padding: 10px 20px;
  background: rgba(255, 255, 255, .94);
  border-radius: 999px;
  box-shadow: 0 6px 18px rgba(23, 96, 122, .12);
}
.cobrand img { display: block; width: auto; }
.cobrand__wateru { height: 20px; }
.cobrand__eternal { height: 26px; }
.cobrand__divider { width: 1px; height: 22px; background: #cfdde4; }

.wave { position: absolute; left: 0; bottom: -1px; width: 100%; height: 48px; display: block; }
.wave path { stroke: none; }

.avatar {
  position: relative;
  z-index: 2;
  width: 138px;
  height: 138px;
  margin: -78px auto 0;
  border-radius: 50%;
  background: #fff;
  padding: 4px;
  box-shadow: 0 6px 18px rgba(13, 58, 74, .16);
}
.avatar img { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; display: block; }

/* ---------- Identitas ---------- */
.identity { text-align: center; padding: 18px 22px 0; }
.identity h1 { font-size: 27px; font-weight: 700; letter-spacing: -.01em; line-height: 1.15; }
.role { color: var(--teal); font-weight: 600; font-size: 16px; margin-top: 6px; }
.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 10px;
  padding: 5px 12px;
  background: var(--tint);
  color: var(--teal);
  border-radius: 999px;
  font-size: 13px;
  font-weight: 500;
}
.chip svg { width: 15px; height: 15px; }

/* ---------- Tombol aksi ---------- */
.actions { padding: 22px 22px 0; display: grid; gap: 10px; }
.actions__row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }

.btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  height: 52px;
  border-radius: 16px;
  font-weight: 600;
  font-size: 16px;
  transition: transform .12s ease, box-shadow .12s ease, background .12s ease;
}
.btn:active { transform: scale(.98); }
.btn--primary {
  color: #fff;
  background: linear-gradient(135deg, #2fd0d9 0%, #13a4bd 100%);
  box-shadow: 0 8px 20px rgba(19, 164, 189, .32);
}
.btn--primary svg { width: 22px; height: 22px; }
.btn--primary:hover { box-shadow: 0 10px 26px rgba(19, 164, 189, .42); }
.btn--ghost {
  height: 48px;
  color: var(--navy);
  background: #fff;
  border: 1.5px solid #d3e8ee;
}
.btn--ghost svg { color: var(--tosca-deep); width: 18px; height: 18px; }
.btn--ghost:hover { background: var(--tint); }

/* ---------- Detail kontak ---------- */
.info {
  margin: 20px 22px 0;
  background: #f7fbfc;
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 4px 6px;
}
.info__row { display: flex; align-items: center; }
.info__row + .info__row { border-top: 1px solid var(--line); }
.info__main { display: flex; align-items: center; gap: 12px; flex: 1; min-width: 0; padding: 12px 8px; }
.info__icon {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: #fff;
  color: var(--tosca-deep);
  box-shadow: inset 0 0 0 1px #d8eef3;
}
.info__icon svg { width: 18px; height: 18px; }
.info__text { display: flex; flex-direction: column; min-width: 0; }
.info__text small { font-size: 12.5px; color: var(--muted); }
.info__text strong { font-size: 16px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.info__copy {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  color: #8aa3ae;
  transition: background .12s ease, color .12s ease;
}
.info__copy:hover { background: #fff; color: var(--tosca-deep); }
.info__copy svg { width: 18px; height: 18px; }

/* ---------- QR pass (versi terang) ---------- */
.pass {
  position: relative;
  margin: 22px 22px 0;
  border-radius: 24px;
  color: var(--navy);
  overflow: hidden;
  background:
    radial-gradient(80% 60% at 100% 0%, rgba(127, 214, 228, .45) 0%, rgba(127, 214, 228, 0) 65%),
    radial-gradient(70% 55% at 0% 100%, rgba(166, 226, 238, .40) 0%, rgba(166, 226, 238, 0) 65%),
    linear-gradient(170deg, #e9f8fb 0%, #f6fcfd 55%, #ffffff 100%);
  border: 1px solid #d6eef3;
  box-shadow: 0 12px 28px rgba(15, 120, 145, .10);
}
.pass::before {
  /* riak air halus */
  content: "";
  position: absolute;
  inset: 0;
  background: repeating-radial-gradient(circle at 88% 6%, rgba(19, 164, 189, .07) 0 1px, transparent 1px 22px);
  pointer-events: none;
}
.pass::after {
  /* gelembung dekoratif */
  content: "";
  position: absolute;
  width: 90px;
  height: 90px;
  left: -30px;
  top: 150px;
  border-radius: 50%;
  background: rgba(127, 203, 224, .18);
  pointer-events: none;
}
.pass__head { position: relative; z-index: 1; display: flex; align-items: center; justify-content: space-between; padding: 18px 20px 0; }
.pass__eyebrow { font-size: 12px; letter-spacing: .14em; text-transform: uppercase; color: var(--tosca-deep); font-weight: 600; }
.pass__title { font-size: 19px; font-weight: 600; margin-top: 2px; color: var(--navy); }
.pass__mark {
  height: 40px;
  width: 40px;
  object-fit: contain;
  padding: 7px;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(15, 120, 145, .14);
}

.pass__qr {
  position: relative;
  z-index: 1;
  margin: 16px auto 0;
  width: 212px;
  height: 212px;
  padding: 14px;
  background: #fff;
  border-radius: 22px;
  box-shadow: 0 10px 26px rgba(15, 120, 145, .16), 0 0 0 6px rgba(39, 201, 212, .10);
}
.pass__qr canvas { width: 100%; height: 100%; display: block; }

.pass__tear {
  position: relative;
  z-index: 1;
  margin: 20px 0 0;
  height: 0;
  border-top: 2px dashed #cfe6ec;
}
.pass__tear::before, .pass__tear::after {
  content: "";
  position: absolute;
  top: -12px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #fff;
  border: 1px solid #d6eef3;
}
.pass__tear::before { left: -12px; }
.pass__tear::after { right: -12px; }

.pass__actions { position: relative; z-index: 1; display: grid; grid-template-columns: repeat(3, 1fr); padding: 8px 10px 12px; }
.pass__actions button {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  min-height: 64px;
  justify-content: center;
  border-radius: 14px;
  font-size: 13px;
  font-weight: 500;
  color: var(--navy);
  transition: background .12s ease;
}
.pass__actions button:hover { background: rgba(39, 201, 212, .10); }
.pass__actions svg { width: 22px; height: 22px; color: var(--tosca-deep); }

/* ---------- Footer & toast ---------- */
.foot { display: flex; align-items: center; gap: 6px; color: var(--muted); font-size: 13px; margin-top: 20px; text-align: center; }
.foot svg { width: 15px; height: 15px; color: var(--tosca-deep); }

.toast {
  position: fixed;
  left: 50%;
  bottom: 24px;
  transform: translate(-50%, 20px);
  background: var(--navy);
  color: #fff;
  padding: 10px 18px;
  border-radius: 999px;
  font-size: 14px;
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s ease, transform .2s ease;
  z-index: 10;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

a:focus-visible, button:focus-visible { outline: 2px solid var(--tosca-deep); outline-offset: 3px; }

@media (max-width: 420px) {
  body { padding: 0 0 24px; }
  .card { border-radius: 0 0 var(--radius) var(--radius); box-shadow: none; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; }
}
