:root {
  --bg: #f5f5f7;
  --card-bg: #ffffff;
  --text-main: #292929;
  --text-sub: #9a9a9a;
  --primary: #6d5344;
  --primary-hover: #5f4335;
  --field-bg: #ffffff;
  --field-border: #d1d5db;
  --notice-bg: #eff6ff;
  --notice-border: #bedbff;
  --notice-text: #1c398e;
  --notice-text-sub: #1447e6;
  --error-bg: #fff7eb;
  --error-text: #292929;
  --error-border: #f0e0c8;
  --success-bg: #ffffff;
  --success-text: #292929;
  --success-border: #e8e8e8;
}

.login-page {
  min-height: 100vh;
  display: grid;
  place-items: center;
  background: var(--bg);
  padding: 40px;
}

.login-card {
  background: var(--card-bg);
  text-align: center;
  border: 1px solid #0000001a;
  color: var(--text-main);
  font-weight: 500;
  padding: 48px 40px;
  border-radius: 12px;
  box-shadow: 0 2px 16px rgba(0, 0, 0, 0.08);
  width: 100%;
  max-width: 420px;
}

.brand-badge,
#screenTitle {
  font-family: "EB Garamond", Georgia, "Times New Roman", serif;
}

.brand-badge {
  width: 64px;
  height: 64px;
  border-radius: 11px;
  background: var(--primary);
  color: #fff;
  display: grid;
  place-items: center;
  margin: 0 auto 22px;
  font-size: 30px;
  font-weight: 700;
  line-height: 1;
}

.screen-title {
  font-size: 24px;
  letter-spacing: -0.4px;
  font-weight: 500;
}

.screen-subtitle {
  margin-top: 6px;
  font-size: 12px;
  color: var(--text-sub);
  font-weight: 400;
  line-height: 1.8;
}

.login-form {
  margin-top: 50px;
  text-align: left;
}

.login-phone-form {
  margin-top: 20px;
  text-align: left;
}

.input-label {
  display: block;
  font-size: 13px;
  margin-bottom: 8px;
}

.input-with-icon {
  position: relative;
}

.input-icon {
  position: absolute;
  top: 50%;
  left: 12px;
  transform: translateY(-50%);
  width: 16px;
  height: 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #a3a3a3;
  pointer-events: none;
}

.input-icon img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

/* 아이콘 있는 필드: 왼쪽 여백 확보 */
.email-input {
  padding: 0 12px 0 36px;
}

/* 아이콘 없는 한 줄 입력(OTP 등) — 동일 스타일, 균등 패딩 */
.login-field-input {
  padding: 0 12px;
}

.email-input,
.login-field-input {
  width: 100%;
  padding: 12px 14px;
  border-radius: 8px;
  border: 1px solid var(--field-border);
  background: var(--field-bg);
  font-size: 14px;
}

.email-input:focus,
.login-field-input:focus {
  outline: none;
}

.email-input:read-only {
  color: #7d7d7d;
  cursor: default;
}

.notice-box {
  margin-top: 12px;
  border: 1px solid var(--notice-border);
  background: var(--notice-bg);
  border-radius: 7px;
  padding: 12px;
  color: var(--notice-text);
  font-size: 14px;
  font-weight: 400;
  line-height: 1.5;
}

.notice-title {
  font-weight: 700;
}

.notice-desc {
  margin-top: 4px;
  font-size: 13px;
}

.form-message {
  margin-top: 10px;
}

.verify-button {
  margin-top: 12px;
  width: 100%;
  padding: 14px;
  border-radius: 7px;
  background: #b8aea7;
  color: #fff;
  font-size: 15px;
  font-weight: 600;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}
.verify-button:enabled {
  background: var(--primary);
}

.verify-button-label {
  text-align: center;
}

.verify-button-icon {
  position: absolute;
  right: 120px;
  top: 50%;
  transform: translateY(-50%);
  width: 14px;
  height: 14px;
  object-fit: contain;
}

