/* ---------- transitions-dev: variables (per-snippet :root blocks) ---------- */
:root {
  --stagger-dur: 500ms;
  --stagger-distance: 12px;
  --stagger-stagger: 40ms;
  --stagger-blur: 3px;
  --stagger-ease: cubic-bezier(0.22, 1, 0.36, 1);

  --icon-swap-dur: 250ms;
  --icon-swap-blur: 2px;
  --icon-swap-start-scale: 0.25;
  --icon-swap-ease: ease-in-out;

  --shake-distance: 6px;
  --shake-overshoot: 4px;
  --shake-dur-a: 80ms;
  --shake-dur-b: 60ms;
  --shake-ease: cubic-bezier(0.22, 1, 0.36, 1);
  --revert-hold: 3000ms;
  --revert-dur: 280ms;

  --check-box: 150ms;
  --check-draw: 350ms;
  --check-delay: 0ms;
  --check-uncheck: 150ms;
  --check-ease: cubic-bezier(0.22, 1, 0.36, 1);

  --learn-shift: 2px;
  --learn-spread: 8deg;
  --learn-in: 350ms;
  --learn-out: 350ms;
  --learn-ease: cubic-bezier(0.22, 1, 0.36, 1);
}

/* ---------- design tokens ---------- */
:root {
  --blue: #2F6FEB;
  --blue-deep: #1E4FC2;
  --blue-soft: #EAF1FE;
  --ink: #14213D;
  --muted: #4A5672;
  --placeholder: #8A94AD;
  --line: #E3E8F2;
  --surface: #F6F8FC;
  --danger: #D93838;
}

*, ::before, ::after { box-sizing: border-box; }
body {
  margin: 0;
  font-family: "Plus Jakarta Sans", system-ui, sans-serif;
  color: var(--ink);
  background: #fff;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
h1, h2, p { margin: 0; }
button, input { font: inherit; color: inherit; }
svg.i { width: 18px; height: 18px; flex-shrink: 0; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }

html, body { height: 100%; }
.page {
  height: 100vh; height: 100dvh; overflow: hidden;
  display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); grid-template-rows: minmax(0, 1fr);
  padding: 16px;
}

/* ---------- form panel ---------- */
.form-panel {
  display: flex; flex-direction: column; justify-content: space-between; align-items: center; gap: clamp(12px, 2.5vh, 40px);
  min-height: 0; overflow-y: auto; scrollbar-width: none;
  padding: clamp(8px, 2vh, 24px) clamp(24px, 5.5vw, 80px);
}
.form-panel::-webkit-scrollbar { display: none; }
.form-panel > * { width: 100%; max-width: 480px; }
.brand { display: flex; align-items: center; gap: 12px; }
.brand img { width: 44px; height: 44px; object-fit: contain; }
.brand strong { display: block; font-size: 18px; font-weight: 800; line-height: 1.25; }
.brand small { display: block; font-size: 12px; color: var(--muted); }
.bottom-spacer { height: clamp(0px, 5vh, 44px); }

.form { display: flex; flex-direction: column; gap: clamp(12px, 2.2vh, 24px); }
.form-head { display: flex; flex-direction: column; gap: clamp(6px, 1.2vh, 12px); }
.kicker { font-size: 13px; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: var(--blue); }
.title { font-size: clamp(26px, min(2.8vw, 4.4vh), 40px); font-weight: 800; letter-spacing: -0.02em; line-height: 1.2; }
.desc { font-size: clamp(13px, 1.9vh, 15px); line-height: 1.5; color: var(--muted); }

