:root {
  --navy:    #0D1B2A;
  --blue:    #1A5276;
  --mid:     #2471A3;
  --sky:     #3498DB;
  --light:   #EBF5FB;
  --teal:    #0E9488;
  --green:   #16A34A;
  --amber:   #D97706;
  --red:     #DC2626;
  --gray-l:  #F7F9FC;
  --gray-1:  #F1F4F8;
  --gray-2:  #E2E8F0;
  --gray-3:  #CBD5E1;
  --gray-4:  #94A3B8;
  --gray-5:  #64748B;
  --gray-7:  #334155;
  --white:   #FFFFFF;
  --font-d:  'Gmarket Sans', 'Noto Sans KR', sans-serif;
  --font-b:  'Noto Sans KR', sans-serif;
}

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

body {
  font-family: var(--font-b);
  background: var(--gray-l);
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  -webkit-font-smoothing: antialiased;
  padding: 20px;
}

.card {
  background: var(--white);
  border-radius: 24px;
  width: 100%;
  max-width: 440px;
  box-shadow: 0 20px 60px rgba(13, 27, 42, .12);
  overflow: hidden;
  animation: fadeUpLogin .4s ease both;
}

@keyframes fadeUpLogin {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: none; }
}

.card-top {
  background: linear-gradient(135deg, #0D1B2A, #1A5276);
  padding: 32px 36px 28px;
  text-align: center;
}

.card-logo {
  width: 56px;
  height: 56px;
  border-radius: 16px;
  background: rgba(255, 255, 255, .15);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  margin: 0 auto 14px;
}

.card-title {
  font-family: var(--font-d);
  font-size: 22px;
  font-weight: 700;
  color: #fff;
  margin-bottom: 4px;
}

.card-sub {
  font-size: 14px;
  color: rgba(255, 255, 255, .6);
}

.card-body { padding: 30px 36px; }

.social-btns {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 20px;
}

.social-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px;
  border-radius: 11px;
  border: 1.5px solid var(--gray-2);
  background: var(--white);
  font-family: var(--font-b);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: all .18s;
  color: var(--gray-7);
}

.social-btn:hover { border-color: var(--gray-3); background: var(--gray-l); }
.social-btn.kakao { background: #FEE500; border-color: #FEE500; color: #3A1D1D; }
.social-btn.naver { background: #03C75A; border-color: #03C75A; color: #fff; }

.divider {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 20px;
}

.divider::before, .divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--gray-2);
}

.divider span { font-size: 12px; color: var(--gray-4); }

.form-group { margin-bottom: 14px; }

label {
  display: block;
  font-size: 13px;
  font-weight: 700;
  color: var(--gray-7);
  margin-bottom: 6px;
}

.input-wrap { position: relative; }

.input-icon {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 16px;
  color: var(--gray-4);
}

input {
  width: 100%;
  padding: 12px 14px 12px 40px;
  border: 1.5px solid var(--gray-2);
  border-radius: 11px;
  font-family: var(--font-b);
  font-size: 14px;
  color: var(--navy);
  background: var(--white);
  transition: border-color .18s;
}

input:focus { outline: none; border-color: var(--sky); box-shadow: 0 0 0 3px rgba(52, 152, 219, .1); }
input::placeholder { color: var(--gray-3); }

.pw-toggle {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  cursor: pointer;
  font-size: 16px;
  color: var(--gray-4);
}

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

.remember {
  display: flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  font-size: 13px;
  color: var(--gray-5);
}

.chk-sm {
  width: 16px;
  height: 16px;
  border-radius: 4px;
  border: 2px solid var(--gray-3);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all .18s;
  flex-shrink: 0;
}

.chk-sm.on { background: var(--blue); border-color: var(--blue); }
.chk-sm.on::after { content: '✓'; font-size: 10px; color: #fff; font-weight: 700; }

.forgot-link { font-size: 13px; color: var(--sky); font-weight: 600; text-decoration: none; }
.forgot-link:hover { text-decoration: underline; }

.submit-btn {
  width: 100%;
  padding: 14px;
  border-radius: 12px;
  border: none;
  background: linear-gradient(135deg, var(--blue), var(--mid));
  color: #fff;
  font-family: var(--font-b);
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  transition: all .22s cubic-bezier(.34, 1.56, .64, 1);
  box-shadow: 0 4px 16px rgba(26, 82, 118, .25);
}

.submit-btn:hover { transform: translateY(-2px); box-shadow: 0 8px 24px rgba(26, 82, 118, .35); }

.card-foot { padding: 0 36px 28px; text-align: center; font-size: 14px; color: var(--gray-5); }
.card-foot a { color: var(--blue); font-weight: 700; text-decoration: none; }
.card-foot a:hover { text-decoration: underline; }

.error-box {
  background: #FEE2E2;
  border: 1px solid rgba(220, 38, 38, .2);
  border-radius: 10px;
  padding: 11px 14px;
  margin-bottom: 14px;
  font-size: 13px;
  color: var(--red);
  display: none;
  align-items: center;
  gap: 8px;
}

.error-box.show { display: flex; }

#toastEl {
  position: fixed;
  bottom: 24px;
  right: 24px;
  background: var(--navy);
  color: #fff;
  padding: 12px 18px;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 500;
  box-shadow: 0 8px 32px rgba(0, 0, 0, .2);
  transform: translateY(70px);
  opacity: 0;
  transition: all .35s cubic-bezier(.34, 1.56, .64, 1);
  z-index: 600;
}
