/* ==========================================================
   Auth Pages — DESIGN-login.md § 3, 4 (px ベース)
   tokens.css + common.css が先に読み込まれている前提
   ========================================================== */

/* ── 2 カラム CSS Grid レイアウト ────────────────────── */
.auth-layout {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 24px;
  max-inline-size: 1340px;
  padding-inline: 24px;
  margin-inline: auto;
  padding-block: 48px 64px;
}

/* デスクトップ (>981px): 2 カラム */
@media (min-width: 981px) {
  .auth-illustration-col {
    grid-column: 1 / span 6;
    align-self: center;
  }
  .auth-form-col {
    grid-column: 9 / span 4;
    padding-block-start: 48px;
  }
}

/* タブレット (700–980px): 縦積み中央 6/12 */
@media (min-width: 700px) and (max-width: 980px) {
  .auth-illustration-col,
  .auth-form-col {
    grid-column: 4 / span 6;
  }
}

/* 小タブレット (601–699px): 縦積み中央 8/12 */
@media (min-width: 601px) and (max-width: 699px) {
  .auth-illustration-col,
  .auth-form-col {
    grid-column: 3 / span 8;
  }
}

/* モバイル (<601px): 全幅縦積み */
@media (max-width: 600px) {
  .auth-layout {
    grid-template-columns: 1fr;
    padding-inline: 16px;
  }
  .auth-illustration-col,
  .auth-form-col {
    grid-column: 1 / -1;
  }
}

/* ── イラスト ────────────────────────────────────────── */
.auth-illustration {
  display: block;
  width: 100%;
}
.auth-illustration img {
  width: 100%;
  aspect-ratio: 7 / 3;
  object-fit: cover;
  border-radius: var(--radius-card);
}

/* ── フォームカラム ──────────────────────────────────── */
.auth-form-col h1 {
  font-size: clamp(24px, 5vw, 32px);
  font-weight: var(--font-weight-medium);
  line-height: 1.1;
  margin-block-end: 24px;
  color: var(--color-text-base);
}

.auth-submit-btn {
  inline-size: 100%;
  margin-block-start: 16px;
}

/* ── フローティングラベル入力 ────────────────────────── */
.compact-form-input-group {
  position: relative;
  block-size: 60px;
}

.compact-form-input-group input {
  position: absolute;
  inset: 0;
  inline-size: 100%;
  block-size: 100%;
  padding-inline: 16px;
  padding-block-start: 20px;
  border: 1px solid var(--color-input-border);
  border-radius: var(--radius-input);
  background: var(--color-surface);
  font-size: 14px;
  font-family: var(--font-stack-text);
  color: var(--color-text-base);
  box-sizing: border-box;
  outline: none;
  transition: border-color 150ms ease, box-shadow 150ms ease;
}

.compact-form-input-group label {
  position: absolute;
  inset-inline-start: 16px;
  inset-block-start: 50%;
  transform: translateY(-50%);
  font-size: 14px;
  color: var(--color-text-muted);
  pointer-events: none;
  transition: all 150ms cubic-bezier(0.2, 0, 0.38, 0.9);
  transform-origin: left center;
}

/* フォーカス時 / 値あり時 */
.compact-form-input-group input:focus + label,
.compact-form-input-group input:not(:placeholder-shown) + label {
  transform: translateY(-100%) scale(0.857);
  inset-block-start: 18px;
  font-size: 12px;
  color: var(--color-text-muted);
}

/* フォーカスボーダー */
.compact-form-input-group input:focus {
  border-color: var(--color-primary);
  box-shadow: inset 0 0 0 0.5px var(--color-primary);
}

/* hover */
.compact-form-input-group input:hover:not(:focus) {
  background: var(--color-surface-soft);
}

/* エラー状態 */
.compact-form-input-group.has-error input {
  border-color: var(--color-error);
}
.compact-form-input-group.has-error label {
  color: var(--color-error);
}

/* ── エラーテキスト ──────────────────────────────────── */
.form-error-text {
  color: var(--color-error);
  font-size: 12px;
  margin-block-start: 4px;
  margin-block-end: 0;
}

/* ── バナー（メッセージ通知） ────────────────────────── */
.auth-banner {
  padding: 12px 16px;
  border-radius: var(--radius-card);
  font-size: 14px;
  margin-block-end: 24px;
  line-height: 1.5;
}
.auth-banner strong {
  display: block;
  margin-block-end: 4px;
}
.auth-banner-success {
  background: #F0FDF4;
  color: var(--color-success);
  border: 1px solid #BBF7D0;
}
.auth-banner-error {
  background: #FEF2F2;
  color: var(--color-error);
  border: 1px solid #FECACA;
}
.auth-banner-warning {
  background: #FFFBEB;
  color: var(--color-warning);
  border: 1px solid #FDE68A;
}

/* ── 案内テキスト ────────────────────────────────────── */
.auth-info-text {
  font-size: 13px;
  color: var(--color-text-muted);
  margin-block-start: 24px;
  text-align: center;
}

/* ── OTP 画面 ────────────────────────────────────────── */
.auth-otp-description {
  font-size: 14px;
  color: var(--color-text-secondary);
  margin-block-end: 24px;
  line-height: 1.6;
}
.auth-otp-description strong {
  color: var(--color-text-base);
  font-weight: var(--font-weight-medium);
}

.auth-otp-resend {
  margin-block-start: 16px;
  text-align: center;
}
.auth-otp-resend button {
  color: var(--color-primary);
  font-size: 14px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  font-family: var(--font-stack-text);
}
.auth-otp-resend button:hover {
  text-decoration: underline;
}
