/* login.css — 로그인 페이지 전용 스타일 */

/* 폰트 임포트 */
@import url("https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&family=Outfit:wght@500;600;700;800&display=swap");

/* 로그인 페이지 전체 레이아웃 */
.login-page {
  min-height: 100vh; /* 이 페이지에는 헤더가 없으므로 화면 전체를 그라데이션 배경으로 채움 */
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #f0f4ff 0%, #dbeafe 50%, #bfdbfe 100%);
  padding: 40px 20px; /* 로그인·회원가입 공통 — 카드가 한 화면 안에 들어오도록 상하 여백 통일 */
  font-family:
    "SUIT",
    -apple-system,
    sans-serif;
}

/* 카드 컨테이너 */
.login-container {
  width: 1120px;
  max-width: 100%;
  padding: 20px;
  display: flex;
  align-items: stretch; /* 좌우 카드의 높이를 항상 동일하게 맞춤 */
  min-height: 710px; /* 로그인·회원가입 카드 높이 통일 기준 */
  position: relative;
  background: transparent;
}

/* 왼쪽 브랜드 패널 */
.login-brand-side {
  width: 500px;
  background: linear-gradient(135deg, #719ddb 0%, #2f5d9f 100%);
  padding: 44px;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  color: #ffffff;
  position: relative;
  border-radius: 28px 0 0 28px;
  min-height: 710px; /* 로그인·회원가입 카드 높이 통일 기준 */
  z-index: 1;
}

.login-brand-side::before {
  content: "";
  position: absolute;
  top: -50px;
  right: -50px;
  width: 150px;
  height: 150px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.15);
  filter: blur(10px);
}

/* 브랜드 로고 */
.brand-logo {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: "Outfit", sans-serif;
  font-size: 22px;
  font-weight: 800;
  color: #ffffff;
  text-decoration: none;
  letter-spacing: -0.5px;
  z-index: 2;
}

.brand-logo svg {
  width: 24px;
  height: 24px;
}

/* 브랜드 본문 컨텐츠 */
.brand-content {
  margin-top: 32px;
  z-index: 2;
}

.brand-title {
  font-size: 21px;
  font-weight: 600;
  line-height: 1.45;
  letter-spacing: -0.03em;
  color: rgba(255, 255, 255, 0.95);
  margin-bottom: 24px;
  font-family: "SUIT", sans-serif;
  word-break: keep-all;
}

/* 바운더리에 떠 있는 자동차 이미지 */
.floating-car-wrapper {
  position: absolute;
  left: 370px; /* 왼쪽으로 더 이동시켜 보라색 카드 쪽에 비중을 크게 둠 (1120px 확장에 따라 60px 오른쪽으로 동기화 이동) */
  top: 56%;
  transform: translate(-50%, -50%);
  z-index: 10;
  pointer-events: none;
  display: flex;
  align-items: center;
  justify-content: center;
}

.floating-car {
  width: 430px; /* 크기를 320px에서 360px로 살짝 키움 */
  height: 430px;
  display: block;
  /* filter: drop-shadow(0 20px 40px rgba(0, 0, 0, 0.15)) brightness(0.85) contrast(1.1) saturate(1.05); */
  animation: float 4.5s ease-in-out infinite;
}

@keyframes float {
  0% {
    transform: translateY(0px) rotate(0deg);
  }
  50% {
    transform: translateY(-12px) rotate(1.2deg);
  }
  100% {
    transform: translateY(0px) rotate(0deg);
  }
}

.brand-footer {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.7);
  z-index: 2;
  margin-top: auto;
}

/* 오른쪽 폼 패널 */
.login-form-side {
  position: relative; /* absolute 해제하고 relative 배치하여 내용에 따라 높이가 유동적으로 증가하도록 함 */
  margin-left: -40px; /* 40px 만큼 왼쪽으로 당겨 오버랩 효과 생성 */
  width: 660px;
  background: #ffffff;
  border-radius: 28px;
  box-shadow:
    -15px 0 40px rgba(0, 0, 0, 0.05),
    0 15px 40px rgba(0, 0, 0, 0.03);
  padding: 44px 110px; /* 1120px 확장에 맞추어 좌우 패딩을 110px로 넓혀 인풋 넓이를 차분하고 정돈되게 유지 */
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 710px; /* 로그인·회원가입 카드 높이 통일 기준 */
  z-index: 5;
}

/* 언어 선택 */
.lang-selector {
  align-self: flex-end;
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 13px;
  color: #8b95a1;
  cursor: pointer;
  user-select: none;
  font-weight: 500;
  transition: color 0.2s;
}

.lang-selector:hover {
  color: #4e5968;
}

.lang-selector svg {
  width: 14px;
  height: 14px;
}

/* 메인 폼 바디 */
.form-body-container {
  margin: auto 0;
  padding: 20px 0;
}

.form-title {
  text-align: center;
  font-size: 28px;
  font-weight: 700;
  color: #17375e;
  margin-bottom: 24px;
  letter-spacing: -0.02em;
  font-family: "SUIT", sans-serif;
}

/* 소셜 로그인 버튼 */
.social-login {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 24px;
}

.btn-social {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: #ffffff;
  border: 1px solid #e5e8eb;
  border-radius: 12px;
  padding: 12px 16px;
  font-size: 14px;
  font-weight: 600;
  color: #4e5968;
  cursor: pointer;
  transition:
    background-color 0.2s,
    border-color 0.2s;
}

.btn-social:hover {
  background: #f9fafb;
  border-color: #d1d6db;
}

