/*
 * Sentrix 로그인 화면 C2 — 밝은 웜그레이 띠 + 가운데 카드 + `아이디 로그인 | 간편 로그인` 탭
 * 조율: coordination/requests/claude-login-c2-20261013-r2.json (L3, 3자 ACK_SCOPE)
 * 범위: #authView.auth-c2 안에서만 적용된다. 기존 왼쪽 그림 + 오른쪽 폼(.auth-shell …) 마크업에는 영향 없음.
 * 이 파일은 index.html의 <link> 1개와 #authView C2 마크업이 들어간 뒤(2단계)에만 화면에 반영된다.
 * 주 버튼: #ff6b00 + 흰 글자 (DESIGN.md decision 12).
 */

#authView.auth-c2 {
  --ac2-mark-url: url("/icons/auth-login-mark-light.png?v=BRAND-S-20261014");
  --ac2-mark-url-dark: url("/icons/auth-login-mark-dark.png?v=BRAND-S-20261014");
  --ac2-word-url: url("/icons/auth-login-wordmark-light.png?v=BRAND-S-20261014");
  --ac2-word-url-dark: url("/icons/auth-login-wordmark-dark.png?v=BRAND-S-20261014");
  --ac2-mark-ratio: 602 / 545;
  --ac2-word-ratio: 346 / 46;
}

/* Sentrix 로그인 셸(.container.ds-page + body.soc-auth-shell-active)의 기존 카드형 규칙을 C2에서만 무력화 */
body.soc-auth-shell-active:has(#authView.auth-c2) .container.ds-page,
body.soc-auth-shell-active:has(#authView.auth-c2) .container.admin-layout,
body:has(#authView.auth-c2:not(.hidden)) .container.ds-page,
body:has(#authView.auth-c2:not(.hidden)) .container.admin-layout {
  display: block !important;
  width: 100% !important;
  max-width: none !important;
  min-height: 100dvh !important;
  margin: 0 !important;
  padding: 0 !important;
  place-items: initial !important;
}

html body.soc-auth-shell-active #authView.auth-c2,
html body:has(#authView.auth-c2:not(.hidden)) #authView.auth-c2,
html[data-theme="dark"] body.soc-auth-shell-active #authView.auth-c2,
html[data-theme="dark"] body:has(#authView.auth-c2:not(.hidden)) #authView.auth-c2 {
  width: 100% !important;
  max-width: none !important;
  min-height: 100svh !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: var(--ac2-bg) !important;
  box-shadow: none !important;
  overflow-x: hidden !important;
}

/* ===== 이하 Sentrix · Sentrix HR 공통 (두 파일이 같은 내용) ===== */

#authView.auth-c2 {
  --ac2-bg: #f6f5f3;
  --ac2-surface: #ffffff;
  --ac2-subtle: #f2efeb;
  --ac2-border: #e6e2dc;
  --ac2-strong: #d6d0c8;
  --ac2-divider: #ece8e2;
  --ac2-text: #1c1917;
  --ac2-text2: #44403c;
  --ac2-muted: #736c67;
  --ac2-accent: #ff6b00;
  --ac2-accent-hover: #e65f00;
  --ac2-accent-ink: #b64000;
  --ac2-accent-weak: #fff1e8;
  --ac2-danger: #b91c1c;
  --ac2-danger-weak: #fef2f2;
  --ac2-amber: #b45309;
  --ac2-amber-weak: #fffbeb;
  --ac2-success: #047857;
  --ac2-success-weak: #ecfdf5;
  --ac2-band: #ece7e1;
  --ac2-band-text: #1c1917;
  --ac2-band-sub: #57534e;
  --ac2-card-shadow: 0 12px 36px rgba(28, 25, 23, 0.1);
  --ac2-g-bg: #ffffff;
  --ac2-g-border: #747775;
  --ac2-g-text: #1f1f1f;
  --ac2-focus: 0 0 0 3px rgba(255, 107, 0, 0.45);
  --ac2-input-border: #a8a29e;

  position: relative;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  width: 100%;
  max-width: none;
  min-height: 100svh;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: var(--ac2-bg);
  box-shadow: none;
  color: var(--ac2-text);
  overflow-x: hidden;
  font-family: Pretendard, "Apple SD Gothic Neo", -apple-system, BlinkMacSystemFont, "Noto Sans KR", "Malgun Gothic", "Segoe UI", system-ui, sans-serif;
  font-size: 15px;
  -webkit-font-smoothing: antialiased;
}

#authView.auth-c2.hidden,
#authView.auth-c2[hidden] {
  display: none;
}

#authView.auth-c2 *,
#authView.auth-c2 *::before,
#authView.auth-c2 *::after {
  box-sizing: border-box;
}

#authView.auth-c2 .hidden,
#authView.auth-c2 [hidden] {
  display: none !important;
}

/* 로그인 화면이 보일 때 바깥 컨테이너를 화면 전체로 */
body.auth-view-active:has(#authView.auth-c2:not(.hidden)) #app,
body:has(#authView.auth-c2:not(.hidden)) #app {
  display: block !important;
  min-height: 100svh !important;
  padding: 0 !important;
  place-items: initial !important;
}

body.auth-view-active #authView.auth-c2 {
  margin: 0 !important;
  align-self: stretch !important;
}

/* ---------- 띠 · 머리 · 소개 ---------- */
#authView.auth-c2 .auth-c2-band {
  position: absolute;
  inset: 0 0 auto 0;
  height: clamp(300px, 46vh, 520px);
  background: var(--ac2-band);
  overflow: hidden;
  pointer-events: none;
}

