:root {
  --pt-orange: #e05700;
  --pt-orange-dark: #c44c00;
  --pt-navy: #0e2a5e;
  --pt-visual-ratio: 93.88;
  --pt-form-min: 520px;
}

html,
body {
  overflow-x: hidden;
}

.pt-login {
  display: flex;
  align-items: stretch;
  min-height: 100vh;
  min-height: 100dvh;
  width: 100%;
  background: #fff;
}

.pt-login-visual {
  flex: 0 0 auto;
  align-self: stretch;

  width: calc(100vh * var(--pt-visual-ratio) / 100);
  width: min(
    calc(100dvh * var(--pt-visual-ratio) / 100),
    calc(100% - var(--pt-form-min))
  );
  /* Also caps the vh fallback above, for browsers without dvh support */
  max-width: calc(100% - var(--pt-form-min));
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  font-size: 0;
  line-height: 0;
  overflow: hidden;
}

.pt-visual-img {
  align-self: stretch;
  width: 100%;
  height: auto;
  object-fit: cover;
  object-position: center;
}

/* ---------- Right form panel ---------- */
.pt-login-form {
  flex: 1 1 auto;
  min-width: 0;
  background: #fff;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: clamp(16px, 4vh, 48px) clamp(16px, 4vw, 32px);
}

.pt-login-card {
  width: 100%;
  max-width: 420px;
}

.pt-form-logo {
  display: block;
  width: clamp(150px, 26vh, 320px);
  max-width: 75%;
  margin: 0 auto clamp(10px, 2.4vh, 26px);
}

.pt-login-form h2 {
  text-align: center;
  font-weight: 800;
  font-size: clamp(1.15rem, 3.4vh, 1.75rem);
  color: var(--pt-navy);
  margin-bottom: 4px;
}

.pt-sub {
  text-align: center;
  color: #6b7280;
  font-size: clamp(0.8rem, 1.9vh, 0.95rem);
  margin-bottom: clamp(12px, 3.2vh, 32px);
}

.pt-login-form .form-label {
  font-weight: 600;
  color: #1f2937;
  font-size: clamp(0.78rem, 1.8vh, 0.9rem);
  margin-bottom: clamp(2px, 0.7vh, 6px);
}

.pt-field {
  margin-bottom: clamp(9px, 2vh, 20px);
}

.pt-input-wrap {
  position: relative;
}

.pt-field .form-control {
  height: clamp(38px, 6.6vh, 52px);
  border-radius: 10px;
  border: 1px solid #d7dbe3;
  padding: 0 44px 0 16px;
  font-size: clamp(14px, 1.9vh, 15px);
}

.pt-field .form-control:focus {
  border-color: var(--pt-orange);
  box-shadow: 0 0 0 3px rgba(224, 87, 0, 0.12);
}

.pt-field-icon {
  position: absolute;
  right: 16px;
  top: 50%;
  transform: translateY(-50%);
  color: #9aa2b1;
  font-size: clamp(16px, 2.6vh, 20px);
  line-height: 1;
  pointer-events: none;
}

.pt-toggle-password {
  pointer-events: auto;
  cursor: pointer;
}

.pt-toggle-password:hover {
  color: var(--pt-orange);
}

.pt-forgot {
  text-align: right;
  margin: 0 0 clamp(11px, 2.4vh, 22px);
}

.pt-forgot a {
  color: #3a6aa5;
  font-size: clamp(0.78rem, 1.8vh, 0.875rem);
  text-decoration: none;
}

.pt-forgot a:hover {
  text-decoration: underline;
}

.pt-login-btn {
  width: 100%;
  height: clamp(38px, 6.6vh, 52px);
  border: 0;
  border-radius: 10px;
  background: var(--pt-orange);
  color: #fff;
  font-weight: 700;
  font-size: clamp(0.875rem, 2.2vh, 1rem);
  transition: background 0.18s ease;
}

.pt-login-btn:hover {
  background: var(--pt-orange-dark);
}

.pt-contact {
  text-align: center;
  color: #6b7280;
  margin: clamp(12px, 2.8vh, 26px) 0 0;
  font-size: clamp(0.78rem, 1.8vh, 0.875rem);
}

.pt-contact a {
  color: #3a6aa5;
  text-decoration: none;
}

.pt-contact a:hover {
  text-decoration: underline;
}

/* Number inputs (OTP) should not show spinners inside the rounded field */
.pt-field input[type="number"] {
  -moz-appearance: textfield;
  appearance: textfield;
}

.pt-field input[type="number"]::-webkit-outer-spin-button,
.pt-field input[type="number"]::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

@media (max-width: 1199.98px) and (min-width: 992px) {
  :root {
    --pt-form-min: 360px;
  }
}

@media (max-width: 991.98px) and (min-width: 768px) {
  :root {
    --pt-form-min: 380px;
  }

  .pt-login-form {
    padding-left: 18px;
    padding-right: 18px;
  }
}

@media (max-width: 767.98px) {
  /* Drop the decorative panel; center the form full-width */
  .pt-login-visual {
    display: none;
  }

  .pt-login-form {
    flex: 1 1 auto;
    max-width: 100%;
    margin: 0 auto;
  }
}

@media (max-width: 575.98px) {
  .pt-login-card {
    max-width: 100%;
  }

  .pt-form-logo {
    max-width: 82%;
  }

  /* 16px keeps iOS from zooming the page when a field takes focus */
  .pt-field .form-control {
    font-size: 16px;
  }
}

@media (max-height: 420px) {
  .pt-login-form {
    justify-content: flex-start;
    min-height: 0;
    max-height: 100vh;
    max-height: 100dvh;
    overflow-y: auto;
  }
}
