/* Tampilan halaman depan Buku Tamu — gradasi navy → indigo → ungu */
:root {
  --c1: #0b1d45;
  --c2: #1e2a78;
  --c3: #4f35b8;
  --c4: #7c3aed;
  --accent: #f5b301;
  --ink: #1b2240;
  --muted: #6b7392;
  --line: #e5e8f5;
  --soft: #f4f5ff;
  --grad: linear-gradient(135deg, #1d4a92 0%, #4f35b8 55%, #7c3aed 100%);
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body.idx {
  min-height: 100vh; margin: 0; color: var(--ink);
  font-family: "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  background-color: #1e2a78;
  background-image: linear-gradient(165deg, var(--c1) 0%, var(--c2) 42%, var(--c3) 78%, var(--c4) 100%);
  position: relative; overflow-x: hidden;
}

html { background: #1e2a78; }
.fx { position: absolute; inset: 0; overflow: hidden; pointer-events: none; z-index: 0; }

/* bola cahaya dekoratif (mengikuti tinggi halaman, tanpa "fixed" agar aman di HP) */
.orb { position: absolute; border-radius: 50%; filter: blur(70px); opacity: .55; pointer-events: none; z-index: 0; }
.orb.o1 { width: 340px; height: 340px; background: #3b82f6; top: -90px; left: -100px; }
.orb.o2 { width: 380px; height: 380px; background: #a855f7; bottom: -120px; right: -120px; }
.orb.o3 { width: 200px; height: 200px; background: #22d3ee; top: 42%; right: -80px; opacity: .3; }
.grid-bg {
  position: absolute; inset: 0 0 auto 0; height: 70vh; z-index: 0; pointer-events: none; opacity: .07;
  background-image: linear-gradient(#fff 1px, transparent 1px), linear-gradient(90deg, #fff 1px, transparent 1px);
  background-size: 38px 38px;
  -webkit-mask-image: radial-gradient(ellipse at 50% 0%, #000 0%, transparent 70%);
          mask-image: radial-gradient(ellipse at 50% 0%, #000 0%, transparent 70%);
}
.wrap { position: relative; z-index: 1; max-width: 560px; margin: 0 auto; padding: 1.6rem 1rem 1rem; }

/* ---------- Kepala ---------- */
.hero { text-align: center; color: #fff; padding: .4rem 0 1.3rem; }
.logo-badge {
  width: 84px; height: 84px; margin: 0 auto .9rem; border-radius: 24px; display: grid; place-items: center;
  background: rgba(255,255,255,.95); box-shadow: 0 12px 32px rgba(8, 12, 50, .35), 0 0 0 6px rgba(255,255,255,.14);
  animation: floaty 5s ease-in-out infinite;
}
.logo-badge img { width: 58px; height: 58px; object-fit: contain; }
.logo-badge .fallback { font-size: 2.2rem; color: var(--c2); display: none; }
.logo-badge.no-img img { display: none; }
.logo-badge.no-img .fallback { display: block; }
@keyframes floaty { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-6px); } }

.kampus { font-size: .72rem; letter-spacing: .14em; text-transform: uppercase; opacity: .8; font-weight: 600; }
.hero h1 { font-size: 2rem; font-weight: 800; margin: .25rem 0 .15rem; letter-spacing: -.02em; }
.hero h1 span { background: linear-gradient(90deg, #fde68a, #fbbf24); -webkit-background-clip: text; background-clip: text; color: transparent; }
.prodi-chip {
  display: inline-flex; align-items: center; gap: .45rem; margin-top: .35rem;
  background: rgba(255,255,255,.14); border: 1px solid rgba(255,255,255,.25); backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px); padding: .38rem .9rem; border-radius: 999px; font-size: .84rem; font-weight: 600;
}
.tagline { margin: .8rem auto 0; max-width: 380px; font-size: .92rem; opacity: .85; line-height: 1.5; }

/* ---------- Langkah ---------- */
.steps { display: flex; align-items: center; justify-content: center; gap: .3rem; margin: 0 0 1.1rem; color: #fff; }
.steps .st { display: flex; flex-direction: column; align-items: center; gap: .35rem; font-size: .72rem; font-weight: 600; opacity: .6; transition: .3s; min-width: 74px; }
.steps .st i {
  width: 42px; height: 42px; display: grid; place-items: center; font-size: 1.15rem; border-radius: 14px;
  background: rgba(255,255,255,.12); border: 1px solid rgba(255,255,255,.22);
}
.steps .st.on { opacity: 1; }
.steps .st.on i { background: #fff; color: var(--c3); box-shadow: 0 8px 20px rgba(8,12,50,.3); }
.steps .st.done i { background: #34d399; color: #064e3b; border-color: transparent; }
.steps .st.done { opacity: 1; }
.steps .bar { flex: 1; max-width: 46px; height: 2px; background: rgba(255,255,255,.25); border-radius: 2px; margin-bottom: 1.3rem; }

/* ---------- Kartu ---------- */
.card-main {
  background: rgba(255,255,255,.97); border-radius: 26px; padding: 1.35rem;
  box-shadow: 0 24px 60px rgba(6, 10, 45, .45); border: 1px solid rgba(255,255,255,.6);
}
.seg {
  display: grid; grid-template-columns: 1fr 1fr; gap: 4px; padding: 5px; background: var(--soft); border-radius: 16px; margin-bottom: 1.2rem;
}
.seg label {
  display: flex; align-items: center; justify-content: center; gap: .45rem; padding: .7rem .5rem; border-radius: 12px;
  font-weight: 700; font-size: .9rem; color: var(--muted); cursor: pointer; transition: .2s; margin: 0; user-select: none;
  white-space: nowrap;
}
.seg input { position: absolute; opacity: 0; pointer-events: none; }
.seg input:checked + label { background: var(--grad); color: #fff; box-shadow: 0 8px 18px rgba(79,53,184,.35); }
.seg input:focus-visible + label { outline: 3px solid rgba(124,58,237,.35); }

.sec-title { display: flex; align-items: center; gap: .6rem; font-weight: 800; font-size: 1.02rem; margin: 0 0 .8rem; }
.sec-title .no {
  width: 28px; height: 28px; border-radius: 9px; background: var(--grad); color: #fff; font-size: .82rem;
  display: grid; place-items: center; box-shadow: 0 6px 14px rgba(79,53,184,.3);
}
.lbl { font-weight: 700; font-size: .85rem; margin-bottom: .35rem; display: flex; align-items: center; gap: .4rem; }
.lbl i { color: var(--c3); }
.lbl .opt { color: var(--muted); font-weight: 500; }

.field {
  position: relative; display: block;
}
.field > i.lead { position: absolute; left: 1rem; top: 50%; transform: translateY(-50%); color: #8a90b0; font-size: 1.1rem; pointer-events: none; }
.field .form-control, .form-select, textarea.form-control {
  border: 2px solid var(--line); border-radius: 14px; padding: .8rem 1rem; background: #fff; font-size: .98rem; color: var(--ink);
}
.field .form-control.has-lead { padding-left: 2.8rem; }
.form-control:focus, .form-select:focus {
  border-color: #7c5cdb; box-shadow: 0 0 0 .25rem rgba(124,58,237,.14);
}
.hint { font-size: .78rem; color: var(--muted); margin-top: .3rem; }

/* NPM */
.npm-row { display: flex; gap: .5rem; }
.npm-row .field { flex: 1; }
.npm-input { font-size: 1.3rem !important; font-weight: 800; letter-spacing: .08em; padding-top: .85rem !important; padding-bottom: .85rem !important; }
.btn-grad {
  background: var(--grad); color: #fff; border: 0; border-radius: 14px; font-weight: 700; padding: .8rem 1.2rem;
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem; transition: transform .15s, box-shadow .15s, filter .15s;
  box-shadow: 0 10px 22px rgba(79,53,184,.35);
}
.btn-grad:hover, .btn-grad:focus { color: #fff; filter: brightness(1.08); transform: translateY(-1px); box-shadow: 0 14px 28px rgba(79,53,184,.42); }
.btn-grad:active { transform: translateY(0); }
.btn-grad:disabled { opacity: .7; transform: none; }
.btn-send { width: 100%; padding: 1rem; font-size: 1.05rem; border-radius: 16px; }
.msg-err { color: #dc2626; font-size: .85rem; margin: .5rem 0 0; font-weight: 600; }
.msg-err:empty { display: none; }
.npm-input::placeholder { color: #b6bbd6; font-weight: 600; letter-spacing: .02em; }

/* Kartu identitas */
.id-card {
  display: flex; align-items: center; gap: .9rem; padding: .95rem 1rem; margin: .9rem 0 0; border-radius: 18px;
  background: linear-gradient(135deg, #eef2ff, #f5eeff); border: 2px solid #d9dcff; animation: pop .35s ease;
}
@keyframes pop { from { transform: scale(.96); opacity: 0; } to { transform: scale(1); opacity: 1; } }
.id-card .av {
  width: 52px; height: 52px; border-radius: 16px; background: var(--grad); color: #fff; font-weight: 800; font-size: 1.15rem;
  display: grid; place-items: center; flex-shrink: 0; position: relative;
}
.id-card .av .ck {
  position: absolute; right: -6px; bottom: -6px; width: 22px; height: 22px; border-radius: 50%; background: #10b981; color: #fff;
  display: grid; place-items: center; font-size: .8rem; border: 2px solid #fff;
}
.id-card .q { font-size: .72rem; color: var(--muted); font-weight: 600; text-transform: uppercase; letter-spacing: .06em; }
.id-card .nama { font-weight: 800; font-size: 1.08rem; line-height: 1.25; color: var(--c2); }
.id-card .meta { font-size: .8rem; color: var(--muted); }

.divider { height: 1px; background: linear-gradient(90deg, transparent, var(--line), transparent); margin: 1.3rem 0; }

/* Kategori berbentuk kartu */
.cat-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: .55rem; }
@media (min-width: 520px) { .cat-grid { grid-template-columns: repeat(3, 1fr); } }
.cat { position: relative; }
.cat input { position: absolute; opacity: 0; pointer-events: none; }
.cat label {
  height: 100%; display: flex; flex-direction: column; align-items: flex-start; gap: .5rem; padding: .75rem; margin: 0;
  border: 2px solid var(--line); border-radius: 16px; cursor: pointer; background: #fff; transition: .18s;
  font-size: .82rem; font-weight: 700; line-height: 1.25;
}
.cat label .ic {
  width: 34px; height: 34px; border-radius: 11px; display: grid; place-items: center; font-size: 1.05rem;
  background: var(--soft); color: var(--c3); transition: .18s;
}
.cat label:hover { border-color: #b9a6f2; transform: translateY(-2px); }
.cat input:checked + label {
  border-color: #7c5cdb; background: linear-gradient(135deg, #f1f0ff, #f8f0ff); box-shadow: 0 8px 20px rgba(124,58,237,.16);
}
.cat input:checked + label .ic { background: var(--grad); color: #fff; }
.cat input:checked + label::after {
  content: "\F26A"; font-family: "bootstrap-icons"; position: absolute; right: 9px; top: 8px; color: #7c3aed; font-size: 1rem;
}
.cat input:focus-visible + label { outline: 3px solid rgba(124,58,237,.35); }
.cat-ket { font-size: .8rem; color: var(--c3); margin-top: .5rem; min-height: 1.1em; font-weight: 600; }

/* Tujuan */
.who { display: grid; grid-template-columns: repeat(2, 1fr); gap: .5rem; }
.who label { margin: 0; }
.who .chip {
  display: flex; align-items: center; gap: .5rem; padding: .6rem .75rem; border: 2px solid var(--line); border-radius: 14px;
  font-size: .8rem; font-weight: 700; cursor: pointer; transition: .18s; height: 100%; background: #fff;
}
.who .chip i { color: var(--c3); font-size: 1.05rem; }
.who input { position: absolute; opacity: 0; pointer-events: none; }
.who input:checked + .chip { border-color: #7c5cdb; background: #f4f0ff; }
.who input:focus-visible + .chip { outline: 3px solid rgba(124,58,237,.35); }

.alert-err {
  background: #fef2f2; border: 1px solid #fecaca; color: #b91c1c; border-radius: 14px; padding: .7rem .9rem; font-size: .88rem;
  display: flex; gap: .5rem; align-items: flex-start; margin-bottom: 1rem; font-weight: 600;
}

/* Tautan status */
.status-link {
  display: flex; align-items: center; gap: .8rem; padding: .85rem 1rem; border-radius: 16px; text-decoration: none; color: var(--ink);
  background: var(--soft); border: 2px dashed #cfd3f3; transition: .18s;
}
.status-link:hover { background: #ecebff; border-color: #a79be8; color: var(--ink); }
.status-link .ic { width: 40px; height: 40px; border-radius: 12px; background: #fff; color: var(--c3); display: grid; place-items: center; font-size: 1.2rem; box-shadow: 0 4px 10px rgba(79,53,184,.12); }
.status-link b { display: block; font-size: .92rem; }
.status-link small { color: var(--muted); }
.status-link .go { margin-left: auto; color: var(--c3); }

/* Info jaminan */
.trust { display: flex; justify-content: center; flex-wrap: wrap; gap: .5rem 1.1rem; margin-top: 1.2rem; color: rgba(255,255,255,.85); font-size: .76rem; font-weight: 600; }
.trust span { display: inline-flex; align-items: center; gap: .35rem; }
.foot { text-align: center; color: rgba(255,255,255,.6); font-size: .76rem; padding: 1rem 0 1.8rem; }

@media (prefers-reduced-motion: reduce) { .logo-badge, .id-card { animation: none; } * { transition: none !important; } }
@media (max-width: 380px) { .hero h1 { font-size: 1.7rem; } .card-main { padding: 1.05rem; } }