#authView.auth-c2 .auth-c2-band::before,
#authView.auth-c2 .auth-c2-band::after {
  content: "";
  position: absolute;
  aspect-ratio: var(--ac2-mark-ratio);
  background: center / contain no-repeat var(--ac2-mark-url);
  filter: grayscale(1);
  opacity: 0.06;
}

#authView.auth-c2 .auth-c2-band::before {
  right: -80px;
  top: -60px;
  height: 520px;
}

#authView.auth-c2 .auth-c2-band::after {
  left: -120px;
  bottom: -180px;
  height: 420px;
  opacity: 0.05;
}

#authView.auth-c2 .auth-c2-top {
  position: relative;
  display: flex;
  align-items: center;
  height: 72px;
  padding: 0 36px;
}

#authView.auth-c2 .auth-c2-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

#authView.auth-c2 .auth-logo-mark {
  display: block;
  width: auto;
  height: 30px;
  aspect-ratio: var(--ac2-mark-ratio);
  margin: 0;
  background: center / contain no-repeat var(--ac2-mark-url);
  animation: none;
}

#authView.auth-c2 .auth-wordmark {
  display: block;
  width: auto;
  height: 16px;
  aspect-ratio: var(--ac2-word-ratio);
  margin: 0;
  background: left center / contain no-repeat var(--ac2-word-url);
}

/* Sentrix: 로고가 <img> 두 장(라이트/다크) */
#authView.auth-c2 .auth-logo-mark:has(img),
#authView.auth-c2 .auth-wordmark:has(img) {
  background: none;
}

#authView.auth-c2 .auth-logo-mark img,
#authView.auth-c2 .auth-wordmark img {
  display: block;
  width: auto;
  height: 100%;
}

#authView.auth-c2 .auth-logo-mark-image-dark,
#authView.auth-c2 .auth-wordmark-image-dark {
  display: none !important;
}

#authView.auth-c2 .auth-c2-hero {
  position: relative;
  margin-top: 6vh;
  padding: 0 24px;
  text-align: center;
  color: var(--ac2-band-text);
}

#authView.auth-c2 .auth-c2-hero h1 {
  margin: 0;
  color: inherit;
  font-size: 30px;
  font-weight: 800;
  line-height: 1.25;
  letter-spacing: -0.02em;
}

#authView.auth-c2 .auth-c2-hero p {
  margin: 8px 0 0;
  color: var(--ac2-band-sub);
  font-size: 15px;
  line-height: 1.5;
}

/* ---------- 카드 ---------- */
#authView.auth-c2 .auth-c2-main {
  position: relative;
  flex: 1;
  display: flex;
  justify-content: center;
  padding: 30px 24px 0;
}

#authView.auth-c2 .auth-c2-card {
  align-self: flex-start;
  width: min(460px, 100%);
  padding: 8px 32px 28px;
  border: 1px solid var(--ac2-border);
  border-radius: 18px;
  background: var(--ac2-surface);
  box-shadow: var(--ac2-card-shadow);
}

#authView.auth-c2[data-auth-step="code"] .auth-c2-card,
#authView.auth-c2[data-auth-tabs="off"] .auth-c2-card {
  padding-top: 30px;
}

/* 탭 */
#authView.auth-c2 .auth-c2-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  margin: 0 -32px 22px;
  border-bottom: 1px solid var(--ac2-divider);
}

#authView.auth-c2[data-auth-step="code"] .auth-c2-tabs,
#authView.auth-c2[data-auth-tabs="off"] .auth-c2-tabs {
  display: none;
}

#authView.auth-c2 .auth-c2-tab {
  position: relative;
  min-height: 52px;
  padding: 16px 0 14px;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  color: var(--ac2-muted);
  font: inherit;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
}

#authView.auth-c2 .auth-c2-tab:hover {
  color: var(--ac2-text2);
}

#authView.auth-c2 .auth-c2-tab[aria-selected="true"] {
  color: var(--ac2-text);
}

#authView.auth-c2 .auth-c2-tab[aria-selected="true"]::after {
  content: "";
  position: absolute;
  left: 24px;
  right: 24px;
  bottom: -1px;
  height: 3px;
  border-radius: 3px;
  background: var(--ac2-accent);
}

#authView.auth-c2 .auth-c2-tab:focus-visible {
  outline: none;
  box-shadow: inset var(--ac2-focus);
  border-radius: 10px;
}

/* 단계별 패널 표시 */
#authView.auth-c2 .auth-c2-form {
  display: block;
  margin: 0;
}

#authView.auth-c2 .auth-c2-panel {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

#authView.auth-c2[data-auth-tab="social"] .auth-c2-form,
#authView.auth-c2[data-auth-tab="id"] .auth-c2-panel-social,
#authView.auth-c2[data-auth-step="code"] .auth-c2-panel-social,
#authView.auth-c2[data-auth-step="code"] .auth-c2-panel-credentials,
#authView.auth-c2:not([data-auth-step="code"]) .auth-c2-panel-code {
  display: none;
}

#authView.auth-c2[data-auth-step="code"] .auth-c2-form {
  display: block;
}

#authView.auth-c2 .auth-c2-panel-code {
  gap: 20px;
}

/* ---------- 입력 ---------- */
#authView.auth-c2 .auth-input-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin: 0;
}

#authView.auth-c2 .auth-field-label {
  color: var(--ac2-text2);
  font-size: 13.5px;
  font-weight: 700;
  line-height: 1.4;
}

