/**
 * portal_modern.css - 講師ポータル (登録・認証・マイページ) モダンUI/UXスタイルシート
 * 全画面完全レスポンシブ & スマホ最適化
 */

:root {
  --pm-primary: #0284c7;
  --pm-primary-hover: #0369a1;
  --pm-primary-dark: #075985;
  --pm-accent: #20c997;
  --pm-bg-light: #f8fafc;
  --pm-border: #cbd5e1;
  --pm-border-focus: #38bdf8;
  --pm-text-main: #1e293b;
  --pm-text-muted: #64748b;
  --pm-danger: #ef4444;
  --pm-danger-bg: #fef2f2;
  --pm-danger-border: #fecaca;
  --pm-warning-bg: #fffbeb;
  --pm-warning-border: #fef3c7;
  --pm-warning-text: #92400e;
}

/* メインコンテナ・カード */
.pm-card {
  background: #ffffff;
  border-radius: 12px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
  border: 1px solid #e2e8f0;
  padding: 32px 28px;
  margin: 20px auto;
  max-width: 580px;
  box-sizing: border-box;
}

@media (max-width: 640px) {
  .pm-card {
    padding: 24px 18px;
    margin: 12px 10px;
    border-radius: 10px;
  }
}

/* ヘッダータイトル */
.pm-title {
  font-size: 22px;
  font-weight: 700;
  color: var(--pm-text-main);
  text-align: center;
  margin: 0 0 8px 0;
  letter-spacing: -0.02em;
}

.pm-subtitle {
  font-size: 14px;
  color: var(--pm-text-muted);
  text-align: center;
  margin: 0 0 24px 0;
  line-height: 1.5;
}

/* サブリンク群 (ログイン・登録切り替え) */
.pm-links {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 20px;
  padding-bottom: 12px;
  border-bottom: 1px dashed #e2e8f0;
}
.pm-link-item {
  font-size: 13px;
  color: var(--pm-primary);
  text-decoration: none;
  font-weight: 500;
  transition: color 0.15s;
}
.pm-link-item:hover {
  color: var(--pm-primary-hover);
  text-decoration: underline;
}

/* フォームフィールド */
.pm-group {
  margin-bottom: 20px;
  text-align: left !important;
}
.pm-label {
  display: block;
  font-size: 14px;
  font-weight: 600;
  color: var(--pm-text-main);
  margin-bottom: 6px;
  text-align: left !important;
}
.pm-label .pm-req {
  display: inline-block;
  background: #ef4444;
  color: #ffffff;
  font-size: 11px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 4px;
  margin-left: 6px;
  vertical-align: middle;
}

/* 入力インプット (iOSズーム防止 16px) */
.pm-input {
  width: 100% !important;
  height: 48px !important;
  font-size: 16px !important;
  padding: 10px 14px !important;
  border: 1.5px solid var(--pm-border) !important;
  border-radius: 8px !important;
  background-color: var(--pm-bg-light) !important;
  color: var(--pm-text-main) !important;
  box-sizing: border-box !important;
  transition: all 0.2s ease !important;
}
.pm-input:focus {
  outline: none !important;
  border-color: var(--pm-primary) !important;
  background-color: #ffffff !important;
  box-shadow: 0 0 0 3px rgba(2, 132, 199, 0.15) !important;
}