.verify-button:hover {
  background: var(--primary-hover);
}

.verify-button:focus-visible {
  outline: 2px solid rgba(109, 78, 62, 0.35);
  outline-offset: 2px;
}

.login-link {
  display: inline-block;
  margin-top: 18px;
  font-size: 13px;
  color: #767676;
}

/* 관리자 로그인(login.html): 비밀번호 필드 눈 아이콘 */
.input-label--spaced {
  margin-top: 16px;
}

.email-input--with-eye {
  padding-right: 36px;
}

.eye-button {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  width: 16px;
  height: 16px;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
}

.eye-button img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

/* 구분선 + "또는" */
.login-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 60px 0 0;
  width: 100%;
}

.login-divider::before,
.login-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: #e5e5e5;
}

.login-divider-text {
  flex-shrink: 0;
  font-size: 13px;
  font-weight: 400;
  color: var(--text-sub);
}

/* 보조 버튼: 흰 배경 + 테두리 */
.login-secondary {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 16px;
  width: 100%;
  min-height: 36px;
  padding: 0 12px;
  border-radius: 7px;
  border: 1px solid #e0e0e0;
  background: #fff;
  color: var(--text-main);
  font-size: 14px;
  font-weight: 500;
  box-sizing: border-box;
}

.login-secondary:hover {
  background: #fafafa;
}

/* OTP 2차 인증(login-otp.html): 이 기기 기억하기 */
.otp-device-block {
  margin-top: 20px;
  text-align: left;
}

.otp-device-box {
  background-color: #f9fafb;
  border-radius: 8px;
  padding: 16px;
  box-sizing: border-box;
}

.otp-device-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.otp-device-copy strong {
  display: block;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-main);
}

.otp-device-copy p {
  margin-top: 6px;
  font-size: 12px;
  line-height: 1.5;
  color: var(--text-sub);
  font-weight: 400;
}

.otp-toggle {
  position: relative;
  flex-shrink: 0;
  margin-top: 2px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
}