#authView.auth-c2 .auth-input-field input {
  width: 100%;
  height: 48px;
  min-height: 48px;
  padding: 0 14px;
  border: 1px solid var(--ac2-strong);
  border-radius: 10px;
  background: var(--ac2-surface);
  box-shadow: none;
  color: var(--ac2-text);
  font: inherit;
  font-size: 15px;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

#authView.auth-c2 .auth-input-field input::placeholder {
  color: var(--ac2-muted);
  opacity: 1;
}

#authView.auth-c2 .auth-input-field input:hover:not(:disabled) {
  border-color: var(--ac2-muted);
}

#authView.auth-c2 .auth-input-field input:focus,
#authView.auth-c2 .auth-input-field input:focus-visible {
  outline: none;
  border-color: var(--ac2-accent);
  box-shadow: 0 0 0 3px var(--ac2-accent-weak);
}

#authView.auth-c2 .auth-input-field input:disabled {
  background: var(--ac2-subtle);
  color: var(--ac2-muted);
  cursor: not-allowed;
}

#authView.auth-c2 .auth-input-field input[aria-invalid="true"],
#authView.auth-c2 .auth-password-wrap.auth-credential-invalid #password,
#authView.auth-c2 .auth-password-wrap.auth-credential-invalid #password:not(:disabled) {
  border-color: var(--ac2-danger);
  box-shadow: 0 0 0 3px var(--ac2-danger-weak);
}

#authView.auth-c2 .auth-password-wrap {
  position: relative;
  display: block;
}

#authView.auth-c2 .auth-password-wrap input {
  padding-right: 52px;
}

#authView.auth-c2 .password-toggle {
  position: absolute;
  top: 50%;
  right: 6px;
  display: inline-grid;
  place-items: center;
  width: 38px;
  height: 38px;
  min-width: 38px;
  min-height: 38px;
  padding: 0;
  border: 0;
  border-radius: 8px;
  background: transparent;
  box-shadow: none;
  color: var(--ac2-muted);
  transform: translateY(-50%);
  cursor: pointer;
}

#authView.auth-c2 .password-toggle:hover:not(:disabled) {
  background: var(--ac2-subtle);
  color: var(--ac2-text2);
}

#authView.auth-c2 .password-toggle:focus-visible {
  outline: none;
  box-shadow: var(--ac2-focus);
}

#authView.auth-c2 .password-toggle svg {
  width: 20px;
  height: 20px;
}

#authView.auth-c2 .input-helper {
  color: var(--ac2-muted);
  font-size: 12.5px;
  line-height: 1.5;
}

#authView.auth-c2 .input-helper.tenant-helper-success {
  color: var(--ac2-success);
}

#authView.auth-c2 .input-helper.tenant-helper-warning {
  color: var(--ac2-amber);
}

#authView.auth-c2 .input-helper.tenant-helper-error,
#authView.auth-c2 .input-error {
  color: var(--ac2-danger);
  font-size: 13px;
  font-weight: 600;
  line-height: 1.5;
}

/* 옵션 줄 */
#authView.auth-c2 .auth-options {
  display: flex;
  align-items: center;
  gap: 18px;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--ac2-text2);
  font-size: 13.5px;
}

#authView.auth-c2 .choice-row {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin: 0;
  color: var(--ac2-text2);
  font-size: 13.5px;
  font-weight: 500;
  cursor: pointer;
}

#authView.auth-c2 .choice-row input[type="checkbox"] {
  width: 18px;
  height: 18px;
  margin: 0;
  accent-color: var(--ac2-accent);
}

/* ---------- 버튼 ---------- */
#authView.auth-c2 .auth-c2-btn,
#authView.auth-c2 .auth-submit-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  height: 50px;
  min-height: 50px;
  margin: 0;
  padding: 0 16px;
  border: 0;
  border-radius: 10px;
  box-shadow: none;
  font: inherit;
  font-size: 16px;
  font-weight: 800;
  line-height: 1;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.15s ease, opacity 0.15s ease;
}

#authView.auth-c2 .auth-submit-btn,
#authView.auth-c2 .auth-c2-btn-primary {
  margin-top: 6px;
  background: var(--ac2-accent);
  color: #ffffff;
}

#authView.auth-c2 .auth-c2-panel-code .auth-c2-btn-primary {
  margin-top: 0;
}

#authView.auth-c2 .auth-submit-btn:hover:not(:disabled),
#authView.auth-c2 .auth-c2-btn-primary:hover:not(:disabled) {
  background: var(--ac2-accent-hover);
  color: #ffffff;
}

#authView.auth-c2 .auth-submit-btn:disabled,
#authView.auth-c2 .auth-c2-btn-primary:disabled,
#authView.auth-c2 .auth-form:has(#username:disabled) .auth-submit-btn {
  background: var(--ac2-accent);
  color: #ffffff;
  opacity: 0.5;
  cursor: not-allowed;
}

#authView.auth-c2 .auth-c2-btn:focus-visible,
#authView.auth-c2 .auth-submit-btn:focus-visible {
  outline: none;
  box-shadow: var(--ac2-focus);
}

#authView.auth-c2 .auth-c2-btn-naver {
  background: #03c75a;
  color: #ffffff;
}

#authView.auth-c2 .auth-c2-btn-naver:hover:not(:disabled) {
  background: #02b351;
}

#authView.auth-c2 .auth-c2-btn-google {
  border: 1px solid var(--ac2-g-border);
  background: var(--ac2-g-bg);
  color: var(--ac2-g-text);
  font-weight: 700;
}

#authView.auth-c2 .auth-c2-btn-google:hover:not(:disabled) {
  background: #f8faff;
}

