:root {
  --primary-color: #2563eb;
  --primary-hover: #1d4ed8;
  --bg-left: #0f172a;
  --text-main: #1e293b;
  --text-sub: #64748b;
  --border-color: #e2e8f0;
  --input-bg: #f8fafc;
}

html,
body {
  height: 100%;
  margin: 0;
  font-family: "Pretendard", -apple-system, BlinkMacSystemFont, system-ui, Roboto, "Helvetica Neue", "Segoe UI", "Apple SD Gothic Neo", "Noto Sans KR", "Malgun Gothic", "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", sans-serif;
  background-color: #fff;
  overflow: hidden;
}

.split-layout {
  display: flex;
  width: 100%;
  height: 100%;
}

.left-panel {
  flex: 1;
  background: url('../img/bg_login_01.jpg') no-repeat center center;
  background-size: cover;
  color: #fff;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 60px;
  position: relative;
  overflow: hidden;
}

.left-panel::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(15, 23, 42, 0.75);
  pointer-events: none;
}

.brand-content {
  position: relative;
  z-index: 1;
  max-width: 600px;
  margin: 0 auto;
}

.brand-logo {
  height: 32px;
  margin-bottom: 32px;
  filter: brightness(0) invert(1);
}

.brand-slogan {
  font-size: 42px;
  font-weight: 700;
  line-height: 1.3;
  margin: 0 0 20px 0;
  letter-spacing: -0.02em;
}

.brand-desc {
  font-size: 18px;
  color: #94a3b8;
  line-height: 1.6;
  margin-bottom: 48px;
}

.brand-features {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-bottom: 60px;
}

.feature-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  font-size: 16px;
  font-weight: 500;
  color: #e2e8f0;
  text-align: center;
}

.feature-icon {
  font-size: 20px;
}

.brand-footer {
  font-size: 13px;
  color: #64748b;
  margin-top: auto;
}

.right-panel {
  width: 520px;
  background: #fff;
  display: flex;
  flex-shrink: 0;
  padding: 40px;
  box-sizing: border-box;
  overflow-y: auto;
  transition: opacity 0.5s ease, transform 0.5s ease;
}

.right-panel.fade-out {
  opacity: 0;
  transform: translateX(30px);
  pointer-events: none;
}

.login-container {
  width: 100%;
  max-width: 360px;
  margin: auto;
}

.mobile-logo-area {
  display: none;
  text-align: center;
  margin-bottom: 30px;
}

.mobile-logo {
  height: 28px;
}

.login-header {
  margin-bottom: 32px;
}

.login-header h2 {
  font-size: 28px;
  font-weight: 700;
  color: var(--text-main);
  margin: 0 0 8px 0;
}

.login-header p {
  font-size: 15px;
  color: var(--text-sub);
  margin: 0;
}

.error-message {
  background-color: #fef2f2;
  color: #dc2626;
  border: 1px solid #fecaca;
  border-radius: 8px;
  padding: 12px;
  margin-bottom: 24px;
  font-size: 14px;
  line-height: 1.4;
}

@keyframes shake {

  0%,
  100% {
    transform: translateX(0);
  }

  10%,
  30%,
  50%,
  70%,
  90% {
    transform: translateX(-4px);
  }

  20%,
  40%,
  60%,
  80% {
    transform: translateX(4px);
  }
}

.shake {
  animation: shake 0.4s cubic-bezier(.36, .07, .19, .97) both;
}

form {
  display: flex;
  flex-direction: column;
}

.input-group {
  margin-bottom: 16px;
  position: relative;
}

.input-group input {
  width: 100%;
  padding: 14px 16px 14px 44px;
  font-size: 15px;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  box-sizing: border-box;
  background-color: var(--input-bg);
  transition: all 0.2s;
  color: var(--text-main);
}

.input-group input:focus {
  outline: none;
  border-color: var(--primary-color);
  background-color: #fff;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.input-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: #94a3b8;
  display: flex;
  align-items: center;
}

.input-group input:focus+.input-icon,
.input-group:focus-within .input-icon {
  color: var(--primary-color);
}

#login-password {
  padding-right: 40px;
  ime-mode: disabled;
}

.password-toggle {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  cursor: pointer;
  color: #94a3b8;
  padding: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.2s;
}

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

.caps-lock-warning {
  color: #ea580c;
  font-size: 13px;
  margin-top: -12px;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 6px;
  padding-left: 4px;
}

.form-options {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
}

.save-id-container {
  position: relative;
}

.save-id-warning {
  position: absolute;
  top: 100%;
  left: 0;
  font-size: 11px;
  color: #ef4444;
  margin-top: 4px;
  white-space: nowrap;
}

.save-id-label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  color: var(--text-sub);
  cursor: pointer;
}

.remember-me {
  display: flex;
  align-items: center;
  cursor: pointer;
  font-size: 14px;
  color: var(--text-sub);
  gap: 8px;
}

.remember-me input {
  display: none;
}

.toggle-track {
  position: relative;
  width: 36px;
  height: 20px;
  background-color: #cbd5e1;
  border-radius: 999px;
  transition: background-color 0.2s ease;
}

.toggle-track::after {
  content: '';
  position: absolute;
  top: 2px;
  left: 2px;
  width: 16px;
  height: 16px;
  background-color: #fff;
  border-radius: 50%;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
  transition: transform 0.2s cubic-bezier(0.4, 0.0, 0.2, 1);
}

