/* RUANG SKARISA — halaman login */
:root {
  --navy: #064E3B;
  --navy-2: #065F46;
  --navy-3: #047857;
  --gold: #E0A526;
  --gold-2: #F4C752;
  --text: #0F172A;
  --muted: #64748B;
  --line: #E2E8F0;
  --card: #FFFFFF;
  --field: #F5F7FB;
  --red: #DC2626;
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; min-height: 100%; }
body {
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans", Ubuntu, sans-serif;
  color: var(--text);
  background: var(--navy);
  font-size: 15px;
  line-height: 1.45;
}
button { font: inherit; cursor: pointer; }
svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex: none; }
[hidden] { display: none !important; }

/* ---------- Latar bergerak ---------- */
.bg { position: fixed; inset: 0; overflow: hidden; z-index: 0;
  background:
    radial-gradient(rgba(255, 255, 255, .06) 1px, transparent 1px) 0 0 / 22px 22px,
    linear-gradient(160deg, var(--navy-2) 0%, var(--navy) 55%, #022C22 100%);
}
.blob { position: absolute; border-radius: 50%; filter: blur(60px); opacity: .55; animation: float 16s ease-in-out infinite alternate; }
.b1 { width: 340px; height: 340px; background: var(--gold); top: -120px; right: -90px; opacity: .35; }
.b2 { width: 420px; height: 420px; background: #10B981; bottom: -180px; left: -140px; opacity: .35; animation-duration: 20s; }
.b3 { width: 220px; height: 220px; background: #2DD4BF; top: 40%; left: 55%; opacity: .18; animation-duration: 24s; }
@keyframes float {
  0% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(30px, 40px) scale(1.08); }
  100% { transform: translate(-20px, 10px) scale(.95); }
}
@media (prefers-reduced-motion: reduce) { .blob { animation: none; } }

/* ---------- Tata letak ---------- */
.wrap {
  position: relative; z-index: 1;
  min-height: 100vh; min-height: 100dvh;
  display: flex; flex-direction: column;
  max-width: 1040px; margin: 0 auto;
  padding: calc(22px + var(--safe-top)) 16px calc(20px + var(--safe-bottom));
}

/* ---------- Sambutan ---------- */
.intro { color: #fff; padding: 4px 6px 22px; animation: rise .5s ease both; }
.brand { display: flex; align-items: center; gap: 12px; }
.logo-main { display: block; width: 190px; max-width: 60%; height: auto; margin: 0 0 0 -6px; }
.official {
  display: inline-flex; flex-direction: column; margin-top: 10px;
  background: rgba(255, 255, 255, .07); border: 1px solid rgba(255, 255, 255, .12);
  border-radius: 12px; padding: 6px 12px;
}
.official span { font-size: 11px; opacity: .65; }
.official b { font-size: 12.5px; }
.brand-name { font-weight: 800; font-size: 18px; letter-spacing: .5px; }
.brand-name span, .intro h1 span { color: var(--gold); }
.brand-school { font-size: 12px; opacity: .7; }
.intro h1 { font-size: 24px; line-height: 1.25; margin: 20px 0 8px; letter-spacing: -.2px; }
.lead { margin: 0; opacity: .75; font-size: 14px; max-width: 460px; }
.feat { display: none; }

/* ---------- Kartu ---------- */
.card {
  background: var(--card);
  border-radius: 26px;
  padding: 22px 18px 16px;
  box-shadow: 0 24px 60px rgba(2, 26, 20, .45);
  animation: rise .5s .08s ease both;
}
@keyframes rise { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }
.card.shake { animation: shake .42s ease; }
@keyframes shake {
  0%, 100% { transform: none; }
  20% { transform: translateX(-8px); } 40% { transform: translateX(7px); }
  60% { transform: translateX(-5px); } 80% { transform: translateX(3px); }
}
.card-head h2 { margin: 0; font-size: 21px; }
.card-head p { margin: 2px 0 16px; color: var(--muted); font-size: 14px; }

/* ---------- Tab peran ---------- */
.roles {
  position: relative;
  display: grid; grid-template-columns: repeat(4, 1fr);
  background: var(--field); border-radius: 16px; padding: 4px; margin-bottom: 18px;
}
.role-ind {
  position: absolute; top: 4px; bottom: 4px; left: 4px;
  width: calc((100% - 8px) / 4);
  background: var(--navy); border-radius: 12px;
  box-shadow: 0 6px 16px rgba(6, 78, 59, .3);
  transition: transform .32s cubic-bezier(.3, 1.3, .5, 1);
}
.role {
  position: relative; z-index: 1;
  border: 0; background: none; color: var(--muted);
  display: flex; flex-direction: column; align-items: center; gap: 3px;
  padding: 9px 2px 8px; border-radius: 12px;
  font-size: 12.5px; font-weight: 700;
  transition: color .2s;
}
.role svg { width: 21px; height: 21px; }
.role.on { color: #fff; }
.role.on svg { color: var(--gold-2); }

/* ---------- Pesan salah ---------- */
.alert {
  display: flex; gap: 10px; align-items: flex-start;
  background: #FEF2F2; color: #991B1B; border: 1px solid #FECACA;
  border-radius: 14px; padding: 11px 12px; margin-bottom: 14px; font-size: 13.5px; font-weight: 500;
}
.alert svg { width: 20px; height: 20px; color: var(--red); margin-top: 1px; }

/* ---------- Isian ---------- */
.pane { animation: fadein .25s ease; }
@keyframes fadein { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }
.field { display: block; margin-bottom: 14px; }
.lbl { display: block; font-size: 13px; font-weight: 700; margin: 0 0 6px 2px; }
.inp {
  display: flex; align-items: center; gap: 10px;
  background: var(--field); border: 1.5px solid transparent; border-radius: 14px;
  padding: 0 6px 0 14px; height: 52px;
  transition: border-color .2s, box-shadow .2s, background .2s;
}
.inp > svg { color: #94A3B8; width: 20px; height: 20px; transition: color .2s; }
.inp:focus-within { background: #fff; border-color: var(--gold); box-shadow: 0 0 0 4px rgba(224, 165, 38, .18); }
.inp:focus-within > svg { color: var(--navy); }
.inp input {
  flex: 1; min-width: 0; height: 100%;
  border: 0; outline: 0; background: transparent; color: var(--text);
  font: inherit; font-size: 16px;
}
.inp input::placeholder { color: #A0AEC0; }
.eye { border: 0; background: none; color: #94A3B8; width: 40px; height: 40px; border-radius: 10px; display: grid; place-items: center; }
.eye:hover { background: rgba(15, 23, 42, .05); }
.eye .eye-off { display: none; }
.eye.show .eye-on { display: none; }
.eye.show .eye-off { display: block; }

.row { display: flex; align-items: center; justify-content: space-between; margin: 2px 2px 18px; }
.check { display: inline-flex; align-items: center; gap: 9px; font-size: 14px; font-weight: 600; cursor: pointer; user-select: none; }
.check input { position: absolute; opacity: 0; pointer-events: none; }
.check span {
  width: 22px; height: 22px; border-radius: 7px; border: 2px solid #CBD5E1; background: #fff;
  display: grid; place-items: center; transition: all .15s;
}
.check input:checked + span { background: var(--navy); border-color: var(--navy); }
.check input:checked + span::after {
  content: ""; width: 10px; height: 5px; border: 2.5px solid var(--gold-2); border-top: 0; border-right: 0;
  transform: rotate(-45deg) translate(1px, -1px);
}
.check input:focus-visible + span { box-shadow: 0 0 0 4px rgba(224, 165, 38, .25); }
.caps { font-size: 12px; font-weight: 700; color: #B45309; background: #FEF3C7; padding: 3px 8px; border-radius: 8px; }

/* ---------- Tombol ---------- */
.submit {
  position: relative; overflow: hidden;
  width: 100%; height: 54px; border: 0; border-radius: 15px;
  display: flex; align-items: center; justify-content: center; gap: 10px;
  background: linear-gradient(135deg, var(--navy-3), var(--navy));
  color: #fff; font-size: 16px; font-weight: 800; letter-spacing: .2px;
  box-shadow: 0 10px 24px rgba(6, 78, 59, .35);
  transition: transform .12s, box-shadow .2s;
}
.submit svg { width: 20px; height: 20px; transition: transform .2s; }
.submit:hover svg { transform: translateX(3px); }
.submit:active { transform: scale(.98); }
.submit::after {
  content: ""; position: absolute; top: 0; left: -60%; width: 40%; height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .18), transparent);
  transform: skewX(-20deg); animation: shine 3.2s ease-in-out infinite;
}
@keyframes shine { 0%, 60% { left: -60%; } 100% { left: 130%; } }
.submit.gold { background: linear-gradient(135deg, var(--gold-2), var(--gold)); color: var(--navy); box-shadow: 0 10px 24px rgba(224, 165, 38, .35); }
.submit.loading { pointer-events: none; opacity: .85; }
.submit.loading svg { animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.help { text-align: center; color: var(--muted); font-size: 13px; margin: 14px 0 0; }

/* ---------- Tamu ---------- */
.guest { text-align: center; padding: 6px 4px 18px; }
.guest-ico {
  width: 68px; height: 68px; border-radius: 22px; margin: 0 auto 12px;
  display: grid; place-items: center;
  background: linear-gradient(135deg, #FEF3C7, #FDE68A); color: #B45309;
}
.guest-ico svg { width: 34px; height: 34px; }
.guest h3 { margin: 0 0 4px; font-size: 18px; }
.guest p { margin: 0 auto 12px; color: var(--muted); font-size: 14px; max-width: 300px; }
.guest ul { list-style: none; padding: 0; margin: 0; display: inline-flex; flex-direction: column; gap: 6px; text-align: left; }
.guest li { display: flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 600; }
.guest li::before {
  content: ""; width: 18px; height: 18px; border-radius: 50%; flex: none;
  background: #DCFCE7 url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2316A34A' stroke-width='3.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 12 4 4 8-8'/%3E%3C/svg%3E") center / 12px no-repeat;
}

.foot { text-align: center; color: #94A3B8; font-size: 11.5px; margin: 18px 0 0; }

/* ---------- Layar lebar ---------- */
@media (min-width: 880px) {
  .wrap { flex-direction: row; align-items: center; gap: 56px; padding: 40px 32px; }
  .intro { flex: 1; padding: 0; }
  .logo-main { width: 360px; max-width: none; margin-left: -10px; }
  .official b { font-size: 14px; }
  .brand-name { font-size: 20px; }
  .intro h1 { font-size: 40px; margin: 36px 0 14px; }
  .lead { font-size: 16px; }
  .feat { display: grid; grid-template-columns: repeat(2, minmax(0, 220px)); gap: 10px; list-style: none; padding: 0; margin: 30px 0 0; }
  .feat li {
    display: flex; align-items: center; gap: 10px;
    background: rgba(255, 255, 255, .06); border: 1px solid rgba(255, 255, 255, .1);
    border-radius: 14px; padding: 11px 14px; font-weight: 600; font-size: 14px;
    backdrop-filter: blur(6px);
  }
  .feat svg { color: var(--gold-2); width: 20px; height: 20px; }
  .card { width: 420px; padding: 30px 28px 20px; }
}
@media (max-width: 360px) {
  .role span { font-size: 11.5px; }
  .intro h1 { font-size: 21px; }
}