/* ボタン */
.pm-btn,
a.pm-btn,
a.pm-btn:link,
a.pm-btn:visited,
a.pm-btn:hover,
a.pm-btn:active {
  width: 100%;
  height: 52px;
  background: linear-gradient(135deg, #0284c7 0%, #0369a1 100%) !important;
  color: #ffffff !important;
  font-size: 17px !important;
  font-weight: 700 !important;
  text-decoration: none !important;
  border: none !important;
  border-radius: 8px !important;
  cursor: pointer !important;
  box-shadow: 0 4px 14px rgba(2, 132, 199, 0.28) !important;
  transition: all 0.2s ease !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 8px !important;
  margin-top: 24px !important;
  box-sizing: border-box !important;
}
.pm-btn span,
a.pm-btn span,
button.pm-btn span {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 6px !important;
  background: transparent !important;
  background-color: transparent !important;
  height: auto !important;
  width: auto !important;
  margin: 0 !important;
  padding: 0 !important;
  box-shadow: none !important;
  border: none !important;
  color: inherit !important;
  font-size: inherit !important;
  font-weight: inherit !important;
  line-height: inherit !important;
  pointer-events: none !important;
}
.pm-btn:hover,
a.pm-btn:hover {
  background: linear-gradient(135deg, #0369a1 0%, #075985 100%) !important;
  box-shadow: 0 6px 18px rgba(2, 132, 199, 0.35) !important;
  transform: translateY(-1px) !important;
  color: #ffffff !important;
  text-decoration: none !important;
}
.pm-btn:active,
a.pm-btn:active {
  transform: translateY(0) !important;
  color: #ffffff !important;
}

/* エラーアラート */
.pm-alert {
  background-color: var(--pm-danger-bg);
  border: 1px solid var(--pm-danger-border);
  color: var(--pm-danger);
  padding: 12px 16px;
  border-radius: 8px;
  font-size: 14px;
  margin-top: 16px;
  text-align: center;
  font-weight: 500;
}
.pm-field-error {
  color: var(--pm-danger);
  font-size: 13px;
  font-weight: 500;
  margin-top: 4px;
  display: block;
}

/* 注意喚起ボックス (高コントラスト・高視認性) */
.pm-notice {
  background-color: #fffbeb !important;
  border: 1.5px solid #fcd34d !important;
  border-left: 6px solid #f59e0b !important;
  color: #1e293b !important;
  padding: 16px 20px !important;
  border-radius: 8px !important;
  margin-top: 24px !important;
  font-size: 14px !important;
  line-height: 1.7 !important;
  box-shadow: 0 2px 8px rgba(245, 158, 11, 0.08) !important;
  text-align: left !important;
}
.pm-notice strong,
.pm-notice .pm-notice-title {
  display: inline-block !important;
  font-size: 15px !important;
  font-weight: 800 !important;
  color: #b45309 !important;
  margin-bottom: 4px !important;
}

/* モダン・ベクターステップフロー (SVG・CSS) */
.pm-step-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 28px;
  position: relative;
  padding: 0 10px;
}
.pm-step-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
  z-index: 2;
  flex: 1;
}
.pm-step-circle {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #e2e8f0;
  color: #64748b;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 700;
  margin-bottom: 6px;
  transition: all 0.3s ease;
}
.pm-step-item.active .pm-step-circle {
  background: #0284c7;
  color: #ffffff;
  box-shadow: 0 0 0 4px rgba(2, 132, 199, 0.2);
}
.pm-step-item.completed .pm-step-circle {
  background: #10b981;
  color: #ffffff;
}
.pm-step-name {
  font-size: 11px;
  color: #64748b;
  font-weight: 500;
  text-align: center;
}
.pm-step-item.active .pm-step-name {
  color: #0284c7;
  font-weight: 700;
}
.pm-step-line {
  position: absolute;
  top: 16px;
  left: 30px;
  right: 30px;
  height: 3px;
  background: #e2e8f0;
  z-index: 1;
}

@media (max-width: 420px) {
  .pm-step-name {
    font-size: 10px;
    line-height: 1.2;
    word-break: keep-all;
  }
  .pm-step-item:not(.active) .pm-step-name {
    opacity: 0.75;
  }
}

/* 安心案内ボックス (カゴ落ち防止) */
.pm-reassure-box {
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  border-radius: 10px;
  padding: 12px 14px;
  margin: 18px 0 20px 0;
  color: #166534;
  line-height: 1.5;
}
.pm-reassure-title {
  font-size: 13px;
  font-weight: 700;
  margin-bottom: 4px;
  display: flex;
  align-items: center;
  gap: 6px;
}
.pm-reassure-desc {
  font-size: 12px;
  color: #15803d;
}