#authView.auth-c2 .auth-c2-btn-ghost {
  border: 1px solid var(--ac2-strong);
  background: transparent;
  color: var(--ac2-text);
  font-weight: 700;
}

#authView.auth-c2 .auth-c2-btn-ghost:hover:not(:disabled) {
  background: var(--ac2-subtle);
}

#authView.auth-c2 .auth-c2-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

#authView.auth-c2 .auth-c2-provider-icon {
  flex: none;
  width: 20px;
  height: 20px;
}

#authView.auth-c2 .auth-c2-social {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

#authView.auth-c2 #googleLoginButton:empty {
  display: none;
}

#authView.auth-c2 #googleLoginButton {
  display: flex;
  justify-content: center;
}

/* 링크처럼 보이는 버튼 */
#authView.auth-c2 .auth-c2-link {
  display: inline;
  min-height: 0;
  margin: 0;
  padding: 2px 0;
  border: 0;
  background: none;
  box-shadow: none;
  color: var(--ac2-text2);
  font: inherit;
  font-size: 13.5px;
  font-weight: 500;
  text-decoration: underline;
  text-decoration-color: var(--ac2-strong);
  text-underline-offset: 3px;
  cursor: pointer;
}

#authView.auth-c2 .auth-c2-link.is-accent {
  color: var(--ac2-accent-ink);
  font-weight: 700;
  text-decoration-color: currentColor;
}

#authView.auth-c2 .auth-c2-link:focus-visible {
  outline: none;
  border-radius: 4px;
  box-shadow: var(--ac2-focus);
}

/* ---------- 문구 ---------- */
#authView.auth-c2 .auth-c2-title {
  margin: 0;
  color: var(--ac2-text);
  font-size: 21px;
  font-weight: 800;
  line-height: 1.35;
  letter-spacing: -0.01em;
}

#authView.auth-c2 .auth-c2-sub {
  margin: 6px 0 0;
  color: var(--ac2-muted);
  font-size: 14.5px;
  line-height: 1.55;
  word-break: keep-all;
}

#authView.auth-c2 .auth-c2-lead {
  margin: 0 0 4px;
}

#authView.auth-c2 .auth-c2-note {
  display: flex;
  gap: 6px;
  margin: 0;
  color: var(--ac2-muted);
  font-size: 12.5px;
  line-height: 1.55;
  word-break: keep-all;
}

#authView.auth-c2 .auth-c2-note b {
  color: var(--ac2-text2);
}

#authView.auth-c2 .auth-c2-center {
  justify-content: center;
  text-align: center;
}

/* 단계 표시 */
#authView.auth-c2 .auth-c2-steps {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 0;
  padding: 0;
  list-style: none;
  color: var(--ac2-muted);
  font-size: 12.5px;
  font-weight: 700;
}

#authView.auth-c2 .auth-c2-steps li {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

#authView.auth-c2 .auth-c2-steps li + li::before {
  content: "";
  width: 18px;
  height: 1px;
  background: var(--ac2-strong);
}

#authView.auth-c2 .auth-c2-steps i {
  display: inline-grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--ac2-subtle);
  color: var(--ac2-muted);
  font-size: 12px;
  font-style: normal;
}

#authView.auth-c2 .auth-c2-steps li.is-done i,
#authView.auth-c2 .auth-c2-steps li[aria-current="step"] i {
  background: var(--ac2-accent);
  color: #ffffff;
}

#authView.auth-c2 .auth-c2-steps li.is-done i {
  font-size: 0;
}

#authView.auth-c2 .auth-c2-steps li.is-done i::before {
  content: "✓";
  font-size: 12px;
  font-weight: 900;
}

#authView.auth-c2 .auth-sr-only {
  position: absolute !important;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

#authView.auth-c2 .auth-c2-steps li[aria-current="step"] {
  color: var(--ac2-text);
}

/* 로그인한 계정 요약 */
#authView.auth-c2 .auth-c2-account {
  display: grid;
  grid-template-columns: 90px 1fr;
  gap: 6px 10px;
  margin: 0;
  padding: 10px 14px;
  border-radius: 12px;
  background: var(--ac2-subtle);
  font-size: 13.5px;
}

#authView.auth-c2 .auth-c2-account dt {
  margin: 0;
  color: var(--ac2-muted);
}

#authView.auth-c2 .auth-c2-account dd {
  margin: 0;
  overflow: hidden;
  color: var(--ac2-text);
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* 안내 상자 */
#authView.auth-c2 .auth-c2-callout {
  display: flex;
  gap: 10px;
  margin: 0;
  padding: 12px 14px;
  border-radius: 12px;
  font-size: 13.5px;
  line-height: 1.55;
  word-break: keep-all;
}

#authView.auth-c2 .auth-c2-callout b {
  font-weight: 800;
}

#authView.auth-c2 .auth-c2-callout.is-warn {
  background: var(--ac2-amber-weak);
  color: var(--ac2-amber);
}

#authView.auth-c2 .auth-c2-callout.is-error {
  background: var(--ac2-danger-weak);
  color: var(--ac2-danger);
}

/* 이 기기에 저장된 회사코드 고르기 */
#authView.auth-c2 .auth-c2-pick {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: 0;
  padding: 0;
  border: 0;
}

#authView.auth-c2 .auth-c2-pick legend {
  margin-bottom: 8px;
  padding: 0;
}

#authView.auth-c2 .auth-c2-pick-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--ac2-border);
  border-radius: 12px;
  background: var(--ac2-surface);
  cursor: pointer;
}

