/* ==========================================================================
   PPAPI — masuk.css · Masuk & Daftar
   Split screen ≥1024px: panel visual gelap (sticky) + panel formulir di atas
   kertas. <1024px: pita gelap ringkas di atas, kartu formulir di bawahnya.
   Semua aturan dibatasi body[data-page="masuk"]; hanya memakai token desain.
   ========================================================================== */

body[data-page="masuk"] { background: var(--c-paper); }

body[data-page="masuk"] .auth-shell {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  min-height: 100vh;
  min-height: 100svh;
}


/* ---------- Panel visual (gelap) ---------- */
body[data-page="masuk"] .auth-visual {
  position: relative;
  color: var(--text);
  background: var(--c-black);
}
/* frame = photo + scaffold + copy; sticky full-viewport panel on desktop */
body[data-page="masuk"] .auth-visual__frame {
  position: relative; isolation: isolate; overflow: hidden;
  display: flex; flex-direction: column;
  padding: calc(var(--header-offset) + clamp(28px, 6vw, 48px)) var(--gutter) clamp(92px, 16vw, 120px);
}
body[data-page="masuk"] .auth-visual__media { z-index: -3; --hero-pos: 64% 42%; }
body[data-page="masuk"] .auth-visual__media img { filter: grayscale(1) contrast(1.08) brightness(.82); }
body[data-page="masuk"] .auth-visual__media::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background:
    var(--noise),
    linear-gradient(0deg, rgba(10,10,11,.97) 0%, rgba(10,10,11,.84) 38%, rgba(10,10,11,.58) 70%, rgba(10,10,11,.72) 100%),
    linear-gradient(90deg, rgba(10,10,11,.7) 0%, rgba(10,10,11,.2) 100%);
}
body[data-page="masuk"] .auth-visual__scaffold { z-index: -2; }
body[data-page="masuk"] .auth-visual__scaffold .scaffold-draw { color: rgba(185,185,191,.12); }

body[data-page="masuk"] .auth-visual__inner {
  position: relative; z-index: 1;
  display: flex; flex-direction: column; flex: 1; min-height: 0;
}

body[data-page="masuk"] .auth-visual__body { display: flex; flex-direction: column; }
body[data-page="masuk"] .auth-visual__eyebrow { color: var(--c-silver); margin-bottom: 16px; }
body[data-page="masuk"] .auth-visual__title {
  font-family: var(--f-display); font-weight: 600;
  font-size: clamp(2.1rem, 8.4vw, 2.9rem); line-height: 1.04; letter-spacing: -.01em;
  color: var(--c-white);
}
body[data-page="masuk"] .auth-visual__title em { color: var(--c-silver); }

/* "Terbuka bagi anggota berstatus Aktif" — shown with the benefits (tablet + desktop) */
body[data-page="masuk"] .auth-benefits__caption {
  display: none; align-items: center; gap: 8px; margin: 26px 0 0;
  font: 600 .7rem/1.3 var(--f-cond); letter-spacing: .22em; text-transform: uppercase; color: var(--c-silver);
}
body[data-page="masuk"] .auth-benefits__caption > [data-icon],
body[data-page="masuk"] .auth-benefits__caption > svg { flex: none; color: var(--c-bone); }
@media (min-width: 600px) {
  body[data-page="masuk"] .auth-benefits__caption { display: inline-flex; }
  body[data-page="masuk"] .auth-benefits__caption + .auth-benefits { margin-top: 14px; }
}

/* benefits — hidden on phones, 3-column row on tablets, ruled list on desktop */
body[data-page="masuk"] .auth-benefits {
  display: none; gap: 10px 22px;
  margin: 26px 0 0; padding: 0; list-style: none;
}
body[data-page="masuk"] .auth-benefit { display: flex; align-items: center; gap: 10px; min-width: 0; }
body[data-page="masuk"] .auth-benefit__icon {
  display: grid; place-items: center; flex: none;
  width: 34px; height: 34px; border-radius: 50%;
  color: var(--c-bone); border: 1px solid rgba(255,255,255,.22);
}
body[data-page="masuk"] .auth-benefit__icon svg { width: 16px; height: 16px; }
body[data-page="masuk"] .auth-benefit__text { display: grid; gap: 4px; min-width: 0; }
body[data-page="masuk"] .auth-benefit__title {
  font: 600 .74rem/1.3 var(--f-cond); letter-spacing: .18em; text-transform: uppercase; color: var(--c-bone);
}
body[data-page="masuk"] .auth-benefit__desc { display: none; font-size: .9rem; line-height: 1.55; color: rgba(236,236,234,.78); }

