/* =====================================================================
   HSLAB Expert Demo Kit — Login / Entry layout
   데모 로그인 진입 화면 공통 레이아웃. tokens.css 의 액센트 테마를 그대로 사용.
   사용: <body class="dk-login" data-dk-theme="amber"> 처럼 테마 지정.
   ===================================================================== */

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

body.dk-login {
  margin: 0;
  font-family: var(--dk-font);
  color: var(--dk-text);
  background:
    radial-gradient(900px 600px at 10% -12%, var(--dk-accent-soft), transparent 60%),
    radial-gradient(900px 720px at 112% 118%, var(--dk-accent-softer), transparent 55%),
    var(--dk-bg);
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--dk-6);
  -webkit-font-smoothing: antialiased;
}

.lg-shell {
  width: 100%;
  max-width: 1000px;
  background: var(--dk-surface);
  border: 1px solid var(--dk-border);
  border-radius: var(--dk-r-xl);
  box-shadow: var(--dk-shadow-lg);
  overflow: hidden;
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  animation: lg-rise var(--dk-dur-slow) var(--dk-ease) both;
}

@keyframes lg-rise {
  from { opacity: 0; transform: translateY(16px) scale(0.99); }
  to   { opacity: 1; transform: none; }
}

/* ---- 좌측 브랜드 패널 ---- */
.lg-brand {
  position: relative;
  padding: var(--dk-10);
  color: var(--dk-text-invert);
  background: var(--dk-accent-grad);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.lg-brand::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(440px 340px at 88% 6%, rgba(255, 255, 255, 0.20), transparent 60%);
  pointer-events: none;
}
.lg-brand > * { position: relative; z-index: 1; }

.lg-back {
  display: inline-flex;
  align-items: center;
  gap: var(--dk-2);
  align-self: flex-start;
  color: rgba(255, 255, 255, 0.92);
  font-size: var(--dk-fs-sm);
  font-weight: 600;
  text-decoration: none;
  padding: 8px 14px;
  min-height: 38px;
  border-radius: var(--dk-r-full);
  background: rgba(255, 255, 255, 0.13);
  border: 1px solid rgba(255, 255, 255, 0.22);
  transition: background var(--dk-dur-fast) var(--dk-ease);
  margin-bottom: var(--dk-8);
}
.lg-back:hover { background: rgba(255, 255, 255, 0.24); }
.lg-back svg { width: 16px; height: 16px; }

.lg-logo {
  width: 60px;
  height: 60px;
  border-radius: var(--dk-r-lg);
  background: rgba(255, 255, 255, 0.16);
  border: 1px solid rgba(255, 255, 255, 0.28);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: var(--dk-5);
}
.lg-logo svg { width: 32px; height: 32px; color: #fff; }

.lg-name { font-size: var(--dk-fs-2xl); font-weight: 900; letter-spacing: -0.3px; margin: 0 0 6px; }
.lg-tag  { font-size: var(--dk-fs-md); font-weight: 600; color: rgba(255, 255, 255, 0.92); margin: 0 0 var(--dk-3); }
.lg-desc { font-size: var(--dk-fs-sm); line-height: 1.6; color: rgba(255, 255, 255, 0.82); margin: 0 0 var(--dk-7); max-width: 38ch; }

.lg-feats { list-style: none; margin: 0 0 auto; padding: 0; display: flex; flex-direction: column; gap: var(--dk-3); }
.lg-feats li { display: flex; gap: var(--dk-3); align-items: flex-start; font-size: var(--dk-fs-sm); color: rgba(255, 255, 255, 0.92); line-height: 1.45; }
.lg-feats svg { width: 20px; height: 20px; flex-shrink: 0; color: #fff; margin-top: 1px; }

.lg-stats {
  display: flex;
  gap: var(--dk-6);
  margin-top: var(--dk-8);
  padding-top: var(--dk-6);
  border-top: 1px solid rgba(255, 255, 255, 0.2);
}
.lg-stats > div { min-width: 0; }
.lg-stats .v { font-size: var(--dk-fs-xl); font-weight: 900; line-height: 1.1; }
.lg-stats .l { font-size: var(--dk-fs-xs); color: rgba(255, 255, 255, 0.78); margin-top: 4px; }

/* ---- 우측 폼 패널 ---- */
.lg-form {
  padding: var(--dk-10);
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.lg-form__head { margin-bottom: var(--dk-6); }
.lg-form__head h2 { font-size: var(--dk-fs-2xl); font-weight: 800; margin: 0 0 6px; color: var(--dk-text); }
.lg-form__head p  { font-size: var(--dk-fs-sm); color: var(--dk-text-muted); margin: 0; line-height: 1.5; }

.lg-field { margin-bottom: var(--dk-4); }
.lg-field label { display: block; font-size: var(--dk-fs-sm); font-weight: 600; color: var(--dk-text); margin-bottom: 6px; }
.lg-input-wrap { position: relative; display: flex; align-items: center; }
.lg-input-wrap > svg { position: absolute; left: 12px; width: 18px; height: 18px; color: var(--dk-text-subtle); pointer-events: none; }
.lg-input {
  width: 100%;
  min-height: 46px;
  padding: 12px 14px 12px 40px;
  font-family: var(--dk-font);
  font-size: var(--dk-fs-base);
  color: var(--dk-text);
  background: var(--dk-surface-2);
  border: 1px solid var(--dk-border-strong);
  border-radius: var(--dk-r-md);
  transition: border-color var(--dk-dur-fast) var(--dk-ease),
              box-shadow var(--dk-dur-fast) var(--dk-ease),
              background var(--dk-dur-fast) var(--dk-ease);
}
.lg-input::placeholder { color: var(--dk-text-subtle); }
.lg-input:focus { outline: none; background: var(--dk-surface); border-color: var(--dk-accent); box-shadow: var(--dk-ring); }
.lg-input--pw { padding-right: 46px; }

.lg-eye {
  position: absolute;
  right: 6px;
  width: 38px;
  height: 38px;
  min-height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--dk-text-subtle);
  border-radius: var(--dk-r-sm);
  transition: color var(--dk-dur-fast) var(--dk-ease);
}
.lg-eye:hover { color: var(--dk-text-muted); }
.lg-eye svg { width: 18px; height: 18px; }

.lg-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--dk-5);
  font-size: var(--dk-fs-sm);
}
.lg-check { display: flex; align-items: center; gap: 8px; color: var(--dk-text-muted); cursor: pointer; }
.lg-check input { width: 16px; height: 16px; accent-color: var(--dk-accent); cursor: pointer; }
.lg-link { color: var(--dk-accent); font-weight: 600; text-decoration: none; }
.lg-link:hover { text-decoration: underline; }

