/* ========================================
   サブスクの窓口 Invest - オーナー専用管理画面
   共通スタイル（白基調 + 紺/青アクセント）
   PC 1280px以上想定
   ======================================== */

/* ---------- リセット ---------- */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html, body {
  font-family: -apple-system, BlinkMacSystemFont, "Hiragino Kaku Gothic ProN",
               "Hiragino Sans", "Yu Gothic UI", "Meiryo", sans-serif;
  font-size: 14px;
  line-height: 1.6;
  color: #333;
  background-color: #f5f7fa;
  min-width: 1280px;
}

/* ---------- 上部識別ストライプ（Admin/メーカー画面と同じ 4px の帯に合わせる） ---------- */
body {
  padding-top: 4px;
}

.invest-topstrip {
  height: 4px;
  background: linear-gradient(90deg, #0a2540 0%, #14375f 40%, #1565c0 70%, #4fc3f7 100%);
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 400;
}

a {
  color: #0a4d8c;
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

table {
  border-collapse: collapse;
  width: 100%;
}

/* ---------- ヘッダー ---------- */
.header {
  background: linear-gradient(180deg, #0a2540 0%, #14375f 100%);
  color: #fff;
  height: 60px;
  display: flex;
  align-items: center;
  padding: 0 clamp(16px, 2vw, 32px);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  position: sticky;
  top: 4px; /* 上部4px帯(.invest-topstrip)の下に貼り付く */
  z-index: 100;
}

.header-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  padding-right: 24px;
  border-right: 1px solid rgba(255, 255, 255, 0.12);
  margin-right: 16px;
  flex-shrink: 0;
  text-decoration: none;
}

.header-logo:hover {
  text-decoration: none;
}

.header-logo-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: 4px;
  background: #4fc3f7;
  flex-shrink: 0;
}

.header-logo-text {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}

.header-logo-main {
  font-size: 14px;
  font-weight: 700;
  color: #fff;
  white-space: nowrap;
}

.header-logo-sub {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.12em;
  color: #4fc3f7;
}

.header-nav {
  display: flex;
  height: 60px;
  flex: 1;
  gap: 2px;
}

.header-nav a {
  display: flex;
  align-items: center;
  padding: 0 14px;
  color: #cfd8e3;
  font-size: 14px;
  font-weight: 500;
  border-bottom: 3px solid transparent;
  transition: all 0.2s;
  text-decoration: none;
}

.header-nav a:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.05);
}

.header-nav a.active {
  color: #fff;
  border-bottom-color: #4fc3f7;
  background: rgba(79, 195, 247, 0.08);
}

.header-user {
  display: flex;
  align-items: center;
  gap: 16px;
  font-size: 13px;
}

.header-user-name {
  color: #fff;
}

.header-user-name .badge {
  display: inline-block;
  padding: 2px 8px;
  background: #1565c0;
  color: #fff;
  font-size: 11px;
  border-radius: 3px;
  margin-left: 6px;
}

.header-logout {
  color: #cfd8e3;
  padding: 6px 14px;
  border: 1px solid #4a5b75;
  border-radius: 4px;
  font-size: 12px;
  text-decoration: none;
  transition: all 0.2s;
}

.header-logout:hover {
  background: rgba(255, 255, 255, 0.1);
  text-decoration: none;
}

/* ---------- メインレイアウト ---------- */
.main-wrapper {
  max-width: 1440px;
  margin: 0 auto;
  padding: 24px 32px;
}

.page-title {
  font-size: 22px;
  font-weight: 600;
  color: #0a2540;
  margin-bottom: 20px;
  padding-bottom: 12px;
  border-bottom: 2px solid #0a4d8c;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.page-title-sub {
  font-size: 13px;
  color: #6b7c93;
  font-weight: normal;
}

.breadcrumb {
  font-size: 12px;
  color: #6b7c93;
  margin-bottom: 12px;
}

.breadcrumb a {
  color: #6b7c93;
}

.breadcrumb-sep {
  margin: 0 8px;
  color: #b0bec5;
}

/* ---------- カード ---------- */
.card {
  background: #fff;
  border: 1px solid #e0e6ed;
  border-radius: 6px;
  padding: 20px 24px;
  box-shadow: 0 1px 2px rgba(10, 37, 64, 0.04);
}