#authView.auth-c2 .auth-c2-pick-row:has(input:checked) {
  border-color: var(--ac2-accent);
  box-shadow: 0 0 0 3px var(--ac2-accent-weak);
}

#authView.auth-c2 .auth-c2-pick-row:has(input:focus-visible) {
  box-shadow: var(--ac2-focus);
}

#authView.auth-c2 .auth-c2-pick-row input {
  width: 20px;
  height: 20px;
  margin: 0;
  accent-color: var(--ac2-accent);
}

#authView.auth-c2 .auth-c2-pick-code {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  color: var(--ac2-text);
  font-size: 15px;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#authView.auth-c2 .auth-c2-tag {
  padding: 2px 8px;
  border-radius: 10px;
  background: var(--ac2-accent-weak);
  color: var(--ac2-accent-ink);
  font-size: 11.5px;
  font-weight: 700;
  white-space: nowrap;
}

/* 상태 메시지 */
#authView.auth-c2 #authMessage {
  margin: 0 0 16px;
  font-size: 13.5px;
  line-height: 1.55;
  word-break: keep-all;
}

#authView.auth-c2 #authMessage:empty {
  display: none;
}

#authView.auth-c2 #authMessage.auth-error,
#authView.auth-c2 #authMessage.auth-info,
#authView.auth-c2 #authMessage.auth-success {
  padding: 12px 14px;
  border-radius: 12px;
  font-weight: 600;
}

#authView.auth-c2 #authMessage.auth-error {
  background: var(--ac2-danger-weak);
  color: var(--ac2-danger);
}

#authView.auth-c2 #authMessage.auth-info {
  background: var(--ac2-subtle);
  color: var(--ac2-text2);
}

#authView.auth-c2 #authMessage.auth-success {
  background: var(--ac2-success-weak);
  color: var(--ac2-success);
}

/* ---------- 바닥글 ---------- */
#authView.auth-c2 .auth-c2-foot {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 18px;
  padding: 22px 16px 26px;
  color: var(--ac2-muted);
  font-size: 12.5px;
}

/* ---------- 다크 ---------- */
:root[data-ui-theme="dark"] #authView.auth-c2,
:root[data-theme="dark"] #authView.auth-c2 {
  --ac2-bg: #0b1220;
  --ac2-surface: #111827;
  --ac2-subtle: #162032;
  --ac2-border: rgba(255, 255, 255, 0.12);
  --ac2-strong: rgba(255, 255, 255, 0.2);
  --ac2-divider: rgba(255, 255, 255, 0.08);
  --ac2-text: #f8fafc;
  --ac2-text2: #cbd5e1;
  --ac2-muted: #94a3b8;
  --ac2-accent-ink: #fb923c;
  --ac2-accent-weak: rgba(251, 146, 60, 0.14);
  --ac2-danger: #f87171;
  --ac2-danger-weak: rgba(248, 113, 113, 0.12);
  --ac2-amber: #fbbf24;
  --ac2-amber-weak: rgba(251, 191, 36, 0.12);
  --ac2-success: #34d399;
  --ac2-success-weak: rgba(52, 211, 153, 0.12);
  --ac2-band: #1b2536;
  --ac2-band-text: #f8fafc;
  --ac2-band-sub: #cbd5e1;
  --ac2-card-shadow: 0 18px 48px rgba(0, 0, 0, 0.45);
  --ac2-g-bg: #131314;
  --ac2-g-border: #8e918f;
  --ac2-g-text: #e3e3e3;
  --ac2-focus: 0 0 0 3px rgba(251, 146, 60, 0.5);
  --ac2-input-border: rgba(255, 255, 255, 0.3);
  background: var(--ac2-bg);
  box-shadow: none;
}

:root[data-ui-theme="dark"] #authView.auth-c2 .auth-logo-mark,
:root[data-theme="dark"] #authView.auth-c2 .auth-logo-mark {
  background-image: var(--ac2-mark-url-dark);
}

:root[data-ui-theme="dark"] #authView.auth-c2 .auth-wordmark,
:root[data-theme="dark"] #authView.auth-c2 .auth-wordmark {
  background-image: var(--ac2-word-url-dark);
}

:root[data-ui-theme="dark"] #authView.auth-c2 .auth-logo-mark:has(img),
:root[data-theme="dark"] #authView.auth-c2 .auth-logo-mark:has(img),
:root[data-ui-theme="dark"] #authView.auth-c2 .auth-wordmark:has(img),
:root[data-theme="dark"] #authView.auth-c2 .auth-wordmark:has(img) {
  background: none;
}

:root[data-ui-theme="dark"] #authView.auth-c2 .auth-logo-mark-image-light,
:root[data-theme="dark"] #authView.auth-c2 .auth-logo-mark-image-light,
:root[data-ui-theme="dark"] #authView.auth-c2 .auth-wordmark-image-light,
:root[data-theme="dark"] #authView.auth-c2 .auth-wordmark-image-light {
  display: none !important;
}

:root[data-ui-theme="dark"] #authView.auth-c2 .auth-logo-mark-image-dark,
:root[data-theme="dark"] #authView.auth-c2 .auth-logo-mark-image-dark,
:root[data-ui-theme="dark"] #authView.auth-c2 .auth-wordmark-image-dark,
:root[data-theme="dark"] #authView.auth-c2 .auth-wordmark-image-dark {
  display: block !important;
}

:root[data-ui-theme="dark"] #authView.auth-c2 .auth-c2-band::before,
:root[data-theme="dark"] #authView.auth-c2 .auth-c2-band::before,
:root[data-ui-theme="dark"] #authView.auth-c2 .auth-c2-band::after,
:root[data-theme="dark"] #authView.auth-c2 .auth-c2-band::after {
  filter: grayscale(1) brightness(3);
}

