/* AOI Alpha 통합 로그인 화면(sso-login.html·sso-error.html).
   캔버스의 태블릿 로그인 디자인: 기본은 세로판(브랜드 띠 위·폼 아래), 1024px 이상은 가로판(왼쪽 560px 브랜드·오른쪽 폼), 600px 아래는 한 열.
   CSP(default-src 'self') 때문에 모든 스타일은 이 파일에만 둔다. 외부 글꼴은 불러오지 않는다. */

:root {
  --navy: #121A35;
  --navy-2: #1E2747;
  --violet: #514EE4;
  --violet-text: #3F3DCA;
  --violet-soft: #A9A6FF;
  --red: #DD4050;
  --ink: #14182B;
  --muted: #5F687D;
  --label: #454D63;
  --line: #CFD4DD;
  --note-bg: #F7F8FA;
  --note-line: #E2E5EA;
  --brand-text: #C9D0E2;
  --brand-note: #A6B1C8;
}

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

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Noto Sans KR", system-ui, sans-serif;
  word-break: keep-all; /* 한국어를 낱말 가운데서 끊지 않는다 */
  overflow-wrap: anywhere;
  color: var(--ink);
  background: #FFFFFF;
}

a { color: var(--violet-text); }
a:hover { color: var(--violet); }

[hidden] { display: none !important; }

/* 화면 폭에 따라 다른 문구 */
.wide-only { display: none; }

/* ---------- 바탕 배치(세로판) ---------- */
.page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.brand {
  flex: none;
  min-height: 400px;
  padding: 48px 56px;
  display: flex;
  flex-direction: column;
  background: var(--navy);
  color: #FFFFFF;
}