/* ブラウザ標準のパスワード表示/クリアアイコンを無効化（独自トグルと競合防止） */
input[type="password"]::-ms-reveal,
input[type="password"]::-ms-clear,
input[type="text"]::-ms-reveal,
input[type="text"]::-ms-clear {
  display: none !important;
  width: 0 !important;
  height: 0 !important;
}

/* パスワード表示トグル (高視認性・ピル型モダンデザイン) */
.pm-pw-wrapper {
  position: relative !important;
  display: flex !important;
  align-items: center !important;
  width: 100% !important;
}
.pm-pw-wrapper .pm-input {
  padding-right: 86px !important; /* ボタンが重ならない十分な右余白 */
}
.pm-pw-toggle {
  position: absolute !important;
  right: 8px !important;
  top: 50% !important;
  transform: translateY(-50%) !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 5px !important;
  background: #f1f5f9 !important;
  border: 1px solid #cbd5e1 !important;
  border-radius: 6px !important;
  padding: 5px 10px !important;
  min-height: 32px !important;
  height: 32px !important;
  font-size: 12px !important;
  font-weight: 700 !important;
  color: #475569 !important;
  cursor: pointer !important;
  z-index: 10 !important;
  user-select: none !important;
  -webkit-user-select: none !important;
  transition: all 0.2s ease !important;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05) !important;
  line-height: 1 !important;
  box-sizing: border-box !important;
  white-space: nowrap !important;
}
.pm-pw-toggle:hover {
  background: #e2e8f0 !important;
  color: #0284c7 !important;
  border-color: #94a3b8 !important;
}
.pm-pw-toggle:active {
  transform: translateY(-50%) scale(0.96) !important;
  background: #cbd5e1 !important;
}
.pm-pw-toggle.is-active {
  background: #e0f2fe !important;
  color: #0284c7 !important;
  border-color: #38bdf8 !important;
  box-shadow: 0 0 0 2px rgba(2, 132, 199, 0.2) !important;
}
.pm-pw-toggle .pm-pw-icon {
  font-size: 13px !important;
  line-height: 1 !important;
  display: inline-block !important;
  pointer-events: none !important;
}
.pm-pw-toggle .pm-pw-text {
  font-size: 11px !important;
  font-weight: 700 !important;
  line-height: 1 !important;
  display: inline-block !important;
  pointer-events: none !important;
}

/* ==========================================================================
   ワイドカード (新規登録 Step 1〜5 / 管理画面フォーム用)
   ========================================================================== */
.pm-card-wide {
  background: #ffffff;
  border-radius: 12px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
  border: 1px solid #e2e8f0;
  padding: 32px 36px;
  margin: 20px auto;
  max-width: 960px;
  box-sizing: border-box;
}

@media (max-width: 768px) {
  .pm-card-wide {
    padding: 20px 14px;
    margin: 10px auto;
    border-radius: 8px;
    border-left: none;
    border-right: none;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.04);
  }
}

/* ==========================================================================
   6段階モダン・ベクターステップフロー (.pm-flow-bar)
   ========================================================================== */
.pm-flow-bar {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  list-style: none !important;
  margin: 0 0 28px 0 !important;
  padding: 12px 16px !important;
  background: #f8fafc !important;
  border: 1px solid #e2e8f0 !important;
  border-radius: 10px !important;
  gap: 6px !important;
  box-sizing: border-box !important;
}

.pm-flow-item {
  flex: 1 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  margin: 0 !important;
  padding: 0 !important;
}

.pm-flow-link {
  display: flex !important;
  align-items: center !important;
  gap: 8px !important;
  text-decoration: none !important;
  color: #64748b !important;
  font-size: 13px !important;
  font-weight: 600 !important;
  padding: 8px 12px !important;
  border-radius: 8px !important;
  transition: all 0.2s ease !important;
  white-space: nowrap !important;
}