/* 기존 다크 규칙(:root[data-ui-theme="dark"] #authView …)보다 앞서도록 같은 대상 다시 지정 */
:root[data-ui-theme="dark"] #authView.auth-c2 .auth-field-label,
:root[data-theme="dark"] #authView.auth-c2 .auth-field-label,
:root[data-ui-theme="dark"] #authView.auth-c2 .choice-row,
:root[data-theme="dark"] #authView.auth-c2 .choice-row,
:root[data-ui-theme="dark"] #authView.auth-c2 .auth-options,
:root[data-theme="dark"] #authView.auth-c2 .auth-options {
  background: transparent;
  color: var(--ac2-text2);
}

:root[data-ui-theme="dark"] #authView.auth-c2 .auth-input-field input,
:root[data-theme="dark"] #authView.auth-c2 .auth-input-field input {
  border-color: var(--ac2-strong);
  background: var(--ac2-surface);
  color: var(--ac2-text);
}

:root[data-ui-theme="dark"] #authView.auth-c2 .auth-input-field input::placeholder,
:root[data-theme="dark"] #authView.auth-c2 .auth-input-field input::placeholder {
  color: var(--ac2-muted);
}

:root[data-ui-theme="dark"] #authView.auth-c2 .auth-input-field input:focus,
:root[data-theme="dark"] #authView.auth-c2 .auth-input-field input:focus {
  border-color: var(--ac2-accent);
  box-shadow: 0 0 0 3px var(--ac2-accent-weak);
}

:root[data-ui-theme="dark"] #authView.auth-c2 .auth-input-field input:disabled,
:root[data-theme="dark"] #authView.auth-c2 .auth-input-field input:disabled {
  background: var(--ac2-subtle);
  color: var(--ac2-muted);
}

:root[data-ui-theme="dark"] #authView.auth-c2 .password-toggle,
:root[data-theme="dark"] #authView.auth-c2 .password-toggle {
  border: 0;
  background: transparent;
  color: var(--ac2-muted);
}

:root[data-ui-theme="dark"] #authView.auth-c2 .choice-row input[type="checkbox"],
:root[data-theme="dark"] #authView.auth-c2 .choice-row input[type="checkbox"] {
  accent-color: var(--ac2-accent);
}

:root[data-ui-theme="dark"] #authView.auth-c2 .auth-c2-btn-google:hover:not(:disabled),
:root[data-theme="dark"] #authView.auth-c2 .auth-c2-btn-google:hover:not(:disabled) {
  background: #1f1f20;
}

/* ---------- 글자색 고정 ----------
 * 앱 전역 다크 규칙(html[data-ui-theme="dark"] body :is(p, label, li, dd, …) { color … !important })이
 * 로그인 카드 안 문구 색을 덮지 않도록, C2 안에서만 의미 색을 !important로 고정한다. */
