/* 로그인 화면 — Synology DSM 7.2 로그인(tpl1) 치수·색을 그대로 따름. 외부 글꼴·CDN 없음 */
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body.lp {
  min-height: 100vh;
  font-family: Verdana, "Segoe UI", "Malgun Gothic", "Microsoft YaHei", "PingFang SC", Arial, sans-serif;
  color: #414b55;
  /* 사진이 없으면 아래 그라데이션이 보인다 */
  background: url("/static/login_bg.jpg") center / cover no-repeat fixed,
              linear-gradient(160deg, #15233b 0%, #2c4560 55%, #5b7286 100%) fixed;
  background-color: #1e3048;
}
.lp-logo { position: fixed; left: 60px; top: 30px; height: 62px; width: auto; z-index: 1; }
.lp-wrap { min-height: 100vh; display: flex; align-items: center; padding: 16px; }
.lp-card {
  position: relative;
  width: 400px; min-height: 500px; max-width: 100%;
  margin-left: calc(60vw - 16px);
  background: #fff;
  border-radius: 6px;
  box-shadow: rgba(0, 0, 0, .2) 0 10px 20px 0;
  padding: 0 40px 22px;
}
/* DSM 카드 위쪽 왼편의 파란 탭 표시줄 */
.lp-card::before { content: ""; position: absolute; left: 40px; top: 0; width: 70px; height: 3px; background: #057feb; }
.lp-title { margin: 0; padding-top: 67px; font-size: 22px; font-weight: 700; color: #057feb; line-height: 32px; }
.lp-sub { margin: 36px 0 0; font-size: 18px; font-weight: 700; color: #414b55; line-height: 28px; }
.lp-hint { margin: 8px 0 0; font-size: 12px; color: #8a929c; line-height: 1.5; }
.lp-error { margin: 12px 0 0; font-size: 13px; color: #e0352b; line-height: 1.5; }

/* 화면 읽기 프로그램에는 읽히고 눈에는 안 보이는 글자 (자리표시 글자가 대신 보임) */
.lp-label {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap; margin: -1px; padding: 0; border: 0;
}
.lp-step { margin-top: 14px; }
.lp-field { position: static; }
.lp-in {
  width: 100%; height: 50px;
  padding: 12px 0 14px;
  font: inherit; font-size: 15px; color: #000;
  background: #fff;
  border: 0; border-bottom: 2px solid #d3e5f9; border-radius: 0;
  outline: none; transition: border-color .15s;
}
.lp-in::placeholder { color: #a6adb6; }
.lp-in:focus { border-bottom-color: #057feb; }
/* DSM 처럼 카드 오른쪽 가장자리에 걸친 큰 원형 화살표 버튼 */
.lp-go {
  position: absolute; right: -36px; top: 315px;
  width: 72px; height: 72px;
  display: flex; align-items: center; justify-content: center;
  border: 0; border-radius: 50%;
  background: #057feb; color: #fff;
  font-size: 30px; line-height: 1; cursor: pointer;
  box-shadow: rgba(0, 0, 0, .15) 0 4px 10px;
}
.lp-go:hover { background: #0069c8; }
.lp-go:focus-visible, .lp-back:focus-visible, .lp-user:focus-visible, .lp-otp summary:focus-visible {
  outline: 2px solid #057feb; outline-offset: 2px;
}
.lp-back {
  display: none;
  margin: 0 0 4px; padding: 4px 0;
  border: 0; background: none;
  font: inherit; font-size: 14px; color: #057feb; cursor: pointer;
  max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.lp-otp { margin-top: 14px; font-size: 13px; color: #8a929c; }
.lp-otp summary { cursor: pointer; padding: 4px 0; }
.lp-otp .lp-in { margin-top: 4px; }

/* JS 가 없으면 두 칸이 모두 보이고 화살표(제출)만 쓴다. JS 가 켜지면 2단계로 나눈다 */
.lp-next { display: none; }
.js .lp-next { display: flex; }
.js .lp-back { display: inline-block; }
.js .lp-form[data-step="1"] .lp-step2,
.js .lp-form[data-step="2"] .lp-step1 { display: none; }

/* 개발용 사용자 선택 */
.lp-dev { display: grid; gap: 8px; max-height: 50vh; overflow-y: auto; margin-top: 16px; }
.lp-user {
  text-align: left; padding: 10px 12px;
  font: inherit; font-size: 14px; color: #414b55;
  background: #f5f7f9; border: 1px solid #d5dae0; border-radius: 6px; cursor: pointer;
}
.lp-user:hover { border-color: #057feb; }
.lp-user span { color: #8a929c; font-size: 12px; }

.lp-foot {
  position: fixed; left: 0; right: 0; bottom: 16px;
  text-align: center; font-size: 12px; color: rgba(255, 255, 255, .85);
  text-shadow: 0 1px 2px rgba(0, 0, 0, .4);
  pointer-events: none;
}
/* 화면이 좁으면 카드를 가운데로 (버튼이 카드 밖으로 나가지 않게 안쪽에 둠) */
@media (max-width: 1100px) {
  .lp-wrap { justify-content: center; }
  .lp-card { margin-left: 0; }
}
@media (max-width: 600px) {
  .lp-logo { left: 16px; top: 16px; height: 40px; }
  .lp-wrap { padding: 72px 16px 56px; }
  .lp-card { width: 100%; min-height: 440px; padding: 0 24px 22px; }
  .lp-card::before { left: 24px; }
  .lp-title { padding-top: 48px; font-size: 20px; }
  .lp-go { right: 16px; top: auto; bottom: 22px; width: 60px; height: 60px; font-size: 26px; }
}

/* 로그인 화면 언어 전환 (한국어 · 中文 · English) */
.lp-lang { position: fixed; top: 44px; right: 60px; z-index: 1; display: flex; gap: 4px;
  background: rgba(0, 0, 0, .35); border-radius: 16px; padding: 4px; }
.lp-lang a { color: #fff; text-decoration: none; font-size: 13px; padding: 4px 12px; border-radius: 12px; }
.lp-lang a:hover { background: rgba(255, 255, 255, .2); }
.lp-lang a.on { background: #fff; color: #057feb; font-weight: 700; }
@media (max-width: 600px) { .lp-lang { top: 18px; right: 16px; } .lp-lang a { padding: 3px 8px; font-size: 12px; } }
