/* ============================================================
   全体レイアウト
============================================================ */
.page-container {
  width: 100%;
  max-width: none;
  margin: 0;
  padding: 0 24px;
  font-family: "Segoe UI", "Hiragino Sans", sans-serif;
  line-height: 1.6;
}

/* ============================================================
   ページタイトル行（登録情報 + タブグループ + 出力 + クリア）
============================================================ */
.page-header {
  display: flex;
  align-items: center;
  gap: 1.2em;
  margin-bottom: 1.5em;
}

.header-right {
  display: flex;
  align-items: center;
  gap: 1em;
}

/* ============================================================
   タブグループ（ブロック表示 / 表で表示）
============================================================ */
.tab-group {
  display: flex;
  border: 1px solid #ccc;
  border-radius: 6px;
  overflow: hidden;
  background: #f7f7f7;
}

.tab-group .view-tab {
  padding: 0.4em 1em;
  border: none;
  background: #f0f0f0;
  cursor: pointer;
  font-size: 0.85em;
}

.tab-group .view-tab + .view-tab {
  border-left: 1px solid #ccc;
}

.tab-group .view-tab.active {
  background: #fff;
  font-weight: bold;
  border-bottom: 2px solid #0078d4;
}

/* ============================================================
   ボタン類
============================================================ */
.btn-clear {
  padding: 0.3em 0.8em;
  font-size: 0.8em;
  color: #fff;
  background-color: #d9534f;
  border: none;
  border-radius: 4px;
  cursor: pointer;
}
.btn-clear:hover {
  background-color: #c9302c;
}

.action-btn {
  padding: 0.2em 0.6em;
  font-size: 0.8em;
  border: 1px solid #ccc;
  background: #f0f0f0;
  border-radius: 4px;
  cursor: pointer;
}

.edit-btn {
  display: inline-block;
  padding: 0.2em 0.6em;
  font-size: 0.8em;
  color: #fff;
  background-color: #0078d4;
  border-radius: 4px;
  text-decoration: none;
}
.edit-btn:hover {
  background-color: #005a9e;
}

/* ============================================================
   ドロップダウン
============================================================ */
.dropdown {
  position: relative;
  display: inline-block;
}
.dropdown-content {
  display: none;
  position: absolute;
  right: 0;
  background-color: #fff;
  min-width: 120px;
  border: 1px solid #ccc;
  border-radius: 4px;
  z-index: 1;
}
.dropdown-content a {
  display: block;
  padding: 0.4em 0.8em;
  font-size: 0.8em;
  text-decoration: none;
  color: #333;
}
.dropdown-content a:hover {
  background-color: #f0f0f0;
}
.dropdown.open .dropdown-content {
  display: block;
}

/* ============================================================
   セクション（ブロック表示）
============================================================ */
section {
  margin-bottom: 2em;
  padding: 1em;
  border: 1px solid #ccc;
  border-radius: 6px;
  background: #f9f9f9;
}

/* ブロック表示のセクションだけ中央寄せ（幅720px） */
#blockView section {
  max-width: 720px;
  margin: 0 auto 2em;
}

/* セクションヘッダー */
.section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.header-actions {
  display: flex;
  gap: 0.5em;
}

/* ============================================================
   テーブル（ブロック表示）
============================================================ */
.profile-table {
  width: 100%;
  border-collapse: collapse;
}
.profile-table th {
  text-align: left;
  width: 25%;
  padding: 0.5em;
  color: #333;
  font-weight: normal;
  background: #f0f0f0;
  border-bottom: 1px solid #ddd;
}
.profile-table td {
  padding: 0.5em;
  border-bottom: 1px solid #ddd;
}

/* ============================================================
   自由記述欄
============================================================ */
#profile-work-selfPromotion,
#profile-business-selfPromotion,
#profile-business-summary {
  padding: 0.5em;
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 4px;
  min-height: 3em;
}

#profile-business-summary {
  margin-bottom: 1.5em;
}

/* ============================================================
   タブ（編年式 / キャリア式）
============================================================ */
.tab-buttons {
  display: flex;
  gap: 1em;
  margin-bottom: 1em;
}
.tab-button {
  padding: 0.5em 1em;
  border: 1px solid #ccc;
  background: #f0f0f0;
  cursor: pointer;
  border-radius: 4px 4px 0 0;
}
.tab-button.active {
  background: #fff;
  border-bottom: 1px solid #fff;
  font-weight: bold;
}
.tab-content {
  display: none;
  border: 1px solid #ccc;
  border-top: none;
  padding: 1em;
  background: #fff;
}
.tab-content.active {
  display: block;
}

/* ============================================================
   プロジェクトブロック
============================================================ */
.project-block {
  margin-bottom: 1em;
  padding: 1em;
  border: 1px solid #ccc;
  border-radius: 6px;
  background: #fff;
}
.project-block h4 {
  margin-top: 0;
  margin-bottom: 0.5em;
  font-size: 1em;
  color: #333;
}