.lg-submit {
  width: 100%;
  min-height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--dk-2);
  font-family: var(--dk-font);
  font-size: var(--dk-fs-md);
  font-weight: 700;
  color: var(--dk-accent-contrast);
  background: var(--dk-accent-grad);
  border: none;
  border-radius: var(--dk-r-md);
  cursor: pointer;
  box-shadow: var(--dk-shadow-md);
  transition: transform var(--dk-dur-fast) var(--dk-ease),
              box-shadow var(--dk-dur-fast) var(--dk-ease),
              opacity var(--dk-dur-fast) var(--dk-ease);
}
.lg-submit:hover { transform: translateY(-1px); box-shadow: var(--dk-shadow-lg); }
.lg-submit:active { transform: none; }
.lg-submit[disabled] { opacity: 0.75; cursor: default; transform: none; box-shadow: var(--dk-shadow-md); }
.lg-submit svg { width: 18px; height: 18px; }

.lg-spin {
  width: 16px;
  height: 16px;
  border: 2px solid rgba(255, 255, 255, 0.4);
  border-top-color: #fff;
  border-radius: 50%;
  animation: lg-spin 0.8s linear infinite;
}
@keyframes lg-spin { to { transform: rotate(360deg); } }

.lg-note {
  margin-top: var(--dk-5);
  padding: 10px 12px;
  background: var(--dk-accent-softer);
  border: 1px solid var(--dk-accent-soft);
  border-radius: var(--dk-r-md);
  font-size: var(--dk-fs-xs);
  color: var(--dk-text-muted);
  text-align: center;
}
.lg-note b { color: var(--dk-accent); font-weight: 700; }

.lg-foot {
  margin-top: var(--dk-6);
  padding-top: var(--dk-5);
  border-top: 1px solid var(--dk-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--dk-3);
  font-size: var(--dk-fs-xs);
  color: var(--dk-text-subtle);
}
.lg-foot a { color: var(--dk-text-muted); text-decoration: none; }
.lg-foot a:hover { color: var(--dk-accent); }

/* ---- 반응형 ---- */
@media (max-width: 860px) {
  body.dk-login { padding: 0; align-items: stretch; }
  .lg-shell {
    grid-template-columns: 1fr;
    max-width: 540px;
    margin: 0 auto;
    border-radius: 0;
    min-height: 100vh;
    box-shadow: none;
    border: none;
  }
  .lg-brand { padding: var(--dk-8) var(--dk-6) var(--dk-7); }
  .lg-form { padding: var(--dk-7) var(--dk-6) var(--dk-8); }
  .lg-desc { max-width: none; }
  .lg-feats { display: none; }
}

@media (max-width: 520px) {
  .lg-name { font-size: var(--dk-fs-xl); }
  .lg-stats { gap: var(--dk-4); }
  .lg-stats .v { font-size: var(--dk-fs-lg); }
}