/* signature lockup: logo · hairline · full name (desktop) */
body[data-page="masuk"] .auth-visual__foot {
  display: none; align-items: center; gap: 18px;
  margin-top: clamp(24px, 4vh, 40px);
}
body[data-page="masuk"] .auth-visual__logo { flex: none; align-self: center; width: auto; height: 34px; }
body[data-page="masuk"] .auth-visual__foot-rule { flex: none; width: 1px; height: 30px; background: rgba(255,255,255,.2); }
body[data-page="masuk"] .auth-visual__org {
  font: 600 .66rem/1.55 var(--f-cond); letter-spacing: .22em; text-transform: uppercase;
  color: var(--c-silver);
}



/* ---------- Panel formulir (terang) ---------- */
body[data-page="masuk"] .auth-panel {
  position: relative;
  padding: 0 var(--gutter) clamp(56px, 10vw, 96px);
  background: var(--c-paper);
}
body[data-page="masuk"] .auth-panel__inner {
  position: relative; z-index: 1;
  display: flex; flex-direction: column; align-items: center;
  width: 100%; max-width: 460px; margin-inline: auto;
}

/* the card overlaps the dark band on small screens */
body[data-page="masuk"] .auth-card {
  --card-pad: clamp(22px, 6vw, 40px);
  width: 100%;
  margin-top: -64px;
  padding-top: 0;
  box-shadow: var(--shadow-2);
}
body[data-page="masuk"] .auth-noscript { margin: var(--card-pad) 0 0; display: block; }

/* tabs flush with the card's top edge, equal width */
body[data-page="masuk"] .auth-tabs .tabs__list {
  gap: 0;
  margin-inline: calc(var(--card-pad) * -1);
  padding-inline: var(--card-pad);
  overflow: visible;
}
body[data-page="masuk"] .auth-tabs .tabs__tab {
  flex: 1 1 0; justify-content: center; min-height: 62px;
  font-size: .82rem; letter-spacing: .22em;
}
body[data-page="masuk"] .auth-tabs .tabs__panel { padding-top: clamp(26px, 4vw, 34px); }
body[data-page="masuk"] .auth-tabs .tabs__panel:focus-visible { outline-offset: 4px; }

/* "silakan masuk untuk melanjutkan …" */
body[data-page="masuk"] .auth-next {
  display: flex; align-items: flex-start; gap: 10px;
  margin: 18px 0 -4px; padding: 12px 14px;
  font-size: .88rem; line-height: 1.5; color: var(--text);
  background: var(--surface-2); border-left: 2px solid var(--text);
}
body[data-page="masuk"] .auth-next[hidden] { display: none; }
body[data-page="masuk"] .auth-next > [data-icon] { margin-top: 2px; color: var(--muted); }

/* panel heading */
body[data-page="masuk"] .auth-head { margin-bottom: 24px; }
body[data-page="masuk"] .auth-head__title {
  font: 600 clamp(1.75rem, 5.6vw, 2.1rem)/1.1 var(--f-display); font-variant-numeric: lining-nums; letter-spacing: -.005em;
  color: var(--text-strong);
}
body[data-page="masuk"] .auth-head__text { margin-top: 10px; font-size: .95rem; line-height: 1.6; color: var(--muted); }

body[data-page="masuk"] .auth-method { margin-bottom: 24px; }
body[data-page="masuk"] .auth-method .segmented__option { gap: 9px; }

/* error alert slot (aria-live) */
body[data-page="masuk"] .auth-alert-slot:empty { display: none; }
body[data-page="masuk"] .auth-alert-slot { margin-bottom: 22px; }
body[data-page="masuk"] .auth-alert-slot .alert { font-size: .9rem; }
body[data-page="masuk"] .auth-alert-slot .alert__action { margin-top: 6px; }