.card-title {
  font-size: 15px;
  font-weight: 600;
  color: #0a2540;
  padding-bottom: 12px;
  margin-bottom: 16px;
  border-bottom: 1px solid #e0e6ed;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.card-title-action {
  font-size: 12px;
  font-weight: normal;
}

/* ---------- ダッシュボード KPI セクション ---------- */
.kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 24px;
}

.kpi-card {
  background: #fff;
  border: 1px solid #e0e6ed;
  border-radius: 6px;
  padding: 18px 20px;
  box-shadow: 0 1px 2px rgba(10, 37, 64, 0.04);
}

.kpi-card.kpi-primary {
  background: linear-gradient(135deg, #0a4d8c 0%, #1565c0 100%);
  color: #fff;
  border-color: #0a4d8c;
}

.kpi-label {
  font-size: 12px;
  color: #6b7c93;
  margin-bottom: 8px;
  font-weight: 500;
}

.kpi-primary .kpi-label {
  color: rgba(255, 255, 255, 0.85);
}

.kpi-value {
  font-size: 26px;
  font-weight: 700;
  color: #0a2540;
  font-family: "Roboto Mono", Consolas, monospace;
  letter-spacing: -0.5px;
}

.kpi-primary .kpi-value {
  color: #fff;
}

.kpi-unit {
  font-size: 14px;
  font-weight: 500;
  margin-left: 4px;
  color: #6b7c93;
}

.kpi-primary .kpi-unit {
  color: rgba(255, 255, 255, 0.85);
}

.kpi-sub {
  font-size: 11px;
  color: #6b7c93;
  margin-top: 6px;
}

.kpi-primary .kpi-sub {
  color: rgba(255, 255, 255, 0.75);
}

/* ---------- グラフセクション ---------- */
.chart-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 16px;
  margin-bottom: 24px;
}

.chart-grid-3 {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 16px;
  margin-bottom: 24px;
}

.chart-wrapper {
  position: relative;
  height: 260px;
}

.chart-wrapper-small {
  position: relative;
  height: 220px;
}

/* ---------- テーブル ---------- */
.data-table {
  width: 100%;
  font-size: 13px;
}

.data-table th {
  background: #f0f4f8;
  color: #0a2540;
  font-weight: 600;
  text-align: left;
  padding: 10px 12px;
  border-bottom: 2px solid #c5d3e0;
  font-size: 12px;
  letter-spacing: 0.5px;
}

.data-table td {
  padding: 12px;
  border-bottom: 1px solid #e0e6ed;
  vertical-align: middle;
}

.data-table tbody tr:hover {
  background: #f8fafc;
  cursor: pointer;
}

.data-table .text-right {
  text-align: right;
}

.data-table .text-center {
  text-align: center;
}

.data-table .num {
  font-family: "Roboto Mono", Consolas, monospace;
  font-weight: 600;
  color: #0a2540;
}

.data-table .num-positive {
  color: #2e7d32;
}

/* ---------- バッジ ---------- */
.badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 12px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.3px;
}

.badge-active {
  background: #e8f5e9;
  color: #2e7d32;
  border: 1px solid #a5d6a7;
}

.badge-pending {
  background: #fff3e0;
  color: #ef6c00;
  border: 1px solid #ffcc80;
}

.badge-complete {
  background: #eceff1;
  color: #546e7a;
  border: 1px solid #b0bec5;
}

.badge-info {
  background: #e3f2fd;
  color: #1565c0;
  border: 1px solid #90caf9;
}

/* ---------- ボタン ---------- */
.btn {
  display: inline-block;
  padding: 8px 18px;
  font-size: 13px;
  font-weight: 600;
  border-radius: 4px;
  text-decoration: none;
  cursor: pointer;
  border: 1px solid transparent;
  transition: all 0.2s;
  font-family: inherit;
}

.btn-primary {
  background: #0a4d8c;
  color: #fff;
}

.btn-primary:hover {
  background: #083d70;
  text-decoration: none;
}

.btn-outline {
  background: #fff;
  color: #0a4d8c;
  border-color: #0a4d8c;
}