.fields { display: flex; flex-direction: column; gap: clamp(10px, 1.6vh, 16px); }
.field { position: relative; display: flex; flex-direction: column; gap: clamp(4px, 0.8vh, 8px); }
.field label { font-size: 14px; font-weight: 600; }
.input {
  display: flex; align-items: center; gap: 12px; height: clamp(44px, 5.8vh, 52px); padding: 0 16px;
  background: var(--surface); border: 1px solid var(--line); border-radius: 14px; color: var(--placeholder);
}
.input:focus-within { border-color: var(--blue); background: #fff; }
.input.is-error { border-color: var(--danger); }
.input input { flex: 1; min-width: 0; border: 0; background: transparent; outline: none; font-size: 15px; color: var(--ink); height: 100%; }
.input input::placeholder { color: var(--placeholder); }
.pw-toggle { display: grid; place-items: center; width: 32px; height: 32px; margin-right: -7px; border: 0; background: transparent; border-radius: 8px; color: var(--muted); cursor: pointer; }
.pw-toggle:hover { background: var(--line); }
.error-msg { position: absolute; top: 0; right: 0; font-size: 13px; font-weight: 600; line-height: 18px; color: var(--danger); }

.options { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.remember { display: flex; align-items: center; gap: 10px; font-size: 14px; color: var(--muted); cursor: pointer; user-select: none; }
.checkbox {
  display: grid; place-items: center; width: 18px; height: 18px; padding: 0; border-radius: 5px; cursor: pointer;
  border: 1.5px solid #C5CDDD; background: #fff;
}
.checkbox[aria-checked="true"] { background: var(--blue); border-color: var(--blue); }
.checkbox svg { width: 10px; height: 10px; overflow: visible; }
.checkbox path { fill: none; stroke: #fff; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.forgot { font-size: 14px; font-weight: 600; color: var(--blue); }
.forgot:hover { color: var(--blue-deep); text-decoration: underline; text-underline-offset: 3px; }

.actions { display: flex; flex-direction: column; gap: clamp(8px, 1.5vh, 14px); }
.btn {
  display: flex; align-items: center; justify-content: center; gap: 10px; min-height: clamp(46px, 6vh, 56px); padding: 10px 24px;
  border-radius: 999px; font-weight: 700; text-align: center; cursor: pointer;
  transition: transform 250ms cubic-bezier(0.22, 1, 0.36, 1), background-color 150ms ease-out, box-shadow 250ms cubic-bezier(0.22, 1, 0.36, 1), border-color 150ms ease-out;
}
.btn:active { transform: scale(0.98); }
.btn-primary { border: 0; background: var(--blue); color: #fff; font-size: 16px; }
.btn-primary:hover { background: var(--blue-deep); box-shadow: 0 12px 26px rgba(47,111,235,0.28); }
.btn-sso { border: 1px solid var(--line); background: #fff; font-size: 15px; color: var(--ink); }
.btn-sso svg { color: var(--blue-deep); }
.btn-sso:hover { border-color: #C5CDDD; background: var(--surface); }
.divider { display: flex; align-items: center; gap: 14px; font-size: 13px; color: var(--placeholder); }
.divider::before, .divider::after { content: ""; flex: 1; height: 1px; background: var(--line); }

.register { display: flex; flex-direction: column; gap: clamp(6px, 1.1vh, 10px); }
.register h2 { font-size: 13px; font-weight: 700; }
.reg-row {
  display: flex; align-items: center; gap: 14px; padding: clamp(8px, 1.3vh, 12px) 16px; border-radius: 16px; background: var(--surface);
  transition: background-color 150ms ease-out;
}
.reg-row:hover { background: var(--blue-soft); }
.reg-ic { width: 36px; height: 36px; border-radius: 10px; background: var(--blue-soft); color: var(--blue); display: grid; place-items: center; flex-shrink: 0; transition: background-color 150ms ease-out; }
.reg-row:hover .reg-ic { background: #fff; }
.reg-text { flex: 1; min-width: 0; }
.reg-text strong { display: block; font-size: 14px; font-weight: 700; }
.reg-text span { font-size: 12px; color: var(--muted); }
.reg-row .t-learn-chevron { color: var(--muted); }
.reg-row .t-learn-chevron svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }

/* ---------- visual panel ---------- */
.visual {
  position: relative; overflow: hidden; color: #fff; border-radius: 36px;
  background: linear-gradient(149deg, #3B7EF2 18%, #2459D6 82%);
  padding: clamp(20px, min(3.9vw, 5.5vh), 56px);
  display: flex; flex-direction: column; justify-content: space-between; gap: clamp(12px, 3vh, 40px);
  min-height: 0;
}
.bg { position: absolute; inset: 0; pointer-events: none; }
.bg-dots {
  position: absolute; inset: 0;
  background-image: radial-gradient(circle, rgba(255,255,255,0.28) 1.6px, transparent 1.7px);
  background-size: 28px 28px;
  -webkit-mask-image: radial-gradient(ellipse 70% 60% at 78% 56%, #000, transparent);
          mask-image: radial-gradient(ellipse 70% 60% at 78% 56%, #000, transparent);
}
.ring { position: absolute; left: 78%; top: 56%; border-radius: 50%; border: 1px solid; transform: translate(-50%, -50%); }
.ring-1 { width: 520px; height: 520px; border-color: rgba(255,255,255,0.18); }
.ring-2 { width: 820px; height: 820px; border-color: rgba(255,255,255,0.12); }
.ring-3 { width: 1120px; height: 1120px; border-color: rgba(255,255,255,0.08); }
.glow { position: absolute; width: 820px; height: 820px; left: -260px; top: -320px; border-radius: 50%; background: radial-gradient(closest-side, rgba(111,163,255,0.35), rgba(111,163,255,0)); }
.visual > :not(.bg) { position: relative; }

.v-top { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; }
.eyebrow { display: inline-flex; align-items: center; gap: 10px; padding: 8px 16px 8px 8px; border-radius: 999px; background: rgba(255,255,255,0.12); border: 1px solid rgba(255,255,255,0.2); font-size: 14px; font-weight: 600; }
.eyebrow b { background: #fff; color: var(--blue-deep); font-size: 12px; font-weight: 800; padding: 4px 10px; border-radius: 999px; }
.help { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 600; color: rgba(255,255,255,0.85); transition: color 150ms ease-out; }
.help:hover { color: #fff; }

.photo-stack { position: relative; display: flex; flex: 1; min-height: 0; padding-left: clamp(40px, 7vw, 96px); padding-bottom: 40px; max-width: 616px; width: 100%; }
.photo { display: block; flex: 1; min-width: 0; min-height: 0; width: auto; height: 100%; object-fit: cover; border-radius: 28px; border: 1px solid rgba(255,255,255,0.3); }
.float-card {
  position: absolute; left: 0; bottom: 0; display: flex; align-items: center; gap: 14px;
  background: #fff; color: var(--ink); border-radius: 20px; padding: 20px; box-shadow: 0 20px 40px rgba(11,42,122,0.25);
}
.float-card .ic { width: 48px; height: 48px; border-radius: 14px; background: var(--blue-soft); color: var(--blue); display: grid; place-items: center; }
.float-card .ic svg { width: 24px; height: 24px; }
.float-card strong { display: block; font-size: 16px; font-weight: 700; }
.float-card span { font-size: 13px; color: var(--muted); }

.v-copy { display: flex; flex-direction: column; gap: 16px; }
.v-copy h2 { font-size: clamp(26px, 2.5vw, 36px); font-weight: 800; letter-spacing: -0.02em; line-height: 1.2; max-width: 656px; }
.v-copy p { font-size: 16px; line-height: 1.6; color: rgba(255,255,255,0.85); }

/* ---------- responsive ---------- */
@media (max-width: 1023px) {
  .page { grid-template-columns: minmax(0, 1fr); grid-template-rows: none; height: auto; min-height: 100dvh; overflow: visible; padding: 0; }
  .form-panel { overflow: visible; }
  .visual { display: none; }
  .form-panel { justify-content: flex-start; padding: 32px clamp(20px, 6vw, 48px); }
  .bottom-spacer { display: none; }
  .form-panel::after { content: "Butuh bantuan? Hubungi admin SIMGPK di wilayah Anda."; font-size: 13px; color: var(--placeholder); text-align: center; margin-top: auto; }
}
@media (max-width: 480px) {
  .form-panel { gap: 32px; padding-block: 20px 28px; }
  .brand img { width: 40px; height: 40px; }
  .btn-primary { font-size: 15px; }
  .btn-sso { font-size: 14px; }
}

/* ======================================================================
   transitions-dev snippets (verbatim) + project-specific hook overrides
   ====================================================================== */

/* 09 · Icon swap — password visibility */
.t-icon-swap {
  position: relative;
  display: inline-grid;
}
.t-icon-swap .t-icon {
  grid-area: 1 / 1;
  transition:
    opacity   var(--icon-swap-dur) var(--icon-swap-ease),
    filter    var(--icon-swap-dur) var(--icon-swap-ease),
    transform var(--icon-swap-dur) var(--icon-swap-ease);
  will-change: opacity, filter, transform;
}
.t-icon-swap[data-state="a"] .t-icon[data-icon="a"],
.t-icon-swap[data-state="b"] .t-icon[data-icon="b"] {
  opacity: 1;
  filter: blur(0);
  transform: scale(1);
}
.t-icon-swap[data-state="a"] .t-icon[data-icon="b"],
.t-icon-swap[data-state="b"] .t-icon[data-icon="a"] {
  opacity: 0;
  filter: blur(var(--icon-swap-blur));
  transform: scale(var(--icon-swap-start-scale));
}

@media (prefers-reduced-motion: reduce) {
  .t-icon-swap .t-icon { transition: none !important; }
}

/* 12 · Error state shake — empty username / password */
.t-input {
  transition: border-color 150ms ease-out;
  will-change: transform;
}
.t-input.is-error {
  transition: border-color var(--revert-dur, 280ms) ease-out;
}

.t-error-msg {
  opacity: 0;
  visibility: hidden;
  transition:
    opacity    var(--revert-dur, 280ms) ease-out,
    visibility 0s linear var(--revert-dur, 280ms);
}
.t-input-wrap.is-error .t-error-msg {
  opacity: 1;
  visibility: visible;
  transition:
    opacity    var(--revert-dur, 280ms) ease-out,
    visibility 0s linear 0s;
}

.t-input.is-shaking {
  animation: t-input-shake calc(
      var(--shake-dur-a) * 2 + var(--shake-dur-b) * 2
    ) linear;
}
@keyframes t-input-shake {
  0%      { transform: translateX(0);                                 animation-timing-function: var(--shake-ease); }
  28.57%  { transform: translateX(var(--shake-distance));             animation-timing-function: var(--shake-ease); }
  57.14%  { transform: translateX(calc(var(--shake-distance) * -1)); animation-timing-function: var(--shake-ease); }
  78.57%  { transform: translateX(var(--shake-overshoot));            animation-timing-function: var(--shake-ease); }
  100%    { transform: translateX(0); }
}

@media (prefers-reduced-motion: reduce) {
  .t-input { animation: none !important; transform: none !important; }
}

/* 25 · Checkbox check — "Ingat saya" */
.t-check {
  transition:
    background var(--check-box) var(--check-ease),
    box-shadow var(--check-box) var(--check-ease);
}
.t-check svg path {
  stroke-dasharray: var(--check-len, 15);
  stroke-dashoffset: var(--check-len, 15);
  transition: stroke-dashoffset var(--check-uncheck) var(--check-ease);
}
.t-check[aria-checked="true"] svg path {
  stroke-dashoffset: 0;
  transition: stroke-dashoffset var(--check-draw) var(--check-ease) var(--check-delay);
}

@media (prefers-reduced-motion: reduce) {
  .t-check, .t-check svg path { transition: none !important; }
}
.checkbox.t-check { transition: background var(--check-box) var(--check-ease), box-shadow var(--check-box) var(--check-ease), border-color var(--check-box) var(--check-ease); }

/* 24 · Learn more hover — register row chevrons */
.t-learn-chevron {
  display: inline-flex;
  transform: translateX(0);
  transition: transform var(--learn-out) var(--learn-ease);
}
.t-learn-arm {
  transform-box: view-box;
  transform-origin: 10px 8px;
  vector-effect: non-scaling-stroke;
  transition: transform var(--learn-out) var(--learn-ease);
}
.t-learn:hover .t-learn-chevron { transform: translateX(var(--learn-shift)); transition-duration: var(--learn-in); }
.t-learn:hover .t-learn-arm { transition-duration: var(--learn-in); }
.t-learn:hover .t-learn-arm-top { transform: rotate(var(--learn-spread)); }
.t-learn:hover .t-learn-arm-bot { transform: rotate(calc(var(--learn-spread) * -1)); }

@media (prefers-reduced-motion: reduce) {
  .t-learn-chevron, .t-learn-arm { transition: none !important; }
}

/* 18 · Texts reveal — form + visual copy on load */
.t-stagger-line {
  display: block;
  opacity: 0;
  transform: translateY(var(--stagger-distance));
  filter: blur(var(--stagger-blur));
  transition:
    opacity   var(--stagger-dur) var(--stagger-ease),
    transform var(--stagger-dur) var(--stagger-ease),
    filter    var(--stagger-dur) var(--stagger-ease);
  will-change: transform, opacity, filter;
}
.t-stagger-line--2 { transition-delay: var(--stagger-stagger); }

.t-stagger.is-shown .t-stagger-line {
  opacity: 1;
  transform: translateY(0);
  filter: blur(0);
}
.t-stagger.is-hiding .t-stagger-line {
  opacity: 0;
  transform: translateY(0);
  filter: blur(0);
  transition:
    opacity 200ms ease,
    transform 0s linear,
    filter 0s linear;
  transition-delay: 0s;
}

@media (prefers-reduced-motion: reduce) {
  .t-stagger-line { transition: none !important; }
}
.t-stagger-line--3 { transition-delay: calc(var(--stagger-stagger) * 2); }
.t-stagger-line--4 { transition-delay: calc(var(--stagger-stagger) * 3); }
.t-stagger-line--5 { transition-delay: calc(var(--stagger-stagger) * 4); }
.t-stagger-line--6 { transition-delay: calc(var(--stagger-stagger) * 5); }
.t-stagger-line--7 { transition-delay: calc(var(--stagger-stagger) * 6); }
/* keep each line's own layout display */
.fields.t-stagger-line, .actions.t-stagger-line, .register.t-stagger-line, .v-copy.t-stagger-line { display: flex; }
.options.t-stagger-line, .v-top.t-stagger-line, .float-card.t-stagger-line { display: flex; }
.no-js .t-stagger-line { opacity: 1; transform: none; filter: none; }
