﻿:root {
  --auth-bg-base: #eff6ff;
  --auth-bg-accent: rgba(29, 78, 216, 0.12);
  --auth-surface: rgba(255, 255, 255, 0.92);
  --auth-surface-strong: #ffffff;
  --auth-border: rgba(148, 163, 184, 0.28);
  --auth-text-primary: #0f172a;
  --auth-text-secondary: #475569;
  --auth-primary: #1d4ed8;
  --auth-primary-hover: #1e40af;
  --auth-primary-soft: rgba(29, 78, 216, 0.1);
  --auth-success: #16a34a;
  --auth-danger: #dc2626;
  --auth-shadow: 0 24px 60px rgba(15, 23, 42, 0.16);
}

body.auth-page {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at top right, rgba(56, 189, 248, 0.18), transparent 32%),
    radial-gradient(circle at top left, rgba(96, 165, 250, 0.16), transparent 30%),
    linear-gradient(180deg, #f8fbff 0%, var(--auth-bg-base) 100%);
  color: var(--auth-text-primary);
  font-family: var(--font-family-base, 'Noto Sans KR', 'Noto Sans', 'Apple SD Gothic Neo', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif);
}

body.auth-page--login {
  background:
    radial-gradient(circle at top center, rgba(37, 99, 235, 0.34), transparent 36%),
    radial-gradient(circle at bottom left, rgba(8, 145, 178, 0.14), transparent 28%),
    linear-gradient(180deg, #111a34 0%, #081126 100%);
  color: #f8fafc;
}

body.auth-page--signup {
  background:
    radial-gradient(circle at 18% 12%, rgba(59, 130, 246, 0.24), transparent 24%),
    radial-gradient(circle at 82% 18%, rgba(6, 182, 212, 0.16), transparent 22%),
    radial-gradient(circle at 50% 88%, rgba(37, 99, 235, 0.18), transparent 28%),
    linear-gradient(180deg, #0f172a 0%, #111c36 42%, #10203f 100%);
  color: #f8fafc;
}

.auth-shell {
  width: min(100%, 1120px);
  margin: 0 auto;
  padding: 28px 20px 56px;
}

.auth-shell--narrow {
  width: min(100%, 460px);
}

body.auth-page--login .auth-shell--narrow {
  width: min(100%, 500px);
  padding-top: 48px;
}

body.auth-page--signup .auth-shell {
  width: min(100%, 1180px);
  padding-top: 34px;
}

.auth-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 24px;
}

.auth-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--auth-text-primary);
  text-decoration: none;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.auth-brand-logo {
  display: block;
  width: 48px;
  height: 48px;
  object-fit: contain;
  object-position: left center;
  padding: 4px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 12px 24px rgba(15, 23, 42, 0.14);
}

.auth-brand-mark {
  width: 40px;
  height: 40px;
  border-radius: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #1d4ed8 0%, #0891b2 100%);
  color: #ffffff;
  font-size: 18px;
  box-shadow: 0 10px 24px rgba(29, 78, 216, 0.2);
}

.auth-brand-text {
  font-size: 1.1rem;
  font-family: var(--font-family-brand, 'Poppins', 'Noto Sans KR', sans-serif);
  letter-spacing: -0.03em;
}

.auth-language {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.74);
  border: 1px solid rgba(148, 163, 184, 0.22);
  box-shadow: 0 10px 24px rgba(148, 163, 184, 0.12);
}

.auth-language-label {
  font-size: 0.85rem;
  color: var(--auth-text-secondary);
  padding-left: 10px;
}