.btn-outline:hover {
  background: #f0f6fc;
  text-decoration: none;
}

.btn-small {
  padding: 5px 12px;
  font-size: 12px;
}

/* ---------- お知らせリスト（ダッシュボード用） ---------- */
.notice-list {
  list-style: none;
}

.notice-list li {
  padding: 12px 0;
  border-bottom: 1px dashed #e0e6ed;
  display: grid;
  grid-template-columns: 90px 80px 1fr;
  gap: 12px;
  align-items: center;
  font-size: 13px;
}

.notice-list li:last-child {
  border-bottom: none;
}

.notice-date {
  color: #6b7c93;
  font-size: 12px;
  font-family: "Roboto Mono", Consolas, monospace;
}

.notice-list a {
  color: #333;
}

.notice-list a:hover {
  color: #0a4d8c;
}

/* ---------- ログイン画面 ---------- */
.login-wrapper {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #0a2540 0%, #14375f 50%, #1565c0 100%);
}

.login-box {
  background: #fff;
  width: 420px;
  padding: 40px;
  border-radius: 8px;
  box-shadow: 0 8px 32px rgba(10, 37, 64, 0.3);
}

.login-logo {
  text-align: center;
  margin-bottom: 28px;
}

.login-logo .brand {
  font-size: 22px;
  font-weight: 700;
  color: #0a2540;
  letter-spacing: 0.5px;
}

.login-logo .brand .mark {
  color: #1565c0;
}

.login-logo .subtitle {
  font-size: 12px;
  color: #6b7c93;
  margin-top: 6px;
  letter-spacing: 1px;
}

.login-form-group {
  margin-bottom: 18px;
}

.login-form-group label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: #0a2540;
  margin-bottom: 6px;
}

.login-form-group input {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #c5d3e0;
  border-radius: 4px;
  font-size: 14px;
  font-family: inherit;
}

.login-form-group input:focus {
  outline: none;
  border-color: #1565c0;
  box-shadow: 0 0 0 3px rgba(21, 101, 192, 0.15);
}

.login-form-options {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  font-size: 12px;
}

.login-form-options label {
  display: flex;
  align-items: center;
  gap: 6px;
  color: #4a5b75;
  cursor: pointer;
}

.login-btn {
  width: 100%;
  padding: 12px;
  background: #0a4d8c;
  color: #fff;
  border: none;
  border-radius: 4px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  transition: background 0.2s;
}

.login-btn:hover {
  background: #083d70;
}

.login-footer {
  text-align: center;
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid #e0e6ed;
  font-size: 12px;
  color: #6b7c93;
}

/* ---------- フッター ---------- */
.footer {
  margin-top: 48px;
  padding: 20px 32px;
  border-top: 1px solid #e0e6ed;
  text-align: center;
  font-size: 11px;
  color: #6b7c93;
  background: #fff;
}

.footer-links {
  margin-bottom: 8px;
}

.footer-links a {
  color: #6b7c93;
  margin: 0 10px;
}

/* ---------- 詳細画面の Description List ---------- */
.dl-list {
  display: grid;
  grid-template-columns: 160px 1fr;
  gap: 0;
  font-size: 13px;
}

.dl-list dt {
  background: #f0f4f8;
  padding: 12px 16px;
  font-weight: 600;
  color: #0a2540;
  border-bottom: 1px solid #e0e6ed;
}

.dl-list dd {
  padding: 12px 16px;
  border-bottom: 1px solid #e0e6ed;
  color: #333;
}

.dl-list dt:last-of-type,
.dl-list dd:last-of-type {
  border-bottom: none;
}

/* ---------- 2カラム グリッド ---------- */
.grid-2col {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 16px;
  margin-bottom: 24px;
}

.grid-1-1 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 24px;
}

/* ---------- FAQ ---------- */
.faq-item {
  border-bottom: 1px solid #e0e6ed;
  padding: 16px 0;
}

.faq-item:last-child {
  border-bottom: none;
}