#authView.auth-c2 .auth-c2-hero h1 { color: var(--ac2-band-text) !important; }
#authView.auth-c2 .auth-c2-hero p { color: var(--ac2-band-sub) !important; }
#authView.auth-c2 .auth-c2-sub,
#authView.auth-c2 .auth-c2-note,
#authView.auth-c2 .input-helper,
#authView.auth-c2 .auth-c2-foot,
#authView.auth-c2 .auth-c2-account dt,
#authView.auth-c2 .auth-c2-steps li,
#authView.auth-c2 .auth-c2-tab { color: var(--ac2-muted) !important; }
#authView.auth-c2 .auth-c2-note b,
#authView.auth-c2 .auth-field-label,
#authView.auth-c2 .choice-row,
#authView.auth-c2 .auth-c2-link { color: var(--ac2-text2) !important; }
#authView.auth-c2 .auth-c2-title,
#authView.auth-c2 .auth-c2-account dd,
#authView.auth-c2 .auth-c2-steps li[aria-current="step"],
#authView.auth-c2 .auth-c2-pick-code,
#authView.auth-c2 .auth-c2-tab[aria-selected="true"] { color: var(--ac2-text) !important; }
#authView.auth-c2 .auth-c2-link.is-accent,
#authView.auth-c2 .auth-c2-tag { color: var(--ac2-accent-ink) !important; }
#authView.auth-c2 .auth-c2-callout.is-warn,
#authView.auth-c2 .input-helper.tenant-helper-warning { color: var(--ac2-amber) !important; }
#authView.auth-c2 .auth-c2-callout.is-error,
#authView.auth-c2 .input-error,
#authView.auth-c2 .input-helper.tenant-helper-error { color: var(--ac2-danger) !important; }
#authView.auth-c2 .input-helper.tenant-helper-success { color: var(--ac2-success) !important; }
#authView.auth-c2 #authMessage.auth-error { color: var(--ac2-danger) !important; }
#authView.auth-c2 #authMessage.auth-info { color: var(--ac2-text2) !important; }
#authView.auth-c2 #authMessage.auth-success { color: var(--ac2-success) !important; }
#authView.auth-c2 .auth-c2-steps li.is-done i,
#authView.auth-c2 .auth-c2-steps li[aria-current="step"] i { color: #ffffff !important; }
#authView.auth-c2 .auth-c2-steps li:not(.is-done):not([aria-current="step"]) i { color: var(--ac2-muted) !important; }
#authView.auth-c2 .auth-c2-btn-naver { background: #03c75a !important; border: 0 !important; color: #ffffff !important; }
#authView.auth-c2 .auth-c2-btn-naver:hover:not(:disabled) { background: #02b351 !important; }
#authView.auth-c2 .auth-c2-btn-google { background: var(--ac2-g-bg) !important; border: 1px solid var(--ac2-g-border) !important; color: var(--ac2-g-text) !important; }
#authView.auth-c2 .auth-c2-btn-ghost { background: transparent !important; border: 1px solid var(--ac2-strong) !important; color: var(--ac2-text) !important; }
#authView.auth-c2 .auth-c2-btn-ghost:hover:not(:disabled) { background: var(--ac2-subtle) !important; }
#authView.auth-c2 .auth-c2-tab { background: transparent !important; border: 0 !important; box-shadow: none !important; }
#authView.auth-c2 .auth-c2-link { background: none !important; border: 0 !important; box-shadow: none !important; }
#authView.auth-c2 .password-toggle { background: transparent !important; border: 0 !important; box-shadow: none !important; }
#authView.auth-c2 .password-toggle:hover:not(:disabled) { background: var(--ac2-subtle) !important; }
#authView.auth-c2 .auth-c2-tab:focus-visible { box-shadow: inset var(--ac2-focus) !important; border-radius: 10px; }
#authView.auth-c2 .auth-c2-link:focus-visible,
#authView.auth-c2 .password-toggle:focus-visible,
#authView.auth-c2 .auth-c2-btn:focus-visible,
#authView.auth-c2 .auth-submit-btn:focus-visible { outline: none; box-shadow: var(--ac2-focus) !important; }
#authView.auth-c2 .auth-c2-callout b { color: inherit !important; }
#authView.auth-c2 .auth-input-field input { border-color: var(--ac2-input-border) !important; }
#authView.auth-c2 .auth-input-field input:focus,
#authView.auth-c2 .auth-input-field input:focus-visible {
  border-color: var(--ac2-accent) !important;
  box-shadow: var(--ac2-focus) !important;
  outline: none !important;
}
#authView.auth-c2 .auth-input-field input[aria-invalid="true"],
#authView.auth-c2 .auth-password-wrap.auth-credential-invalid #password {
  border-color: var(--ac2-danger) !important;
  box-shadow: 0 0 0 3px var(--ac2-danger-weak) !important;
  background: var(--ac2-surface) !important;
}
#authView.auth-c2 .auth-input-field input::placeholder { font-weight: 400 !important; color: var(--ac2-muted) !important; }
/* 체크박스·라디오: 앱 전역 모양 대신 C2 전용 모양 (두 테마 같음) */
#authView.auth-c2 .choice-row input[type="checkbox"],
#authView.auth-c2 .auth-c2-pick-row input[type="radio"] {
  -webkit-appearance: none !important;
  appearance: none !important;
  flex: none;
  display: inline-grid;
  place-items: center;
  width: 18px;
  height: 18px;
  margin: 0;
  border: 1.5px solid var(--ac2-input-border) !important;
  border-radius: 5px;
  background: var(--ac2-surface) !important;
  box-shadow: none !important;
  outline: none !important;
  cursor: pointer;
}
#authView.auth-c2 .auth-c2-pick-row input[type="radio"] {
  width: 20px;
  height: 20px;
  border-radius: 50%;
}
#authView.auth-c2 .choice-row input[type="checkbox"]:checked {
  border-color: var(--ac2-accent) !important;
  background: var(--ac2-accent) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M3.5 8.5l3 3 6-7' fill='none' stroke='%23fff' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 13px no-repeat !important;
}
#authView.auth-c2 .auth-c2-pick-row input[type="radio"]:checked {
  border: 6px solid var(--ac2-accent) !important;
  background: #ffffff !important;
}
#authView.auth-c2 .choice-row input[type="checkbox"]::before,
#authView.auth-c2 .choice-row input[type="checkbox"]::after,
#authView.auth-c2 .auth-c2-pick-row input[type="radio"]::before,
#authView.auth-c2 .auth-c2-pick-row input[type="radio"]::after { content: none !important; display: none !important; }
#authView.auth-c2 .choice-row input[type="checkbox"]:focus-visible { box-shadow: var(--ac2-focus) !important; }
#authView.auth-c2 .auth-c2-pick-row input[type="radio"] {
  width: 20px !important;
  height: 20px !important;
  min-width: 20px !important;
  min-height: 20px !important;
  max-width: 20px !important;
  max-height: 20px !important;
  padding: 0 !important;
  border-radius: 50% !important;
}
#authView.auth-c2 .choice-row input[type="checkbox"] {
  width: 18px !important;
  height: 18px !important;
  min-width: 18px !important;
  min-height: 18px !important;
  padding: 0 !important;
}
#authView.auth-c2 .auth-c2-pick-row:has(input:focus-visible) { box-shadow: var(--ac2-focus) !important; }
#authView.auth-c2 .auth-c2-note:has(> .auth-c2-link.hidden:only-child) { display: none; }
/* 비밀번호 변경 결과 확인 줄: 아래 아이디 칸과 붙지 않게(포커스 링 3px 포함) 안내문과 같은 간격을 둔다. */
#authView.auth-c2 .sx-pw-recovery-row { margin-bottom: 16px; }
#authView.auth-c2 .input-helper:empty { display: none; }
#authView.auth-c2 .input-helper { font-weight: 500; }