.remember-me input:checked+.toggle-track {
  background-color: #1e40af;
}

.remember-me input:checked+.toggle-track::after {
  transform: translateX(16px);
}

.remember-text {
  user-select: none;
}

.login-button {
  background-color: var(--primary-color);
  color: white;
  font-size: 16px;
  font-weight: 600;
  padding: 16px;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: background-color 0.2s;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.login-button:hover {
  background-color: var(--primary-hover);
}

.spinner {
  width: 18px;
  height: 18px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  border-top-color: #fff;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.form-footer {
  margin-top: 24px;
  text-align: center;
  font-size: 13px;
  color: #94a3b8;
}

.footer-link {
  color: var(--text-sub);
  text-decoration: none;
  transition: color 0.2s;
}

.footer-link:hover {
  color: var(--primary-color);
  text-decoration: underline;
}

.divider {
  margin: 0 8px;
  color: #cbd5e1;
}

.install-area {
  margin-top: 32px;
  text-align: center;
}

.btn-install-link {
  background: none;
  border: none;
  color: var(--primary-color);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  padding: 8px 12px;
  border-radius: 6px;
  transition: background 0.2s;
}

.btn-install-link:hover {
  background-color: #eff6ff;
}

.ios-guide {
  margin-top: 24px;
  padding: 16px;
  background-color: #f8fafc;
  border-radius: 12px;
  font-size: 13px;
  color: #64748b;
  line-height: 1.5;
}

@media (max-width: 820px) {
  .left-panel {
    display: none;
  }

  .right-panel {
    width: 100%;
    padding: 20px;
    background: url('../img/bg_login_01.jpg') no-repeat center center;
    background-size: cover;
    position: relative;
  }

  .right-panel::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(15, 23, 42, 0.6);
    pointer-events: none;
  }

  .login-container {
    background: #fff;
    padding: 32px 24px;
    border-radius: 16px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
    position: relative;
    z-index: 1;
    animation: slideUpFade 0.8s cubic-bezier(0.16, 1, 0.3, 1) both;
  }

  @keyframes slideUpFade {
    from {
      opacity: 0;
      transform: translateY(30px);
    }

    to {
      opacity: 1;
      transform: translateY(0);
    }
  }

  .mobile-logo-area {
    display: block;
  }

  .login-header {
    text-align: center;
  }

  .mobile-logo {
    animation: logoBounceIn 0.8s cubic-bezier(0.175, 0.885, 0.32, 1.275) 0.2s both;
  }

  @keyframes logoBounceIn {
    0% {
      opacity: 0;
      transform: scale(0.3) translateY(10px);
    }

    50% {
      opacity: 1;
      transform: scale(1.1) translateY(-5px);
    }

    70% {
      transform: scale(0.95) translateY(0);
    }

    100% {
      opacity: 1;
      transform: scale(1) translateY(0);
    }
  }
}

.gateway-cards {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-top: 10px;
}

.gateway-card {
  display: flex;
  align-items: center;
  padding: 20px;
  border: 1px solid var(--border-color);
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.2s ease;
  background: #fff;
  position: relative;
  overflow: hidden;
}

.gateway-card[data-role="partner"] {
  border: 1px solid var(--primary-color);
  background-color: #f8fafc;
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.08);
}

.gateway-card[data-role="partner"] .card-icon-box {
  background-color: #eff6ff;
}

.gateway-card:hover {
  border-color: var(--primary-color);
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.1);
  transform: translateY(-2px);
}

.card-icon-box {
  width: 48px;
  height: 48px;
  background: var(--input-bg);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary-color);
  margin-right: 16px;
  flex-shrink: 0;
}

.card-info h3 {
  margin: 0 0 4px 0;
  font-size: 16px;
  font-weight: 700;
  color: var(--text-main);
}

.card-info p {
  margin: 0;
  font-size: 13px;
  color: var(--text-sub);
}

.card-arrow {
  margin-left: auto;
  color: #cbd5e1;
  font-weight: bold;
  transition: transform 0.2s;
}

.gateway-card:hover .card-arrow {
  color: var(--primary-color);
  transform: translateX(4px);
}

.back-btn {
  background: none;
  border: none;
  cursor: pointer;
  padding: 12px 12px 12px 0;
  margin-bottom: 4px;
  color: var(--text-sub);
  display: flex;
  align-items: center;
  transition: color 0.2s;
}

.back-btn:hover {
  color: var(--text-main);
}

.view-enter {
  animation: fadeInRight 0.3s ease forwards;
}

@keyframes fadeInRight {
  from {
    opacity: 0;
    transform: translateX(10px);
  }

  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.pill-particle {
  position: fixed;
  width: 14px;
  height: 6px;
  border-radius: 10px;
  pointer-events: none;
  z-index: 9999;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.15);
  margin-left: -7px;
  margin-top: -3px;
  animation: pill-pop 0.8s cubic-bezier(0.165, 0.84, 0.44, 1) forwards;
}

@keyframes pill-pop {
  0% {
    transform: translate3d(0, 0, 0) scale(0.5);
    opacity: 1;
  }

  100% {
    transform: translate3d(var(--tx), var(--ty), 0) scale(1) rotate(var(--rot));
    opacity: 0;
  }
}