.faq-question {
  font-size: 14px;
  font-weight: 600;
  color: #0a2540;
  margin-bottom: 10px;
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.faq-question::before {
  content: "Q.";
  color: #1565c0;
  font-weight: 700;
  font-size: 15px;
  flex-shrink: 0;
}

.faq-answer {
  font-size: 13px;
  color: #4a5b75;
  line-height: 1.8;
  padding-left: 26px;
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.faq-answer::before {
  content: "A.";
  color: #6b7c93;
  font-weight: 700;
  font-size: 14px;
  flex-shrink: 0;
  margin-left: -26px;
}

.faq-category {
  font-size: 11px;
  background: #e3f2fd;
  color: #1565c0;
  padding: 3px 10px;
  border-radius: 3px;
  margin-bottom: 16px;
  display: inline-block;
  font-weight: 600;
}

/* ---------- お知らせ詳細 ---------- */
.notice-detail-header {
  border-bottom: 2px solid #0a4d8c;
  padding-bottom: 16px;
  margin-bottom: 20px;
}

.notice-detail-meta {
  display: flex;
  gap: 12px;
  font-size: 12px;
  color: #6b7c93;
  margin-bottom: 10px;
  align-items: center;
}

.notice-detail-title {
  font-size: 18px;
  font-weight: 600;
  color: #0a2540;
}

.notice-detail-body {
  font-size: 13px;
  line-height: 1.9;
  color: #333;
}

.notice-detail-body p {
  margin-bottom: 14px;
}

/* ---------- アカウント情報 ---------- */
.account-section {
  margin-bottom: 24px;
}

.account-section-title {
  font-size: 13px;
  font-weight: 600;
  color: #6b7c93;
  margin-bottom: 10px;
  text-transform: uppercase;
  letter-spacing: 1px;
}

/* ---------- 契約書類 ---------- */
.contract-row {
  display: grid;
  grid-template-columns: 100px 1fr 140px 120px;
  gap: 12px;
  padding: 14px 12px;
  border-bottom: 1px solid #e0e6ed;
  align-items: center;
  font-size: 13px;
}

.contract-row:last-child {
  border-bottom: none;
}

.contract-row:hover {
  background: #f8fafc;
}

.contract-id {
  font-family: "Roboto Mono", Consolas, monospace;
  font-size: 12px;
  color: #6b7c93;
}

.contract-name {
  font-weight: 600;
  color: #0a2540;
}

.contract-name-sub {
  font-size: 11px;
  color: #6b7c93;
  font-weight: normal;
  margin-top: 2px;
}

/* ---------- 補助ユーティリティ ---------- */
.text-muted {
  color: #6b7c93;
}

.text-small {
  font-size: 12px;
}

.text-bold {
  font-weight: 600;
}

.mb-0 { margin-bottom: 0; }
.mb-1 { margin-bottom: 8px; }
.mb-2 { margin-bottom: 16px; }
.mb-3 { margin-bottom: 24px; }
.mt-2 { margin-top: 16px; }
.mt-3 { margin-top: 24px; }

/* ---------- サブメニュー(ドロップダウン) ---------- */
.header-nav .nav-item {
  position: relative;
  display: flex;
  align-items: center;
  height: 64px;
}

.header-nav .nav-item > a {
  display: flex;
  align-items: center;
  padding: 0 20px;
  color: #cfd8e3;
  font-size: 14px;
  font-weight: 500;
  border-bottom: 3px solid transparent;
  transition: all 0.2s;
  text-decoration: none;
  height: 100%;
}

.header-nav .nav-item > a:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.05);
}

.header-nav .nav-item > a.active {
  color: #fff;
  border-bottom-color: #4fc3f7;
  background: rgba(79, 195, 247, 0.08);
}

.header-nav .nav-item .caret {
  font-size: 10px;
  margin-left: 4px;
  opacity: 0.7;
}

.header-nav .submenu {
  display: none;
  position: absolute;
  top: 64px;
  left: 0;
  background: #fff;
  border: 1px solid #e0e6ed;
  border-radius: 0 0 6px 6px;
  min-width: 200px;
  box-shadow: 0 6px 16px rgba(10, 37, 64, 0.15);
  z-index: 100;
  overflow: hidden;
}

.header-nav .nav-item:hover .submenu {
  display: block;
}

