/* TAAG スケジュール管理アプリ — 共通スタイル
 * MVP段階の最小限スタイル。後で UI ライブラリ導入時に整理する想定。
 */

* {
  box-sizing: border-box;
}

/* HTML 標準の hidden 属性を、後続の .btn/.modal 等の display 指定より
 * 優先させる。これがないと CSS の display: inline-flex 等が
 * hidden を打ち消してしまい、要素が表示されてしまう。
 * (v0.1.8: vendor 権限の +新規案件/組織管理 ボタンが見えてしまう問題対策)
 */
[hidden] {
  display: none !important;
}

html,
body {
  margin: 0;
  padding: 0;
  height: 100%;
  font-family:
    -apple-system, BlinkMacSystemFont, "Segoe UI", "Hiragino Sans",
    "Yu Gothic UI", "Noto Sans JP", sans-serif;
  color: #1f2937;
  background: linear-gradient(135deg, #f3f4f6 0%, #e5e7eb 100%);
  -webkit-font-smoothing: antialiased;
}

/* ============================================================
 * 認証カード(ログイン画面用)
 * ============================================================ */
.auth-card {
  max-width: 440px;
  margin: 8vh auto;
  padding: 2.5rem 2rem;
  background: #ffffff;
  border-radius: 12px;
  box-shadow:
    0 1px 3px rgba(0, 0, 0, 0.05),
    0 8px 24px rgba(0, 0, 0, 0.08);
}

.auth-card__header {
  text-align: center;
  margin-bottom: 2rem;
}

.auth-card__title {
  margin: 0 0 0.5rem;
  font-size: 1.5rem;
  font-weight: 600;
  color: #111827;
}

.auth-card__subtitle {
  margin: 0;
  color: #6b7280;
  font-size: 0.95rem;
}

.auth-card__body {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.auth-card__hint {
  margin: 0;
  color: #6b7280;
  font-size: 0.825rem;
  line-height: 1.5;
  text-align: center;
}

.auth-card__divider {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin: 0.75rem 0;
  color: #9ca3af;
  font-size: 0.8rem;
}

.auth-card__divider::before,
.auth-card__divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: #e5e7eb;
}

.auth-card__form {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.auth-card__loading {
  text-align: center;
  color: #6b7280;
  padding: 1rem;
}

.auth-card__footer {
  margin-top: 2rem;
  text-align: center;
  color: #9ca3af;
}

/* ============================================================
 * フォーム
 * ============================================================ */
.form-label {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  font-size: 0.875rem;
  color: #374151;
}

.form-input {
  width: 100%;
  padding: 0.65rem 0.85rem;
  font-size: 0.95rem;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  background: #ffffff;
  transition:
    border-color 0.15s,
    box-shadow 0.15s;
}

.form-input:focus {
  outline: none;
  border-color: #2563eb;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

/* ============================================================
 * ボタン
 * ============================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  padding: 0.75rem 1rem;
  font-size: 0.95rem;
  font-weight: 500;
  border: 1px solid transparent;
  border-radius: 6px;
  cursor: pointer;
  transition:
    background-color 0.15s,
    border-color 0.15s,
    transform 0.05s;
}

.btn:active:not(:disabled) {
  transform: translateY(1px);
}

.btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.btn--primary {
  background: #2563eb;
  color: #ffffff;
}
.btn--primary:hover:not(:disabled) {
  background: #1d4ed8;
}

.btn--slack {
  background: #ffffff;
  color: #1f2937;
  border-color: #d1d5db;
}
.btn--slack:hover:not(:disabled) {
  background: #f9fafb;
  border-color: #9ca3af;
}

.btn__icon {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

.btn--ghost {
  background: transparent;
  color: #374151;
  border-color: #d1d5db;
}
.btn--ghost:hover:not(:disabled) {
  background: #f9fafb;
}

/* ============================================================
 * フィードバックメッセージ
 * ============================================================ */
.feedback {
  margin-top: 0.5rem;
  padding: 0.75rem 0.9rem;
  border-radius: 6px;
  font-size: 0.875rem;
  line-height: 1.5;
}

.feedback--success {
  background: #ecfdf5;
  color: #065f46;
  border: 1px solid #a7f3d0;
}

.feedback--error {
  background: #fef2f2;
  color: #991b1b;
  border: 1px solid #fecaca;
}

.feedback--info {
  background: #eff6ff;
  color: #1e40af;
  border: 1px solid #bfdbfe;
}

/* ============================================================
 * ダッシュボード
 * ============================================================ */
.dashboard {
  max-width: 880px;
  margin: 4vh auto;
  padding: 0 1.5rem;
}

.dashboard__header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.25rem 1.5rem;
  background: #ffffff;
  border-radius: 12px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
  margin-bottom: 1.5rem;
}

.dashboard__title {
  margin: 0;
  font-size: 1.25rem;
  font-weight: 600;
}

.dashboard__panel {
  background: #ffffff;
  border-radius: 12px;
  padding: 1.75rem;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
  margin-bottom: 1.25rem;
}

.dashboard__panel-title {
  margin: 0 0 1rem;
  font-size: 1rem;
  font-weight: 600;
  color: #111827;
  padding-bottom: 0.6rem;
  border-bottom: 1px solid #e5e7eb;
}

.field-list {
  display: grid;
  grid-template-columns: 160px 1fr;
  row-gap: 0.65rem;
  column-gap: 1rem;
  font-size: 0.95rem;
}

.field-list dt {
  color: #6b7280;
  font-weight: 500;
}

.field-list dd {
  margin: 0;
  color: #111827;
}

.role-badge {
  display: inline-block;
  padding: 0.15rem 0.6rem;
  font-size: 0.8rem;
  font-weight: 600;
  border-radius: 999px;
  background: #eff6ff;
  color: #1d4ed8;
}

.role-badge--admin {
  background: #fef3c7;
  color: #92400e;
}
.role-badge--staff {
  background: #ecfdf5;
  color: #065f46;
}
.role-badge--vendor {
  background: #f3e8ff;
  color: #6b21a8;
}
.role-badge--guest {
  background: #f3f4f6;
  color: #374151;
}

/* ============================================================
 * 案件カード一覧(09 v0.2 ダッシュボード)
 * ============================================================ */

.toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  margin: 0.5rem 0 1.25rem;
  padding: 1rem 1.25rem;
  background: #ffffff;
  border-radius: 12px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.toolbar__filter {
  font-size: 0.875rem;
  color: #4b5563;
}

.btn--small {
  padding: 0.55rem 0.9rem;
  font-size: 0.875rem;
}

.project-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1rem;
  margin-bottom: 1.25rem;
}

.project-card {
  background: #ffffff;
  border-radius: 12px;
  padding: 1rem 1.25rem;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  border-left: 4px solid #2563eb;
  transition: transform 0.05s, box-shadow 0.15s;
}

.project-card:hover {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  transform: translateY(-1px);
}

.project-card__number {
  font-size: 0.75rem;
  color: #6b7280;
  font-family: monospace;
}

.project-card__name {
  font-size: 1rem;
  font-weight: 600;
  color: #111827;
  margin: 0;
}

.project-card__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  font-size: 0.8rem;
  color: #6b7280;
}

