/* 기본 로그인 카드 레이아웃(좌: 이미지 / 우: 폼) */
.landing-card {
  width: min(1080px, calc(100vw - 48px));
  aspect-ratio: 1024 / 525;
  border-radius: 16px;
  overflow: hidden;
  border: none;
  background: var(--bg-surface);
  box-shadow: 0 20px 56px rgba(0, 0, 0, 0.45);
  display: grid;
  grid-template-columns: 62.5% 37.5%;
}

.landing-visual {
  position: relative;
  padding: 0;
  background-image:
    linear-gradient(140deg, rgba(10, 12, 20, 0.08), rgba(10, 12, 20, 0.2)),
    url("/static/branding/FGSS 메인페이지 백그라운드 이미지v0.2.png");
  /* 왼쪽 비주얼 이미지 크기/좌우 위치 미세 조정 */
  background-size: 100% 100%, 106% auto;
  background-position: center, -1% center;
  background-repeat: no-repeat;
}

.landing-panel {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 50px;
  background: #1b243a;
}

.landing-login-box {
  width: 100%;
  max-width: 380px;
}

/* 로그인 폼 공통 요소 */
.landing-logo {
  display: inline-block;
  font-size: 60px;
  font-weight: 700;
  line-height: 1;
  letter-spacing: 0.01em;
  color: #ffffff;
  margin-bottom: 26px;
}
.landing-logo-subtext {
  margin-top: 6px;
  font-size: 12px;
  font-weight: 450;
  color: var(--text-secondary);
  letter-spacing: 0.01em;
}

.landing-field {
  width: 100%;
  height: 44px;
  border-radius: 9px;
  border: 1px solid #2a3248;
  background: #151b2d;
  color: var(--text-primary);
  padding: 0 14px;
  font-size: 14px;
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.landing-field::placeholder {
  color: var(--text-secondary);
}

.landing-field:focus {
  border-color: #2e7a71;
  box-shadow: 0 0 0 2px rgba(46, 122, 113, 0.18);
}

.landing-field-invalid {
  border-color: #ef4444 !important;
  box-shadow: 0 0 0 2px rgba(239, 68, 68, 0.18) !important;
}

.landing-field-shake {
  animation: landingFieldShake 0.28s ease-in-out;
}

@keyframes landingFieldShake {
  0%, 100% { transform: translateX(0); }
  20% { transform: translateX(-3px); }
  40% { transform: translateX(3px); }
  60% { transform: translateX(-2px); }
  80% { transform: translateX(2px); }
}

.landing-form {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.landing-save-row {
  margin-top: 2px;
  display: flex;
  gap: 16px;
  color: var(--text-secondary);
  font-size: 13px;
}

.landing-save-row label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
}

.landing-save-item {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.landing-save-row input[type="checkbox"] {
  width: 15px;
  height: 15px;
  accent-color: #2e7a71;
}

.landing-save-tooltip-text {
  position: absolute;
  left: 50%;
  top: calc(100% + 8px);
  transform: translateX(-50%);
  width: max-content;
  max-width: min(92vw, 420px);
  padding: 8px 10px;
  border-radius: 8px;
  background: rgba(23, 34, 56, 0.96);
  color: #eef2ff;
  font-size: 11px;
  font-weight: 400;
  line-height: 1.45;
  white-space: normal;
  text-align: left;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.28);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.15s ease;
  z-index: 10;
}

.landing-save-tooltip-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 14px;
  width: 14px;
  height: 14px;
  border-radius: 999px;
  background: #f59e0b;
  color: #1f2937;
  font-size: 10px;
  font-weight: 800;
  line-height: 1;
}