.header-nav .submenu a {
  display: block;
  padding: 12px 18px;
  color: #333;
  font-size: 13px;
  font-weight: 500;
  border-bottom: 1px solid #e0e6ed;
  height: auto;
  background: none;
  text-decoration: none;
  transition: all 0.15s;
}

.header-nav .submenu a:last-child {
  border-bottom: none;
}

.header-nav .submenu a:hover {
  background: #f0f6fc;
  color: #0a4d8c;
}

.header-nav .submenu a.active {
  color: #0a4d8c;
  background: #e3f2fd;
  font-weight: 600;
}

/* ---------- 公募案件バッジ ---------- */
.badge-recruit {
  background: #ffebee;
  color: #c62828;
  border: 1px solid #ef9a9a;
}

.badge-budget-ok {
  background: #e8f5e9;
  color: #2e7d32;
  border: 1px solid #a5d6a7;
}

.badge-budget-ng {
  background: #fafafa;
  color: #757575;
  border: 1px solid #bdbdbd;
}

/* ---------- エントリーボタン ---------- */
.btn-entry {
  background: linear-gradient(135deg, #c62828 0%, #d84315 100%);
  color: #fff;
  padding: 14px 36px;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.5px;
  border-radius: 4px;
  border: none;
  cursor: pointer;
  font-family: inherit;
  transition: all 0.2s;
  box-shadow: 0 2px 6px rgba(198, 40, 40, 0.3);
}

.btn-entry:hover {
  background: linear-gradient(135deg, #b71c1c 0%, #bf360c 100%);
  transform: translateY(-1px);
  box-shadow: 0 4px 10px rgba(198, 40, 40, 0.4);
}

.btn-entry:disabled {
  background: #bdbdbd;
  cursor: not-allowed;
  box-shadow: none;
  transform: none;
}

/* ---------- 資金チェックボックス ---------- */
.budget-check {
  padding: 14px 20px;
  border-radius: 6px;
  margin: 20px 0;
  display: flex;
  align-items: center;
  gap: 14px;
}

.budget-check.ok {
  background: #e8f5e9;
  border: 1px solid #a5d6a7;
}

.budget-check.ng {
  background: #fff3e0;
  border: 1px solid #ffb74d;
}

.budget-check-icon {
  font-size: 22px;
  width: 28px;
  text-align: center;
  flex-shrink: 0;
}

.budget-check.ok .budget-check-icon {
  color: #2e7d32;
}

.budget-check.ng .budget-check-icon {
  color: #ef6c00;
}

.budget-check-text {
  flex: 1;
  font-size: 13px;
  line-height: 1.5;
  color: #333;
}

.budget-check-text .status-label {
  font-weight: 700;
  font-size: 14px;
  margin-right: 14px;
  color: #2e7d32;
}

.budget-check.ng .budget-check-text .status-label {
  color: #c62828;
}

.budget-check-text strong {
  color: #0a4d8c;
  font-weight: 700;
}

/* インライン版 エントリーボタン(サイズ小さめ) */
.btn-entry-inline {
  background: linear-gradient(135deg, #c62828 0%, #d84315 100%);
  color: #fff;
  padding: 8px 20px;
  font-size: 13px;
  font-weight: 700;
  border-radius: 4px;
  border: none;
  cursor: pointer;
  font-family: inherit;
  white-space: nowrap;
  flex-shrink: 0;
  transition: all 0.2s;
  box-shadow: 0 2px 4px rgba(198, 40, 40, 0.25);
}

.btn-entry-inline:hover {
  background: linear-gradient(135deg, #b71c1c 0%, #bf360c 100%);
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(198, 40, 40, 0.35);
}

/* ---------- 公募案件詳細・シミュレーション表 ---------- */
.simulation-table {
  width: 100%;
  font-size: 13px;
  margin-top: 12px;
}

.simulation-table th {
  background: #f0f4f8;
  color: #0a2540;
  font-weight: 600;
  text-align: center;
  padding: 10px 12px;
  border: 1px solid #c5d3e0;
  font-size: 12px;
}

.simulation-table td {
  padding: 10px 12px;
  border: 1px solid #e0e6ed;
  text-align: right;
  font-family: "Roboto Mono", Consolas, monospace;
  font-weight: 600;
  color: #0a2540;
}

.simulation-table td.label {
  background: #f8fafc;
  text-align: left;
  font-family: inherit;
  font-weight: 500;
  color: #4a5b75;
}

.simulation-table td.highlight {
  background: #e3f2fd;
  color: #0a4d8c;
  font-size: 14px;
}

.text-right { text-align: right; }
.text-center { text-align: center; }

.num-large {
  font-family: "Roboto Mono", Consolas, monospace;
  font-weight: 700;
  font-size: 18px;
  color: #0a2540;
}

/* ---------- ロゴをリンク化した際の色補正 ---------- */
a.header-logo {
  color: #fff;
  cursor: pointer;
}

a.header-logo:hover {
  text-decoration: none;
  opacity: 0.85;
}

/* ---------- お問い合わせフォーム ---------- */
.form-note {
  background: #e3f2fd;
  border: 1px solid #90caf9;
  color: #1565c0;
  font-size: 12px;
  padding: 12px 16px;
  border-radius: 6px;
  margin-bottom: 20px;
  line-height: 1.7;
}

.form-row {
  margin-bottom: 20px;
}

.form-row label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: #0a2540;
  margin-bottom: 6px;
}

.form-row label .required {
  color: #c62828;
  font-size: 11px;
  font-weight: 700;
  margin-left: 6px;
}

.form-control {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #c5d3e0;
  border-radius: 4px;
  font-size: 14px;
  font-family: inherit;
  color: #333;
  background: #fff;
}

.form-control:focus {
  outline: none;
  border-color: #1565c0;
  box-shadow: 0 0 0 3px rgba(21, 101, 192, 0.15);
}

textarea.form-control {
  min-height: 170px;
  resize: vertical;
  line-height: 1.7;
}

.form-hint {
  font-size: 11px;
  color: #6b7c93;
  margin-top: 6px;
}

.form-actions {
  display: flex;
  gap: 12px;
  justify-content: flex-end;
  align-items: center;
  padding-top: 16px;
  margin-top: 8px;
  border-top: 1px solid #e0e6ed;
}

/* ---------- ヘッダー：設定(歯車)メニュー ---------- */
/* メニューをトリガーの真下に隙間なく出すため、ユーザー領域をヘッダー全高さにする */
.header-user {
  height: 60px;
}

.header-settings {
  position: relative;
  align-self: stretch;
  display: flex;
  align-items: center;
}

.header-settings-trigger {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 8px;
  background: transparent;
  border: 1px solid transparent;
  color: #cfd8e3;
  cursor: pointer;
  transition: all 0.2s;
}

.header-settings-trigger:hover,
.header-settings:hover .header-settings-trigger {
  color: #fff;
  background: rgba(255, 255, 255, 0.1);
  border-color: #4a5b75;
}

.header-settings-menu {
  display: none;
  position: absolute;
  top: 100%; /* ヘッダー下端に密着＝トリガーとメニューの間に隙間を作らない */
  right: 0;
  min-width: 200px;
  background: #fff;
  border: 1px solid #e0e6ed;
  border-radius: 6px;
  box-shadow: 0 6px 16px rgba(10, 37, 64, 0.15);
  z-index: 200;
  overflow: hidden;
}

/* トリガー〜メニューが同一ホバー領域（.header-settings）なので、リンクまで途切れずクリックできる */
.header-settings:hover .header-settings-menu {
  display: block;
}

.header-settings-menu a,
.header-settings-menu .header-settings-logout {
  display: block;
  width: 100%;
  text-align: left;
  padding: 11px 18px;
  color: #333;
  font-size: 13px;
  font-weight: 500;
  font-family: inherit;
  border: none;
  border-bottom: 1px solid #e0e6ed;
  background: #fff;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.15s;
}

.header-settings-menu a:last-child,
.header-settings-menu form:last-child .header-settings-logout {
  border-bottom: none;
}

.header-settings-menu a:hover {
  background: #f0f6fc;
  color: #0a4d8c;
  text-decoration: none;
}

.header-settings-menu a.active {
  background: #e3f2fd;
  color: #0a4d8c;
  font-weight: 600;
}

.header-settings-logout {
  color: #c62828;
}

.header-settings-logout:hover {
  background: #fdecea;
  color: #b71c1c;
}
