/* Shared auth styles, rebuilt from mockup/auth.html. The CSS tokens
   (--bg, --panel, --ink, --accent, --serif, etc.) are app-provided —
   each app declares them in its global stylesheet. The class names are
   namespaced with `pk-auth-` so they don't collide with app-local CSS. */

.pk-auth {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
}

/* Soft brand glow centered behind the card */
.pk-auth::before {
  content: "";
  position: absolute;
  top: -20%;
  left: 50%;
  transform: translateX(-50%);
  width: 1100px;
  height: 1100px;
  border-radius: 50%;
  background: radial-gradient(
    ellipse at center,
    rgba(196, 99, 60, 0.16) 0%,
    rgba(196, 99, 60, 0.06) 35%,
    transparent 65%
  );
  filter: blur(40px);
  pointer-events: none;
  z-index: 0;
}

.pk-auth-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  padding: 28px 24px 32px;
  position: relative;
  z-index: 2;
}

/* Topbar: brand left, contextual link right */
.pk-auth-topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  max-width: 480px;
  width: 100%;
  margin: 0 auto;
}
.pk-auth-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--ink);
}
.pk-auth-brand .mark {
  width: 28px;
  height: 28px;
  flex-shrink: 0;
}
.pk-auth-brand .mark svg {
  width: 100%;
  height: 100%;
  display: block;
}
.pk-auth-brand .name {
  font-family: var(--serif);
  font-weight: 450;
  font-size: 22px;
  letter-spacing: -0.01em;
}
.pk-auth-topright {
  font-size: 14px;
  color: var(--ink-dim);
}
.pk-auth-topright a {
  color: var(--accent);
  font-weight: 500;
  margin-left: 6px;
}
.pk-auth-topright a:hover {
  color: var(--accent-deep);
}

/* Form wrap centers the card vertically */
.pk-auth-form-wrap {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 48px 0 32px;
}
.pk-auth-form {
  width: 100%;
  max-width: 440px;
  margin: 0 auto;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 22px;
  padding: 40px 40px 36px;
  box-shadow:
    0 40px 80px -40px rgba(60, 40, 20, 0.18),
    0 14px 30px -16px rgba(60, 40, 20, 0.08);
}
.pk-auth-eyebrow {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 16px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.pk-auth-eyebrow .step {
  color: var(--ink-mute);
  font-weight: 400;
}
.pk-auth-title {
  font-family: var(--serif);
  font-weight: 380;
  font-size: clamp(34px, 3.6vw, 44px);
  line-height: 1.06;
  letter-spacing: -0.018em;
  margin: 0;
  max-width: 16ch;
  color: var(--ink);
  font-feature-settings: "ss01";
}
.pk-auth-title i {
  font-style: italic;
  color: var(--accent-deep);
  font-weight: 400;
}
.pk-auth-lede {
  margin: 14px 0 0;
  font-size: 16px;
  line-height: 1.55;
  color: var(--ink-dim);
  max-width: 42ch;
}

/* SSO buttons (Google + Apple side-by-side) */
.pk-auth-sso {
  margin-top: 28px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

/* Divider */
.pk-auth-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 22px 0;
  color: var(--ink-mute);
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}
.pk-auth-divider::before,
.pk-auth-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--line);
}

/* Form fields */
.pk-auth-fields {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.pk-auth-field {
  position: relative;
}
.pk-auth-field label {
  display: block;
  margin-bottom: 6px;
  font-size: 13px;
  color: var(--ink-dim);
  font-weight: 500;
}
.pk-auth-field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.pk-auth-input {
  width: 100%;
  height: 52px;
  padding: 0 16px;
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  background: var(--panel);
  color: var(--ink);
  font-size: 15px;
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
  font-family: inherit;
}
.pk-auth-input::placeholder {
  color: var(--ink-mute);
}
.pk-auth-input:hover {
  border-color: var(--ink);
}
.pk-auth-input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 4px var(--line-focus);
}

/* Password wrapper + toggle */
.pk-auth-pw-wrap {
  position: relative;
}
.pk-auth-pw-toggle {
  position: absolute;
  top: 0;
  right: 0;
  height: 52px;
  width: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--ink-mute);
  border: 0;
  background: transparent;
  cursor: pointer;
}
.pk-auth-pw-toggle:hover {
  color: var(--accent);
}
.pk-auth-pw-toggle svg {
  width: 18px;
  height: 18px;
}