.auth-language-button {
  border: none;
  background: transparent;
  color: var(--auth-text-secondary);
  border-radius: 999px;
  padding: 8px 14px;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.auth-language-button:hover,
.auth-language-button:focus-visible {
  outline: none;
  background: rgba(29, 78, 216, 0.08);
  color: var(--auth-primary);
}

.auth-language-button.is-active {
  background: linear-gradient(135deg, #1d4ed8 0%, #2563eb 100%);
  color: #ffffff;
  box-shadow: 0 10px 18px rgba(29, 78, 216, 0.22);
}

.auth-card {
  background: var(--auth-surface);
  border: 1px solid var(--auth-border);
  border-radius: 28px;
  box-shadow: var(--auth-shadow);
  backdrop-filter: blur(14px);
}

.login-card {
  padding: 34px 30px 28px;
}

body.auth-page--login .login-card {
  padding: 24px 28px 22px;
  border-radius: 26px;
  background: rgba(5, 10, 27, 0.96);
  border: 1px solid rgba(100, 116, 139, 0.34);
  box-shadow: 0 30px 80px rgba(2, 6, 23, 0.54);
  backdrop-filter: none;
}

.login-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 28px;
}

.login-header {
  text-align: center;
  margin-bottom: 28px;
}

body.auth-page--login .login-header {
  margin-bottom: 18px;
}

.login-brand-lockup {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  min-width: 0;
}

.login-brand-logo {
  width: 58px;
  height: 58px;
  object-fit: contain;
  object-position: center;
  flex: 0 0 auto;
  border-radius: 50%;
  background: transparent;
  clip-path: circle(50% at 50% 50%);
  filter: drop-shadow(0 14px 24px rgba(14, 165, 233, 0.16));
}

.login-brand-copy {
  display: grid;
  gap: 5px;
  text-align: left;
}

.login-brand-title {
  margin: 0;
  font-size: clamp(2rem, 6vw, 2.7rem);
  line-height: 1;
  letter-spacing: -0.05em;
  color: #f8fafc;
  font-family: var(--font-family-brand, 'Poppins', 'Noto Sans KR', sans-serif);
}

.login-brand-copy span {
  color: rgba(191, 219, 254, 0.86);
  font-size: 0.86rem;
  font-weight: 800;
  letter-spacing: -0.01em;
}

body.auth-page--login .login-header h1.login-brand-title {
  color: #ffffff;
}

.login-brand-subtitle {
  margin: 10px 0 0;
  font-size: 1.05rem;
  font-weight: 600;
  color: rgba(226, 232, 240, 0.8);
}

.login-badge,
.auth-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 6px 14px;
  border-radius: 999px;
  background: var(--auth-primary-soft);
  color: var(--auth-primary);
  border: 1px solid rgba(29, 78, 216, 0.12);
  font-size: 0.8rem;
  font-weight: 700;
  margin-bottom: 16px;
}

body.auth-page--login .login-badge {
  margin-bottom: 0;
  padding: 7px 14px;
  border-radius: 999px;
  background: rgba(2, 132, 199, 0.14);
  border-color: rgba(56, 189, 248, 0.28);
  color: #38bdf8;
  font-size: 0.78rem;
  line-height: 1.2;
  text-align: center;
}

body.auth-page--signup .auth-brand {
  color: #f8fafc;
  gap: 12px;
  min-width: 0;
}

body.auth-page--signup .auth-brand-logo {
  width: 52px;
  height: 52px;
  max-width: none;
  max-height: none;
  object-fit: cover;
  padding: 0;
  border-radius: 17px;
  background: #062043;
  border: 1px solid rgba(148, 163, 184, 0.24);
  box-shadow: 0 16px 28px rgba(2, 6, 23, 0.26);
}

