/* Account UI. Loaded on every page (layout.html) because the header shows
   the Log Masuk / user + Log Keluar item; the rest is the auth form card. */

/* Header: account item in the nav list */
.nav__user {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 12px 4px; border-bottom: 1px solid var(--line);
  font: 600 16px var(--font-head); color: var(--navy);
}
.nav__user form { margin: 0; }
.nav__logout {
  padding: 6px 14px; background: var(--white); border: 2px solid var(--navy); border-radius: var(--r-pill); min-height: 44px;
  font: 600 13px/1.2 var(--font-head); color: var(--navy); cursor: pointer;
}
.nav__logout:hover { background: var(--pale-yellow); }

@media (min-width: 1280px) {
  .nav__user { padding: 0; border: 0; font-size: 14px; gap: 8px; }
  /* a long first name must not push the WhatsApp button off screen */
  .nav__user span { max-width: 5.5em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .nav__logout { padding: 4px 10px; font-size: 12px; white-space: nowrap; }
  /* one more item in the nav: keep labels on one line, tighten the gaps */
  .nav__list { gap: 16px; }
  .header__bar { gap: 12px; }
  .nav__list > li > a { white-space: nowrap; }
}

/* Logged in: the extra account item needs room, so the buttons lose their icons. */
@media (min-width: 1280px) {
  .has-user .nav__list { gap: 12px; }
  .has-user .header__actions .btn .icon { display: none; }
}

/* Auth pages */
.auth { padding-block: 8px 56px; }
.auth__card {
  max-width: 440px; margin: 16px auto 0; padding: 24px 20px;
  background: var(--white); border: 1px solid #eef0f6; border-radius: var(--r-lg); box-shadow: var(--shadow-md);
}
.auth__title {
  display: flex; align-items: center; gap: 12px; font-size: 24px;
}
.auth__title::before {
  content: ""; width: 32px; height: 5px; border-radius: 3px; background: var(--gold-grad); flex: none;
}
.auth__lead { margin: 10px 0 18px; font-size: 15px; color: var(--navy-soft); }
.auth__error {
  margin-bottom: 14px; padding: 10px 14px; border-radius: var(--r-sm);
  background: #fdecec; border: 1px solid #f3b4b4; color: #8a1c1c; font-size: 14px; font-weight: 600;
}
.auth__form { display: grid; gap: 14px; }
.auth__field { display: grid; gap: 6px; font: 600 14px var(--font-head); color: var(--navy); }
.auth__field input {
  width: 100%; padding: 12px 14px; border: 1.5px solid var(--line); border-radius: var(--r-sm);
  font: 400 16px var(--font-body); color: var(--text); background: var(--white);
}
.auth__field input:focus-visible { outline: 3px solid var(--navy); outline-offset: 0; border-color: var(--navy); }
.auth__field .req, .field .req { color: #b42318; margin-left: 2px; }
.auth__field small { font: 400 13px var(--font-body); color: var(--navy-soft); }
.auth__submit { width: 100%; margin-top: 4px; padding: 14px 22px; font-size: 16px; }
.auth__alt { margin-top: 18px; text-align: center; font-size: 14px; color: var(--navy-soft); }
.auth__alt a { color: var(--navy); font-weight: 700; text-decoration: underline; text-decoration-color: var(--gold-deep); text-underline-offset: 3px; }

@media (min-width: 640px) {
  .auth { padding-top: 16px; }
  .auth__card { margin-top: 28px; padding: 32px 36px; }
}
