/* =================================================
   Base / Reset
   ================================================= */
html, body {
  height: 100%;
  margin: 0;
  padding: 0;
  background-color: #f5f5f5;
  user-select: none;
}

/* =================================================
   App Layout
   ================================================= */
#app {
  display: flex;
  flex-direction: row; /* 左：toolbar / 右：main */
  height: 100%;
  min-height: 0;
}

/* 右側メイン（上下分割） */
.main {
  flex: 1;
  display: flex;
  flex-direction: column; /* 上：menubar / 下：stage */
  min-height: 0;
}

/* SVG内テキスト選択禁止 */
svg text {
  user-select: none;
}

/* =================================================
   MenuBar（Top）
   ================================================= */
.menubar {
  display: flex;
  /*justify-content: space-between; 右詰め*/
  align-items: center;
  gap: 140px; /* ← タイトルとボタン群の余白 */

  height: 120px;
  padding: 0 0 0 40px;

  font-family: "Segoe UI", "Noto Sans JP", sans-serif;
}

/* タイトル */
.menubar-title {
  font-size: 28px;
  font-weight: 600;
  color: #999999;
  letter-spacing: 0.03em;
}

.menubar-title-sub {
  font-size: 15px;
}

/* 操作ボタン群 */
.menubar-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

/* メニューバーボタン */
.menubar-btn {
  display: flex;
  align-items: center;
  gap: 6px;

  height: 44px;
  padding: 0 14px;

  background: #ffffff;
  border: 1px solid #dddddd;
  border-radius: 8px;

  color: #666666;
  font-size: 18px;
  cursor: pointer;

  transition:
    background 0.15s ease,
    border-color 0.15s ease,
    color 0.15s ease;
}

.menubar-btn:hover {
  border-color: #ff5757;
  color: #ff5757;
}

.menubar-btn:active {
  background: #fff2f2;
}

/* 危険操作 */
.menubar-btn.danger {
  color: #ff5757;
  border-color: #ff5757;
}

.menubar-btn.danger:hover {
  background: #ff5757;
  color: #ffffff;
}

/* menubar 内のリンクをボタン表示にする */
.menubar-link {
  text-decoration: none;
}

/* =================================================
   Toolbar（Left）
   ================================================= */
.toolbar {
  display: flex;
  flex-direction: column;
  gap: 15px;
  padding: 40px 30px;

  background: #333333;
  border-right: 1px solid #222222;

  font-family: "Segoe UI", "Noto Sans JP", sans-serif;
}

/* ツールバーボタン */
.toolbar-btn {
  width: 100px;
  height: 70px;

  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 5px;

  background: #3f3f3f;
  border: 1px solid #555555;
  border-radius: 5px;

  color: #dddddd;
  cursor: pointer;

  transition:
    background 0.15s ease,
    border-color 0.15s ease,
    color 0.15s ease;
}

.toolbar-btn:hover {
  background: #4a4a4a;
  border-color: #777777;
}

/* アクティブ状態 */
.toolbar-btn.active {
  background: #ff5757;
  border-color: #ff5757;
  color: #ffffff;

  box-shadow: 0 8px 20px rgba(0,0,0,0.28);
}

/* アイコン */
.toolbar-icon {
  width: 50px;
  height: 50px;
  stroke: #dddddd;
  stroke-width: 1.9;
}

.toolbar-btn.active .toolbar-icon {
  stroke: #ffffff;
  stroke-width: 2.4;
}

/* ラベル */
.toolbar-text {
  font-size: 16px;
  font-weight: 500;
  letter-spacing: 0.03em;
}

/* =================================================
   Stage（Right Bottom）
   ================================================= */
.stage-container {
  flex: 1;
  overflow: auto;
}

.stage-scroll {
  width: 100%;
  height: 100%;
  overflow: auto;
  background: #f8f9fb;
}

/* =================================================
   Modal Common
   ================================================= */
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 1000;

  display: flex;
  align-items: center;
  justify-content: center;

  background: rgba(0,0,0,0.5);
}

/* =================================================
   Relation Modal
   ================================================= */
.relation-modal {
  background: #ffffff;
  padding: 24px;
  border-radius: 12px;
  max-width: 420px;
}

.relation-row {
  display: flex;
  gap: 12px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}

.relation-item {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  border: 1px solid #cccccc;
  background: #f5f5f5;
  cursor: pointer;
}

.relation-item:hover {
  background: #dddddd;
}

/* =================================================
   Color Modal
   ================================================= */
.color-modal {
  background: #ffffff;
  padding: 20px 28px;
  border-radius: 14px;
  min-width: 360px;

  box-shadow: 0 12px 30px rgba(0,0,0,0.2);
}

.color-modal-title {
  font-size: 18px;
  font-weight: bold;
  margin-bottom: 16px;
}

.color-row {
  display: flex;
  gap: 16px;
}

.color-item {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 2px solid #e0e0e0;
  cursor: pointer;
}

.color-item:hover {
  transform: scale(1.08);
  border-color: #999999;
}

/* =================================================
   Detail Modal
   ================================================= */
.detail-modal {
  background: #ffffff;
  padding: 24px;
  border-radius: 16px;
  width: 360px;
}

.detail-title {
  font-size: 20px;
  font-weight: bold;
  margin-bottom: 16px;
}

.detail-modal label {
  display: block;
  font-size: 14px;
  margin-top: 12px;
}

.detail-modal input[type="text"],
.detail-modal input[type="date"],
.detail-modal input[type="number"] {
  width: 100%;
  padding: 10px;
  margin-top: 4px;

  border-radius: 8px;
  border: 1px solid #dddddd;
  font-size: 16px;
}

.detail-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 20px;
}

.detail-ok {
  background: #ff5757;
  color: #ffffff;
  border: none;
  padding: 10px 18px;
  border-radius: 10px;
  font-size: 16px;
  cursor: pointer;
}