/* ---------- 좁은 화면 ---------- */
@media (max-width: 640px) {
  #authView.auth-c2 .auth-c2-band {
    height: 300px;
    min-height: 0;
  }

  #authView.auth-c2 .auth-c2-top {
    height: 60px;
    padding: 0 16px;
  }

  #authView.auth-c2 .auth-c2-hero {
    margin-top: 16px;
    padding: 0 16px;
  }

  #authView.auth-c2 .auth-c2-hero h1 {
    font-size: 24px;
  }

  #authView.auth-c2 .auth-c2-hero p {
    font-size: 14px;
  }

  #authView.auth-c2 .auth-c2-main {
    padding: 22px 16px 0;
  }

  #authView.auth-c2 .auth-c2-card {
    padding: 4px 20px 22px;
    border-radius: 16px;
  }

  #authView.auth-c2[data-auth-step="code"] .auth-c2-card,
  #authView.auth-c2[data-auth-tabs="off"] .auth-c2-card {
    padding-top: 22px;
  }

  #authView.auth-c2 .auth-c2-tabs {
    margin: 0 -20px 18px;
  }

  #authView.auth-c2 .auth-c2-account {
    grid-template-columns: 72px 1fr;
  }

  #authView.auth-c2 .auth-c2-link {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
  }

  #authView.auth-c2 .choice-row {
    min-height: 44px;
  }

  #authView.auth-c2 .password-toggle {
    width: 44px;
    height: 44px;
    right: 2px;
  }
}

@media (prefers-reduced-motion: reduce) {
  #authView.auth-c2 * {
    transition: none !important;
  }
}

/* ===== P3 다듬기 (2026-10-13, 독립 QA A/B) — #authView.auth-c2 범위만 ===== */
/* 대기 단계 원: 다크에서 카드 배경과 구분되도록 테두리 */
#authView.auth-c2 .auth-c2-steps li:not(.is-done):not([aria-current="step"]) i {
  box-shadow: inset 0 0 0 1px var(--ac2-strong);
}
/* 단계 표시 굵기: 두 제품 통일 */
#authView.auth-c2 .auth-c2-steps,
#authView.auth-c2 .auth-c2-steps li,
#authView.auth-c2 .auth-c2-steps i {
  font-weight: 700 !important;
}
/* 입력 라벨 여백: 전역 label 여백 무력화(두 제품 같은 간격) */
#authView.auth-c2 .auth-input-field > .auth-field-label {
  margin: 0 !important;
}
/* 라이트: 포커스된 입력칸 배경을 흰색으로 통일 */
:root:not([data-ui-theme="dark"]):not([data-theme="dark"]) #authView.auth-c2 .auth-input-field input:focus,
:root:not([data-ui-theme="dark"]):not([data-theme="dark"]) #authView.auth-c2 .auth-input-field input:focus-visible {
  background-color: var(--ac2-surface) !important;
}
/* 주 버튼 키보드 포커스: 반투명 링 + 실선 외곽선 */
#authView.auth-c2 .auth-c2-btn:focus-visible,
#authView.auth-c2 .auth-submit-btn:focus-visible {
  outline: 2px solid var(--ac2-accent) !important;
  outline-offset: 2px !important;
}
/* 안내문 줄바꿈: 마지막 줄 외톨이·어색한 끊김 줄이기 */
#authView.auth-c2 .auth-c2-sub,
#authView.auth-c2 .auth-c2-callout {
  text-wrap: balance;
}
#authView.auth-c2 .auth-c2-note {
  text-wrap: pretty;
}

/* ---------- WEB-LOGIN-HERO-WORDMARK-20261015: hero 제목은 확정 BRAND-S 워드마크, 상단 바는 S 마크만 ---------- */
#authView.auth-c2 .auth-c2-top .auth-wordmark {
  display: none;
}

/* 제목 텍스트는 aria-labelledby 접근성 이름으로 남기고, 화면에는 워드마크 이미지만 보인다.
 * 글자는 크기를 0으로 만들지 않고 상자 밖으로 밀어 잘라 낸다(화면 낭독기가 건너뛰지 않게). */
#authView.auth-c2 .auth-c2-hero h1 {
  width: min(clamp(180px, 22vw, 288px), 100%);
  height: auto;
  aspect-ratio: var(--ac2-word-ratio);
  margin: 0 auto;
  overflow: hidden;
  color: transparent !important;
  font-size: 16px;
  line-height: 1;
  text-align: left;
  text-indent: 100%;
  white-space: nowrap;
  background: center / contain no-repeat var(--ac2-word-url);
}

:root[data-ui-theme="dark"] #authView.auth-c2 .auth-c2-hero h1,
:root[data-theme="dark"] #authView.auth-c2 .auth-c2-hero h1 {
  background-image: var(--ac2-word-url-dark);
}

#authView.auth-c2 .auth-c2-hero p {
  margin-top: 14px;
}

@media (forced-colors: active) {
  #authView.auth-c2 .auth-c2-hero h1,
  :root[data-ui-theme="dark"] #authView.auth-c2 .auth-c2-hero h1,
  :root[data-theme="dark"] #authView.auth-c2 .auth-c2-hero h1 {
    width: auto;
    aspect-ratio: auto;
    overflow: visible;
    text-align: center;
    text-indent: 0;
    white-space: normal;
    color: CanvasText !important;
    font-size: 30px;
    line-height: 1.25;
    background: none;
  }
}

@media (forced-colors: active) and (max-width: 640px) {
  #authView.auth-c2 .auth-c2-hero h1,
  :root[data-ui-theme="dark"] #authView.auth-c2 .auth-c2-hero h1,
  :root[data-theme="dark"] #authView.auth-c2 .auth-c2-hero h1 {
    font-size: 24px;
  }
}
