@charset "UTF-8";
/* ============================================================================
 * views/login.css
 * COLAVIA v1.000.0000
 *
 *   ログイン・パスワード再設定・招待受諾の画面（未ログイン）。
 *
 *   ヘッダを持たない。SPA の外枠（app_shell.php）は読み込むが、
 *   ヘッダの組み立ては js/app.js がログイン後にだけ行う。
 *
 *   配色は OS 設定に追従する（「自動」固定）。
 *   ログイン前は、そのユーザーの表示設定を読み出せないため（§6.4）。
 *
 *   出所: mock/index.html の <style> から切り出したもの。
 *         モック専用だった .mocknav（状態の直接切替）は取り除いてある。
 * ========================================================================== */
/* ---------------------------------------------------------------------------
 * 1. 画面全体
 * ------------------------------------------------------------------------- */

.auth-wrap {
  min-height: 100vh;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: var(--sp-6) var(--sp-4) var(--sp-10);
  gap: var(--sp-5);
}

.auth-brand {
  display: flex; align-items: center; gap: var(--sp-3);
  font-size: var(--fs-md); font-weight: 700; letter-spacing: 0.02em;
}

.auth-brand__mark {
  display: grid; place-items: center;
  width: 2.25rem; height: 2.25rem;
  border-radius: var(--r-sm);
  color: var(--c-text-on-accent); font-size: var(--fs-base);
  background-image: linear-gradient(160deg, #4da2ff 0%, var(--c-accent) 100%);
}

.auth-card {
  width: 100%; max-width: 25rem;
  padding: var(--sp-8) var(--sp-6);
  border: 0.0625rem solid var(--c-hairline);
  border-radius: var(--r-xl);
  background-color: var(--c-surface);
  box-shadow: 0 0.75rem 2.5rem rgba(0, 0, 0, 0.10);
}

.auth-title { font-size: 1.25rem; margin-bottom: var(--sp-2); }

.auth-sub { font-size: var(--fs-sm); color: var(--c-text-secondary); line-height: 1.7; margin-bottom: var(--sp-5); }

.auth-foot { font-size: var(--fs-xs); color: var(--c-text-tertiary); text-align: center; line-height: 1.8; }

/* ---------------------------------------------------------------------------
 * 2. フォーム部品
 * ------------------------------------------------------------------------- */

.field-block { margin-bottom: var(--sp-4); }

.field-label {
  display: flex; align-items: baseline; justify-content: space-between; gap: var(--sp-2);
  margin-bottom: var(--sp-2);
  font-size: var(--fs-sm); font-weight: 700;
}

.input.is-error { box-shadow: 0 0 0 0.125rem var(--c-red); }

/* パスワードの表示切替（.input-wrap / .input-reveal）は
   メール設定の SMTP パスワードでも使うため components.css へ移した。 */

.btn-full { width: 100%; height: 2.5rem; font-size: var(--fs-base); }

.link {
  color: var(--c-accent); font-size: var(--fs-sm);
  border-radius: var(--r-xs);
}

.link:hover { text-decoration: underline; }

.auth-actions {
  display: flex; align-items: center; justify-content: space-between; gap: var(--sp-3);
  margin-top: var(--sp-4); flex-wrap: wrap;
}

/* ---------------------------------------------------------------------------
 * 3. 通知（エラー・案内）
 * ------------------------------------------------------------------------- */

.alert {
  display: flex; gap: var(--sp-3);
  padding: var(--sp-3);
  margin-bottom: var(--sp-4);
  border-radius: var(--r-sm);
  font-size: var(--fs-sm); line-height: 1.7;
  border: 0.0625rem solid color-mix(in srgb, var(--tone) 30%, transparent);
  background-color: color-mix(in srgb, var(--tone) 10%, transparent);
}

.alert[data-tone="error"] { --tone: var(--c-red); }

.alert[data-tone="info"]  { --tone: var(--c-blue); }

.alert[data-tone="done"]  { --tone: var(--c-green); }

.alert[data-tone="warn"]  { --tone: var(--c-orange); }

.alert__icon { color: var(--tone); flex-shrink: 0; line-height: 1.7; }

/* ---------------------------------------------------------------------------
 * 4. アカウントの表示（2段階目）
 * ------------------------------------------------------------------------- */

.account {
  display: flex; align-items: center; gap: var(--sp-3);
  padding: var(--sp-2) var(--sp-3);
  margin-bottom: var(--sp-5);
  border: 0.0625rem solid var(--c-hairline);
  border-radius: var(--r-full);
}

.account__main { flex: 1 1 auto; min-width: 0; }

.account__mail {
  font-size: var(--fs-sm); font-weight: 500;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}

/* ---------------------------------------------------------------------------
 * 5. ワンタイムパスワードの入力
 * ------------------------------------------------------------------------- */

.otp-boxes { display: flex; gap: var(--sp-2); justify-content: center; margin-bottom: var(--sp-4); }

.otp-box {
  width: 2.75rem; height: 3.25rem;
  border-radius: var(--r-sm);
  background-color: var(--c-fill);
  text-align: center;
  font-size: 1.375rem; font-weight: 700;
  transition: box-shadow var(--dur-fast) var(--ease);

  /* 数字入力のスピナーを消す */
  -moz-appearance: textfield;
}

.otp-box::-webkit-outer-spin-button,
.otp-box::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }

.otp-box:focus { box-shadow: 0 0 0 0.1875rem var(--c-focus-ring); }

.otp-box:focus-visible { outline: none; }

.otp-box.is-error { box-shadow: 0 0 0 0.125rem var(--c-red); }

.otp-meta {
  display: flex; align-items: center; justify-content: space-between; gap: var(--sp-2);
  font-size: var(--fs-xs); color: var(--c-text-secondary);
  margin-bottom: var(--sp-4);
}

/* ---------------------------------------------------------------------------
 * 6. パスワードの強度
 * ------------------------------------------------------------------------- */

.strength { display: flex; gap: 0.25rem; margin-top: var(--sp-2); }

.strength__bar {
  flex: 1 1 0; height: 0.25rem; border-radius: var(--r-full);
  background-color: var(--c-fill-hover);
}

.strength__bar.is-on { background-color: var(--tone, var(--c-green)); }

.strength__label { margin-top: var(--sp-1); font-size: var(--fs-xs); color: var(--c-text-secondary); }

.rules { margin-top: var(--sp-2); font-size: var(--fs-xs); line-height: 1.9; }

.rules li { display: flex; align-items: center; gap: var(--sp-2); color: var(--c-text-tertiary); }

.rules li.is-ok { color: var(--c-green); }

/* ---------------------------------------------------------------------------
 * レスポンシブ
 * ------------------------------------------------------------------------- */


@media (max-width: 30rem) {
  .auth-card { padding: var(--sp-5) var(--sp-4); }
  .otp-box { width: 2.25rem; height: 2.75rem; font-size: 1.125rem; }
}


/* ---------------------------------------------------------------------------
 * 実装フェーズで追加したもの
 * ------------------------------------------------------------------------- */

/* カード下部の補足（モックではインライン style で書いていた） */
.auth-note {
  margin: var(--sp-4) 0 0;
  font-size: var(--fs-xs);
}

/* 確認欄が一致していないときの色 */
.strength__label.is-ng { color: var(--c-red); }
