*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html,
body {
  min-height: 100%;
}

body.pb-login {
  font-family: Inter, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  color: #1f2937;
  min-height: 100dvh;
  overflow-x: hidden;
  background: #0d0d0f;
}

.pb-login-bg {
  position: fixed;
  inset: 0;
  background-color: #0d0d0f;
  background-position: left center;
  background-repeat: no-repeat;
  background-size: cover;
  z-index: 0;
}

.pb-login-stage {
  position: relative;
  z-index: 1;
  min-height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding:
    max(1.5rem, env(safe-area-inset-top))
    max(4vw, env(safe-area-inset-right))
    max(1.5rem, env(safe-area-inset-bottom))
    max(1rem, env(safe-area-inset-left));
}

.pb-login-card {
  width: min(100%, 420px);
  background: #fff;
  border-radius: 28px;
  padding: 2.15rem 2rem 1.5rem;
  box-shadow: 0 28px 70px rgba(20, 16, 12, 0.28);
  animation: pbCardIn 0.55s ease both;
}

.pb-login-logo {
  display: block;
  width: min(100%, 260px);
  height: auto;
  margin: 0 auto 1.15rem;
}

.pb-login-card h1 {
  text-align: center;
  font-size: 1.7rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  color: #111827;
  margin-bottom: 0.3rem;
}

.pb-login-sub {
  text-align: center;
  font-size: 0.92rem;
  color: #6b7280;
  margin-bottom: 1.5rem;
}

.pb-login-error {
  margin-bottom: 1rem;
  padding: 0.7rem 0.85rem;
  font-size: 0.86rem;
  color: #8b1a12;
  background: #fdecee;
  border-radius: 10px;
}

.pb-field {
  display: block;
  font-size: 0.84rem;
  font-weight: 500;
  color: #4b5563;
  margin-bottom: 0.4rem;
}

.pb-input {
  width: 100%;
  margin-bottom: 1.05rem;
  padding: 0.82rem 0.95rem;
  font-family: inherit;
  font-size: 0.95rem;
  color: #111827;
  background: #f3f4f6;
  border: 1px solid transparent;
  border-radius: 10px;
  outline: none;
  transition: box-shadow 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.pb-input::placeholder {
  color: #9ca3af;
}

.pb-input:focus {
  background: #fff;
  border-color: #d6b8b3;
  box-shadow: 0 0 0 3px rgba(122, 31, 21, 0.12);
}

.pb-password {
  position: relative;
}

.pb-password .pb-input {
  padding-right: 2.75rem;
}

.pb-password-toggle {
  position: absolute;
  right: 0.45rem;
  top: 0.72rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  border: 0;
  background: transparent;
  color: #9ca3af;
  cursor: pointer;
  border-radius: 8px;
}

.pb-password-toggle:hover {
  color: #7a1f15;
}

.pb-password-toggle .eye-open,
.pb-password-toggle .eye-off {
  width: 20px;
  height: 20px;
  pointer-events: none;
}

.pb-password-toggle .eye-open {
  display: block !important;
}

.pb-password-toggle .eye-off {
  display: none !important;
}

.pb-password-toggle.is-showing .eye-open {
  display: none !important;
}

.pb-password-toggle.is-showing .eye-off {
  display: block !important;
}

.pb-login-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  margin-top: 0.35rem;
  padding: 0.88rem 1.2rem;
  font-family: inherit;
  font-size: 1rem;
  font-weight: 700;
  color: #fff;
  background: #c8102e;
  border: 0;
  border-radius: 999px;
  cursor: pointer;
  transition: background 0.2s ease, transform 0.15s ease;
}

.pb-login-btn:hover {
  background: #9e0c24;
}

.pb-login-btn:active {
  transform: scale(0.98);
}

.pb-login-switch {
  margin: 0.85rem 0 0;
  text-align: center;
  font-size: 0.82rem;
}

.pb-login-switch a {
  color: #7a1f15;
  font-weight: 600;
  text-decoration: none;
  border-bottom: 1px solid rgba(122, 31, 21, 0.35);
  padding-bottom: 1px;
  transition: color 0.15s ease, border-color 0.15s ease;
}

.pb-login-switch a:hover {
  color: #5c150e;
  border-bottom-color: #5c150e;
}

.pb-login-copy {
  margin-top: 1.15rem;
  padding-top: 1rem;
  border-top: 1px solid #e8eaed;
  text-align: center;
  font-size: 0.78rem;
  line-height: 1.5;
  color: #6b7280;
}

.pb-login-copy strong {
  font-weight: 700;
  color: #374151;
}

.pb-login-copy-sep {
  margin: 0 0.35rem;
  color: #9ca3af;
}

.pb-login-copy a {
  color: #c8102e;
  font-weight: 600;
  text-decoration: none;
}

.pb-login-copy a:hover {
  text-decoration: underline;
}

@keyframes pbCardIn {
  from {
    opacity: 0;
    transform: translateY(14px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 900px) {
  .pb-login-stage {
    justify-content: center;
  }

  .pb-login-bg {
    background-position: center;
  }

  .pb-login-card {
    box-shadow: 0 22px 50px rgba(20, 16, 12, 0.34);
  }
}

@media (max-width: 520px) {
  .pb-login-card {
    padding: 1.6rem 1.2rem 1.25rem;
    border-radius: 22px;
  }

  .pb-login-logo {
    width: min(100%, 210px);
  }

  .pb-login-card h1 {
    font-size: 1.45rem;
  }
}