body.auth-page--signup .auth-brand-mark {
  background: linear-gradient(135deg, #60a5fa 0%, #22d3ee 100%);
  box-shadow: 0 12px 28px rgba(14, 165, 233, 0.24);
}

body.auth-page--signup .auth-brand-text {
  display: none;
}

body.auth-page--signup .auth-brand-copy {
  display: grid;
  gap: 4px;
  line-height: 1;
}

body.auth-page--signup .auth-brand-copy strong {
  color: #ffffff;
  font-family: var(--font-family-brand, 'Poppins', 'Noto Sans KR', sans-serif);
  font-size: clamp(1.08rem, 2vw, 1.34rem);
  font-weight: 800;
  letter-spacing: -0.04em;
  white-space: nowrap;
}

body.auth-page--signup .auth-brand-copy span {
  color: rgba(191, 219, 254, 0.82);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  text-transform: none;
  white-space: nowrap;
}

body.auth-page--signup .auth-language {
  background: rgba(8, 15, 33, 0.72);
  border-color: rgba(148, 163, 184, 0.18);
  box-shadow: none;
}

body.auth-page--signup .auth-language-label,
body.auth-page--signup .auth-language-button {
  color: rgba(226, 232, 240, 0.88);
}

body.auth-page--signup .auth-language-button:hover,
body.auth-page--signup .auth-language-button:focus-visible {
  background: rgba(96, 165, 250, 0.12);
  color: #ffffff;
}

.login-header h1,
.auth-title {
  margin: 0 0 10px;
  font-size: 2rem;
  letter-spacing: -0.04em;
  color: var(--auth-text-primary);
}

.login-header p,
.auth-subtitle {
  margin: 0;
  color: var(--auth-text-secondary);
  line-height: 1.65;
  font-size: 0.96rem;
}

.auth-support-note {
  margin: 18px 0 0;
  padding: 12px 14px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(148, 163, 184, 0.16);
  color: var(--auth-text-secondary);
  font-size: 0.9rem;
  line-height: 1.55;
}

.status-message {
  display: none;
  border-radius: 16px;
  padding: 14px 16px;
  margin-bottom: 18px;
  font-size: 0.94rem;
  line-height: 1.55;
}

.status-message.error {
  display: block;
  background: rgba(220, 38, 38, 0.08);
  border: 1px solid rgba(220, 38, 38, 0.18);
  color: var(--auth-danger);
}

body.auth-page--login .status-message.error {
  background: rgba(127, 29, 29, 0.32);
  border-color: rgba(248, 113, 113, 0.28);
  color: #fca5a5;
}

.status-message.success {
  display: block;
  background: rgba(22, 163, 74, 0.08);
  border: 1px solid rgba(22, 163, 74, 0.18);
  color: var(--auth-success);
}

body.auth-page--login .status-message.success {
  background: rgba(20, 83, 45, 0.34);
  border-color: rgba(74, 222, 128, 0.26);
  color: #86efac;
}

.login-form {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.social-login-panel {
  margin: 18px 0 0;
  padding: 14px;
  border: 1px solid rgba(56, 189, 248, 0.18);
  border-radius: 20px;
  background:
    linear-gradient(180deg, rgba(15, 23, 42, 0.68), rgba(15, 23, 42, 0.36));
}

.social-login-panel--pending {
  border-style: dashed;
  background:
    linear-gradient(180deg, rgba(15, 23, 42, 0.5), rgba(15, 23, 42, 0.24));
}

.social-login-heading {
  margin-bottom: 12px;
}

.social-login-heading h2 {
  margin: 0 0 4px;
  color: #f8fafc;
  font-size: 1.02rem;
  font-weight: 800;
  letter-spacing: -0.03em;
}

.social-login-heading p {
  margin: 0;
  color: rgba(203, 213, 225, 0.78);
  font-size: 0.88rem;
  line-height: 1.45;
}

.social-login-status {
  margin: 0 0 12px;
  padding: 10px 12px;
  border-radius: 14px;
  background: rgba(59, 130, 246, 0.1);
  border: 1px solid rgba(96, 165, 250, 0.16);
  color: rgba(219, 234, 254, 0.92);
  font-size: 0.86rem;
  line-height: 1.45;
}

.social-login-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.social-login-button {
  width: 100%;
  min-height: 48px;
  border: 0;
  border-radius: 15px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-size: 0.94rem;
  font-weight: 800;
  cursor: pointer;
  transition: transform 0.18s ease, box-shadow 0.18s ease, opacity 0.18s ease;
}

.social-login-button:hover:not(:disabled),
.social-login-button:focus-visible:not(:disabled) {
  outline: none;
  transform: translateY(-1px);
  box-shadow: 0 16px 30px rgba(15, 23, 42, 0.22);
}

.social-login-button:disabled {
  cursor: not-allowed;
  opacity: 0.64;
}

.social-login-button.is-provider-pending {
  box-shadow: inset 0 0 0 1px rgba(15, 23, 42, 0.12);
}

.social-login-button.is-provider-ready {
  box-shadow: 0 14px 26px rgba(15, 23, 42, 0.2);
}

.social-login-button--kakao {
  background: #fee500;
  color: #191600;
}

.social-login-button--naver {
  background: #03c75a;
  color: #ffffff;
}

.social-login-symbol {
  width: 28px;
  height: 28px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.52);
  color: inherit;
  font-weight: 900;
}

.login-form .form-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.login-form .form-label {
  color: var(--auth-text-primary);
  font-weight: 600;
}

body.auth-page--login .login-form .form-label {
  color: #e2e8f0;
  font-size: 1rem;
  font-weight: 700;
}

.login-form .form-input {
  width: 100%;
  box-sizing: border-box;
  min-height: 52px;
  height: 52px;
  border-radius: 16px;
  border: 1px solid rgba(148, 163, 184, 0.24);
  background: var(--auth-surface-strong);
  padding: 0 16px;
  font-size: 1rem;
  line-height: 1.2;
  color: var(--auth-text-primary);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

body.auth-page--login .login-form .form-input {
  min-height: 54px;
  height: 54px;
  border-radius: 14px;
  background: #182033;
  border-color: rgba(71, 85, 105, 0.68);
  color: #f8fafc;
  padding: 0 16px;
}

.login-form .form-input::placeholder {
  color: #94a3b8;
}

body.auth-page--login .login-form .form-input::placeholder {
  color: #8b95a7;
}

.login-form .form-input:focus {
  outline: none;
  border-color: rgba(29, 78, 216, 0.46);
  box-shadow: 0 0 0 4px rgba(29, 78, 216, 0.12);
}

body.auth-page--login .login-form .form-input:focus {
  border-color: rgba(56, 189, 248, 0.55);
  box-shadow: 0 0 0 4px rgba(56, 189, 248, 0.12);
}

.login-button,
.auth-submit {
  width: 100%;
  box-sizing: border-box;
  min-height: 52px;
  height: 52px;
  border: none;
  border-radius: 16px;
  background: linear-gradient(135deg, #1d4ed8 0%, #2563eb 100%);
  color: #ffffff;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.18s ease, box-shadow 0.18s ease, opacity 0.18s ease;
}

body.auth-page--login .login-button {
  min-height: 54px;
  height: 54px;
  margin-top: 8px;
  border-radius: 14px;
  background: linear-gradient(135deg, #38bdf8 0%, #40aef0 100%);
  color: #ffffff;
}

.login-button:hover:not(:disabled),
.auth-submit:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 18px 30px rgba(29, 78, 216, 0.22);
}

body.auth-page--login .login-button:hover:not(:disabled) {
  box-shadow: 0 18px 30px rgba(56, 189, 248, 0.18);
}

.login-button:disabled,
.auth-submit:disabled {
  cursor: not-allowed;
  opacity: 0.64;
}

.helper-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  color: var(--auth-text-secondary);
  font-size: 0.9rem;
}

body.auth-page--login .helper-row {
  margin-top: 2px;
  color: rgba(226, 232, 240, 0.72);
}

.helper-row a,
.auth-link {
  color: var(--auth-primary);
  text-decoration: none;
  font-weight: 600;
}

body.auth-page--login .auth-link {
  color: #38bdf8;
}

body.auth-page--login .auth-link:hover {
  color: #7dd3fc;
}

body.auth-page--login .auth-language {
  gap: 4px;
  padding: 4px;
  border-radius: 12px;
  background: #ffffff;
  border: 1px solid rgba(203, 213, 225, 0.72);
  box-shadow: none;
}

body.auth-page--login .auth-language-label {
  display: none;
}

body.auth-page--login .auth-language-button {
  min-width: 34px;
  min-height: 30px;
  padding: 0 12px;
  border-radius: 10px;
  font-size: 0.82rem;
  font-weight: 700;
}

body.auth-page--login .auth-language-button:hover,
body.auth-page--login .auth-language-button:focus-visible {
  background: rgba(59, 130, 246, 0.1);
  color: #1d4ed8;
}

body.auth-page--login .auth-language-button.is-active {
  background: #2f64f3;
  color: #ffffff;
  box-shadow: none;
}

.helper-row a:hover,
.auth-link:hover {
  text-decoration: underline;
}

.auth-page .signup-container {
  margin-top: 0;
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid var(--auth-border);
  box-shadow: var(--auth-shadow);
}

.auth-page .signup-header {
  margin-bottom: 24px;
}

.auth-page .back-link {
  font-weight: 600;
}

.auth-page .auth-step-note {
  margin: 14px auto 0;
  max-width: 560px;
  padding: 12px 14px;
  border-radius: 16px;
  background: rgba(29, 78, 216, 0.06);
  color: var(--auth-text-secondary);
  font-size: 0.92rem;
  line-height: 1.55;
}

.signup-suggestion-modal {
  position: fixed !important;
  inset: 0 !important;
  background: rgba(15, 23, 42, 0.72) !important;
  backdrop-filter: blur(8px) !important;
  display: flex !important;
  justify-content: center !important;
  align-items: center !important;
  z-index: 2147483647 !important;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.signup-suggestion-modal.show {
  opacity: 1 !important;
  visibility: visible !important;
}

.signup-suggestion-modal-content {
  width: min(92vw, 520px);
  max-height: 90vh !important;
  overflow-y: auto !important;
  background: #ffffff !important;
  border-radius: 24px !important;
  box-shadow: 0 30px 70px rgba(15, 23, 42, 0.28) !important;
  transform: scale(0.96);
  transition: transform 0.3s ease;
}

.signup-suggestion-modal.show .signup-suggestion-modal-content {
  transform: scale(1);
}

.signup-suggestion-modal-header {
  padding: 24px 28px 20px !important;
  background: linear-gradient(135deg, #1d4ed8 0%, #0891b2 100%) !important;
  border-radius: 24px 24px 0 0 !important;
}

.signup-suggestion-modal-header h3 {
  margin: 0 !important;
  color: #ffffff !important;
  font-size: 1.2rem !important;
  font-weight: 700 !important;
}

.signup-suggestion-modal-body {
  padding: 24px 28px !important;
}

.signup-suggestion-modal-body p {
  margin: 0 0 14px !important;
  color: #1e293b !important;
  line-height: 1.65 !important;
}

.signup-suggestion-info {
  padding: 14px 16px !important;
  border-radius: 16px !important;
  background: rgba(29, 78, 216, 0.06) !important;
  color: #475569 !important;
  border: 1px solid rgba(29, 78, 216, 0.1) !important;
}

.signup-suggestion-modal-footer {
  display: flex !important;
  justify-content: flex-end !important;
  gap: 12px !important;
  padding: 0 28px 28px !important;
}

.signup-suggestion-modal-footer .btn {
  min-width: 112px !important;
  min-height: 46px !important;
  border-radius: 14px !important;
  border: none !important;
  font-weight: 700 !important;
  cursor: pointer !important;
}

.signup-suggestion-modal-footer .btn-primary {
  background: linear-gradient(135deg, #1d4ed8 0%, #2563eb 100%) !important;
  color: #ffffff !important;
}

.signup-suggestion-modal-footer .btn-secondary {
  background: #f8fafc !important;
  color: #334155 !important;
  border: 1px solid rgba(148, 163, 184, 0.28) !important;
}

@media (max-width: 768px) {
  .auth-shell {
    padding: 18px 16px 44px;
  }

  .auth-topbar {
    flex-direction: column;
    align-items: stretch;
  }

  .auth-language {
    justify-content: space-between;
    width: 100%;
  }

  .login-card {
    padding: 28px 22px 22px;
  }

  body.auth-page--login .auth-shell--narrow {
    padding-top: 42px;
  }

  body.auth-page--login .login-card {
    padding: 22px 18px 20px;
  }

  .login-card-top {
    flex-direction: column;
    align-items: stretch;
    margin-bottom: 22px;
  }

  body.auth-page--login .auth-language {
    align-self: flex-end;
  }

  .login-header h1,
  .auth-title {
    font-size: 1.72rem;
  }

  .login-brand-title {
    font-size: 2.08rem;
  }

  .login-brand-lockup {
    gap: 12px;
  }

  .login-brand-logo {
    width: 52px;
    height: 52px;
  }

  .social-login-actions {
    grid-template-columns: 1fr;
  }

  .login-brand-subtitle {
    font-size: 0.98rem;
  }

  .helper-row {
    flex-direction: column;
    align-items: flex-start;
  }

  .signup-suggestion-modal-footer {
    flex-direction: column-reverse !important;
  }

  .signup-suggestion-modal-footer .btn {
    width: 100% !important;
  }
}