.pm-flow-circle {
  width: 24px !important;
  height: 24px !important;
  border-radius: 50% !important;
  background: #e2e8f0 !important;
  color: #64748b !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  font-size: 11px !important;
  font-weight: 700 !important;
  flex-shrink: 0 !important;
}

.pm-flow-item.active .pm-flow-link {
  background: #0284c7 !important;
  color: #ffffff !important;
  box-shadow: 0 2px 8px rgba(2, 132, 199, 0.25) !important;
}

.pm-flow-item.active .pm-flow-circle {
  background: #ffffff !important;
  color: #0284c7 !important;
}

.pm-flow-item.complete .pm-flow-link {
  color: #0284c7 !important;
  background: #e0f2fe !important;
}

.pm-flow-item.complete .pm-flow-circle {
  background: #0284c7 !important;
  color: #ffffff !important;
}

@media (max-width: 768px) {
  .pm-flow-bar {
    display: grid !important;
    grid-template-columns: repeat(3, 1fr) !important;
    gap: 8px !important;
    padding: 10px !important;
  }
  .pm-flow-link {
    width: 100% !important;
    justify-content: center !important;
    padding: 8px 4px !important;
    font-size: 12px !important;
    gap: 5px !important;
  }
  .pm-flow-circle {
    width: 20px !important;
    height: 20px !important;
    font-size: 10px !important;
  }
}

/* ==========================================================================
   フォーム・テーブルのスマホ・レスポンシブ最適化
   ========================================================================== */
.pm-card-wide table.profile,
.pm-card-wide table.form,
table.profile,
table.station {
  width: 100% !important;
  border-collapse: collapse !important;
  margin-bottom: 20px !important;
}

@media (max-width: 768px) {
  /* スマホ時はテーブルをブロック縦並び化 */
  table.profile,
  table.profile tbody,
  table.profile tr,
  table.profile th,
  table.profile td {
    display: block !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }

  table.profile tr {
    margin-bottom: 16px !important;
    border: 1px solid #e2e8f0 !important;
    border-radius: 8px !important;
    overflow: hidden !important;
    background: #ffffff !important;
  }

  table.profile th {
    background: #f1f5f9 !important;
    color: #1e293b !important;
    font-size: 14px !important;
    font-weight: 700 !important;
    padding: 10px 14px !important;
    border: none !important;
    text-align: left !important;
  }

  table.profile td {
    padding: 14px !important;
    border: none !important;
    background: #ffffff !important;
  }

  table.profile td input[type="text"],
  table.profile td input[type="email"],
  table.profile td input[type="password"],
  table.profile td select,
  table.profile td textarea,
  dl.profile dd input[type="text"],
  dl.profile dd input[type="email"],
  dl.profile dd select,
  dl.profile dd textarea {
    font-size: 16px !important; /* iOS自動ズーム防止 */
    min-height: 42px !important;
    box-sizing: border-box !important;
  }

  dl.profile dt {
    font-size: 14px !important;
    font-weight: 700 !important;
    margin-top: 14px !important;
    margin-bottom: 6px !important;
  }

  dl.profile dd {
    margin-left: 0 !important;
    margin-bottom: 12px !important;
  }

  dl.profile dd input[type="text"],
  dl.profile dd select,
  dl.profile dd textarea {
    width: 100% !important;
    padding: 8px 12px !important;
    border: 1px solid #cbd5e1 !important;
    border-radius: 6px !important;
  }
}

/* ==========================================================================
   講師管理画面 (マイページダッシュボード) クイックアクセス・グリッド
   ========================================================================== */
.tf-dashboard-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 16px;
  margin: 20px 0;
}

@media (max-width: 640px) {
  .tf-dashboard-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
  }
}

.tf-tile {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 20px 16px;
  text-decoration: none;
  color: #1e293b;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  transition: all 0.2s ease;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.04);
}

.tf-tile:hover {
  transform: translateY(-2px);
  border-color: #0284c7;
  box-shadow: 0 6px 16px rgba(2, 132, 199, 0.12);
  color: #0284c7;
}

