/* Auth pages — split visual / form */

:root {
  --si-font: var(--cp-font, "Plus Jakarta Sans", system-ui, -apple-system, sans-serif);
  --si-font-display: "Sora", var(--si-font);
  --si-accent: #156b7a;
  --si-accent-dark: #0d3d47;
  --si-accent-soft: #e8f4f6;
  --si-amber: #e8a54b;
  --si-text: #1a3d44;
  --si-muted: #6b7c80;
  --si-line: #e4e9eb;
  --si-panel: #f7f9fa;
  --si-input: #ffffff;
  --si-danger: #dc2626;
  --si-radius: 12px;
}

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

html,
body {
  height: 100%;
}

body.cp-signin {
  margin: 0;
  font-family: var(--si-font);
  color: var(--si-text);
  background: var(--si-panel);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* ——— Shell ——— */

.cp-auth {
  min-height: 100vh;
  min-height: 100dvh;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(360px, 520px);
}

/* ——— Left visual ——— */

.cp-auth__visual {
  position: relative;
  overflow: hidden;
  min-height: 100vh;
  min-height: 100dvh;
  background: #0b1a22;
  color: #fff;
}

.cp-auth__img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 58% center;
  transform: scale(1.06);
  animation: cp-auth- ken 18s ease-in-out infinite alternate;
  will-change: transform;
}

.cp-auth__shade {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(6, 18, 26, 0.55) 0%, rgba(6, 18, 26, 0.18) 38%, rgba(6, 18, 26, 0.72) 100%),
    linear-gradient(90deg, rgba(6, 18, 26, 0.15) 0%, rgba(6, 18, 26, 0.35) 100%);
  pointer-events: none;
}

.cp-auth__visual-inner {
  position: relative;
  z-index: 1;
  height: 100%;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: clamp(1.75rem, 4vw, 3rem);
  animation: cp-auth-fade-up 0.7s ease both;
}

.cp-auth__brand {
  display: inline-flex;
  align-items: center;
  gap: 0.85rem;
  text-decoration: none;
  color: #fff;
  width: fit-content;
}

.cp-auth__brand-name {
  font-family: var(--si-font-display);
  font-weight: 700;
  font-size: clamp(1.5rem, 2.5vw, 2rem);
  letter-spacing: -0.03em;
  line-height: 1.1;
  text-shadow: 0 8px 28px rgba(0, 0, 0, 0.35);
}

.cp-signin__promo-brand {
  font-family: var(--si-font-display, "Sora", system-ui, sans-serif);
  font-weight: 700;
  font-size: 1.25rem;
  letter-spacing: -0.03em;
  color: #0f172a;
}

.cp-auth__visual-copy {
  max-width: 28rem;
  animation: cp-auth-fade-up 0.85s ease 0.12s both;
}

.cp-auth__visual-copy h2 {
  margin: 0;
  font-family: var(--si-font-display);
  font-weight: 700;
  font-size: clamp(1.85rem, 3.2vw, 2.65rem);
  letter-spacing: -0.035em;
  line-height: 1.12;
  text-shadow: 0 12px 40px rgba(0, 0, 0, 0.4);
}

.cp-auth__visual-copy p {
  margin: 0.85rem 0 0;
  font-size: 1.02rem;
  line-height: 1.55;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.82);
  max-width: 24rem;
  text-shadow: 0 6px 20px rgba(0, 0, 0, 0.35);
}

.cp-auth__visual-accent {
  display: block;
  width: 48px;
  height: 3px;
  margin-bottom: 1.1rem;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--si-amber), rgba(232, 165, 75, 0.15));
  animation: cp-auth-line 1s ease 0.2s both;
}

/* ——— Right panel ——— */

.cp-auth__panel {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(1.5rem, 4vw, 3rem) clamp(1.25rem, 3.5vw, 2.75rem);
  background:
    radial-gradient(720px 420px at 100% 0%, rgba(21, 107, 122, 0.08), transparent 60%),
    radial-gradient(640px 380px at 0% 100%, rgba(232, 165, 75, 0.06), transparent 55%),
    var(--si-panel);
  overflow-y: auto;
}