.brand-body {
  margin-top: auto;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.brand h1 {
  margin: 0;
  font-size: 34px;
  line-height: 1.35;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.features {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.features li {
  padding: 6px 12px;
  border-radius: 999px;
  background: var(--navy-2);
  color: var(--brand-text);
  font-size: 14px;
}

.feature-icon { display: none; }

.brand-note {
  margin: 40px 0 0;
  font-size: 13px;
  line-height: 1.6;
  color: var(--brand-note);
}

/* ---------- 로고 ---------- */
.logo {
  display: inline-flex;
  align-items: center;
  gap: 12px;
}

.logo-mark {
  display: flex;
  width: 28px;
  height: 24px;
  align-items: flex-end;
  gap: 3px;
  transform: skewX(-12deg);
}

.logo-mark i {
  display: block;
  width: 7px;
  border-radius: 2px 2px 1px 1px;
  background: var(--red);
}

.logo-mark i:nth-child(1) { height: 11px; opacity: 0.78; }
.logo-mark i:nth-child(2) { height: 17px; opacity: 0.9; }
.logo-mark i:nth-child(3) { height: 24px; }

.logo-word {
  display: inline-flex;
  align-items: baseline;
  gap: 5px;
  line-height: 1;
}

.logo-word strong {
  color: #FFFFFF;
  font-size: 22px;
  font-weight: 800;
  letter-spacing: 0.065em;
}

.logo-word small {
  color: var(--violet-soft);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.18em;
}

.logo-dark .logo-word strong { color: var(--navy); }
.logo-dark .logo-word small { color: var(--violet); }

/* ---------- 폼 ---------- */
.panel {
  flex: 1;
  padding: 56px 80px 40px;
  display: flex;
  flex-direction: column;
}

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

.head {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.head h2 {
  margin: 0;
  font-size: 30px;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.sub {
  margin: 0;
  font-size: 16px;
  color: var(--muted);
}

.alert {
  margin: 0;
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding: 12px 14px;
  border-radius: 10px;
  background: #FEF3F2;
  border: 1px solid #FDA29B;
  color: #B42318;
  font-size: 15px;
  line-height: 1.5;
}

.alert::before {
  content: "!";
  flex: none;
  width: 18px;
  height: 18px;
  margin-top: 2px;
  border: 2px solid currentColor;
  border-radius: 50%;
  font-size: 11px;
  font-weight: 800;
  line-height: 14px;
  text-align: center;
}

.alert:empty { display: none; }

.field {
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 14px;
  font-weight: 500;
  color: var(--label);
}

.field input {
  width: 100%;
  height: 56px;
  padding: 0 18px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: #FFFFFF;
  font: inherit;
  font-size: 18px;
  font-weight: 400;
  color: var(--ink);
}

.field input:focus {
  outline: none;
  border-color: var(--violet);
  box-shadow: 0 0 0 3px rgba(81, 78, 228, 0.18);
}

.pw {
  position: relative;
  display: flex;
}

.pw input { padding-right: 60px; }

.pw-toggle {
  position: absolute;
  right: 4px;
  top: 4px;
  width: 48px;
  height: 48px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--muted);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.pw-toggle:focus-visible { outline: 2px solid var(--violet); outline-offset: 0; }
.pw-toggle .eye-off { display: none; }
.pw-toggle[aria-pressed="true"] .eye { display: none; }
.pw-toggle[aria-pressed="true"] .eye-off { display: block; }

.row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 4px 12px;
}

.check {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 48px;
  font-size: 16px;
  color: var(--ink);
  cursor: pointer;
}

.check input {
  width: 22px;
  height: 22px;
  margin: 0;
  accent-color: var(--violet);
}

.link {
  min-height: 48px;
  display: inline-flex;
  align-items: center;
  font-size: 16px;
  font-weight: 500;
  text-decoration: none;
}

.submit {
  height: 56px;
  border: 0;
  border-radius: 12px;
  background: var(--violet);
  color: #FFFFFF;
  font: inherit;
  font-size: 19px;
  font-weight: 700;
  cursor: pointer;
}

.submit:hover { background: #4542D4; }
.submit:focus-visible { outline: 3px solid rgba(81, 78, 228, 0.35); outline-offset: 2px; }

.foot {
  margin-top: auto;
  padding-top: 32px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.foot p {
  margin: 0;
  font-size: 14px;
  line-height: 1.6;
  color: var(--muted);
}

.foot .first {
  padding: 14px 16px;
  border-radius: 10px;
  background: var(--note-bg);
  border: 1px solid var(--note-line);
  font-size: 15px;
}

/* ---------- 가로판(1024px 이상) ---------- */
@media (min-width: 1024px) {
  .wide-only { display: revert; }
  br.wide-only { display: inline; }
  .narrow-only { display: none; }

  .page { flex-direction: row; }

  .brand {
    width: 560px;
    min-height: 100vh;
  }

  .brand-body { gap: 28px; }

  .brand h1 { font-size: 36px; }

  .features {
    flex-direction: column;
    flex-wrap: nowrap;
    gap: 14px;
  }

  .features li {
    padding: 0;
    border-radius: 0;
    background: none;
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 16px;
  }

  .feature-icon {
    width: 36px;
    height: 36px;
    flex: none;
    border-radius: 10px;
    background: var(--navy-2);
    color: var(--violet-soft);
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  .panel {
    padding: 40px;
    align-items: center;
    justify-content: center;
  }

  .form {
    width: 420px;
    gap: 20px;
  }

  .field input { padding: 0 16px; font-size: 17px; }
  .pw input { padding-right: 60px; }
  .check, .link { font-size: 15px; }
  .submit { font-size: 18px; }

  .foot {
    width: 420px;
    margin-top: 20px;
    padding-top: 0;
  }

  .foot .staff {
    padding: 12px 14px;
    border-radius: 10px;
    background: var(--note-bg);
    border: 1px solid var(--note-line);
  }
}

/* ---------- 휴대폰(600px 아래): 한 열 ---------- */
@media (max-width: 599px) {
  .brand {
    min-height: 0;
    padding: 24px 20px 28px;
  }

  .brand-body {
    margin-top: 28px;
    gap: 14px;
  }

  .brand h1 { font-size: 24px; }

  .features li { font-size: 13px; padding: 5px 10px; }

  .panel { padding: 28px 16px 24px; }

  .form { gap: 18px; }

  .head h2 { font-size: 26px; }

  .field input { font-size: 17px; }

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

  .foot { padding-top: 24px; }
}

/* ---------- 오류 화면 ---------- */
.error-page {
  min-height: 100vh;
  padding: 24px 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--note-bg);
}

.error-card {
  width: 100%;
  max-width: 480px;
  padding: 40px 32px;
  border-radius: 16px;
  border: 1px solid var(--note-line);
  background: #FFFFFF;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.error-card h1 {
  margin: 8px 0 0;
  font-size: 24px;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.error-card p {
  margin: 0;
  font-size: 16px;
  line-height: 1.6;
  color: var(--muted);
}

.error-card .submit {
  margin-top: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
}

.error-card .submit:hover { color: #FFFFFF; }
