/* Split auth layout — photo on the left, form on the right */

body.cp-auth-page {
  min-height: 100vh;
  background: #fff;
  overflow-x: hidden;
}

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

/* Photo side */

.cp-auth__media {
  position: sticky;
  top: 0;
  height: 100vh;
  overflow: hidden;
  isolation: isolate;
  color: #fff;
  background: var(--cp-teal-dark, #0d3d47);
}

.cp-auth__media-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: -2;
  transform: scale(1.06);
  animation: cp-auth-zoom 14s cubic-bezier(0.22, 0.61, 0.36, 1) forwards;
}

.cp-auth__media::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(180deg, rgba(6, 28, 33, 0.55) 0%, rgba(6, 28, 33, 0.05) 28%, rgba(6, 28, 33, 0.1) 52%, rgba(6, 28, 33, 0.9) 100%),
    linear-gradient(90deg, rgba(13, 61, 71, 0.25), transparent 60%);
}

.cp-auth__media-inner {
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: clamp(1.75rem, 3.5vw, 3rem);
}

.cp-auth__media-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.cp-auth__logo {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  min-width: 0;
  font-family: "Sora", var(--cp-font, sans-serif);
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1;
  color: #fff;
  overflow-wrap: anywhere;
}

.cp-auth__logo::before {
  content: "";
  flex: none;
  width: 10px;
  height: 10px;
  border-radius: 3px;
  background: #fff;
  transform: rotate(45deg);
  box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.18);
}

.cp-auth__pill {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.45rem 0.85rem;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.28);
  background: rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(10px);
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.cp-auth__pill::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #4ade80;
  box-shadow: 0 0 0 3px rgba(74, 222, 128, 0.25);
}

.cp-auth__media-copy {
  max-width: 34rem;
  animation: cp-auth-rise 0.9s 0.15s ease both;
}

.cp-auth__media-copy h2 {
  margin: 0;
  font-family: "Sora", var(--cp-font, sans-serif);
  font-size: clamp(1.9rem, 3vw, 2.75rem);
  font-weight: 600;
  line-height: 1.12;
  letter-spacing: -0.03em;
  text-wrap: balance;
}

.cp-auth__media-copy p {
  margin: 1rem 0 0;
  max-width: 30rem;
  color: rgba(255, 255, 255, 0.78);
  font-size: 1rem;
  line-height: 1.65;
}

/* Form side */

.cp-auth__panel {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  padding: clamp(1.5rem, 4vw, 3rem) clamp(1.5rem, 5vw, 4.5rem);
  background:
    radial-gradient(600px 380px at 100% 0%, rgba(21, 107, 122, 0.07), transparent 65%),
    #fff;
}

.cp-auth__body {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  width: 100%;
  max-width: 440px;
  margin: 0 auto;
  padding: 2rem 0;
  animation: cp-auth-rise 0.7s ease both;
}

.cp-auth .cp-signin__head {
  gap: 2.25rem;
  margin-bottom: 2rem;
}