.cp-auth__panel-inner {
  width: 100%;
  max-width: 400px;
  animation: cp-auth-fade-up 0.65s ease 0.08s both;
}

.cp-auth__mobile-brand {
  display: none;
  margin-bottom: 1.5rem;
}

.cp-auth__head {
  margin-bottom: 1.65rem;
}

.cp-auth__head h1 {
  margin: 0;
  font-family: var(--si-font-display);
  font-weight: 700;
  font-size: clamp(1.7rem, 2.4vw, 2rem);
  letter-spacing: -0.035em;
  color: var(--si-accent-dark);
  line-height: 1.15;
}

.cp-auth__head p {
  margin: 0.5rem 0 0;
  color: var(--si-muted);
  font-weight: 500;
  line-height: 1.55;
  font-size: 0.98rem;
}

/* ——— Alerts ——— */

.cp-signin__alert {
  margin: 0 0 1.1rem;
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
  border-radius: var(--si-radius);
  border: 1px solid rgba(220, 38, 38, 0.22);
  background: rgba(220, 38, 38, 0.06);
  padding: 0.85rem 0.95rem;
}

.cp-signin__alert-ic {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  background: #dc2626;
  flex-shrink: 0;
}

.cp-signin__alert-ic svg {
  width: 17px;
  height: 17px;
}

.cp-signin__alert-tx {
  font-size: 0.9rem;
  color: #7f1d1d;
  line-height: 1.5;
  font-weight: 550;
}

.cp-signin__alert-tx ul {
  margin: 0.35rem 0 0;
  padding-left: 1.1rem;
}

/* ——— Form ——— */

.cp-signin__form {
  display: grid;
  gap: 1rem;
}

.cp-field__label {
  display: block;
  margin-bottom: 0.45rem;
  color: rgba(26, 61, 68, 0.72);
  font-weight: 700;
  font-size: 0.75rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.cp-field__control {
  position: relative;
}

.cp-field__icon {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--si-accent-soft);
  color: var(--si-accent-dark);
  pointer-events: none;
}

.cp-field__icon svg {
  width: 17px;
  height: 17px;
}

.cp-field__input {
  width: 100%;
  padding: 0.88rem 3rem 0.88rem 3.55rem;
  border-radius: var(--si-radius);
  border: 1px solid var(--si-line);
  background: var(--si-input);
  color: var(--si-text);
  font-weight: 600;
  font-size: 0.97rem;
  outline: none;
  transition: border-color 0.16s ease, box-shadow 0.16s ease, background 0.16s ease;
}

.cp-field__input::placeholder {
  color: rgba(107, 124, 128, 0.7);
  font-weight: 500;
}

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

.cp-field__input:focus {
  border-color: rgba(21, 107, 122, 0.55);
  box-shadow: 0 0 0 4px rgba(21, 107, 122, 0.12);
}

.cp-field__input.is-invalid {
  border-color: rgba(220, 38, 38, 0.55);
  box-shadow: 0 0 0 4px rgba(220, 38, 38, 0.1);
}

.cp-field__toggle {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  width: 40px;
  height: 40px;
  border-radius: 10px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--si-accent-dark);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background 0.14s ease, border-color 0.14s ease;
}

.cp-field__toggle:hover {
  background: var(--si-accent-soft);
  border-color: rgba(197, 221, 226, 0.9);
}

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

.cp-field__error {
  margin: 0.4rem 0 0;
  color: #b91c1c;
  font-weight: 700;
  font-size: 0.84rem;
}

.cp-signin__row {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  align-items: center;
  flex-wrap: wrap;
  margin-top: 0.1rem;
}

.cp-check {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  cursor: pointer;
  user-select: none;
}

.cp-check input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.cp-check__box {
  width: 18px;
  height: 18px;
  border-radius: 5px;
  border: 1px solid var(--si-line);
  background: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: background 0.14s ease, border-color 0.14s ease;
}

.cp-check input:focus-visible + .cp-check__box {
  outline: 3px solid rgba(21, 107, 122, 0.2);
  outline-offset: 2px;
}