/* Inline meta row (forgot link etc) */
.pk-auth-field-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 8px;
  font-size: 12px;
}
.pk-auth-field-meta a {
  color: var(--accent);
  font-weight: 500;
}
.pk-auth-field-meta a:hover {
  color: var(--accent-deep);
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* Password strength bar */
.pk-auth-pw-strength {
  display: flex;
  gap: 4px;
  margin-top: 10px;
}
.pk-auth-pw-strength .bar {
  flex: 1;
  height: 3px;
  border-radius: 999px;
  background: var(--line);
  transition: background 0.2s ease;
}
.pk-auth-pw-strength.s1 .bar:nth-child(-n + 1) { background: var(--bad); }
.pk-auth-pw-strength.s2 .bar:nth-child(-n + 2) { background: var(--warn); }
.pk-auth-pw-strength.s3 .bar:nth-child(-n + 3) { background: var(--warn); }
.pk-auth-pw-strength.s4 .bar:nth-child(-n + 4) { background: var(--good); }
.pk-auth-pw-strength-label {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.10em;
  text-transform: uppercase;
  color: var(--ink-mute);
  margin-top: 6px;
}
.pk-auth-pw-strength-label.s1 { color: var(--bad); }
.pk-auth-pw-strength-label.s2,
.pk-auth-pw-strength-label.s3 { color: var(--warn); }
.pk-auth-pw-strength-label.s4 { color: var(--good); }

/* Checkbox row */
.pk-auth-check-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-top: 14px;
  font-size: 13px;
  color: var(--ink-dim);
  line-height: 1.5;
}
.pk-auth-check-row input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}
.pk-auth-check-row .box {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  border: 1.5px solid var(--line-strong);
  border-radius: 5px;
  background: var(--panel);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent-ink);
  margin-top: 1px;
  transition: all 0.15s ease;
}
.pk-auth-check-row label {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  cursor: pointer;
}
.pk-auth-check-row input:checked + .box {
  background: var(--accent);
  border-color: var(--accent);
}
.pk-auth-check-row input:focus + .box {
  box-shadow: 0 0 0 4px var(--line-focus);
}
.pk-auth-check-row .box svg {
  width: 12px;
  height: 12px;
  opacity: 0;
}
.pk-auth-check-row input:checked + .box svg {
  opacity: 1;
}
.pk-auth-check-row a {
  color: var(--accent);
  font-weight: 500;
}
.pk-auth-check-row a:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* Submit button */
.pk-auth-submit {
  width: 100%;
  height: 52px;
  margin-top: 22px;
  background: var(--accent);
  color: var(--accent-ink);
  border: 0;
  border-radius: 12px;
  font-size: 15px;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: background 0.15s ease, transform 0.05s ease;
  cursor: pointer;
  font-family: inherit;
}
.pk-auth-submit:hover:not(:disabled) {
  background: var(--accent-deep);
}
.pk-auth-submit:active:not(:disabled) {
  transform: scale(0.99);
}
.pk-auth-submit:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}
.pk-auth-submit svg {
  width: 16px;
  height: 16px;
}

/* Inline error block above the submit */
.pk-auth-error {
  margin: 6px 0 0;
  font-size: 13px;
  color: var(--bad);
  line-height: 1.5;
}

/* Footer link row inside the card */
.pk-auth-alt {
  margin-top: 22px;
  text-align: center;
  font-size: 14px;
  color: var(--ink-dim);
}
.pk-auth-alt a {
  color: var(--accent);
  font-weight: 500;
}
.pk-auth-alt a:hover {
  color: var(--accent-deep);
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* Back link (verify, forgot) */
.pk-auth-back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--ink-dim);
  margin-bottom: 18px;
  font-weight: 500;
  background: transparent;
  border: 0;
  padding: 0;
  cursor: pointer;
  font-family: inherit;
}
.pk-auth-back:hover {
  color: var(--accent);
}
.pk-auth-back svg {
  width: 14px;
  height: 14px;
}

/* OTP grid */
.pk-auth-otp {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 10px;
  margin-top: 24px;
}
.pk-auth-otp input {
  height: 60px;
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  background: var(--panel);
  text-align: center;
  font-family: var(--serif);
  font-weight: 400;
  font-size: 26px;
  color: var(--ink);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
  outline: none;
}
.pk-auth-otp input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 4px var(--line-focus);
}
.pk-auth-otp input.filled {
  background: var(--panel-warm, color-mix(in srgb, var(--accent) 6%, var(--panel)));
  border-color: var(--accent);
}

.pk-auth-otp-resend {
  text-align: center;
  margin-top: 18px;
  font-size: 13px;
  color: var(--ink-dim);
}
.pk-auth-otp-resend a {
  color: var(--accent);
  font-weight: 500;
}
.pk-auth-otp-resend .timer {
  font-family: var(--mono);
  color: var(--ink-mute);
}

