/* =============================
   共通スタイル
============================= */

/* Vueマウント前のテンプレート構文（{{ }}）の一瞬表示を防ぐ */
[v-cloak] {
  display: none !important;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: "メイリオ", Meiryo, "ヒラギノ角ゴ Pro", "Hiragino Kaku Gothic Pro", sans-serif;
}

/* ---- ページ ---- */
.page {
  background: #fff;
  min-height: 100vh;
}

/* ---- ヘッダー ---- */
.header {
  background: #2e6da4;
  padding: 8px 16px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.header-logo {
  display: flex;
  align-items: center;
}

.header-logo a {
  display: flex;
  align-items: center;
}

.header-logo img {
  display: block;
  height: 50px;
  width: auto;
}

/* ---- メインコンテンツ ---- */
.main {
  max-width: 780px;
  margin: 0 auto;
  padding: 24px 20px;
}

/* ---- タイトル・ステップバー ---- */
.form-title {
  font-size: 22px;
  font-weight: normal;
  color: #333;
  margin-bottom: 16px;
}

.step-bar {
  float: right;
  margin-top: 4px;
  display: flex;
  align-items: center;
  gap: 2px;
  font-size: 12px;
}

.step-bar .step {
  border: 1px solid #aaa;
  padding: 2px 10px;
  color: #aaa;
  background: #fff;
}

.step-bar .step.active {
  background: #2e6da4;
  color: #fff;
  border-color: #2e6da4;
}

.step-bar .arrow {
  color: #aaa;
  font-size: 10px;
}

.clearfix::after {
  content: "";
  display: table;
  clear: both;
}

/* ---- お知らせ・注意書き ---- */
.notice {
  border: 1px solid #ccc;
  background: #f9f9f9;
  padding: 10px 14px;
  margin-bottom: 20px;
  font-size: 13px;
  color: #444;
}

.notice ul {
  margin: 4px 0 0 16px;
}

.notice li {
  list-style: disc;
  margin: 2px 0;
}

/* ---- セクション区切り ---- */
hr.sec {
  border: none;
  border-top: 1px solid #e0e0e0;
  margin: 6px 0;
}

/* ---- バッジ（必須／任意） ---- */
.badge {
  display: inline-block;
  font-size: 10px;
  padding: 1px 5px;
  border-radius: 2px;
  margin-right: 6px;
  vertical-align: middle;
}

.badge.req {
  background: #c0392b;
  color: #fff;
}

.badge.opt {
  background: #888;
  color: #fff;
}

/* ---- ボタンエリア ---- */
.btn-area {
  text-align: center;
  margin-top: 28px;
  padding-bottom: 20px;
}

/* =============================
   入力フォーム専用スタイル
============================= */

/* ---- フォームテーブル ---- */
table.form-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

table.form-table tr {
  border-bottom: 1px solid #e0e0e0;
}

table.form-table td {
  padding: 10px 8px;
  vertical-align: top;
}

table.form-table td.label-cell {
  width: 160px;
  padding-top: 12px;
  color: #333;
  white-space: nowrap;
}

table.form-table td.input-cell {
  padding: 8px 8px;
}

/* ---- 入力要素 ---- */
input[type="text"],
input[type="email"],
input[type="password"],
input[type="tel"],
input[type="date"],
select {
  height: 28px;
  border: 1px solid #ccc;
  border-radius: 0;
  padding: 2px 6px;
  font-size: 13px;
  color: #333;
  background: #f0f0f0;
  outline: none;
}

input[type="text"]:focus,
input[type="email"]:focus,
input[type="password"]:focus,
input[type="tel"]:focus,
input[type="date"]:focus,
select:focus {
  border-color: #2e6da4;
  background: #fff;
}

select {
  background: #fff;
}

textarea {
  background: #f0f0f0;
  border: 1px solid #ccc;
  padding: 4px 6px;
  font-size: 13px;
  font-family: inherit;
  resize: vertical;
  outline: none;
}

textarea:focus {
  border-color: #2e6da4;
  background: #fff;
}

/* エラー状態 */
input.input-error,
select.input-error,
textarea.input-error {
  border-color: #c0392b !important;
  background: #fff5f5 !important;
}

input.input-error:focus,
select.input-error:focus,
textarea.input-error:focus {
  border-color: #c0392b !important;
  box-shadow: 0 0 0 2px rgba(192, 57, 43, 0.12);
}

/* サイズ */
input.full { width: 100%; }
input.mid  { width: 200px; }
input.sm   { width: 80px; }
input.xs   { width: 60px; }

select.pref {
  width: 140px;
  height: 28px;
}

/* ---- パスワード表示トグル ---- */
.pw-wrap {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.pw-toggle {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  height: 28px;
  padding: 0 8px;
  border: 1px solid #bbb;
  border-radius: 3px;
  background: #f5f5f5;
  color: #555;
  font-size: 12px;
  font-family: inherit;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.15s, border-color 0.15s;
}

.pw-toggle:hover {
  background: #e8e8e8;
  border-color: #999;
}

/* ---- ヒント ---- */
.hint {
  font-size: 11px;
  color: #e74c3c;
  margin-top: 3px;
}

.hint::before {
  content: "▲ ";
}

.hint2 {
  font-size: 11px;
  color: #888;
  margin-top: 3px;
}

/* ---- レイアウトヘルパー ---- */
.pair {
  display: flex;
  align-items: center;
  gap: 6px;
}

.pair-item {
  display: flex;
  align-items: center;
  gap: 6px;
}

.pair span {
  color: #555;
  font-size: 13px;
}

.addr-stack {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

/* ---- ラジオ・チェックボックス ---- */
.radio-row {
  display: flex;
  gap: 16px;
  padding-top: 4px;
  flex-wrap: wrap;
}

.radio-row label {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 13px;
  color: #333;
  cursor: pointer;
}

/* ---- 縦並びラジオボタン（項目数が多い場合など） ---- */
.radio-row-col {
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
}

.member-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
  padding-top: 4px;
}

.member-row label {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 13px;
  color: #333;
  cursor: pointer;
}

.member-row input[type="checkbox"] {
  width: 14px;
  height: 14px;
  cursor: pointer;
  background: #fff;
}

.job-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
  padding-top: 4px;
}

.job-row label {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 13px;
  color: #333;
  cursor: pointer;
}

/* ---- 送信ボタン ---- */
.btn-confirm {
  background: #c0392b;
  color: #fff;
  border: none;
  padding: 11px 48px;
  font-size: 15px;
  cursor: pointer;
  border-radius: 3px;
}

.btn-confirm:hover {
  background: #a93226;
}

/* ---- エラーサマリー ---- */
.error-summary {
  background: #fff5f5;
  border: 1px solid #f0b0b0;
  border-left: 4px solid #c0392b;
  border-radius: 3px;
  padding: 12px 16px;
  margin-bottom: 16px;
  display: none;
}

.error-summary.visible {
  display: block;
}

.error-summary-title {
  font-size: 13px;
  font-weight: 700;
  color: #c0392b;
  display: flex;
  align-items: center;
  gap: 7px;
  margin-bottom: 8px;
}

.error-summary-list {
  padding-left: 20px;
  margin: 0;
}

.error-summary-list li {
  font-size: 12px;
  color: #a00;
  line-height: 1.7;
}

/* ---- システムエラーサマリー（is-system-error 修飾子） ---- */
/* バリデーションエラー（赤）と区別するためオレンジ系で表示 */
.error-summary.is-system-error {
  background: #fff8f0;
  border-color: #f0c080;
  border-left-color: #d08000;
}

.error-summary.is-system-error .error-summary-title {
  color: #a05000;
}

.error-summary.is-system-error .error-summary-title svg circle,
.error-summary.is-system-error .error-summary-title svg path {
  stroke: #d08000;
}

/* ---- フィールドエラーメッセージ ---- */
.field-error {
  font-size: 12px;
  color: #c0392b;
  margin-top: 4px;
  display: flex;
  align-items: flex-start;
  gap: 4px;
  line-height: 1.5;
}

.field-error::before {
  content: '！';
  font-size: 11px;
  font-weight: 700;
  flex-shrink: 0;
  margin-top: 1px;
}

/* グループエラー（ラジオ・チェックボックス用） */
.group-error {
  font-size: 12px;
  color: #c0392b;
  margin-top: 4px;
  display: flex;
  align-items: flex-start;
  gap: 4px;
  line-height: 1.5;
}

.group-error::before {
  content: '！';
  font-size: 11px;
  font-weight: 700;
  flex-shrink: 0;
  margin-top: 1px;
}

/* =============================
   確認画面専用スタイル
============================= */

table.confirm-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

table.confirm-table tr {
  border-bottom: 1px solid #e0e0e0;
}

table.confirm-table td {
  padding: 10px 8px;
  vertical-align: top;
}

table.confirm-table td.label-cell {
  width: 160px;
  color: #555;
  white-space: nowrap;
  padding-top: 10px;
}

table.confirm-table td.value-cell {
  color: #333;
  padding: 10px 8px;
  font-weight: 500;
}

table.confirm-table td.value-cell.empty {
  color: #aaa;
  font-weight: normal;
}

.btn-area {
  display: flex;
  justify-content: center;
  gap: 16px;
}

.btn-submit {
  background: #c0392b;
  color: #fff;
  border: none;
  padding: 11px 48px;
  font-size: 15px;
  cursor: pointer;
  border-radius: 3px;
}

.btn-submit:hover {
  background: #a93226;
}

.btn-back {
  background: #fff;
  color: #2e6da4;
  border: 1px solid #2e6da4;
  padding: 11px 32px;
  font-size: 14px;
  cursor: pointer;
  border-radius: 3px;
}

.btn-back:hover {
  background: #f0f6fc;
}

.check-mark {
  color: #27ae60;
  font-weight: bold;
  margin-right: 4px;
}

.confirm-content {
  position: relative;
}

.confirm-content.is-loading > *:not(.confirm-loading-overlay) {
  opacity: 0;
}

.confirm-loading-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #888;
  font-size: 13px;
}