.landing-save-tooltip-message {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.landing-save-tooltip-line {
  display: block;
}

.landing-save-tooltip-line--warn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.landing-save-item:hover .landing-save-tooltip-text {
  opacity: 1;
  visibility: visible;
}

.landing-login-btn {
  height: 44px;
  border-radius: 9px;
  font-size: 14px;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  border: none;
  width: 100%;
  margin-top: 8px;
  cursor: pointer;
}

.landing-login-btn.primary {
  background: #2e7a71;
  color: #ffffff;
}

.landing-login-btn.primary:hover {
  background: #25635d;
}

.landing-links {
  margin-top: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  font-size: 13px;
  color: var(--text-secondary);
}
.landing-inline-flash {
  margin-top: 10px;
  font-size: 12px;
  line-height: 1.4;
}
.landing-inline-flash.success {
  color: #5DCAA5;
}
.landing-inline-flash.error {
  color: #f09595;
}
.landing-inline-flash.warning {
  color: #e0a955;
}
.landing-resend-btn {
  display: inline-block;
  margin-top: 6px;
  height: 28px;
  padding: 0 12px;
  border-radius: 7px;
  font-size: 12px;
  font-weight: 600;
  border: 1px solid #e0a955;
  background: transparent;
  color: #e0a955;
  cursor: pointer;
  transition: all 0.2s ease;
}
.landing-resend-btn:hover {
  background: #e0a955;
  color: #1c1f26;
}
.landing-resend-btn:disabled {
  opacity: 0.6;
  cursor: default;
}

.landing-links a:hover {
  color: var(--text-primary);
}

.landing-divider {
  color: var(--text-muted);
}

/* 로그인 모달 컨테이너/애니메이션 */
.login-modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(4px);
  opacity: 0;
  transition: opacity 0.25s ease;
}

.login-modal-overlay.is-open {
  opacity: 1;
}

.login-modal-card {
  width: min(980px, calc(100vw - 40px));
  border-radius: 16px;
  background: transparent;
  border: none;
  box-shadow: 0 20px 48px rgba(15, 23, 42, 0.28);
  position: relative;
  overflow: visible;
  transform: translateY(8px) scale(0.98);
  opacity: 0;
  transition: transform 0.25s ease, opacity 0.25s ease;
}

.login-modal-overlay.is-open .login-modal-card {
  transform: translateY(0) scale(1);
  opacity: 1;
}

.login-modal-close {
  width: 2rem;
  height: 2rem;
  border-radius: 999px;
  border: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #4B5563;
}

.login-modal-close:hover {
  color: #0F6E56;
}

.login-modal-close-floating {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 2;
  background: rgba(255, 255, 255, 0.9);
}

/* 모달 안에서의 로그인 카드/폼 오버라이드 */
.login-modal-card .landing-card--modal {
  width: 100%;
  aspect-ratio: auto;
  min-height: 450px;
  border: none;
  background: #ffffff;
  box-shadow: none;
  grid-template-columns: 60% 40%;
}

/* 모달 반응형 */
@media (max-width: 900px) {
  .login-modal-card .landing-card--modal {
    grid-template-columns: 1fr;
    min-height: 0;
  }

  .login-modal-card .landing-visual {
    min-height: 180px;
  }
}

/* 모달 안 폼 스타일(라이트 톤) */
.login-modal-card .landing-login-box {
  max-width: none;
}

.login-modal-card .landing-logo {
  color: #0F6E56;
  font-size: 42px;
  margin-bottom: 30px;
}

.login-modal-card .landing-logo-subtext {
  color: #6B7280;
}

.login-modal-card .landing-panel {
  background: #f3f3f4;
  padding: 28px 32px;
}

.login-modal-card .landing-field {
  border: 1px solid #D1D5DB;
  background: #FFFFFF;
  color: #111827;
}

.login-modal-card .landing-field::placeholder {
  color: #9CA3AF;
}

.login-modal-card .landing-save-row,
.login-modal-card .landing-links {
  color: #6B7280;
}

.login-modal-card .landing-links a:hover {
  color: #0F6E56;
}

.login-modal-card .landing-login-btn.primary {
  background: #0F6E56;
}

.login-modal-card .landing-login-btn.primary:hover {
  background: #0b5846;
}

/* ============================================================
   임무17 · 로그인 모달 모바일 미세 조정
   ============================================================ */
@media (max-width: 640px) {
  .login-modal-card { width: 100% !important; max-width: 100% !important; }
  .landing-card--modal {
    padding: 20px !important;
    border-radius: 12px !important;
  }
  .landing-card--modal input,
  .landing-card--modal button {
    font-size: 16px !important; /* iOS 자동 zoom 방지 */
  }
}