.cp-auth .cp-signin__mark {
  width: 38px;
  height: 38px;
  border-radius: 11px;
  background: linear-gradient(140deg, var(--cp-teal-dark, #0d3d47), var(--cp-teal, #156b7a));
  box-shadow: 0 10px 24px rgba(13, 61, 71, 0.2);
}

.cp-auth .cp-signin__mark svg {
  width: 18px;
  height: 18px;
}

.cp-auth .cp-signin__headline h1 {
  font-size: clamp(1.85rem, 2.6vw, 2.3rem);
  font-weight: 700;
  letter-spacing: -0.035em;
  line-height: 1.1;
}

.cp-auth .cp-signin__headline p {
  margin-top: 0.6rem;
  font-size: 0.98rem;
}

.cp-auth .cp-signin__form {
  gap: 1.15rem;
}

/* Fields */

.cp-auth .cp-field__label {
  margin-bottom: 0.45rem;
  color: var(--cp-text, #1a3d44);
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0;
  text-transform: none;
}

.cp-auth .cp-field__icon {
  left: 14px;
  width: 20px;
  height: 20px;
  border: 0;
  border-radius: 0;
  background: none;
  color: rgba(107, 124, 128, 0.8);
  transition: color 0.15s ease;
}

.cp-auth .cp-field__control:focus-within .cp-field__icon {
  color: var(--cp-teal, #156b7a);
}

.cp-auth .cp-field__input {
  height: 52px;
  padding: 0 3rem 0 2.85rem;
  border-radius: 12px;
  border: 1px solid #e1e6e8;
  background: #f7f9fa;
  font: inherit;
  font-size: 0.96rem;
  font-weight: 500;
  transition: border-color 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
}

.cp-auth .cp-field__input::placeholder {
  font-weight: 500;
  color: #a3afb3;
}

.cp-auth .cp-field__input:hover {
  border-color: #cfd8db;
}

.cp-auth .cp-field__input:focus {
  background: #fff;
  border-color: var(--cp-teal, #156b7a);
  box-shadow: 0 0 0 4px rgba(21, 107, 122, 0.1);
}

.cp-auth .cp-field__input.is-invalid {
  background: #fff;
  border-color: rgba(220, 38, 38, 0.6);
  box-shadow: 0 0 0 4px rgba(220, 38, 38, 0.08);
}

.cp-auth .cp-field__toggle {
  right: 6px;
  width: 40px;
  height: 40px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: rgba(107, 124, 128, 0.9);
}

.cp-auth .cp-field__toggle:hover {
  background: rgba(21, 107, 122, 0.08);
  color: var(--cp-teal-dark, #0d3d47);
}

.cp-auth .cp-field__error {
  font-size: 0.82rem;
  font-weight: 600;
}

.cp-auth .cp-check__box {
  border-color: #cfd8db;
  box-shadow: none;
}

.cp-auth .cp-check input:checked + .cp-check__box {
  background: var(--cp-teal, #156b7a);
  border-color: var(--cp-teal, #156b7a);
}

.cp-auth .cp-check input:checked + .cp-check__box::after {
  border-color: #fff;
}

.cp-auth .cp-check__tx {
  font-size: 0.88rem;
  font-weight: 500;
}

.cp-auth .cp-signin__link {
  color: var(--cp-teal, #156b7a);
  font-size: 0.88rem;
  font-weight: 600;
}

/* Alerts */

.cp-auth .cp-signin__alert,
.cp-auth .cp-forgot__success {
  margin-bottom: 1.25rem;
  padding: 0.8rem 0.9rem;
  border-radius: 12px;
}

.cp-auth .cp-signin__alert-ic,
.cp-auth .cp-forgot__success-ic {
  width: 30px;
  height: 30px;
  border-radius: 9px;
  box-shadow: none;
}

.cp-auth .cp-signin__alert-ic svg,
.cp-auth .cp-forgot__success-ic svg {
  width: 16px;
  height: 16px;
}

.cp-auth .cp-signin__alert-tx,
.cp-auth .cp-forgot__success-tx {
  font-size: 0.88rem;
  font-weight: 500;
}

/* Submit */

.cp-auth .cp-signin__submit {
  height: 54px;
  margin-top: 0.5rem;
  border-radius: 12px;
  font-family: inherit;
  font-size: 0.98rem;
  font-weight: 700;
  letter-spacing: 0;
  background: linear-gradient(135deg, var(--cp-teal-dark, #0d3d47) 0%, var(--cp-teal, #156b7a) 100%);
  box-shadow: 0 12px 28px -10px rgba(13, 61, 71, 0.55);
  transition: transform 0.15s ease, box-shadow 0.15s ease, filter 0.15s ease;
}

.cp-auth .cp-signin__submit:hover {
  transform: translateY(-1px);
  filter: brightness(1.08);
  box-shadow: 0 16px 32px -10px rgba(13, 61, 71, 0.6);
}

.cp-auth .cp-signin__submit-ic {
  transition: transform 0.2s ease;
}

.cp-auth .cp-signin__submit:hover .cp-signin__submit-ic {
  transform: translateX(3px);
}

.cp-auth .cp-signin__foot {
  margin-top: 1.25rem;
  padding-top: 1.25rem;
  border-top: 1px solid #edf0f2;
  font-size: 0.9rem;
  font-weight: 500;
}

.cp-auth__legal {
  margin: 0;
  text-align: center;
  font-size: 0.78rem;
  color: #a3afb3;
}

/* Motion */

@keyframes cp-auth-zoom {
  to { transform: scale(1); }
}

@keyframes cp-auth-rise {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: none; }
}

@media (prefers-reduced-motion: reduce) {
  .cp-auth__media-img,
  .cp-auth__media-copy,
  .cp-auth__body {
    animation: none;
    transform: none;
  }
}

/* Responsive */

@media (max-width: 900px) {
  .cp-auth {
    grid-template-columns: 1fr;
  }

  .cp-auth__media {
    position: relative;
    height: 260px;
  }

  .cp-auth__media-copy p {
    display: none;
  }

  .cp-auth__media-copy h2 {
    font-size: 1.5rem;
  }

  .cp-auth__panel {
    position: relative;
    min-height: auto;
    margin-top: -24px;
    border-radius: 24px 24px 0 0;
    padding-top: 1rem;
  }

  .cp-auth .cp-signin__brand {
    display: none;
  }

  .cp-auth .cp-signin__head {
    gap: 0;
  }
}

@media (max-width: 520px) {
  .cp-auth__media {
    height: 220px;
  }

  .cp-auth__media-copy h2 {
    font-size: 1.3rem;
  }

  .cp-signup__cols {
    grid-template-columns: 1fr;
  }
}