.tf-tile-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: #e0f2fe;
  color: #0284c7;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  margin-bottom: 12px;
  transition: all 0.2s ease;
}

.tf-tile:hover .tf-tile-icon {
  background: #0284c7;
  color: #ffffff;
}

.tf-tile-title {
  font-size: 15px;
  font-weight: 700;
  margin-bottom: 4px;
}

.tf-tile-desc {
  font-size: 12px;
  color: #64748b;
  line-height: 1.4;
}

@media (max-width: 640px) {
  .tf-tile {
    padding: 14px 10px;
    border-radius: 10px;
  }
  .tf-tile-icon {
    width: 40px;
    height: 40px;
    font-size: 18px;
    margin-bottom: 8px;
  }
  .tf-tile-title {
    font-size: 13px;
  }
  .tf-tile-desc {
    font-size: 11px;
    display: none; /* スマホではコンパクト化 */
  }
}

/* ==========================================================================
   講師管理画面 上部モバイルタブナビゲーション (.tf-nav-tabs)
   ========================================================================== */
.tf-nav-tabs-wrap {
  background: #ffffff;
  border-bottom: 1px solid #e2e8f0;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.03);
  margin-bottom: 16px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.tf-nav-tabs {
  display: flex !important;
  align-items: center !important;
  list-style: none !important;
  margin: 0 !important;
  padding: 0 8px !important;
  min-width: max-content !important;
}

.tf-nav-item {
  margin: 0 !important;
  padding: 0 !important;
}

.tf-nav-link {
  display: flex !important;
  align-items: center !important;
  gap: 6px !important;
  padding: 12px 14px !important;
  font-size: 13px !important;
  font-weight: 600 !important;
  color: #64748b !important;
  text-decoration: none !important;
  border-bottom: 3px solid transparent !important;
  transition: all 0.15s ease !important;
  white-space: nowrap !important;
}

.tf-nav-link:hover {
  color: #0284c7 !important;
}

.tf-nav-link.active {
  color: #0284c7 !important;
  border-bottom-color: #0284c7 !important;
  background: rgba(2, 132, 199, 0.04) !important;
}

/* ==========================================================================
   見出し・ボタン・フォーム要素の統一モダンデザイン
   ========================================================================== */
#main h3,
.box-form h3 {
  background: linear-gradient(135deg, #0284c7 0%, #0369a1 100%) !important;
  border-radius: 8px !important;
  color: #ffffff !important;
  font-size: 16px !important;
  font-weight: 700 !important;
  padding: 12px 18px !important;
  margin: 16px 0 20px 0 !important;
  box-shadow: 0 2px 8px rgba(2, 132, 199, 0.2) !important;
  border: none !important;
  display: flex !important;
  align-items: center !important;
}

.box-form input[type="submit"],
.box-form button[type="submit"],
#main input[type="submit"],
#main button[type="submit"],
a.button-05,
input.button-05,
p.button a,
.side-button-regist a {
  background: linear-gradient(135deg, #0284c7 0%, #0369a1 100%) !important;
  color: #ffffff !important;
  font-size: 16px !important;
  font-weight: 700 !important;
  border-radius: 8px !important;
  border: none !important;
  padding: 12px 28px !important;
  min-height: 48px !important;
  box-shadow: 0 4px 14px rgba(2, 132, 199, 0.28) !important;
  cursor: pointer !important;
  transition: all 0.2s ease !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  text-decoration: none !important;
  box-sizing: border-box !important;
  margin-left: auto !important;
  margin-right: auto !important;
}

.box-form input[type="submit"]:hover,
.box-form button[type="submit"]:hover,
#main input[type="submit"]:hover,
#main button[type="submit"]:hover,
a.button-05:hover,
input.button-05:hover {
  background: linear-gradient(135deg, #0369a1 0%, #075985 100%) !important;
  box-shadow: 0 6px 18px rgba(2, 132, 199, 0.35) !important;
  transform: translateY(-1px) !important;
}

/* 講師管理画面 カードフッター保存ボタン */
.card-footer .btn-info,
.card-footer button[type="submit"],
.card-footer input[type="submit"] {
  background: linear-gradient(135deg, #0284c7 0%, #0369a1 100%) !important;
  border: none !important;
  border-radius: 8px !important;
  font-size: 16px !important;
  font-weight: 700 !important;
  padding: 12px 32px !important;
  min-height: 46px !important;
  box-shadow: 0 4px 12px rgba(2, 132, 199, 0.25) !important;
  width: 100% !important;
  max-width: 320px !important;
  margin: 0 auto !important;
  display: block !important;
  color: #ffffff !important;
}

.card-footer .btn-info:hover,
.card-footer button[type="submit"]:hover {
  background: linear-gradient(135deg, #0369a1 0%, #075985 100%) !important;
  box-shadow: 0 6px 16px rgba(2, 132, 199, 0.35) !important;
}

/* 講師管理画面 上部スティッキータブ */
.tf-nav-tabs-wrap {
  position: relative !important;
  width: 100% !important;
  overflow-x: auto !important;
  -webkit-overflow-scrolling: touch !important;
}

/* ==========================================================================
   講師管理画面 ナビゲーションバー＆コンテンツ余白（上部潜り込み完全防止）
   ========================================================================== */
/* PC表示（992px以上）: ナビバー＋ピルタブの高さ（約80〜95px）を確実に確保 */
body.layout-navbar-fixed .wrapper .content-wrapper,
.layout-navbar-fixed .content-wrapper,
.content-wrapper {
  padding-top: 105px !important;
}
.content-wrapper > .content {
  padding-top: 15px !important;
}

/* モバイル表示（768px以下）: ナビバー＋タブバー余白を確保 */
@media (max-width: 768px) {
  body.layout-navbar-fixed .wrapper .content-wrapper,
  .layout-navbar-fixed .content-wrapper,
  .content-wrapper {
    padding-top: 120px !important;
  }
  .content-wrapper > .content {
    padding-top: 10px !important;
  }
  .card-header .card-title {
    font-size: 16px !important;
  }
}

/* ナビバー内のタブバー（ピル型デザイン） */
.main-header .tf-nav-tabs-wrap {
  background: transparent !important;
  border-bottom: none !important;
  box-shadow: none !important;
  margin: 0 !important;
  padding: 0 !important;
  width: 100% !important;
  overflow-x: auto !important;
  -webkit-overflow-scrolling: touch !important;
}

.main-header .tf-nav-tabs {
  display: flex !important;
  align-items: center !important;
  list-style: none !important;
  margin: 0 !important;
  padding: 4px 8px !important;
  gap: 4px !important;
  min-width: max-content !important;
}

.main-header .tf-nav-item {
  margin: 0 !important;
  padding: 0 !important;
}

.main-header .tf-nav-link {
  display: flex !important;
  align-items: center !important;
  gap: 6px !important;
  padding: 6px 12px !important;
  font-size: 13px !important;
  font-weight: 600 !important;
  color: #475569 !important;
  text-decoration: none !important;
  border-radius: 6px !important;
  border: 1px solid transparent !important;
  background: transparent !important;
  transition: all 0.15s ease !important;
  white-space: nowrap !important;
}

.main-header .tf-nav-link:hover {
  background: #f1f5f9 !important;
  color: #0284c7 !important;
}

.main-header .tf-nav-link.active {
  background: #e0f2fe !important;
  color: #0284c7 !important;
  border-color: #bae6fd !important;
  font-weight: 700 !important;
}

/* ==========================================================================
   写真アップロード モダンカードグリッド (.tf-photo-grid / .reg-photo-grid)
   ========================================================================== */
.tf-photo-grid {
  display: grid !important;
  grid-template-columns: repeat(4, 1fr) !important;
  gap: 16px !important;
  margin: 16px 0 !important;
  padding: 0 !important;
}

@media (max-width: 991px) {
  .tf-photo-grid {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 12px !important;
  }
}

.tf-photo-card {
  background: #ffffff !important;
  border: 1.5px solid #e2e8f0 !important;
  border-radius: 10px !important;
  padding: 12px !important;
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  text-align: center !important;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.03) !important;
  transition: border-color 0.2s ease !important;
}

.tf-photo-card.is-main {
  border-color: #0284c7 !important;
  background: #f0f9ff !important;
}

.tf-photo-badge {
  font-size: 12px !important;
  font-weight: 700 !important;
  padding: 3px 8px !important;
  border-radius: 4px !important;
  margin-bottom: 8px !important;
  display: inline-block !important;
  background: #f1f5f9 !important;
  color: #475569 !important;
}

.tf-photo-badge.must {
  background: #fee2e2 !important;
  color: #ef4444 !important;
}

.tf-photo-badge.main-badge {
  background: #0284c7 !important;
  color: #ffffff !important;
}

.tf-photo-thumb-wrap {
  width: 100% !important;
  max-width: 140px !important;
  aspect-ratio: 3 / 4 !important;
  background: #f8fafc !important;
  border: 1px dashed #cbd5e1 !important;
  border-radius: 6px !important;
  overflow: hidden !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  margin-bottom: 10px !important;
}

.tf-photo-thumb {
  width: 100% !important;
  height: 100% !important;
  object-fit: cover !important;
  display: block !important;
}

.tf-photo-thumb.no-image {
  opacity: 0.4 !important;
}

.tf-photo-actions {
  display: flex !important;
  flex-direction: column !important;
  gap: 6px !important;
  width: 100% !important;
}

.tf-btn-trim {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 4px !important;
  background: #0284c7 !important;
  color: #ffffff !important;
  font-size: 12px !important;
  font-weight: 600 !important;
  padding: 6px 10px !important;
  border-radius: 6px !important;
  text-decoration: none !important;
  transition: background 0.15s ease !important;
}

.tf-btn-trim:hover {
  background: #0369a1 !important;
  color: #ffffff !important;
}

.tf-btn-select {
  position: relative !important;
  overflow: hidden !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  background: #f1f5f9 !important;
  color: #334155 !important;
  border: 1px solid #cbd5e1 !important;
  border-radius: 6px !important;
  padding: 6px 10px !important;
  font-size: 12px !important;
  font-weight: 600 !important;
  cursor: pointer !important;
}

.tf-btn-select input[type="file"] {
  position: absolute !important;
  top: 0 !important;
  right: 0 !important;
  min-width: 100% !important;
  min-height: 100% !important;
  font-size: 100px !important;
  text-align: right !important;
  opacity: 0 !important;
  outline: none !important;
  cursor: pointer !important;
  display: block !important;
}

.tf-btn-del {
  background: transparent !important;
  color: #ef4444 !important;
  border: 1px solid #fecaca !important;
  border-radius: 6px !important;
  padding: 4px 8px !important;
  font-size: 11px !important;
  font-weight: 600 !important;
  cursor: pointer !important;
  transition: all 0.15s ease !important;
}

.tf-btn-del:hover {
  background: #fef2f2 !important;
}

/* ボタンの文字見切れ・不要な折り返し防止 */
#form_assist_submit_btn,
.box-form input[type="submit"],
.box-form button[type="submit"],
#main button[type="submit"],
#main input[type="submit"],
button.button,
button.button-03,
button.button-02,
button.button-04,
button.button-05,
a.button-05,
.pm-btn {
  white-space: nowrap !important;
  line-height: 1.3 !important;
  padding: 10px 24px !important;
}

/* ==========================================================================
   各ページ下部アクションボタンの完全センタリング (PC & スマホ共通)
   ========================================================================== */
/* フォーム親コンテナのセンタリング基盤 */
#main form[name="form"],
.block-form form,
.box-form form,
.pm-card form,
.pm-card-wide form {
  text-align: center !important;
}

/* フォーム内の通常コンテンツ（テキスト・テーブル・リスト等）は左揃えを維持 */
#main form[name="form"] > p,
#main form[name="form"] > div:not(.pm-btn-wrap):not(.btn-group):not(.button-wrap),
#main form[name="form"] > table,
.block-form form > p,
.block-form form > div:not(.pm-btn-wrap):not(.btn-group):not(.button-wrap),
.block-form form > table,
.block-form form > ul,
.box-form form > p,
.box-form form > table {
  text-align: left !important;
}

/* 各種アクションボタン（次へ、保存、申請等）の強制中央揃え (PC & スマホ共通) */
button.button,
button.button-03,
button.button-02,
button.button-04,
button.button-05,
button[type="submit"],
input[type="submit"],
a.button-05,
a.button,
img.button,
img.button-no,
.button-05,
.button-no,
.card-footer button[type="submit"],
.card-footer input[type="submit"],
.card-footer .btn-info,
a.pm-btn,
button.pm-btn,
.pm-btn {
  display: flex !important;
  margin-left: auto !important;
  margin-right: auto !important;
  float: none !important;
  justify-content: center !important;
  align-items: center !important;
  text-align: center !important;
  box-sizing: border-box !important;
  text-indent: 0 !important;
  overflow: visible !important;
}

/* プライマリアクションボタン（次へ、保存する、申請する）のスタイル統一 */
button.button,
button.button-03,
button.button-02,
button.button-04,
.pm-card-wide button.button,
.pm-card-wide button.button-03,
.pm-card button.button,
.block-form button,
.block-form button.button,
.box-form button[type="submit"],
#main button[type="submit"] {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  background: linear-gradient(135deg, #0284c7 0%, #0369a1 100%) !important;
  color: #ffffff !important;
  font-size: 16px !important;
  font-weight: 700 !important;
  border-radius: 8px !important;
  border: none !important;
  padding: 12px 36px !important;
  min-height: 48px !important;
  min-width: 220px !important;
  max-width: 380px !important;
  width: 100% !important;
  box-shadow: 0 4px 14px rgba(2, 132, 199, 0.28) !important;
  cursor: pointer !important;
  transition: all 0.2s ease !important;
  margin: 28px auto 16px auto !important;
}

button.button:hover,
button.button-03:hover,
.pm-card-wide button.button:hover,
.pm-card-wide button.button-03:hover,
.block-form button:hover,
.block-form button.button:hover {
  background: linear-gradient(135deg, #0369a1 0%, #075985 100%) !important;
  box-shadow: 0 6px 18px rgba(2, 132, 199, 0.35) !important;
  transform: translateY(-1px) !important;
}

/* セカンダリアクションボタン（本登録申請ページへ移動する、無効ボタン） */
a.button-05,
.button-05,
#main a.button-05,
.block-form a.button-05,
.pm-card-wide a.button-05 {
  background: #ffffff !important;
  color: #0284c7 !important;
  border: 1.5px solid #0284c7 !important;
  font-size: 15px !important;
  font-weight: 700 !important;
  border-radius: 8px !important;
  padding: 10px 24px !important;
  min-height: 44px !important;
  min-width: 200px !important;
  max-width: 340px !important;
  width: 100% !important;
  margin-top: 10px !important;
  margin-bottom: 24px !important;
  transition: all 0.2s ease !important;
}

a.button-05:hover,
.button-05:hover,
#main a.button-05:hover,
.block-form a.button-05:hover,
.pm-card-wide a.button-05:hover {
  background: #f0f9ff !important;
  border-color: #0369a1 !important;
  color: #0369a1 !important;
  transform: translateY(-1px) !important;
}

img.button-no,
.button-no,
#main img.button-no,
.block-form img.button-no,
.pm-card-wide img.button-no {
  margin-top: 10px !important;
  margin-bottom: 24px !important;
  opacity: 0.6 !important;
}




