/* Duera sign-in (1.4.0): photo left / form right on desktop; on phones the photo stays on top
   and the form rises over it as a sheet with rounded top corners. */
body.duera-auth-page {
  margin: 0;
  background: #fff;
  color: var(--dark, #311b14);
  font-family: Inter, sans-serif;
}

.duera-auth {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  min-height: 100vh;
  min-height: 100dvh;
}

.duera-auth-visual {
  position: sticky;
  top: 0;
  height: 100vh;
  height: 100dvh;
  overflow: hidden;
  background: #f6f4f1;
}

.duera-auth-visual img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.duera-auth .duera-auth-back {
  position: absolute;
  top: 24px;
  left: 24px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 14px 9px 10px;
  border-radius: 999px;
  color: var(--dark, #311b14);
  background: #ffffffe6;
  box-shadow: 0 6px 20px #311b141f;
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  backdrop-filter: blur(6px);
}

.duera-auth .duera-auth-back-icon {
  width: 16px;
  height: 16px;
  transform: rotate(180deg);
}

.duera-auth-pane {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 56px 32px;
}

.duera-auth-card {
  width: min(420px, 100%);
}

.duera-auth-logo {
  display: inline-block;
  margin: -12px 0 28px -14px;
}

/* The wordmark file carries generous padding (612×408), so it is sized by height. */
.duera-auth-logo img {
  display: block;
  width: auto;
  height: 80px;
}

.duera-auth-card h1 {
  margin: 0 0 6px;
  color: var(--dark, #311b14);
  font-family: "Sk Modernist", Arial, sans-serif;
  font-size: 28px;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.2;
}

.duera-auth-sub {
  margin: 0 0 24px;
  color: #311b14a6;
  font-size: 15px;
  line-height: 1.5;
}

.duera-auth-sub strong {
  color: var(--dark, #311b14);
  font-weight: 600;
  word-break: break-all;
}

.duera-auth-change {
  margin-left: 6px;
  color: var(--duera-burgundy, #4f0a09);
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.duera-auth .duera-feedback {
  margin: 0 0 18px;
  padding: 12px 14px;
  border-radius: 10px;
  color: var(--dark, #311b14);
  background: #f6f1ee;
  font-size: 14px;
  line-height: 1.5;
}

.duera-auth .duera-feedback-error {
  color: #8a1c13;
  background: #fbeceb;
}

.duera-auth-method {
  position: relative;
  margin: 0;
}

.duera-auth-google {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  width: 100%;
  min-height: 54px;
  padding: 0 18px;
  border: 1px solid #311b1433;
  border-radius: 12px;
  color: var(--dark, #311b14);
  background: #fff;
  font: inherit;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: border-color 140ms ease, background-color 140ms ease;
}

.duera-auth-google:hover {
  border-color: #311b1466;
  background: #fbfaf8;
}

.duera-auth-google:focus-visible,
.duera-auth-primary:focus-visible,
.duera-auth-submit:focus-visible {
  outline: 2px solid var(--duera-burgundy, #4f0a09);
  outline-offset: 3px;
}

.duera-auth-divider {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 22px 0;
  color: #311b148c;
  font-size: 13px;
}

.duera-auth-divider::before,
.duera-auth-divider::after {
  flex: 1;
  height: 1px;
  background: #311b1426;
  content: "";
}

.duera-auth-email > input.duera-field-input {
  padding-right: 62px;
}

.duera-auth-submit {
  position: absolute;
  z-index: 3;
  top: 7px;
  right: 7px;
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  padding: 0;
  border: 0;
  border-radius: 10px;
  color: #fff;
  background: var(--duera-burgundy, #4f0a09);
  cursor: pointer;
  transition: transform 140ms ease, opacity 140ms ease;
}

.duera-auth-submit:hover {
  transform: translateX(2px);
}

.duera-auth-submit:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

.duera-auth-submit-icon {
  width: 18px;
  height: 18px;
}

/* "Terakhir digunakan" pill sits on the bottom edge of the remembered option. */
.duera-auth-last {
  position: absolute;
  z-index: 4;
  bottom: -9px;
  left: 50%;
  padding: 2px 9px;
  border-radius: 999px;
  color: #fff;
  background: var(--duera-burgundy, #4f0a09);
  font-size: 11px;
  font-weight: 600;
  line-height: 1.5;
  white-space: nowrap;
  transform: translateX(-50%);
  pointer-events: none;
}

.duera-auth-last[hidden] {
  display: none;
}

.duera-auth-method:has(.duera-field-error:not([hidden])) .duera-auth-last {
  display: none;
}

.duera-auth-note {
  margin: 22px 0 0;
  color: #311b14a6;
  font-size: 13px;
  line-height: 1.55;
}

.duera-auth-legal {
  margin: 14px 0 0;
  color: #311b148c;
  font-size: 12px;
  line-height: 1.55;
}

.duera-auth-legal a,
.duera-auth-footer a {
  color: var(--duera-burgundy, #4f0a09);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.duera-auth-footer {
  margin: 40px 0 0;
  font-size: 13px;
}

/* One-time code. */
.duera-auth-otp {
  margin: 0;
}

.duera-auth-digits {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 10px;
  margin: 0 0 18px;
  padding: 0;
  border: 0;
}

.duera-auth-digits .otp-digit {
  width: 100%;
  min-width: 0;
  height: 60px;
  padding: 0;
  border: 1px solid #311b1433;
  border-radius: 12px;
  color: var(--dark, #311b14);
  background: #fff;
  font: inherit;
  font-size: 24px;
  font-weight: 600;
  text-align: center;
  caret-color: var(--duera-burgundy, #4f0a09);
  outline: 0;
  transition: border-color 140ms ease, box-shadow 140ms ease;
}

.duera-auth-digits .otp-digit:focus {
  border-color: var(--duera-burgundy, #4f0a09);
  box-shadow: 0 0 0 1px var(--duera-burgundy, #4f0a09);
}

.duera-auth-primary {
  width: 100%;
  min-height: 54px;
  border: 0;
  border-radius: 12px;
  color: #fff;
  background: var(--duera-burgundy, #4f0a09);
  font: inherit;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
}

.duera-auth-primary:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.duera-auth-resend {
  margin: 14px 0 0;
  text-align: center;
}

.duera-auth-resend button {
  padding: 8px 4px;
  border: 0;
  color: var(--duera-burgundy, #4f0a09);
  background: none;
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}

.duera-auth-resend button:disabled {
  color: #311b148c;
  text-decoration: none;
  cursor: default;
}

.duera-auth-page .skip-link {
  position: absolute;
  left: -9999px;
}

.duera-auth-page .skip-link:focus {
  top: 12px;
  left: 12px;
  z-index: 20;
  padding: 10px 14px;
  border-radius: 8px;
  background: #fff;
}

@media (max-width: 991px) {
  .duera-auth {
    display: block;
    min-height: 0;
  }

  .duera-auth-visual {
    position: relative;
    height: clamp(220px, 38vh, 340px);
  }

  .duera-auth .duera-auth-back {
    top: max(16px, env(safe-area-inset-top));
    left: 16px;
  }

  /* The form sheet overlaps the photo slightly. */
  .duera-auth-pane {
    position: relative;
    z-index: 2;
    display: block;
    min-height: calc(100dvh - clamp(220px, 38vh, 340px) + 28px);
    margin-top: -28px;
    padding: 28px 20px calc(32px + env(safe-area-inset-bottom));
    border-radius: 24px 24px 0 0;
    background: #fff;
    box-shadow: 0 -10px 30px #311b1414;
  }

  .duera-auth-card {
    margin: 0 auto;
  }

  .duera-auth-logo {
    display: block;
    width: max-content;
    margin: -10px auto 14px;
  }

  .duera-auth-logo img {
    height: 64px;
  }

  .duera-auth-card h1 {
    font-size: 24px;
  }

  .duera-auth-digits {
    gap: 8px;
  }

  .duera-auth-digits .otp-digit {
    height: 54px;
    font-size: 22px;
  }

  .duera-auth-footer {
    margin-top: 28px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .duera-auth-submit,
  .duera-auth-google,
  .duera-auth-digits .otp-digit {
    transition: none;
  }
}