/* ============================================================
   ログアウト
============================================================ */
.logout-container {
  text-align: center;
  margin-top: 2em;
}
.logout-btn {
  padding: 0.5em 1.2em;
  font-size: 1em;
  color: #fff;
  background-color: #d9534f;
  border: none;
  border-radius: 4px;
  cursor: pointer;
}
.logout-btn:hover {
  background-color: #c9302c;
}

/* ============================================================
   ビュー切り替え（ブロック表示 / 表ビュー）
============================================================ */
.view-content {
  display: none;
}
.view-content.active {
  display: block;
}

/* ============================================================
   表ビュー：職務経歴のスキル＋PR 横長ブロック
============================================================ */
.work-info-block {
  margin-top: 1.5em;
  padding: 1em 1.2em;
  border: 1px solid #ccc;
  background: #fff;
  border-radius: 6px;
  line-height: 1.6;
  max-width: 100%;
}

.work-info-block h3 {
  margin-top: 0;
  margin-bottom: 0.5em;
  font-size: 1em;
  color: #333;
}

.work-info-block div {
  white-space: pre-line;
}

/* ============================================================
   役職カード（表の中に複数入る）
============================================================ */
.position-cell {
  display: flex;
  flex-direction: column;
  gap: 0.5em;
}

.position-card {
  position: relative;
  padding: 0.5em;
  border: 1px solid #ccc;
  background: #fafafa;
  border-radius: 4px;
  font-size: 0.85em;
  line-height: 1.4;
  max-width: 180px;
  cursor: default;
}

.pos-dept,
.pos-title {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.pos-period {
  white-space: nowrap;
  opacity: 0.8;
}

.pos-tooltip {
  display: none;
  position: absolute;
  top: 0;
  left: 190px;
  padding: 0.6em;
  background: #fff;
  border: 1px solid #aaa;
  border-radius: 4px;
  white-space: pre-line;
  z-index: 10;
  width: max-content;
  max-width: 300px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.2);
}

.position-card:hover .pos-tooltip {
  display: block;
}

/* ============================================================
   職務経歴（編年式）列ごとの最大幅（employment-table のみ）
============================================================ */
.employment-table td:nth-child(1),
.employment-table th:nth-child(1) {
  max-width: 180px;
}

.employment-table td:nth-child(2),
.employment-table th:nth-child(2) {
  max-width: 160px;
}

.employment-table td:nth-child(3),
.employment-table th:nth-child(3) {
  max-width: 120px;
}

.employment-table td:nth-child(4),
.employment-table th:nth-child(4) {
  max-width: 130px;
  white-space: nowrap;
}

.employment-table td:nth-child(5),
.employment-table th:nth-child(5) {
  max-width: 160px;
}

.employment-table td:nth-child(6),
.employment-table th:nth-child(6) {
  max-width: 220px;
}

.employment-table td:nth-child(7),
.employment-table th:nth-child(7) {
  max-width: 180px;
}

/* ============================================================
   資本金＋従業員数（縦並び）
============================================================ */
.capital-emp-cell {
  display: flex;
  flex-direction: column;
  gap: 0.2em;
}

/* ============================================================
   表ブロック横スクロール（編年式・キャリア式・業務経歴 共通）
============================================================ */
.scroll-block {
  overflow-x: auto;
  overflow-y: visible;
  width: 100%;
  padding-bottom: 0.5em;
}

.scroll-block table {
  min-width: 900px;
  table-layout: fixed;
}

/* ============================================================
   スキル＋PR（軽い整形）
============================================================ */
.extra-skill-list {
  display: flex;
  flex-direction: column;
  gap: 0.3em;
}

.skill-item {
  padding: 0.2em 0;
}

.extra-pr-text {
  white-space: pre-line;
}



.detail-cell {
  position: relative;
  white-space: normal;
  word-break: break-word;
  overflow-wrap: break-word;
}

.detail-tooltip {
  position: absolute;
  max-width: 320px;
  padding: 10px;
  background: #fff;
  border: 1px solid #ccc;
  border-radius: 6px;
  white-space: normal;
  word-break: break-word;
  box-shadow: 0 2px 8px rgba(0,0,0,0.15);
  z-index: 999999;
  display: none;
}

.detail-cell:hover .detail-tooltip {
  display: block;
}

/* データソースバッジのスタイル */
.status-badge {
  padding: 5px 15px;
  border-radius: 20px;
  font-size: 0.85em;
  font-weight: bold;
  display: inline-block;
  vertical-align: middle;
}
.status-aws {
  background-color: #dcfce7;
  color: #166534;
  border: 1px solid #bbf7d0;
}
.status-local {
  background-color: #ffedd5;
  color: #9a3412;
  border: 1px solid #fed7aa;
}