.social-icon {
  width: 18px;
  height: 18px;
}

/* 구분선 */
.divider {
  display: flex;
  align-items: center;
  text-align: center;
  color: #b0b8c1;
  font-size: 12px;
  margin: 24px 0;
  font-weight: 500;
}

.divider::before,
.divider::after {
  content: "";
  flex: 1;
  border-bottom: 1px solid #f2f4f6;
}

.divider:not(:empty)::before {
  margin-right: 12px;
}

.divider:not(:empty)::after {
  margin-left: 12px;
}

/* 폼 그룹 */
.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: #4e5968;
  margin-bottom: 6px;
}

.input-wrapper {
  position: relative;
}

.form-group input {
  width: 100%;
  border: none;
  border-bottom: 1.5px solid #e5e8eb;
  padding: 10px 14px;
  font-size: 15px;
  color: #191f28;
  background: transparent;
  transition: border-color 0.2s;
  border-radius: 0;
  font-family: inherit;
}

.form-group input:focus {
  outline: none;
  border-bottom-color: #3182f6;
}

.form-group input::placeholder {
  color: #ccc;
}

/* 브라우저 자동완성 배경이 글자를 테두리에 밀어붙이지 않도록 정리
   (연한 파란 박스 대신 은은한 톤 + 좌우 여백 유지) */
.form-group input:-webkit-autofill,
.form-group input:-webkit-autofill:hover,
.form-group input:-webkit-autofill:focus {
  -webkit-text-fill-color: #191f28;
  -webkit-box-shadow: 0 0 0 40px #f4f7ff inset;
  caret-color: #191f28;
}

.form-group input.is-invalid {
  border-bottom-color: #df2226;
}

/* 비밀번호 숨김/표시 버튼 */
.btn-toggle-password {
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  cursor: pointer;
  color: #8b95a1;
  padding: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.2s;
}

.btn-toggle-password:hover {
  color: #4e5968;
}

.btn-toggle-password svg {
  width: 20px;
  height: 20px;
}

/* 에러 메시지 */
.field-error {
  color: #df2226;
  font-size: 12px;
  margin-top: 5px;
  min-height: 16px;
  font-weight: 500;
}

/* 로그인 폼 부가 옵션 */
.form-options {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: -4px;
  margin-bottom: 24px;
  font-size: 13px;
}

.remember-me {
  display: flex;
  align-items: center;
  gap: 6px;
  color: #4e5968;
  cursor: pointer;
  user-select: none;
  font-weight: 500;
}

.remember-me input {
  width: 16px;
  height: 16px;
  accent-color: #3182f6;
  cursor: pointer;
}

.forgot-password-link {
  color: #8b95a1;
  text-decoration: none;
  font-weight: 500;
  transition: color 0.2s;
}

.forgot-password-link:hover {
  color: #3182f6;
}

/* 제출 버튼 */
.btn-submit {
  width: 100%;
  background: #2f5d9f;
  color: #ffffff;
  border: none;
  border-radius: 12px;
  padding: 15px;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  transition:
    background-color 0.2s,
    transform 0.1s;
  box-shadow: 0 4px 12px rgba(49, 130, 246, 0.2);
}

.btn-submit:hover {
  background: #244b80;
}

.btn-submit:active {
  transform: scale(0.99);
}

.form-message {
  font-size: 13px;
  text-align: center;
  margin-top: 10px;
  min-height: 18px;
  font-weight: 500;
  color: #e5484d;
}

.form-message.is-success {
  color: #1a7f4b;
}

/* 폼 하단 푸터 */
.form-footer {
  text-align: center;
  font-size: 13px;
  color: #4e5968;
  line-height: 1.6;
}

.form-footer p {
  margin: 0;
  padding: 24px 0 0;
}

.form-footer a {
  color: #3182f6;
  font-weight: 700;
  text-decoration: none;
}

.form-footer a:hover {
  text-decoration: underline;
}

.subscribe-tip {
  margin-top: 6px;
  font-size: 12px;
  color: #8b95a1;
}

/* 동의 체크박스 */
.checkbox-field {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: #4e5968;
  margin-top: 16px;
  margin-bottom: 4px;
  cursor: pointer;
  user-select: none;
  font-weight: 500;
}

.checkbox-field input {
  width: 16px;
  height: 16px;
  accent-color: #3182f6;
  cursor: pointer;
}

/* 회원가입 페이지 — 필드가 많아 로그인 카드와 높이가 벌어지므로 내부 간격만 압축해 통일 */
.login-page--signup .form-body-container {
  padding: 0;
}

.login-page--signup .form-title {
  margin-bottom: 14px;
}

.login-page--signup .form-group {
  margin-bottom: 6px;
}

.login-page--signup .form-group input {
  padding: 8px 14px;
}

.login-page--signup .field-error {
  margin-top: 2px;
  min-height: 14px;
}

.login-page--signup .checkbox-field {
  margin-top: 8px;
  margin-bottom: 2px;
}

.login-page--signup .form-message {
  margin-top: 4px;
  min-height: 14px;
}

.login-page--signup .divider {
  margin: 14px 0;
}

.login-page--signup .social-login {
  margin-bottom: 0;
}

/* 반응형 스타일 */
@media (max-width: 850px) {
  .login-container {
    max-width: 480px;
    min-height: auto;
    display: block;
  }
  .login-brand-side {
    display: none;
  }
  .login-form-side {
    width: 100%;
    margin-left: 0; /* 모바일에서는 음수 마진 해제 */
    padding: 36px 28px;
  }
  .floating-car-wrapper {
    display: none;
  }
}