/* Success state (forgot-sent, done) */
.pk-auth-success {
  text-align: center;
  padding: 8px 0;
}
.pk-auth-success .icon {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: rgba(107, 138, 79, 0.12);
  color: var(--good);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 22px;
}
.pk-auth-success .icon svg {
  width: 32px;
  height: 32px;
}
.pk-auth-success .pk-auth-title {
  margin-left: auto;
  margin-right: auto;
  max-width: 18ch;
}
.pk-auth-success .pk-auth-lede {
  margin-left: auto;
  margin-right: auto;
  max-width: 38ch;
}
.pk-auth-success .pk-auth-submit {
  margin-top: 28px;
}
.pk-auth-success .pk-auth-alt {
  margin-top: 18px;
}

/* Micro footer */
.pk-auth-micro-foot {
  max-width: 480px;
  width: 100%;
  margin: 0 auto;
  padding-top: 20px;
  display: flex;
  justify-content: center;
  gap: 24px;
  font-size: 12px;
  color: var(--ink-mute);
}
.pk-auth-micro-foot a {
  color: var(--ink-mute);
}
.pk-auth-micro-foot a:hover {
  color: var(--accent);
}

/* SSO button shell — used by GoogleSignInButton + AppleSignInButton when
   they render native variants and as the wrapper class for the web GIS
   target. */
.pk-auth-sso-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  height: 48px;
  padding: 0 18px;
  border-radius: 12px;
  border: 1px solid var(--line-strong);
  background: var(--panel);
  color: var(--ink);
  font-size: 14px;
  font-weight: 500;
  width: 100%;
  cursor: pointer;
  transition: all 0.15s ease;
  font-family: inherit;
}
.pk-auth-sso-btn:hover:not(:disabled) {
  border-color: var(--ink);
  background: var(--panel-warm, color-mix(in srgb, var(--accent) 4%, var(--panel)));
}
.pk-auth-sso-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}
.pk-auth-sso-btn svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

@media (max-width: 640px) {
  .pk-auth-main {
    padding: 22px 20px 28px;
  }
  .pk-auth-form {
    padding: 32px 24px 28px;
    border-radius: 18px;
  }
  .pk-auth-form-wrap {
    padding: 24px 0 24px;
  }
  .pk-auth-topright {
    font-size: 13px;
  }
}

@media (max-width: 480px) {
  .pk-auth-sso {
    grid-template-columns: 1fr;
  }
  .pk-auth-otp {
    gap: 6px;
  }
  .pk-auth-otp input {
    height: 54px;
    font-size: 22px;
  }
  .pk-auth-title {
    font-size: 30px;
  }
  .pk-auth-field-row {
    grid-template-columns: 1fr;
  }
  /* Plain background on narrow screens — feels more app-native */
  .pk-auth-form {
    border: 0;
    box-shadow: none;
    background: transparent;
    padding: 8px 0 0;
  }
}

.google-btn[data-v-21143e3e] {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
}
.google-btn-target[data-v-21143e3e] {
  width: 100%;
  display: flex;
  justify-content: center;
  min-height: 44px;
}
.google-btn-native[data-v-21143e3e] {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  width: 100%;
  min-height: 44px;
  padding: var(--space-2) var(--space-4);
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-medium);
  font-size: var(--font-size-m);
  font-weight: var(--font-weight-medium);
  cursor: pointer;
  transition: background var(--transition-fast), border-color var(--transition-fast);
}
.google-btn-native[data-v-21143e3e]:hover:not(:disabled) {
  border-color: var(--primary);
}
.google-btn-native[data-v-21143e3e]:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}
.google-icon[data-v-21143e3e] {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.google-btn-fallback[data-v-21143e3e] {
  font-size: var(--font-size-xs);
  color: var(--text-secondary);
  margin: var(--space-2) 0 0;
}

.apple-btn[data-v-62e34dd9] {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
}
.apple-btn-native[data-v-62e34dd9] {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  width: 100%;
  min-height: 44px;
  padding: var(--space-2) var(--space-4);
  background: #000;
  color: #fff;
  border: 1px solid #000;
  border-radius: var(--radius-medium);
  font-size: var(--font-size-m);
  font-weight: var(--font-weight-medium);
  cursor: pointer;
  transition: opacity var(--transition-fast);
}
.apple-btn-native[data-v-62e34dd9]:hover:not(:disabled) {
  opacity: 0.92;
}
.apple-btn-native[data-v-62e34dd9]:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}
.apple-icon[data-v-62e34dd9] {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
