/* =====================================================================
   Portal Penguji IAI Mobile — tema maroon IAI
   PHP polos + CSS vanilla; dipakai index.php & admin.php
   ===================================================================== */

:root {
  --maroon:        #7d1f2e;
  --maroon-dark:   #5e1421;
  --maroon-deep:   #460d17;
  --gold:          #c9a227;
  --gold-soft:     #f0e3bd;
  --ink:           #2b2024;
  --ink-soft:      #6b5a60;
  --paper:         #ffffff;
  --tint:          #faf5f0;
  --line:          #eadcd2;
  --ok:            #1d7a46;
  --ok-bg:         #e8f6ee;
  --err:           #b3261e;
  --err-bg:        #fdecea;
  --radius:        14px;
  --shadow:        0 10px 30px rgba(70, 13, 23, .08);
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

/* Atribut hidden harus selalu menang atas display class (mis. .btn inline-flex) */
[hidden] { display: none !important; }

body {
  margin: 0;
  font-family: var(--font);
  color: var(--ink);
  background: var(--paper);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

.container { max-width: 1080px; margin: 0 auto; padding: 0 20px; }
.container.narrow { max-width: 680px; }

h1, h2, h3, h4 { line-height: 1.25; margin: 0 0 .5em; }
h2 { font-size: clamp(1.5rem, 3vw, 2rem); text-align: center; color: var(--maroon-deep); }
h3 { font-size: 1.1rem; }
code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: .92em;
  background: var(--tint);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 1px 6px;
  word-break: break-all;
}

/* ---------- Topbar ---------- */
.topbar {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255, 255, 255, .92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.topbar-inner { display: flex; align-items: center; justify-content: space-between; padding: 12px 20px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); }
.brand-logo { height: 40px; width: auto; object-fit: contain; }
.brand-text { font-weight: 700; font-size: 1.05rem; }
.badge-beta {
  font-size: .78rem; font-weight: 600; color: var(--maroon);
  background: #f7ecee; border: 1px solid #ecd2d6;
  padding: 4px 12px; border-radius: 999px; white-space: nowrap;
}

/* ---------- Hero ---------- */
.hero {
  background:
    radial-gradient(1100px 420px at 85% -60%, rgba(201, 162, 39, .22), transparent 60%),
    linear-gradient(160deg, var(--maroon-deep) 0%, var(--maroon-dark) 55%, var(--maroon) 100%);
  color: #fff;
  text-align: center;
  padding: 72px 0 64px;
}
.hero-kicker {
  display: inline-block;
  font-size: .8rem; font-weight: 700; letter-spacing: 2px; text-transform: uppercase;
  color: var(--gold-soft);
  border: 1px solid rgba(240, 227, 189, .45);
  border-radius: 999px;
  padding: 6px 16px;
  margin: 0 0 22px;
}
.hero h1 { font-size: clamp(1.9rem, 5vw, 3rem); margin-bottom: .6em; }
.hero h1 .accent { color: var(--gold); }
.hero-lead {
  max-width: 620px; margin: -6px auto 22px;
  color: var(--gold-soft);
  font-size: 1.02rem; font-style: italic;
  line-height: 1.55;
}
.hero-lead strong { color: var(--gold); font-style: normal; letter-spacing: .3px; }
.hero-sub { max-width: 640px; margin: 0 auto 30px; font-size: 1.06rem; color: #f3e4e6; }
.hero-cta { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }

/* Info ketersediaan platform (Android kini, iOS menyusul) */
.platform-row { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; margin: 26px 0 0; }
.platform-chip {
  display: inline-flex; align-items: center; gap: 8px;
  background: rgba(255, 255, 255, .12);
  border: 1px solid rgba(255, 255, 255, .3);
  color: #fff; border-radius: 999px;
  padding: 7px 16px; font-size: .88rem;
}
.platform-chip .play-icon { width: 15px; height: 15px; border-radius: 2px; }
.platform-soon { color: #e8ccd2; font-style: italic; }
.hero-note { margin: 16px 0 0; font-size: .85rem; color: #d9bfc4; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font: inherit; font-weight: 600; text-decoration: none; cursor: pointer;
  border: 1px solid transparent;
  border-radius: 10px;
  padding: 11px 22px;
  transition: transform .12s ease, box-shadow .12s ease, background .12s ease, color .12s ease;
}
.btn-lg { padding: 14px 28px; font-size: 1.02rem; }
.btn-block { width: 100%; }
.btn-primary {
  background: var(--maroon); color: #fff;
  box-shadow: 0 6px 18px rgba(125, 31, 46, .35);
}
.btn-primary:hover { background: var(--maroon-dark); transform: translateY(-1px); }
.btn-primary:disabled { opacity: .6; cursor: wait; transform: none; }
.btn-ghost {
  background: transparent; color: inherit;
  border-color: currentColor; opacity: .92;
}
.btn-ghost:hover { opacity: 1; transform: translateY(-1px); }
.hero .btn-ghost { color: #fff; }
.btn-light {
  background: #fff; color: var(--maroon);
  box-shadow: 0 6px 18px rgba(0, 0, 0, .18);
}
.btn-light:hover { transform: translateY(-1px); }
.btn-row { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 12px; }

/* ---------- Sections & cards ---------- */
.section { padding: 64px 0; }
.section-tinted { background: var(--tint); }
.section-sub { text-align: center; color: var(--ink-soft); max-width: 560px; margin: 0 auto 36px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.task-card { padding: 28px 24px; text-align: left; }
.task-icon {
  width: 48px; height: 48px; border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  color: var(--maroon);
  background: #f7ecee; margin-bottom: 14px;
}
.task-icon svg { width: 26px; height: 26px; display: block; }
.task-card h3 { color: var(--maroon); }
.task-card p { color: var(--ink-soft); margin: 0; font-size: .95rem; }

/* ---------- Form ---------- */
.form-card { padding: 32px; margin-top: 6px; }
.field { margin-bottom: 20px; }
.field label, .label-like {
  display: block; font-weight: 600; font-size: .92rem; margin-bottom: 7px;
}
.optional { font-weight: 400; color: var(--ink-soft); font-size: .85em; }
.hint { font-size: .82rem; color: var(--ink-soft); margin: 7px 0 0; }
.hint a { color: var(--maroon); font-weight: 600; }
input[type="email"], input[type="text"], textarea {
  width: 100%;
  font: inherit; color: var(--ink);
  background: #fff;
  border: 1.5px solid var(--line);
  border-radius: 10px;
  padding: 12px 14px;
  transition: border-color .12s ease, box-shadow .12s ease;
}
input:focus, textarea:focus {
  outline: none;
  border-color: var(--maroon);
  box-shadow: 0 0 0 3px rgba(125, 31, 46, .12);
}
textarea { resize: vertical; min-height: 120px; }
.check { display: flex; gap: 10px; align-items: flex-start; font-weight: 400 !important; cursor: pointer; font-size: .93rem; }
.check input { margin-top: 4px; accent-color: var(--maroon); width: 16px; height: 16px; flex: none; }
.privacy-note { font-size: .8rem; color: var(--ink-soft); text-align: center; margin: 14px 0 0; }
.hp-field { position: absolute; left: -9999px; top: -9999px; opacity: 0; height: 0; overflow: hidden; }

.form-alert {
  border-radius: 10px; padding: 12px 14px; margin-bottom: 18px; font-size: .92rem;
}
.form-alert.err { background: var(--err-bg); color: var(--err); border: 1px solid #f5c6c2; }
.form-alert.ok  { background: var(--ok-bg);  color: var(--ok);  border: 1px solid #bfe5cf; }

/* ---------- Sukses pendaftaran ---------- */
.success-head { display: flex; gap: 16px; align-items: flex-start; margin-bottom: 26px; }
.success-icon {
  flex: none;
  width: 52px; height: 52px; border-radius: 50%;
  background: var(--ok-bg); color: var(--ok);
  border: 2px solid var(--ok);
  display: flex; align-items: center; justify-content: center;
}
.success-icon svg { width: 26px; height: 26px; display: block; }
.success-head h3 { color: var(--ok); margin-bottom: .25em; }
.success-head p { margin: 0; color: var(--ink-soft); }

/* Kotak pesan menunggu aktivasi admin */
.wait-box {
  background: #fff8e6;
  border: 1px solid #f0dcb0;
  border-radius: 10px;
  padding: 16px 18px;
  margin-bottom: 18px;
}
.wait-box p { margin: 0 0 8px; font-size: .95rem; }
.wait-box p:last-child { margin-bottom: 0; }
.wait-box strong { color: #8a6d1a; }

/* Area tombol login Google */
.signin-area { display: flex; flex-direction: column; align-items: center; gap: 16px; padding: 8px 0 2px; }
.signin-intro { margin: 0; font-weight: 600; }
.signin-area .privacy-note { margin-top: 4px; max-width: 420px; }
#google-btn { min-height: 44px; display: flex; justify-content: center; }

/* Papan pemberitahuan (mis. login belum dikonfigurasi) */
.notice {
  background: #fff8e6;
  border: 1px solid #f0dcb0;
  color: #6b5514;
  border-radius: 10px;
  padding: 14px 16px;
  font-size: .92rem;
  line-height: 1.55;
}

/* ---------- Bintang rating ---------- */
.stars { display: flex; gap: 4px; }
.star {
  background: none; border: none; cursor: pointer;
  color: #d8c7cb;
  padding: 2px 4px;
  transition: color .1s ease, transform .1s ease;
}
.star svg { width: 30px; height: 30px; display: block; }
.star:hover { transform: scale(1.12); }
.star.on { color: var(--gold); }

/* ---------- Footer ---------- */
.footer { background: var(--maroon-deep); color: #d9bfc4; padding: 40px 0; font-size: .9rem; }
.footer-inner { display: grid; gap: 14px; }
.footer-brand { display: flex; align-items: center; gap: 12px; }
.footer-logo {
  width: 46px; height: 46px; object-fit: contain;
  background: #fff; border-radius: 50%; padding: 4px; flex: none;
}
.footer strong { color: #fff; }
.footer-links { display: flex; flex-direction: column; gap: 6px; }
.footer a { color: var(--gold-soft); text-decoration: none; word-break: break-all; }
.footer a:hover { text-decoration: underline; }
.footer-copy { margin: 8px 0 0; font-size: .8rem; color: #a88890; }

/* ---------- Responsif ---------- */
@media (max-width: 860px) {
  .grid-3 { grid-template-columns: 1fr; }
  .hero { padding: 56px 0 48px; }
  .section { padding: 48px 0; }
  .form-card { padding: 24px 20px; }
  .brand-logo { height: 32px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .btn, .star { transition: none; }
}