.project-card__meta-item {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
}

.project-card__meta-item::before {
  content: "·";
  color: #d1d5db;
  margin-right: 0.25rem;
}

.project-card__meta-item:first-child::before {
  content: none;
  margin: 0;
}

.project-card__dates {
  font-size: 0.8rem;
  color: #4b5563;
  border-top: 1px dashed #e5e7eb;
  padding-top: 0.55rem;
}

.status-badge {
  display: inline-block;
  padding: 0.1rem 0.55rem;
  font-size: 0.7rem;
  font-weight: 600;
  border-radius: 999px;
  background: #eff6ff;
  color: #1d4ed8;
}
.status-badge--計画中 { background: #f3f4f6; color: #4b5563; }
.status-badge--設計中 { background: #ecfdf5; color: #065f46; }
.status-badge--施工中 { background: #fef3c7; color: #92400e; }
.status-badge--竣工   { background: #e0e7ff; color: #3730a3; }
.status-badge--中止   { background: #fee2e2; color: #991b1b; }

.empty-state {
  background: #ffffff;
  border-radius: 12px;
  padding: 2.5rem 1.5rem;
  text-align: center;
  color: #6b7280;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.empty-state__title {
  font-size: 1rem;
  font-weight: 600;
  color: #374151;
  margin: 0 0 0.5rem;
}

.empty-state__hint {
  margin: 0;
  font-size: 0.875rem;
}

/* ============================================================
 * モーダル(新規案件登録)
 * ============================================================ */

.modal {
  width: min(600px, 92vw);
  max-height: 86vh;
  border: none;
  border-radius: 12px;
  padding: 0;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.25);
}

.modal::backdrop {
  background: rgba(15, 23, 42, 0.55);
}

.modal__inner {
  display: flex;
  flex-direction: column;
  max-height: 86vh;
}

.modal__header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid #e5e7eb;
  flex-shrink: 0;
}

.modal__title {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 600;
  color: #111827;
}

.modal__close {
  background: transparent;
  border: none;
  font-size: 1.4rem;
  cursor: pointer;
  color: #9ca3af;
  padding: 0;
  line-height: 1;
}
.modal__close:hover { color: #374151; }

.modal__body {
  padding: 1.25rem 1.5rem;
  overflow-y: auto;
  flex: 1;
}

.modal__footer {
  display: flex;
  justify-content: flex-end;
  gap: 0.6rem;
  padding: 1rem 1.5rem;
  border-top: 1px solid #e5e7eb;
  flex-shrink: 0;
  background: #f9fafb;
}

.modal__footer .btn {
  flex-shrink: 0;
  white-space: nowrap;
}

/* エラー表示はフッターの外、本文とフッターの間に独立配置(ボタン押し潰し防止) */
.modal__error {
  margin: 0 1.5rem 0.75rem;
  flex-shrink: 0;
}

.form-grid {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.form-row {
  display: flex;
  gap: 0.6rem;
  align-items: flex-end;
}

.form-row .form-label {
  flex: 1;
}

.form-input--with-button {
  display: flex;
  gap: 0.4rem;
}

.form-input--with-button .form-input {
  flex: 1;
}

.form-required::after {
  content: " *";
  color: #dc2626;
}

.form-help {
  font-size: 0.75rem;
  color: #6b7280;
  margin-top: 0.2rem;
}

.form-warning {
  background: #fffbeb;
  color: #92400e;
  padding: 0.5rem 0.75rem;
  border-radius: 6px;
  font-size: 0.8rem;
  border: 1px solid #fde68a;
}

.form-error {
  background: #fef2f2;
  color: #991b1b;
  padding: 0.5rem 0.75rem;
  border-radius: 6px;
  font-size: 0.8rem;
  border: 1px solid #fecaca;
}

.form-input.is-invalid,
.form-select.is-invalid {
  border-color: #dc2626;
  background: #fef2f2;
}

.form-radio-group {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  padding: 0.65rem 0.85rem;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  background: #f9fafb;
}

.form-radio-label {
  display: flex;
  gap: 0.5rem;
  align-items: flex-start;
  font-size: 0.875rem;
  cursor: pointer;
  padding: 0.2rem 0;
}

.form-radio-label input {
  margin-top: 0.2rem;
}

.form-radio-label small {
  display: block;
  color: #6b7280;
  font-size: 0.75rem;
}

.form-section-title {
  font-size: 0.825rem;
  font-weight: 600;
  color: #374151;
  margin: 0.5rem 0 0.25rem;
  padding-top: 0.5rem;
  border-top: 1px dashed #e5e7eb;
}

.form-section-title:first-child {
  border-top: none;
  padding-top: 0;
}

details.form-accordion {
  border: 1px solid #e5e7eb;
  border-radius: 6px;
  padding: 0;
  margin-top: 0.5rem;
}

details.form-accordion[open] {
  background: #fafbfc;
}

details.form-accordion summary {
  padding: 0.7rem 0.9rem;
  cursor: pointer;
  font-size: 0.875rem;
  font-weight: 500;
  color: #4b5563;
  user-select: none;
}

details.form-accordion summary:hover {
  background: #f3f4f6;
}

details.form-accordion .form-grid {
  padding: 0.85rem;
}

.form-select {
  width: 100%;
  padding: 0.65rem 0.85rem;
  font-size: 0.95rem;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  background: #ffffff;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%236b7280' d='M6 8L0 0h12z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.75rem center;
  background-size: 12px 8px;
  padding-right: 2rem;
}

.form-select:focus {
  outline: none;
  border-color: #2563eb;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

/* ============================================================
 * トースト通知(保存成功時)
 * ============================================================ */
.toast {
  position: fixed;
  top: 1.25rem;
  right: 1.25rem;
  background: #065f46;
  color: #ffffff;
  padding: 0.85rem 1.25rem;
  border-radius: 8px;
  font-size: 0.9rem;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
  opacity: 0;
  transform: translateY(-12px);
  transition: opacity 0.2s, transform 0.2s;
  z-index: 1000;
  max-width: 320px;
}

.toast.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* ============================================================
 * 折りたたみ デバッグパネル
 * ============================================================ */
details.debug-panel {
  background: #ffffff;
  border-radius: 12px;
  padding: 0;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
  margin-top: 1.25rem;
}

details.debug-panel summary {
  padding: 0.85rem 1.25rem;
  font-size: 0.825rem;
  color: #6b7280;
  cursor: pointer;
  user-select: none;
}

details.debug-panel summary:hover { color: #374151; }

details.debug-panel[open] > div {
  padding: 0 1.5rem 1.5rem;
}

/* ============================================================
 * 組織管理画面(admin.html)
 * ============================================================ */
.dashboard__header-left {
  display: flex;
  align-items: center;
  gap: 1rem;
}

/* admin 用ツールバー(横並びレイアウト) */
.toolbar--admin {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.toolbar__filter-label,
.toolbar__search-label {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.85rem;
  color: #4b5563;
}

.toolbar__count {
  margin-left: auto;
  font-size: 0.825rem;
  color: #6b7280;
}

.form-select--inline,
.form-input--inline {
  padding: 0.35rem 0.6rem;
  font-size: 0.85rem;
  width: auto;
}

.form-input--inline {
  min-width: 200px;
}

.form-textarea {
  resize: vertical;
  min-height: 60px;
}

/* テーブル */
.org-table-wrap {
  margin-top: 1rem;
  background: #ffffff;
  border-radius: 10px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
  overflow-x: auto;
}

.org-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
}

.org-table thead th {
  background: #f9fafb;
  text-align: left;
  padding: 0.75rem 1rem;
  border-bottom: 1px solid #e5e7eb;
  color: #4b5563;
  font-weight: 600;
  font-size: 0.78rem;
  letter-spacing: 0.02em;
}

.org-table tbody td {
  padding: 0.7rem 1rem;
  border-bottom: 1px solid #f3f4f6;
  vertical-align: middle;
}

.org-table tbody tr:hover {
  background: #f9fafb;
}

.org-table__name {
  font-weight: 500;
  color: #111827;
}

.org-table__note {
  color: #6b7280;
  font-size: 0.8rem;
  max-width: 280px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.org-table__ops {
  white-space: nowrap;
  text-align: right;
}

.org-table__ops .btn {
  margin-left: 0.4rem;
}

.org-table__empty-row {
  padding: 1.5rem;
  text-align: center;
  color: #9ca3af;
  font-size: 0.85rem;
}

/* type別バッジ */
.type-badge {
  display: inline-block;
  padding: 0.15rem 0.55rem;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  border: 1px solid transparent;
}
.type-badge--社内       { background: #dbeafe; color: #1e40af; border-color: #bfdbfe; }
.type-badge--設計-構造  { background: #ede9fe; color: #5b21b6; border-color: #ddd6fe; }
.type-badge--設計-設備  { background: #fae8ff; color: #86198f; border-color: #f5d0fe; }
.type-badge--施工       { background: #ffedd5; color: #9a3412; border-color: #fed7aa; }
.type-badge--客先       { background: #dcfce7; color: #166534; border-color: #bbf7d0; }
.type-badge--行政       { background: #e5e7eb; color: #374151; border-color: #d1d5db; }
.type-badge--その他     { background: #f3f4f6; color: #6b7280; border-color: #e5e7eb; }

/* 危険操作ボタン */
.btn--danger {
  background: #ffffff;
  color: #b91c1c;
  border: 1px solid #fecaca;
}
.btn--danger:hover {
  background: #fef2f2;
  border-color: #fca5a5;
}

/* ダッシュボード ⚙ボタン(admin限定) */
.dashboard__header-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.btn--icon {
  padding: 0.4rem 0.55rem;
  font-size: 1rem;
  line-height: 1;
}

/* ============================================================
 * 案件カード — クリック可能化(project_detail への遷移用)
 * ============================================================ */
.project-card--clickable {
  cursor: pointer;
}
.project-card--clickable:focus-visible {
  outline: 2px solid #2563eb;
  outline-offset: 2px;
}

/* ============================================================
 * 案件詳細画面(project_detail.html)
 * ============================================================ */
.detail {
  max-width: 1280px;
  margin: 0 auto;
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.detail__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}
.detail__header-left {
  display: flex;
  align-items: center;
  gap: 1rem;
  min-width: 0;
}
.detail__header-right {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}
.detail__title {
  margin: 0;
  font-size: 1.25rem;
  font-weight: 600;
  color: #111827;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.detail__panel {
  background: #ffffff;
  border-radius: 12px;
  padding: 1.25rem 1.5rem;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}
.detail__panel-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.75rem;
}
.detail__panel-title {
  margin: 0 0 0.75rem;
  font-size: 0.95rem;
  font-weight: 600;
  color: #374151;
}
.detail__panel-header .detail__panel-title {
  margin: 0;
}
.detail__version-label {
  font-size: 0.8rem;
  color: #6b7280;
  font-family: monospace;
}
.detail__panel-tools {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}
.zoom-controls {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  background: #f3f4f6;
  border-radius: 8px;
  padding: 0.2rem 0.45rem;
}
.zoom-controls__label {
  font-size: 0.75rem;
  font-family: monospace;
  color: #374151;
  min-width: 3.2em;
  text-align: center;
}
.zoom-controls__input-wrap {
  display: inline-flex;
  align-items: center;
  background: #ffffff;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  padding: 0.1rem 0.4rem;
  gap: 0.1rem;
}
.zoom-controls__input-wrap:focus-within {
  border-color: #2563eb;
  box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.15);
}
.zoom-controls__input {
  width: 3.2em;
  border: none;
  outline: none;
  background: transparent;
  font-family: monospace;
  font-size: 0.8rem;
  color: #111827;
  text-align: right;
  padding: 0;
  /* spinner を消す(数値入力の上下矢印) */
  -moz-appearance: textfield;
  appearance: textfield;
}
.zoom-controls__input::-webkit-outer-spin-button,
.zoom-controls__input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}
.zoom-controls__suffix {
  font-size: 0.75rem;
  color: #6b7280;
  font-family: monospace;
}
.zoom-controls .btn {
  background: transparent;
  border: none;
  padding: 0.25rem 0.5rem;
}
.zoom-controls .btn--icon {
  font-size: 1.1rem;
  line-height: 1;
}

.field-list--columns {
  display: grid;
  grid-template-columns: max-content 1fr max-content 1fr;
  column-gap: 1.25rem;
  row-gap: 0.45rem;
  margin: 0;
}
.field-list--columns dt {
  color: #6b7280;
  font-size: 0.8rem;
  align-self: center;
}
.field-list--columns dd {
  margin: 0;
  font-size: 0.9rem;
  color: #111827;
}

/* ============================================================
 * 工程表(Gantt)
 * ============================================================ */
.gantt-scroll {
  overflow-x: auto;
  overflow-y: hidden;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  background: #ffffff;
  /* マイルストーンポップオーバー(position:absolute)の基準点として relative 必須 */
  position: relative;
}
.gantt {
  display: flex;
  flex-direction: column;
  min-width: max-content;
  font-size: 0.75rem;
}

.gantt__header {
  display: flex;
  background: #f9fafb;
  border-bottom: 1px solid #e5e7eb;
  position: sticky;
  top: 0;
  z-index: 2;
}
.gantt__header-body {
  display: flex;
  flex-direction: column;
}
.gantt__year-row,
.gantt__month-row {
  display: flex;
  height: 24px;
  align-items: center;
}
.gantt__year-row {
  border-bottom: 1px solid #e5e7eb;
  background: #f3f4f6;
}
.gantt__year-cell {
  font-weight: 600;
  font-size: 0.7rem;
  color: #4b5563;
  text-align: center;
  border-right: 1px solid #e5e7eb;
  flex-shrink: 0;
}
.gantt__month-cell {
  width: 60px;
  flex-shrink: 0;
  text-align: center;
  color: #6b7280;
  font-size: 0.7rem;
  border-right: 1px solid #e5e7eb;
}

.gantt__body {
  display: flex;
  flex-direction: column;
}
.gantt__row {
  display: flex;
  border-bottom: 1px solid #f1f5f9;
}
.gantt__row:hover {
  background: #fafbfc;
}

.gantt__row-label {
  width: var(--label-col, 160px);
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0 0.75rem;
  border-right: 1px solid #e5e7eb;
  background: #ffffff;
  position: sticky;
  left: 0;
  z-index: 1;
}
.gantt__row-label--header {
  background: #f9fafb;
  height: 48px;
  font-weight: 600;
  color: #374151;
  z-index: 3;
}
.gantt__row-label-text {
  font-size: 0.75rem;
  color: #1f2937;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.gantt__row-body {
  position: relative;
  flex-shrink: 0;
}

/* 月境界の縦罫(背景) */
.gantt__grid-cell {
  position: absolute;
  top: 0;
  height: 100%;
  border-right: 1px dashed #f1f5f9;
  pointer-events: none;
}

/* セグメント(バー) — top と height は JS でレーン位置を指定 */
.gantt__seg {
  position: absolute;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.7rem;
  color: #1f2937;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  padding: 0 0.25rem;
  box-sizing: border-box;
}
.gantt__seg--arrow {
  border-top: 1px solid #2563eb;
  border-bottom: 1px solid #2563eb;
  background: rgba(37, 99, 235, 0.04);
  color: #1e3a8a;
}
/*
 * arrow モードは仕様(13文書 §3-2 A)で「上辺・下辺のみ罫線」だが、Excel 原本では
 * 矢印 ← → がバーの端ピッタリに来るため端が視覚的に明示される。ブラウザ版では
 * テキストが中央寄せされ両端に空白ができるので、::before / ::after で短い縦罫を
 * 両端に追加して「両端が切れている」印象を解消する。bracket(四方枠)との区別は
 * 上下罫線・端の縦罫の太さで保たれる。
 */
.gantt__seg--arrow::before,
.gantt__seg--arrow::after {
  content: "";
  position: absolute;
  top: -1px;
  bottom: -1px;
  width: 1px;
  background: #2563eb;
  pointer-events: none;
}
.gantt__seg--arrow::before {
  left: 0;
}
.gantt__seg--arrow::after {
  right: 0;
}
.gantt__seg--bracket {
  border: 1px solid #047857;
  background: rgba(4, 120, 87, 0.05);
  color: #064e3b;
  border-radius: 2px;
}
.gantt__seg--fill {
  background: rgba(245, 158, 11, 0.2);
  border: 1px solid rgba(245, 158, 11, 0.5);
  color: #78350f;
}

/* バー幅が狭いとき、ラベルをバーの右側に出す(v0.2.1 短バー対策) */
.gantt__seg-label-outside {
  position: absolute;
  display: flex;
  align-items: center;
  font-size: 0.7rem;
  color: #1f2937;
  white-space: nowrap;
  padding: 0 0.15rem;
  pointer-events: none;
  z-index: 1;
}

/* マイルストーン(▲ + 下方向ガイド縦罫 + ズーム連動ラベル) */
.gantt__ms {
  position: absolute;
  top: 0;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  pointer-events: auto;
  z-index: 2; /* バーより前面に */
  cursor: pointer;
  /* ▲の幅(クリックヒットエリア)を確保 */
  width: 14px;
  /* ラベルが幅を超えてはみ出す前提 */
  overflow: visible;
}
.gantt__ms-mark {
  color: #dc2626;
  font-size: 0.75rem;
  line-height: 1;
  margin-top: 1px;
  transition: transform 0.1s;
}
/* 下方向への薄いガイド縦罫(▲位置からバーチャートまで届いて、対応関係を視覚化) */
.gantt__ms-guide {
  flex: 1;
  width: 1px;
  border-left: 1px dotted rgba(220, 38, 38, 0.28);
  pointer-events: none;
  margin-top: 1px;
}
.gantt__ms:hover .gantt__ms-mark,
.gantt__ms--active .gantt__ms-mark {
  transform: scale(1.4);
  color: #b91c1c;
}
.gantt__ms:hover .gantt__ms-guide,
.gantt__ms--active .gantt__ms-guide {
  border-left-style: solid;
  border-left-color: rgba(185, 28, 28, 0.75);
  border-left-width: 1.5px;
}

/* ズーム連動マイルストーン名ラベル(月幅が広いときだけ JS が追加する) */
.gantt__ms-label {
  position: absolute;
  top: 11px; /* ▲の真下、ガイドの上に被せる */
  left: 50%;
  transform: translateX(-50%);
  font-size: 0.6rem;
  line-height: 1.05;
  color: #4b5563;
  white-space: nowrap;
  pointer-events: none;
  background: rgba(255, 255, 255, 0.82);
  padding: 1px 3px;
  border-radius: 2px;
  max-width: 120px;
  overflow: hidden;
  text-overflow: ellipsis;
  z-index: 3;
}
.gantt__ms:hover .gantt__ms-label,
.gantt__ms--active .gantt__ms-label {
  color: #b91c1c;
  background: rgba(255, 255, 255, 0.97);
  z-index: 5;
}

/* マイルストーンクリック時のポップオーバー(近傍▲をまとめて一覧) */
.ms-popover {
  position: absolute;
  background: #ffffff;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.16);
  padding: 0.55rem 0.7rem 0.6rem;
  min-width: 200px;
  max-width: 340px;
  z-index: 60;
  font-size: 0.8rem;
  color: #1f2937;
}
.ms-popover__title {
  font-weight: 600;
  font-size: 0.65rem;
  color: #6b7280;
  margin: 0 0 0.35rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding-right: 1.4rem; /* close ボタン分の余白 */
}
.ms-popover__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.18rem;
}
.ms-popover__item {
  display: flex;
  gap: 0.55rem;
  align-items: baseline;
  padding: 2px 0;
}
.ms-popover__item-date {
  flex-shrink: 0;
  color: #6b7280;
  font-feature-settings: "tnum";
  font-size: 0.72rem;
  min-width: 5.5em;
}
.ms-popover__item-name {
  font-weight: 500;
  color: #1f2937;
  word-break: break-word;
}
.ms-popover__close {
  position: absolute;
  top: 3px;
  right: 6px;
  background: none;
  border: none;
  font-size: 1rem;
  color: #9ca3af;
  cursor: pointer;
  padding: 2px 6px;
  line-height: 1;
}
.ms-popover__close:hover {
  color: #1f2937;
}

/* トラック種別バッジ */
.gantt__track-badge {
  display: inline-block;
  padding: 0.05rem 0.4rem;
  font-size: 0.65rem;
  font-weight: 600;
  border-radius: 999px;
  background: #e5e7eb;
  color: #4b5563;
  flex-shrink: 0;
}
.gantt__track-badge--master_schedule { background: #dbeafe; color: #1e40af; }
.gantt__track-badge--confirmation    { background: #fef3c7; color: #92400e; }
.gantt__track-badge--regulation      { background: #fde68a; color: #78350f; }
.gantt__track-badge--design_design   { background: #ecfdf5; color: #065f46; }
.gantt__track-badge--design_structure{ background: #ede9fe; color: #5b21b6; }
.gantt__track-badge--design_facility { background: #cffafe; color: #155e75; }
.gantt__track-badge--meeting         { background: #f3f4f6; color: #4b5563; }
.gantt__track-badge--construction    { background: #ffedd5; color: #9a3412; }
.gantt__track-badge--custom          { background: #f5f5f4; color: #57534e; }

/* ============================================================
 * 印刷用 (@media print) — A3 横 1枚に収める printable view (v0.1)
 * 設計: docs/18_printable_view_v0.1.md
 *
 * 印刷ボタン押下時、JS が currentMonthWidth を A3 横有効幅にフィットさせて
 * 再描画してから window.print() を呼ぶ。本ブロックは印刷時のレイアウト調整
 * (不要要素の hidden 化・余白圧縮・色強制)のみを担当する。
 * ============================================================ */
/* ============================================================
 * 印刷専用エリア(画面では非表示、@media print 時のみ表示)
 *   印刷ボタン押下時、JS が #print-gantt に印刷用月幅でガントを描画する。
 *   画面の .detail には一切触らず、zoom も使わないため、印刷レンダリングが
 *   軽い・画面表示も変わらない。(2026-05-26 リビジョン3)
 * ============================================================ */
.print-area {
  display: none;
}
.print-area__header {
  display: flex;
  align-items: baseline;
  gap: 1rem;
  margin-bottom: 4mm;
}
.print-area__title {
  font-size: 14pt;
  font-weight: 700;
  margin: 0;
  color: #111827;
}
.print-area__panel {
  border: 1px solid #999;
  padding: 3mm 4mm;
  margin: 0 0 3mm 0;
  page-break-inside: avoid;
}
.print-area__panel-title {
  font-size: 10pt;
  font-weight: 600;
  margin: 0 0 2mm 0;
  color: #1f2937;
}
.print-area__gantt-scroll {
  overflow: visible;
  max-height: none;
  border: none;
}
.print-area .gantt__ms-guide {
  /* 印刷では▲ガイド線(縦罫)を出さない(うるさいので) */
  display: none;
}

@media print {
  /*
   * 用紙サイズ:A3 横を「寸法明示」で指定。
   *
   * 当初は `size: A3 landscape` と書いていたが、Brave の簡易印刷ダイアログ
   * (=Chrome/Edge の compact dialog 系)では `landscape` キーワードが
   * 用紙向きに反映されず、A3 縦の紙にガントが 90°回転して焼き付く事象を
   * 確認(2026-05-27, docs/19_v0.1)。Chromium 系で長年知られた挙動。
   * 寸法を 420mm × 297mm で明示すると、ダイアログに向き選択がない簡易版
   * でも横紙として扱われる。
   */
  @page {
    size: 420mm 297mm; /* A3 横(420mm 幅 × 297mm 高さ) */
    margin: 10mm;
  }

  /* 背景色強制(Chrome の省インクモード対策)は▲とfill帯のみに絞る */
  .gantt__seg--fill,
  .gantt__ms-mark {
    print-color-adjust: exact;
    -webkit-print-color-adjust: exact;
  }

  body {
    background: #ffffff;
    color: #000;
    font-size: 10pt;
    margin: 0;
    padding: 0;
  }

  /* 画面用 DOM は丸ごと非表示(印刷専用エリアと入れ替え) */
  .detail {
    display: none !important;
  }

  /* 印刷専用エリアを表示 */
  .print-area {
    display: block;
  }
  .print-area .field-list--columns dt,
  .print-area .field-list--columns dd {
    font-size: 9pt;
    line-height: 1.3;
  }
  .print-area .gantt {
    font-size: 8.5pt;
  }
  .print-area .gantt__row-label-text {
    font-size: 8pt;
  }

  /* リンク色は黒で(印刷時の読みやすさ優先) */
  a {
    color: #000;
    text-decoration: none;
  }
}

/* ============================================================
 * 編集パネル(右側スライドイン、20 v0.1)
 *   docs/20_工程表編集UI_v0.1.md 準拠。staff/admin のみ操作可。
 *   セグメント編集とマイルストーン編集を同じパネルで切り替える。
 * ============================================================ */
.edit-panel {
  position: fixed;
  top: 0;
  right: 0;
  width: 360px;
  height: 100vh;
  background: #ffffff;
  box-shadow: -4px 0 12px rgba(0, 0, 0, 0.08);
  display: flex;
  flex-direction: column;
  transform: translateX(100%);
  transition: transform 0.2s ease;
  z-index: 100;
  visibility: hidden;
}
.edit-panel.edit-panel--open {
  transform: translateX(0);
  visibility: visible;
}
.edit-panel__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  border-bottom: 1px solid #e5e7eb;
}
.edit-panel__title {
  margin: 0;
  font-size: 16px;
  font-weight: 700;
  color: #111827;
}
.edit-panel__body {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.edit-panel__field {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.edit-panel__field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.edit-panel__label {
  font-size: 12px;
  font-weight: 600;
  color: #374151;
}
.edit-panel__input,
.edit-panel__select,
.edit-panel__textarea {
  width: 100%;
  padding: 7px 9px;
  border: 1px solid #d1d5db;
  border-radius: 4px;
  font-size: 14px;
  color: #111827;
  background: #fff;
  box-sizing: border-box;
}
.edit-panel__input:focus,
.edit-panel__select:focus {
  outline: 2px solid #6366f1;
  outline-offset: -1px;
}
.edit-panel__radio-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.edit-panel__radio-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: #374151;
  cursor: pointer;
}
.edit-panel__readonly {
  font-size: 13px;
  color: #6b7280;
  padding: 4px 0;
}
.edit-panel__hint {
  font-size: 11px;
  color: #9ca3af;
}
.edit-panel__dirty-flag {
  font-size: 12px;
  color: #b45309;
  background: #fef3c7;
  padding: 6px 10px;
  border-radius: 4px;
  margin-top: 4px;
}
.edit-panel__dirty-flag[hidden] {
  display: none;
}
.edit-panel__footer {
  padding: 12px 16px;
  border-top: 1px solid #e5e7eb;
  background: #f9fafb;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.edit-panel__error {
  font-size: 12px;
  color: #b91c1c;
  background: #fee2e2;
  padding: 6px 10px;
  border-radius: 4px;
}
.edit-panel__footer-buttons {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
}
.edit-panel__footer-buttons-right {
  display: flex;
  gap: 8px;
  margin-left: auto;
}

/* 行ラベル右端の「+▲」「+▬」追加ボタン(canEdit 時のみ表示) */
.gantt__row-add-ms,
.gantt__row-add-seg {
  display: none;
  font-size: 11px;
  line-height: 1;
  padding: 2px 6px;
  border-radius: 3px;
  cursor: pointer;
  white-space: nowrap;
  flex-shrink: 0;
}
.gantt__row-add-ms {
  margin-left: auto; /* flex 親の中で右端に押し出す */
  border: 1px solid #c7d2fe;
  background: #eef2ff;
  color: #4f46e5;
}
.gantt__row-add-ms:hover {
  background: #c7d2fe;
}
.gantt__row-add-seg {
  margin-left: 4px;
  border: 1px solid #bbf7d0;
  background: #f0fdf4;
  color: #166534;
}
.gantt__row-add-seg:hover {
  background: #bbf7d0;
}
/*
 * 表示ルール(2026-05-27 修正):
 *   +▲ +▬ ボタンを常時表示すると行ラベル文字が省略されてしまう(160px幅では狭い)。
 *   そのため canEdit 時でも「行ホバー」または「ボタン自体にフォーカスがある時」だけ表示する。
 *   これで通常時は工程名フル表示、操作したい時はホバーで現れる UX に。
 */
.can-edit-gantt .gantt__row:hover .gantt__row-add-ms,
.can-edit-gantt .gantt__row:hover .gantt__row-add-seg,
.can-edit-gantt .gantt__row-add-ms:focus,
.can-edit-gantt .gantt__row-add-seg:focus {
  display: inline-block;
}
/* +▬ が先に来るが、+▲ の方が margin-left:auto を持つので、+▲ が右端、+▬ がその左に並ぶ */
/* 行ラベルテキストが + ボタン分の幅を残せるよう、shrink を有効に */
.can-edit-gantt .gantt__row-label-text {
  min-width: 0;
  flex-shrink: 1;
}
/* ホバー時はテキストが多少省略されても許容(ボタン表示優先) */
.can-edit-gantt .gantt__row:hover .gantt__row-label-text {
  text-overflow: ellipsis;
}

/* セグメント / マイルストーン要素のクリック+ドラッグヒント
 * canEdit 時のみ JS が body に .can-edit-gantt クラスを付ける
 * 20 v0.2 ドラッグ操作対応:本体は move カーソル
 * (両端 6px リサイズ判定は JS 側で行う。ここで擬似要素を使うと
 *  既存の .gantt__seg--arrow::before/::after の矢印端罫線と衝突するため
 *  カーソル変更だけにとどめ、ユーザーは試して気付く方式) */
.can-edit-gantt .gantt__seg {
  cursor: move;
}
.can-edit-gantt .gantt__ms {
  cursor: grab;
}

/* ドラッグ中の見た目 */
.gantt__seg--dragging {
  outline: 2px solid #6366f1;
  outline-offset: 1px;
  opacity: 0.85;
  z-index: 5;
  cursor: grabbing !important;
}
.gantt__ms--dragging {
  outline: 2px solid #6366f1;
  outline-offset: 2px;
  opacity: 0.85;
  z-index: 5;
  cursor: grabbing !important;
}
/* ドラッグ中はテキスト選択を防ぐ */
body:has(.gantt__seg--dragging),
body:has(.gantt__ms--dragging) {
  user-select: none;
}

/* マイルストーンポップオーバー内の編集リンク */
.ms-popover__edit-link {
  display: inline-block;
  margin-left: 8px;
  font-size: 11px;
  color: #4f46e5;
  text-decoration: none;
  border: 1px solid #e0e7ff;
  border-radius: 3px;
  padding: 1px 6px;
  background: #eef2ff;
  cursor: pointer;
}
.ms-popover__edit-link:hover {
  background: #c7d2fe;
}
.ms-popover__item {
  display: flex;
  align-items: center;
}

/* ===== スケジュール策定日 インライン編集(v0.1.5) ===== */
.info-inline-edit {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.info-inline-edit__input {
  padding: 2px 6px;
  font-size: 14px;
  border: 1px solid #ccc;
  border-radius: 3px;
}
.info-inline-edit__feedback {
  font-size: 12px;
  color: #666;
}
.info-inline-edit__feedback--success {
  color: #2e7d32;
}
.info-inline-edit__feedback--error {
  color: #c62828;
}

/* ===== 管理画面タブ(v0.1.7) ===== */
.admin-tabs {
  display: flex;
  gap: 4px;
  border-bottom: 2px solid #ddd;
  margin-bottom: 16px;
}
.admin-tabs__tab {
  padding: 8px 20px;
  background: transparent;
  border: none;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  cursor: pointer;
  font-size: 14px;
  color: #666;
}
.admin-tabs__tab:hover {
  color: #333;
  background: #f5f5f5;
}
.admin-tabs__tab.is-active {
  color: #1976D2;
  border-bottom-color: #1976D2;
  font-weight: bold;
}
.admin-panel {
  /* 表示・非表示は hidden 属性で制御 */
}
.admin-panel__note {
  margin-top: 12px;
  font-size: 12px;
  color: #666;
  padding: 8px 12px;
  background: #f9f9f9;
  border-left: 3px solid #1976D2;
}
.role-badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 3px;
  font-size: 12px;
  font-weight: bold;
}
.role-badge--admin  { background: #FFEBEE; color: #C62828; }
.role-badge--staff  { background: #E3F2FD; color: #1976D2; }
.role-badge--vendor { background: #FFF3E0; color: #F57C00; }
.role-badge--guest  { background: #F5F5F5; color: #666; }

/* ============================================================
 * アプリ設定パネル(v0.1.11)
 * ============================================================ */
.admin-settings {
  margin: 12px 0 20px;
  border: 1px solid #ddd;
  border-radius: 6px;
  background: #fafafa;
}
.admin-settings__summary {
  padding: 10px 14px;
  cursor: pointer;
  font-weight: bold;
  color: #455A64;
  user-select: none;
}
.admin-settings__summary:hover {
  background: #f0f0f0;
}
.admin-settings__body {
  padding: 8px 16px 16px;
  border-top: 1px solid #e0e0e0;
}
.admin-settings__group {
  border: none;
  margin: 0;
  padding: 0;
}
.admin-settings__legend {
  font-weight: bold;
  margin-bottom: 8px;
  color: #37474F;
}
.admin-settings__radio {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 6px 0;
  cursor: pointer;
}
.admin-settings__radio input[type="radio"] {
  margin-top: 3px;
}
.admin-settings__actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px dashed #ddd;
}
.admin-settings__current {
  font-size: 13px;
  color: #546E7A;
}
.admin-settings__note {
  margin-top: 10px;
  font-size: 12px;
  color: #78909C;
  line-height: 1.5;
}

/* ============================================================
 * 案件詳細: メンバー管理セクション(v0.1.12)
 * ============================================================ */
.detail__panel-note {
  margin: 0 0 10px;
  font-size: 13px;
  color: #607D8B;
}
.empty-state--inline {
  padding: 10px 0;
  text-align: left;
}
.org-table--compact th,
.org-table--compact td {
  padding: 6px 10px;
  font-size: 13px;
}
.members-row--self {
  background: #FFF9C4;
}
.members-self-badge {
  display: inline-block;
  padding: 1px 6px;
  margin-left: 6px;
  border-radius: 3px;
  font-size: 11px;
  background: #FBC02D;
  color: #fff;
}
.members-main-badge {
  display: inline-block;
  padding: 1px 6px;
  margin-left: 6px;
  border-radius: 3px;
  font-size: 11px;
  background: #1976D2;
  color: #fff;
}
.members-org-type {
  color: #607D8B;
  font-size: 12px;
}
.members-locked-note {
  color: #B0BEC5;
  font-size: 12px;
}

/* ============================================================
 * 未保存ドラッグ変更バー(v0.1.15)
 * ============================================================ */
.pending-bar {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0 0 12px;
  padding: 10px 16px;
  background: #FFF8E1;
  border: 1px solid #FFB300;
  border-radius: 6px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
  font-size: 14px;
}
.pending-bar__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #F57C00;
  color: #fff;
  font-weight: bold;
  font-size: 13px;
}
.pending-bar__msg {
  color: #E65100;
  font-weight: 600;
}
.pending-bar__spacer {
  flex: 1;
}
.pending-bar[hidden] {
  display: none;
}

/* ============================================================
 * 担当者モーダル: 役割の権限ヒント(v0.1.15)
 * ============================================================ */
.form-help--permissions {
  display: block;
  margin-top: 6px;
  padding: 8px 10px;
  background: #ECEFF1;
  border-left: 3px solid #607D8B;
  border-radius: 0 4px 4px 0;
  font-size: 12px;
  line-height: 1.7;
  color: #455A64;
}
.form-help--permissions strong {
  color: #263238;
}

/* ============================================================
 * 横断ダッシュボード(v0.1.16)
 * ============================================================ */
.dashboard__header-left {
  display: flex;
  align-items: center;
  gap: 16px;
}
.overview-filters {
  display: flex;
  align-items: center;
  gap: 18px;
  flex-wrap: wrap;
  padding: 10px 16px;
  margin: 0 0 10px;
  background: #fafafa;
  border: 1px solid #eee;
  border-radius: 6px;
}
.overview-filters__label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: #455A64;
}
.overview-filters__year {
  min-width: 12em;
  text-align: center;
  font-weight: 600;
  color: #263238;
}
.overview-filters__count {
  margin-left: auto;
  font-size: 13px;
  color: #607D8B;
}
.overview-scroll {
  overflow: auto;
  border: 1px solid #ddd;
  border-radius: 4px;
  background: #fff;
}
.overview-gantt {
  position: relative;
  font-size: 12px;
}
.overview-gantt__header {
  display: flex;
  background: #ECEFF1;
  border-bottom: 1px solid #B0BEC5;
  position: sticky;
  top: 0;
  z-index: 2;
}
.overview-gantt__label-header {
  padding: 8px 12px;
  font-weight: 600;
  color: #263238;
  border-right: 1px solid #B0BEC5;
  background: #ECEFF1;
}
.overview-gantt__timeline-header {
  flex-shrink: 0;
}
.overview-gantt__year-row {
  display: flex;
  border-bottom: 1px solid #CFD8DC;
}
.overview-gantt__year-cell {
  padding: 4px 0;
  text-align: center;
  font-weight: 600;
  color: #455A64;
  border-right: 1px solid #CFD8DC;
}
.overview-gantt__month-row {
  display: flex;
}
.overview-gantt__month-cell {
  padding: 4px 0;
  text-align: center;
  color: #546E7A;
  border-right: 1px solid #ECEFF1;
}
.overview-gantt__month-cell--fy-start {
  border-left: 2px solid #B0BEC5;
}
.overview-gantt__body {
  position: relative;
}
.overview-gantt__gridline {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 1px;
  background: #ECEFF1;
  pointer-events: none;
}
.overview-gantt__row {
  display: flex;
  align-items: stretch;
  border-bottom: 1px solid #ECEFF1;
  cursor: pointer;
  transition: background-color 0.1s ease;
}
.overview-gantt__row:hover {
  background: #F5F7FA;
}
.overview-gantt__row:focus-within {
  background: #E3F2FD;
  outline: none;
}
.overview-gantt__label {
  flex-shrink: 0;
  padding: 6px 10px;
  border-right: 1px solid #ECEFF1;
  background: #fff;
  position: sticky;
  left: 0;
  z-index: 1;
}
.overview-gantt__label-top {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  color: #607D8B;
}
.overview-gantt__label-name {
  font-weight: 600;
  font-size: 13px;
  color: #263238;
  line-height: 1.3;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.overview-gantt__label-sub {
  font-size: 11px;
  color: #78909C;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.overview-gantt__lane {
  position: relative;
  flex-shrink: 0;
}
.overview-gantt__bar {
  position: absolute;
  top: 8px;
  bottom: 8px;
  background: #90CAF9;
  border: 1px solid #1976D2;
  border-radius: 3px;
}
.overview-gantt__bar--計画中  { background: #FFE082; border-color: #FFA000; }
.overview-gantt__bar--設計中  { background: #90CAF9; border-color: #1976D2; }
.overview-gantt__bar--施工中  { background: #A5D6A7; border-color: #388E3C; }
.overview-gantt__bar--竣工    { background: #CFD8DC; border-color: #607D8B; }
.overview-gantt__bar--中止    { background: #FFCDD2; border-color: #D32F2F; opacity: 0.6; }
.overview-gantt__ms {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  color: #D32F2F;
  font-size: 10px;
  line-height: 1;
  pointer-events: none;
}

/* ============================================================
 * 人別ビュー(v0.1.18)
 * ============================================================ */
.persons-legend {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  margin: 0 0 10px;
  padding: 8px 14px;
  background: #F5F7FA;
  border: 1px dashed #B0BEC5;
  border-radius: 4px;
  font-size: 12px;
  color: #546E7A;
}
.persons-legend__item {
  font-weight: 600;
  color: #455A64;
}
.persons-legend__chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  border-radius: 3px;
  font-size: 11px;
}
.persons-legend__chip--main {
  background: #FFF3E0;
  border: 1px solid #F57C00;
  color: #E65100;
}
.persons-legend__chip--track {
  background: #E3F2FD;
  border: 1px solid #1976D2;
  color: #0D47A1;
}
.persons-legend__chip--other {
  background: #ECEFF1;
  border: 1px solid #607D8B;
  color: #455A64;
}
.persons-gantt__row {
  cursor: default;
}
.persons-gantt__lane {
  position: relative;
}
.persons-gantt__bar {
  position: absolute;
  border: 1px solid;
  border-radius: 3px;
  padding: 0 4px;
  font-size: 11px;
  line-height: 20px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  cursor: pointer;
  transition: transform 0.1s ease, box-shadow 0.1s ease;
}
.persons-gantt__bar:hover {
  transform: translateY(-1px);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.15);
  z-index: 2;
}
.persons-gantt__bar--main {
  font-weight: 700;
}
.persons-gantt__bar--main::before {
  content: "★";
  margin-right: 3px;
  color: #F57C00;
}
.persons-gantt__bar--other {
  opacity: 0.85;
  background-image: repeating-linear-gradient(
    45deg,
    rgba(255,255,255,0.3),
    rgba(255,255,255,0.3) 3px,
    transparent 3px,
    transparent 6px
  );
}
.persons-gantt__bar-label {
  pointer-events: none;
}