/* ---- 送信中オーバーレイ（画面全体） ---- */
.page-loading-overlay {
  position: fixed;
  inset: 0;
  background: rgba(255, 255, 255, 0.85);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
}

.loading-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
}

.loading-spinner {
  width: 40px;
  height: 40px;
  border: 4px solid #d9dce1;
  border-top-color: #2e6da4;
  border-radius: 50%;
  animation: loading-spin 0.8s linear infinite;
}

@keyframes loading-spin {
  to { transform: rotate(360deg); }
}

.loading-text {
  font-size: 20px;
  font-weight: 700;
  color: #333;
}

/* =============================
   フッター
============================= */
.q-footer {
  background: #1c2f5e;
  text-align: center;
  padding: 70px;
  font-size: 12px;
  color: #aabbcc;
  margin-top: auto;
}

/* フッターを画面下部へ押し下げるためのflexレイアウト */
.page-flex {
  display: flex;
  flex-direction: column;
}

.page-flex .main {
  flex: 1;
}

/* ---- グレー背景（パスコード・完了・エラー画面用） ---- */
.page-gray {
  background: #F4F5F7;
}

/* =============================
   カード画面共通スタイル（完了・エラー）
============================= */

.card-main {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding-top: 48px;
  padding-bottom: 48px;
}