body[data-page="masuk"] .auth-form { gap: 20px; }
body[data-page="masuk"] .auth-form .btn--block { margin-top: 4px; }
body[data-page="masuk"] .auth-form__row {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 4px 16px;
  margin-top: -8px;
}
body[data-page="masuk"] .auth-card .check { min-height: 44px; align-items: center; padding-block: 4px; }
body[data-page="masuk"] .auth-card .check__box { margin-top: 0; }
body[data-page="masuk"] .auth-card .check > input { top: 50%; transform: translateY(-50%); }
body[data-page="masuk"] .auth-agree .check { align-items: flex-start; }
body[data-page="masuk"] .auth-agree .check__box { margin-top: 3px; }
body[data-page="masuk"] .auth-agree .check > input { top: 7px; transform: none; }
body[data-page="masuk"] .auth-agree { margin-top: -6px; }
body[data-page="masuk"] .auth-form .strength { margin-top: 4px; }

/* text link styled as button */
body[data-page="masuk"] .auth-link {
  display: inline-flex; align-items: center; gap: 6px; min-height: 44px;
  font: 500 .9rem/1.2 var(--f-body); color: var(--text);
  text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 4px;
  text-decoration-color: var(--line-strong);
  transition: text-decoration-color .3s, color .3s;
}
body[data-page="masuk"] .auth-link:hover { text-decoration-color: currentColor; }
body[data-page="masuk"] .auth-link:disabled { color: var(--muted); text-decoration: none; cursor: default; }
body[data-page="masuk"] .auth-link--strong { font-weight: 600; }

/* "atau" divider with coupler nodes */
body[data-page="masuk"] .auth-or {
  display: flex; align-items: center; gap: 14px; margin: 28px 0 22px;
  font: 600 .7rem/1 var(--f-cond); letter-spacing: .3em; text-transform: uppercase; color: var(--muted);
}
body[data-page="masuk"] .auth-or::before,
body[data-page="masuk"] .auth-or::after {
  content: ""; flex: 1; height: 5px;
  background:
    linear-gradient(var(--line-strong), var(--line-strong)) 100% 50% / 5px 5px no-repeat,
    linear-gradient(var(--line), var(--line)) 0 50% / 100% 1px no-repeat;
}
body[data-page="masuk"] .auth-or::after {
  background:
    linear-gradient(var(--line-strong), var(--line-strong)) 0 50% / 5px 5px no-repeat,
    linear-gradient(var(--line), var(--line)) 0 50% / 100% 1px no-repeat;
}
body[data-page="masuk"] .auth-or > span { padding-left: .3em; }

body[data-page="masuk"] .auth-card .btn-google { font-size: .95rem; }
body[data-page="masuk"] .auth-card .btn-google svg { width: 20px; height: 20px; }

body[data-page="masuk"] .auth-legal { margin-top: 14px; font-size: .82rem; line-height: 1.55; color: var(--muted); text-align: center; }

body[data-page="masuk"] .auth-switch {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 0 8px;
  margin-top: 26px; padding-top: 14px; border-top: 1px solid var(--line);
  font-size: .92rem; color: var(--muted);
}

/* phone · step 2 */
body[data-page="masuk"] .auth-sent-to {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 10px 6px 10px 16px;
  background: var(--surface-2); border-left: 2px solid var(--text); border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}
body[data-page="masuk"] .auth-sent-to__text { display: grid; gap: 4px; min-width: 0; }
body[data-page="masuk"] .auth-sent-to__label {
  font: 600 .68rem/1.2 var(--f-cond); letter-spacing: .2em; text-transform: uppercase; color: var(--muted);
}
body[data-page="masuk"] .auth-sent-to__number {
  font: 600 1.15rem/1.2 var(--f-cond); letter-spacing: .06em; font-variant-numeric: tabular-nums; color: var(--text-strong);
  white-space: nowrap;
}
body[data-page="masuk"] .auth-sent-to .auth-link { flex: none; padding-inline: 10px; }