.otp-toggle-input {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.otp-toggle-sr {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.otp-toggle-track {
  display: block;
  width: 48px;
  height: 28px;
  border-radius: 14px;
  background-color: #cbced4;
  position: relative;
  transition: background-color 0.2s ease;
  flex-shrink: 0;
}

.otp-toggle-thumb {
  position: absolute;
  top: 2px;
  left: 2px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.12);
  transition: transform 0.2s ease;
}

.otp-toggle-input:checked + .otp-toggle-track {
  background-color: var(--primary);
}

.otp-toggle-input:checked + .otp-toggle-track .otp-toggle-thumb {
  transform: translateX(20px);
}

.otp-toggle-input:focus-visible + .otp-toggle-track {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

.otp-toggle-input:disabled + .otp-toggle-track {
  opacity: 0.5;
  cursor: not-allowed;
}

.otp-toggle:has(.otp-toggle-input:disabled) {
  cursor: not-allowed;
  pointer-events: none;
}

/* login-otp.html: 경고/에러 토스트 디자인 샘플 (정적) */
.otp-toast-samples {
  margin-top: 12px;
  display: flex;
  flex-direction: column;
}

/* 휴대폰 문자 인증(login-phone.html) */
.login-card--phone-verify .login-form--lp,
.login-card--phone-verify .login-phone-form {
  margin-top: 20px;
}

.login-brand-img {
  text-align: center;
  margin-bottom: 8px;
}

.login-phone-heading {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-top: 22px;
}

.login-shield-badge {
  width: 64px;
  height: 64px;
  border-radius: 16px;
  background: var(--primary);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.login-shield-badge img {
  width: 32px;
  height: 32px;
  object-fit: contain;
  display: block;
  filter: brightness(0) invert(1);
}

.login-phone-title {
  margin: 0;
  font-family: inherit;
  font-size: 18px;
  font-weight: 500;
  letter-spacing: -0.3px;
  color: var(--text-main);
}

.phone-notice {
  margin-top: 20px;
  text-align: left;
}

.phone-notice-line {
  margin: 0;
  font-size: 14px;
  line-height: 1.5;
}

.phone-notice-number {
  color: var(--notice-text);
  font-weight: 600;
}

.phone-notice-validity {
  margin-top: 4px;
  font-size: 12px;
  color: var(--notice-text-sub);
}

.login-code-row {
  display: flex;
  align-items: stretch;
  gap: 8px;
}

.login-code-input {
  flex: 1;
  min-width: 0;
}

.login-timer-btn {
  flex-shrink: 0;
  min-width: 64px;
  padding: 0 10px;
  height: 36px;
  border-radius: 7px;
  border: 1px solid #e0e0e0;
  background: #fff;
  font: inherit;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-sub);
  cursor: pointer;
  box-sizing: border-box;
}

/* 카운트다운 중(50초 …) */
.login-timer-btn:disabled {
  cursor: not-allowed;
  opacity: 0.95;
  color: var(--text-sub);
}

/* 재전송 표시 시 — 더 넓게, 진한 글자색 */
.login-timer-btn:not(:disabled) {
  min-width: 70px;
  padding: 0 18px;
  color: #0a0a0a;
}

.login-timer-btn:not(:disabled):hover {
  background: #fafafa;
}

/* LP 관리자 로그인(login.html) */
.login-lp-title {
  text-align: center;
  font-size: 14px;
  color: #6b7280;
  margin-bottom: 32px;
  font-weight: 400;
}

.login-sub-title {
  text-align: center;
  font-size: 18px;
  color: #111827;
  margin-bottom: 24px;
  padding-top: 6px;
}

.login-form--lp {
  margin-top: 28px;
}

.verify-button--plain {
  margin-top: 16px;
}

.login-forgot {
  margin: 18px 0 0;
  text-align: center;
  font-size: 13px;
  font-weight: 400;
  color: var(--text-sub);
  line-height: 1.5;
}

.login-forgot__link {
  color: var(--text-main);
}

.login-forgot__link:hover {
  color: var(--primary);
  text-decoration: underline;
  text-underline-offset: 2px;
}

/* 임시 비밀번호 발송(first-login-email.html) */
.email-sent-box {
  margin-top: 20px;
  border: 1px solid #e8e4e0;
  background: #f5f2f0;
  border-radius: 7px;
  padding: 14px 12px;
  color: var(--text-main);
  font-size: 14px;
  font-weight: 400;
  line-height: 1.1;
}

.email-sent-line {
  margin: 0;
}

.email-sent-address {
  color: #337ab7;
  font-weight: 600;
}

.email-sent-address:hover {
  color: #23527c;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.email-sent-desc {
  margin: 4px 0 0;
  font-size: 13px;
  color: var(--text-main);
}

.login-email-verify-form {
  margin-top: 20px;
  text-align: left;
}

.login-code-label-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
}

.input-label--inline {
  margin-bottom: 0;
}

.login-resend-link {
  flex-shrink: 0;
  padding: 0;
  border: 0;
  background: transparent;
  font: inherit;
  font-size: 14px;
  font-weight: 500;
  color: var(--primary);
  cursor: pointer;
  text-decoration: none;
}

.login-resend-link:hover {
  color: var(--primary);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.login-code-input--spaced {
  letter-spacing: 0.42em;
  text-align: center;
  font-variant-numeric: tabular-nums;
  width: 100%;
  padding: 14px 16px;
  font-size: 22px;
  letter-spacing: 0.42em;
  border: 1px solid #D1D5DB;
  border-radius: 8px;
  outline: none;
  transition: border-color 0.15s;
  margin-bottom: 8px;
}

.email-verify-help {
  margin-top: 12px;
  text-align: center;
  font-size: 13px;
  line-height: 1.1;
}

.email-verify-help p {
  margin: 0;
}

.email-verify-help p + p {
  margin-top: 4px;
}

.login-phone-form .login-code-label-row {
  margin-top: 0;
}

