/* ===== 공통 토큰 ===== */
:root{
  --accent:#17b6c4;
  --accent-dark:#129aa6;
  --ink:#1c2530;
  --muted:#8a97a6;
  --line:#e3e8ee;
  --card:#ffffff;
  --notice:#e5342b;
  --bg-dark:#0d1b24;
}
*{ box-sizing:border-box; }

/* ===== 폰트 =====
   Pretendard 를 프로젝트에 내장한다(SIL OFL 1.1, 상업적 이용 무료).
   CDN 이 아니라 내장이라 외부망이 끊겨도, PC·태블릿 어디서든 같은 글꼴로 보인다.
   가변폰트라 파일 하나로 100~900 모든 굵기를 처리한다.
   자세한 내용은 fonts/LICENSE.txt 참고. */
@font-face{
  font-family:"Pretendard";
  src:url("../fonts/Pretendard-ko.woff2") format("woff2");
  font-weight:100 900;        /* 가변폰트 굵기 범위 */
  font-style:normal;
  font-display:swap;          /* 폰트 받는 동안 글자가 안 보이는 현상 방지 */
}

html,body{ height:100%; margin:0; }
body{
  font-family:"Pretendard","Apple SD Gothic Neo","Malgun Gothic",system-ui,sans-serif;
  color:var(--ink);
  -webkit-font-smoothing:antialiased;
}
/* input·button·select 는 브라우저 기본 글꼴을 쓰므로 상속받지 않는다.
   명시하지 않으면 입력칸과 버튼만 다른 글꼴로 보인다. */
input, button, select, textarea{ font-family:inherit; }

/* ===== 로그인 ===== */
.login-body{ background:var(--bg-dark); position:relative; overflow:hidden; }

/* 배경: 이미지 전체가 잘리지 않게 contain.
   남는 여백은 이미지 배경색과 같은 톤이라 이어져 보인다.
   (축약형 대신 개별 속성으로 써야 구형 브라우저에서도 안전하다) */
.login-body .bgimg{
  position:fixed; top:0; left:0; right:0; bottom:0; z-index:0;
  background-color:#0a1620;
  background-image:url('../img/back_3.png');
  background-position:center center;
  background-size:contain;
  background-repeat:no-repeat;
}
/* 배경 위 어두운 레이어 (인포그래픽 글자가 읽히도록 옅게) */
.login-body .bgimg::after{
  content:''; position:absolute; top:0; left:0; right:0; bottom:0;
  background:rgba(13,27,36,0.3);
}
.login-body .bg{ display:none; }   /* SVG 폴백 안 씀 */

.notice{
  position:fixed; top:0; left:0; right:0; z-index:5;
  background:var(--notice); color:#fff;
  display:flex; align-items:center; justify-content:center; gap:18px;
  padding:14px 56px; font-size:16px; font-weight:600; line-height:1.4;
}
.notice .chrome{
  display:inline-flex; align-items:center; gap:9px;
  background:#fff; color:#333; border-radius:6px;
  padding:8px 14px; font-size:15px; font-weight:600; white-space:nowrap; text-decoration:none;
}
.notice .chrome:hover{ background:#f2f4f7; }
.notice .chrome svg{ width:20px; height:20px; flex:none; }
.notice .close{
  position:absolute; right:16px; top:50%; transform:translateY(-50%);
  background:none; border:none; color:#fff; font-size:24px; cursor:pointer; line-height:1;
}

.login-wrap{
  position:relative; z-index:2;
  min-height:100vh;
  display:flex; align-items:center; justify-content:center; padding:24px;
}
.login-card{
  width:100%; max-width:430px;
  background:var(--card); border-radius:14px;
  box-shadow:0 24px 60px rgba(0,0,0,.35);
  padding:48px 44px 36px;
}
.brand{
  height:auto; margin-bottom:30px;
  display:flex; align-items:center; justify-content:center;
}
.brand img{ max-width:220px; width:70%; height:auto; }

.field{ margin-bottom:22px; position:relative; }
.field input{
  width:100%; height:60px;
  border:1.5px solid var(--line); border-radius:9px;
  padding:0 46px 0 16px; font-size:15px; color:var(--ink);
  background:#fff; outline:none;
  transition:border-color .15s, box-shadow .15s;
}
/* 플로팅 라벨: 입력칸 위에 떠 있는 텍스트 */
.field .flabel{
  position:absolute; left:14px; top:50%; transform:translateY(-50%);
  color:#aab4c0; font-size:15px; pointer-events:none;
  background:#fff; padding:0 5px;
  transition:top .15s, font-size .15s, color .15s;
}
/* 포커스했을 때만 라벨이 위로 (포커스 빠지면 값이 있어도 원위치) */
.field input:focus + .flabel{
  top:0; font-size:12px; color:var(--accent); font-weight:600;
}
/* 값이 있고 포커스 아닐 때: 라벨 숨김 (입력값이 라벨 자리를 대신함) */
.field input:not(:placeholder-shown):not(:focus) + .flabel{
  opacity:0;
}
.field input:hover{ border-color:#b9c4cf; }
.field input:focus{ border-color:var(--accent); box-shadow:0 0 0 3px rgba(23,182,196,.12); }
.toggle{
  position:absolute; right:12px; top:50%; transform:translateY(-50%);
  background:none; border:none; cursor:pointer; padding:6px; color:var(--muted); display:flex; z-index:2;
}
.toggle svg{ width:22px; height:22px; }

.btn-primary{
  width:100%; height:54px; margin-top:10px;
  background:var(--accent); color:#fff; border:none; border-radius:9px;
  font-size:16px; font-weight:700; cursor:pointer; transition:background .15s;
}
.btn-primary:hover{ background:var(--accent-dark); }

.login-links{
  margin-top:22px; display:flex; align-items:center; justify-content:center; gap:22px; font-size:14px;
}
.login-links a{ color:#5a6b7b; text-decoration:none; font-weight:600; }
.login-links a:hover{ color:var(--ink); }
.login-links .sep{ width:1px; height:13px; background:var(--line); }

.help-btn{
  position:fixed; right:20px; bottom:18px; z-index:3;
  width:38px; height:38px; border-radius:50%;
  background:#fff; color:#5a6b7b; border:1px solid var(--line);
  display:flex; align-items:center; justify-content:center;
  font-size:18px; font-weight:700; cursor:pointer; box-shadow:0 4px 14px rgba(0,0,0,.15);
}

.err-msg{ color:var(--notice); font-size:13px; margin:4px 2px 0; min-height:18px; }

@media (max-width:520px){
  .login-card{ padding:36px 24px 28px; }
  .notice{ flex-direction:column; gap:8px; padding:10px 40px; }
}