/* six boxes always fit the card (the .field grid track may not grow past the card) */
body[data-page="masuk"] .auth-otp { min-width: 0; justify-content: space-between; gap: clamp(6px, 2vw, 10px); }
body[data-page="masuk"] .auth-otp .otp__input { flex: 1 1 0; width: 0; min-width: 0; max-width: 60px; }

body[data-page="masuk"] .auth-resend {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 0 6px;
  margin-top: -6px; font-size: .9rem; color: var(--muted);
}
body[data-page="masuk"] .auth-countdown { font-variant-numeric: tabular-nums; }

/* "Lengkapi profil" step — replaces the tabs inside the card */
body[data-page="masuk"] .auth-tabs[hidden],
body[data-page="masuk"] .auth-complete[hidden],
body[data-page="masuk"] .auth-complete [hidden] { display: none; }
body[data-page="masuk"] .auth-complete { padding-top: var(--card-pad); }
body[data-page="masuk"] .auth-complete__eyebrow { margin-bottom: 14px; }
/* programmatic focus target only (like main:focus) — not in the tab order */
body[data-page="masuk"] .auth-head__title[tabindex="-1"]:focus { outline: none; }
body[data-page="masuk"] .auth-complete__who { margin-bottom: 24px; padding-right: 16px; }
body[data-page="masuk"] .auth-complete__id { white-space: normal; overflow-wrap: anywhere; letter-spacing: .04em; }
body[data-page="masuk"] .auth-complete .auth-agree { margin-top: -4px; }

/* Daftar: the three registration stages (account → form → verification) */
body[data-page="masuk"] .auth-steps {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px;
  margin: 20px 0 0; padding: 0; list-style: none;
}
body[data-page="masuk"] .auth-steps__item {
  display: flex; align-items: baseline; gap: 8px; min-width: 0;
  padding-top: 11px; border-top: 1px solid var(--line-strong);
  font: 600 .7rem/1.3 var(--f-cond); letter-spacing: .14em; text-transform: uppercase; color: var(--muted);
}
body[data-page="masuk"] .auth-steps__item.is-current { padding-top: 10px; border-top: 2px solid var(--text); color: var(--text); }
body[data-page="masuk"] .auth-steps__num { flex: none; font-variant-numeric: tabular-nums lining-nums; letter-spacing: .08em; }
body[data-page="masuk"] .auth-steps__label { min-width: 0; }

/* Mode Demo note under the card */
body[data-page="masuk"] .auth-demo {
  /* minmax(0, 1fr): an implicit auto track would take the nowrap .btn's width as its minimum and push the
     admin block (and its copy buttons) out of the frame below ~390px */
  display: grid; grid-template-columns: minmax(0, 1fr); gap: 0;
  width: 100%; margin-top: 22px; padding: 16px 18px;
  font-size: .86rem; line-height: 1.6; color: var(--muted);
  border: 1px dashed var(--line-strong); border-radius: var(--radius-sm);
}
body[data-page="masuk"] .auth-demo[hidden],
body[data-page="masuk"] .auth-demo [hidden] { display: none; }
body[data-page="masuk"] .auth-demo__intro { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 12px; }
body[data-page="masuk"] .auth-demo__icon { margin-top: 2px; color: var(--text); }
body[data-page="masuk"] .auth-demo__title,
body[data-page="masuk"] .auth-demo__admin-title {
  margin-bottom: 4px;
  font: 600 .7rem/1.3 var(--f-cond); letter-spacing: .24em; text-transform: uppercase; color: var(--text);
}
body[data-page="masuk"] .auth-demo strong { color: var(--text); font-weight: 600; }