.card-box {
  width: 100%;
  max-width: 460px;
  background: #fff;
  border: 1px solid #D9DCE1;
  border-radius: 8px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.06);
  padding: 48px 44px 44px;
  text-align: center;
  animation: card-rise 0.6s ease both;
}

@keyframes card-rise {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}

.card-seal {
  width: 64px;
  height: 64px;
  margin: 0 auto 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: card-pop 0.5s 0.15s cubic-bezier(.34,1.56,.64,1) both;
}

@keyframes card-pop {
  from { transform: scale(0.4); opacity: 0; }
  to   { transform: scale(1); opacity: 1; }
}

.card-seal svg {
  width: 28px;
  height: 28px;
}

.card-seal.is-success {
  background: #1B78A3;
}

.card-seal.is-error {
  background: #c0392b;
}

.card-title {
  font-size: 24px;
  font-weight: 600;
  letter-spacing: 0.04em;
  margin: 0 0 22px;
  line-height: 1.6;
}

.card-title.is-success {
  color: #1B78A3;
}

.card-title.is-error {
  color: #c0392b;
}

.card-divider {
  width: 40px;
  height: 2px;
  margin: 0 auto 26px;
}

.card-divider.is-success {
  background: #1B78A3;
}

.card-divider.is-error {
  background: #c0392b;
}

.card-lead {
  font-size: 14.5px;
  line-height: 2;
  color: #4A4F58;
  margin: 0 0 36px;
}

.btn-primary {
  flex: 1;
  padding: 10px 40px;
  background: #16225C;
  color: #fff;
  border: none;
  border-radius: 6px;
  font-size: 15px;
  letter-spacing: 0.08em;
  cursor: pointer;
  font-family: inherit;
  transition: background 0.2s ease;
}

.btn-primary:hover {
  background: #101a48;
}

@media (max-width: 400px) {
  .card-box { padding: 44px 26px 34px; }
  .card-title { font-size: 22px; }
}

@media (max-width: 600px) {
  table.form-table td.label-cell {
    display: block;
    width: auto;
    white-space: normal;
    padding-bottom: 4px;
  }

  table.form-table td.input-cell {
    display: block;
    width: auto;
    padding-top: 0;
  }

  .pair {
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
  }

  .pair-item {
    width: 100%;
  }

  .pair-item input.mid {
    flex: 1;
    max-width: none;
  }

  input.mid {
    width: 100%;
    max-width: 280px;
  }

  select.pref {
    width: 100%;
    max-width: 280px;
  }

  /* ---- 生年月日欄：入力欄＋ラベルをセットのまま折り返し表示 ---- */
  .pair-birthday {
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    row-gap: 8px;
    column-gap: 10px;
  }

  .pair-birthday .pair-item {
    width: auto;
  }

  /* ---- 確認画面テーブルのモバイル対応 ---- */
  table.confirm-table td.label-cell {
    display: block;
    width: auto;
    white-space: normal;
    padding-bottom: 2px;
  }

  table.confirm-table td.value-cell {
    display: block;
    width: auto;
    padding-top: 0;
  }

  /* ---- 確認画面ボタンエリアのモバイル対応（縦積み・フル幅） ---- */
  .btn-area {
    flex-direction: column;
    gap: 10px;
  }

  .btn-back,
  .btn-submit {
    width: 100%;
  }
}