.cp-check input:checked + .cp-check__box {
  background: var(--si-accent-soft);
  border-color: rgba(21, 107, 122, 0.55);
}

.cp-check input:checked + .cp-check__box::after {
  content: "";
  width: 9px;
  height: 5px;
  border-left: 2px solid rgba(13, 61, 71, 0.92);
  border-bottom: 2px solid rgba(13, 61, 71, 0.92);
  transform: rotate(-45deg);
  margin-top: -1px;
}

.cp-check__tx {
  color: rgba(26, 61, 68, 0.78);
  font-weight: 600;
  font-size: 0.9rem;
}

.cp-signin__link {
  color: var(--si-accent-dark);
  text-decoration: none;
  font-weight: 700;
  font-size: 0.9rem;
  transition: color 0.14s ease;
}

.cp-signin__link:hover {
  color: var(--si-accent);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.cp-signin__submit {
  margin-top: 0.35rem;
  width: 100%;
  border: none;
  border-radius: var(--si-radius);
  padding: 0.95rem 1.05rem;
  cursor: pointer;
  font-family: var(--si-font-display);
  font-weight: 700;
  letter-spacing: -0.01em;
  font-size: 1rem;
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  background: linear-gradient(135deg, #0d3d47 0%, #156b7a 55%, #1a8a7a 100%);
  box-shadow: 0 14px 32px rgba(13, 61, 71, 0.22);
  transition: transform 0.16s ease, box-shadow 0.16s ease, filter 0.16s ease;
}

.cp-signin__submit:hover {
  transform: translateY(-1px);
  filter: brightness(1.04);
  box-shadow: 0 18px 36px rgba(13, 61, 71, 0.28);
}

.cp-signin__submit:active {
  transform: translateY(0);
}

.cp-signin__submit-ic {
  width: 18px;
  height: 18px;
  display: inline-flex;
  transition: transform 0.16s ease;
}

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

.cp-signin__submit-ic svg {
  width: 18px;
  height: 18px;
}

.cp-signin__foot {
  margin: 1.15rem 0 0;
  color: var(--si-muted);
  font-weight: 550;
  text-align: center;
  font-size: 0.93rem;
}

/* ——— Motion ——— */

@keyframes cp-auth-ken {
  from {
    transform: scale(1.06) translate3d(0, 0, 0);
  }
  to {
    transform: scale(1.12) translate3d(-1.5%, -1%, 0);
  }
}

@keyframes cp-auth-fade-up {
  from {
    opacity: 0;
    transform: translateY(14px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes cp-auth-line {
  from {
    opacity: 0;
    transform: scaleX(0.35);
    transform-origin: left center;
  }
  to {
    opacity: 1;
    transform: scaleX(1);
    transform-origin: left center;
  }
}

@media (prefers-reduced-motion: reduce) {
  .cp-auth__img,
  .cp-auth__visual-inner,
  .cp-auth__visual-copy,
  .cp-auth__panel-inner,
  .cp-auth__visual-accent {
    animation: none !important;
  }

  .cp-auth__img {
    transform: none;
  }
}

/* ——— Responsive ——— */

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

  .cp-auth__visual {
    min-height: 220px;
    height: 34vh;
    max-height: 280px;
  }

  .cp-auth__visual-inner {
    min-height: 100%;
    padding: 1.25rem 1.35rem;
    justify-content: flex-end;
  }

  .cp-auth__visual-copy h2 {
    font-size: 1.45rem;
  }

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

  .cp-auth__panel {
    align-items: flex-start;
    padding-top: 1.75rem;
    padding-bottom: 2.5rem;
  }

  .cp-auth__mobile-brand {
    display: none;
  }
}

@media (max-width: 520px) {
  .cp-auth__visual {
    height: 28vh;
    min-height: 180px;
  }

  .cp-auth__brand-name {
    font-size: 1.2rem;
  }

  .cp-auth__panel-inner {
    max-width: none;
  }

  .cp-auth__head h1 {
    font-size: 1.55rem;
  }

  .cp-field__input {
    padding-left: 3.35rem;
  }
}