/* seeded admin account (Mode Demo only) */
body[data-page="masuk"] .auth-demo__admin {
  margin-top: 16px; padding-top: 16px; border-top: 1px dashed var(--line-strong);
}
body[data-page="masuk"] .auth-demo__admin-head { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 12px; }
body[data-page="masuk"] .auth-demo__admin-icon { margin-top: 2px; color: var(--text); }
body[data-page="masuk"] .auth-cred {
  display: grid; margin: 14px 0 12px;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-sm);
}
body[data-page="masuk"] .auth-cred__row {
  display: grid; grid-template-columns: 96px minmax(0, 1fr); align-items: center; gap: 8px;
  padding: 0 0 0 14px;
}
body[data-page="masuk"] .auth-cred__row + .auth-cred__row { border-top: 1px solid var(--line); }
body[data-page="masuk"] .auth-cred dt {
  font: 600 .66rem/1.3 var(--f-cond); letter-spacing: .2em; text-transform: uppercase; color: var(--muted);
}
body[data-page="masuk"] .auth-cred dd { display: flex; align-items: center; justify-content: space-between; gap: 6px; min-width: 0; margin: 0; }
/* Credential values are retyped character for character, so they are set in a monospace face: its capital I
   carries serifs, the lowercase l a tail and the 1 a foot, and most system monos slash or dot the zero.
   Neither Barlow Condensed nor Inter can do this: both draw I and l as the same plain bar, and the Google
   Fonts build of Inter omits the cv/ss disambiguation alternates. System stack only, so no extra web-font
   request; the condensed face stays on the dt labels. <kbd> marks the values as text the visitor types. */
body[data-page="masuk"] .auth-cred__value {
  min-width: 0; overflow-wrap: anywhere;
  font: 500 .94rem/1.4 ui-monospace, "SF Mono", "Cascadia Mono", "Segoe UI Mono", Consolas, "Liberation Mono", Menlo, "Roboto Mono", "Droid Sans Mono", monospace;
  letter-spacing: 0; font-variant-ligatures: none;
  color: var(--text-strong); user-select: all;
}
body[data-page="masuk"] .auth-cred__copy { color: var(--muted); }
body[data-page="masuk"] .auth-cred__copy:hover,
body[data-page="masuk"] .auth-cred__copy:focus-visible { color: var(--text); }
body[data-page="masuk"] .auth-demo__fill { background: var(--surface); white-space: normal; line-height: 1.3; padding-block: 10px; }
body[data-page="masuk"] .auth-demo__fill > span:first-child { text-wrap: balance; }

/* "Lupa kata sandi?" modal — success state (modal lives in <body>) */
body[data-page="masuk"] .auth-modal .modal__body > p:first-child { margin-bottom: 4px; }
body[data-page="masuk"] .auth-sent { display: grid; justify-items: start; gap: 10px; }
body[data-page="masuk"] .auth-sent__icon {
  display: grid; place-items: center; width: 48px; height: 48px; margin-bottom: 4px;
  color: var(--text); border: 1px solid var(--line-strong); border-radius: 50%;
}
body[data-page="masuk"] .auth-sent__title { font: 600 1.35rem/1.25 var(--f-display); font-variant-numeric: lining-nums; color: var(--text) !important; }
body[data-page="masuk"] .auth-sent__demo {
  margin-top: 4px; padding-top: 12px; border-top: 1px solid var(--line); font-size: .86rem;
}


/* ---------- Tablet (600–1023): one centred 560px column, benefits in a row ---------- */
@media (min-width: 600px) and (max-width: 1023px) {
  body[data-page="masuk"] .auth-visual__inner,
  body[data-page="masuk"] .auth-panel__inner { width: 100%; max-width: 560px; margin-inline: auto; }
  body[data-page="masuk"] .auth-benefits { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
  body[data-page="masuk"] .auth-benefit { align-items: flex-start; }
  body[data-page="masuk"] .auth-benefit__title { padding-top: 9px; }
}


/* ---------- Desktop split screen ---------- */
@media (min-width: 1024px) {
  body[data-page="masuk"] .auth-shell {
    grid-template-columns: minmax(0, 1fr) minmax(540px, 1fr);
    align-items: start;
  }

  /* the dark column spans the whole shell; only its frame sticks to the viewport */
  body[data-page="masuk"] .auth-visual { align-self: stretch; }
  body[data-page="masuk"] .auth-visual__frame {
    position: sticky; top: 0;
    height: 100vh; height: 100svh;
    padding:
      calc(var(--header-offset) + clamp(32px, 5vh, 56px))
      clamp(40px, 4.4vw, 80px)
      clamp(32px, 5vh, 52px)
      max(var(--gutter), calc(50vw - var(--container) / 2 + var(--gutter)));
  }
  /* the photo stays bright at the top right; a soft scrim sits behind the copy column so the
     eyebrow and the small caps reach AA over the railings (25–80% band from the top) */
  body[data-page="masuk"] .auth-visual__media::after {
    background:
      var(--noise),
      radial-gradient(ellipse 62% 46% at 30% 40%, rgba(10,10,11,.5) 0%, rgba(10,10,11,.32) 55%, rgba(10,10,11,0) 100%),
      linear-gradient(0deg, rgba(10,10,11,.97) 0%, rgba(10,10,11,.88) 34%, rgba(10,10,11,.56) 62%, rgba(10,10,11,.3) 82%, rgba(10,10,11,.5) 100%),
      linear-gradient(90deg, rgba(10,10,11,.76) 0%, rgba(10,10,11,.34) 70%, rgba(10,10,11,.1) 100%);
  }
  body[data-page="masuk"] .auth-visual__body { margin-top: auto; }
  body[data-page="masuk"] .auth-visual__title { font-size: clamp(2.4rem, min(3.7vw, 6.4vh), 3.75rem); }
  body[data-page="masuk"] .auth-visual__foot { display: flex; }

  body[data-page="masuk"] .auth-benefits {
    display: grid; gap: 0; max-width: 470px;
    margin-top: clamp(28px, 4.4vh, 44px);
    border-top: 1px solid rgba(255,255,255,.12);
  }
  body[data-page="masuk"] .auth-benefits__caption { margin-top: clamp(28px, 4.4vh, 44px); }
  body[data-page="masuk"] .auth-benefit {
    align-items: flex-start; gap: 18px;
    padding: clamp(14px, 2vh, 18px) 0;
    border-bottom: 1px solid rgba(255,255,255,.12);
  }
  body[data-page="masuk"] .auth-benefit__icon { width: 42px; height: 42px; }
  body[data-page="masuk"] .auth-benefit__icon svg { width: 18px; height: 18px; }
  body[data-page="masuk"] .auth-benefit__title { font-size: .8rem; padding-top: 2px; }
  body[data-page="masuk"] .auth-benefit__desc { display: block; }

  body[data-page="masuk"] .auth-panel {
    display: flex; align-items: center; justify-content: center;
    min-height: 100vh; min-height: 100svh;
    padding: calc(var(--header-offset) + clamp(36px, 6vh, 64px)) clamp(32px, 4vw, 72px) clamp(48px, 8vh, 80px);
  }
  body[data-page="masuk"] .auth-card { margin-top: 0; box-shadow: var(--shadow-1); }
}

/* short desktop screens: keep the sticky panel from clipping */
@media (min-width: 1024px) and (max-height: 760px) {
  body[data-page="masuk"] .auth-benefit__desc { display: none; }
  body[data-page="masuk"] .auth-benefit { align-items: center; }
  body[data-page="masuk"] .auth-benefit__icon { width: 36px; height: 36px; }
  body[data-page="masuk"] .auth-visual__title { font-size: clamp(2.2rem, 3.2vw, 3rem); }
}
@media (min-width: 1024px) and (max-height: 600px) {
  body[data-page="masuk"] .auth-visual__frame { position: relative; height: auto; min-height: 100vh; }
}


/* ---------- Small phones ---------- */
@media (max-width: 479px) {
  body[data-page="masuk"] .auth-tabs .tabs__tab { min-height: 56px; }
  body[data-page="masuk"] .auth-method .segmented__option { padding: 0 10px; }
  body[data-page="masuk"] .auth-sent-to { padding-left: 14px; }
  body[data-page="masuk"] .auth-sent-to__number { font-size: 1.05rem; letter-spacing: .03em; }
}
/* Narrow phones (< 380px): the 96px label column would leave the credential too little room and break it
   mid-string, so each label sits above its value instead. */
@media (max-width: 379px) {
  body[data-page="masuk"] .auth-cred__row { grid-template-columns: minmax(0, 1fr); gap: 0; padding-top: 10px; }
}
